Logical replication claims to work, not working - new tables

2024-01-20 Thread Chris Angelico
PostgreSQL 15 on Debian, both ends of replication. I'm doing logical replication in a bit of a complex setup. Not sure how much of this is relevant so I'll give you a lot of detail; sorry if a lot of this is just noise. * Bidirectional alternating-master replication. Since I'm still on PG 15, the

Re: Logical replication claims to work, not working - new tables

2024-01-21 Thread Chris Angelico
On Mon, 22 Jan 2024 at 05:25, Justin wrote: > > When using replica set to full this kicks off a full table scan for each > update or delete this is very expensive. If there are no errors being > reported you will find it is working but hung doing full scans. Inserts are > just appended to e

Re: Logical replication claims to work, not working - new tables

2024-01-21 Thread Chris Angelico
On Mon, 22 Jan 2024 at 05:50, Chris Angelico wrote: > > On Mon, 22 Jan 2024 at 05:25, Justin wrote: > > Adding a primary key will fix this issue. Note PG 16 can use indexes to > > find qualifying rows when a table's replica is set to full. > > I'll try dro

Logical replication and AFTER UPDATE triggers [PG 16]

2024-02-01 Thread Chris Angelico
After various iterations of logical on PG 15, I bit the bullet and installed PG 16. (Using the bookworm-pgdg repository.) Turns out, that basically solved all the problems I'd been having previously - yay! Got a bit of a curveball thrown at me though. I have a singleton settings table (see other t

Re: Logical replication and AFTER UPDATE triggers [PG 16]

2024-02-02 Thread Chris Angelico
On Fri, 2 Feb 2024 at 13:20, Chris Angelico wrote: > create or replace function send_settings_notification() returns > trigger language plpgsql as $$begin perform > pg_notify('stillebot.settings', ''); return null; end$$; > create trigger settin