Least painful way to undistribute?

23 views
Skip to first unread message

Phil Budne

unread,
Mar 10, 2022, 6:51:40 PM3/10/22
to citus-users
I've been called in to look at a system that had most of its tables distributed using citus, BUT has only one node (so everything is local).  I don't think the users are seeing ANY benefit, and are seeing UPDATEs running serially, and the PG main process being hammered with new connections and running near 100% of the time (interposing pgBouncer helped, but then some queries were timing out).

Some of the tables contain >2 billion rows (they were sharded a the same time their primary keys were increased from int to long).  The system was down two weeks to do the conversion, and the result was a backlog of 22 million "jobs" to be processed (which will result in multiple rows generated).

All tables look to be distributed by hash into 128 shards.

My first wish would be to make the tables into local partitioned tables, and my second would be to set up a downstream replica that is unsharded, and can be made the primary once replication is complete.

I didn't even know about citus before being called in to look at this, and I'm not a database person by trade, so please be kind, if possible!

Thanks in advance!
Phil

Reply all
Reply to author
Forward
0 new messages