DEV Community

Evan Lin
Evan Lin

Posted on • Originally published at evanlin.com on

[TIL] CitusCon2023 Presentation Reflections

title: [TIL] CitusCon2023 Conference Talk Related Thoughts
published: false
date: 2023-05-08 00:00:00 UTC
tags: 
canonical_url: http://www.evanlin.com/til-cituscon-2023-keynote/
Enter fullscreen mode Exit fullscreen mode

Keynote: - Distributed PostgresSQL Problems and How to Solve Them with Citus

What is Citus Postgres

Citus was started by the US company Citus Data and acquired by Microsoft in 20191. Citus is an extension of PostgreSQL, which can transform PostgreSQL into a distributed database with features such as sharding, a distributed SQL engine, reference tables, and distributed tables2. Microsoft also has related products, such as Azure PostgreSQL, which can accelerate the performance and scalability of PostgreSQL.

How to use Citus?

Citus Postgres is an extension built on top of PostgresSQL. You can find related processes in the open-source project https://github.com/citusdata/citus.

Directly use the managed service on Azure.

Azure Cosmos DB for PostgreSQL portal.

Or build your own through the open-source project

Reference: https://github.com/citusdata/citus#readme

curl https://install.citusdata.com/community/deb.sh > add-citus-repo.sh
sudo bash add-citus-repo.sh
sudo apt-get -y install postgresql-15-citus-11.3

Enter fullscreen mode Exit fullscreen mode

Add an extension lib

shared_preload_libraries = 'citus'

Enter fullscreen mode Exit fullscreen mode

Add a PostgresSQL Extension

CREATE EXTENSION citus;

Enter fullscreen mode Exit fullscreen mode

What's the difference between Azure Postgresql and CitusData Postgresql

Azure PostgreSQL is a Microsoft product, which is an extension of PostgreSQL that can accelerate the performance and scalability of PostgreSQL1. Citus is an extension of PostgreSQL, which can transform PostgreSQL into a distributed database with features such as sharding, a distributed SQL engine, reference tables, and distributed tables2. Therefore, both Citus and Azure PostgreSQL are extensions of PostgreSQL, but they have different functions.

Performance Comparison

image-20230509004802060

  • It can be seen that, although it is through Azure Cosmos DB for PostgresSQL (network version), the performance can beat CockroachDB and Yugabyte managed DB.

Postgres without SQL: Natural language queries using GPT-3 & Rust | Citus Con 2023

Using Rust to write a Postgres extension can use natural language to issue commands. JelteF/pg_human: #Postgres without SQL: Natural language queries using GPT-3 & Rusthttps://github.com/JelteF/pg_human

Video:

Key points:

  • By using Rust to write a Postgres extension, you can use text descriptions to create forms.
SELECT give_me_a_query_to('create tables for a todo app with multiple u
sers');

Enter fullscreen mode Exit fullscreen mode
  • You can learn how to install a postgres extension.

Top comments (0)