4 ms·
I’m already loving PG10’s native partitioning support. PG11 closes the loop on a few convenience features like being able to set foreign and primary keys at the
by shrumm 8y ago
I’m already loving PG10’s native partitioning support. PG11 closes the loop on a few convenience features like being able to set foreign and primary keys at the master table level. With PG10 I can’t use ON CONFLICT clauses - looking forward to upgrading and sorting that out.
- welder 8y agoCheck out TimescaleDB, a Postgres extension that auto-creates partition tables for you while PG11 native partitioning you still need to manually run CREATE TABLE. https://news.ycombinator.com/item?id=18026699 https://news.ycombinator.com/item?id=18026699
- shrumm 8y agowould love to but this is a no-go at this point, since I’m on RDS. I think it’s great you’re solving this though - I currently use a cron job to create new partitions.
- LunaSea 8y agoI encountered the same limitations as you while implementing partitioning a few months ago and it's possible to use ON CONFLICT if the unique index is set on the partitioned table. So after initialising a new partition, I also create a unique index attached to that partition directly instead of the parent table.
- shrumm 8y agowow thanks, I never thought to try it, just dismissed it and never dig further. I’ll try this!