Re: autovacuum_freeze_max_age on append-only tables

2022-04-22 Thread Senor
Thanks David In any case the cost-based stuff throttles I/O only (per the docs at least) but even while sleeping it still holds its lock.  And it won't be kicked off of the lock by other processes.  I don't see where it is documented that the autovacuum cost settings are altered during the ant

Re: Logical subscription / publication lifetimes

2022-04-22 Thread andrew cooke
Ah, thanks! I should have read the documentation of all the parameters! So the portion of data that is covered by "copy_data" is going to reflect updates and deletes prior to the creation of the slot even if "publish=insert" (only)? This makes sense because I can't see how else it could be pra

Re: Logical subscription / publication lifetimes

2022-04-22 Thread David G. Johnston
On Fri, Apr 22, 2022 at 5:00 AM andrew cooke wrote: > > If I define a publication at time Tp, then load some data on the > publisher, then start a subscription at time Ts, then load some more > data on the publisher, does the subscriber get data from Tp or Ts > onwards? > > It depends. By defaul

Re: logical replication worker can't find postgis function

2022-04-22 Thread Willy-Bas Loos
OK thanks for the help, have a nice weekend! On Fri, Apr 22, 2022 at 3:39 PM Laurenz Albe wrote: > On Fri, 2022-04-22 at 15:26 +0200, Willy-Bas Loos wrote: > > On Fri, Apr 22, 2022 at 3:20 PM Laurenz Albe > wrote: > > > > > > The trigger function is bad and dangerous, because it relies on the >

Re: logical replication worker can't find postgis function

2022-04-22 Thread Laurenz Albe
On Fri, 2022-04-22 at 15:26 +0200, Willy-Bas Loos wrote: > On Fri, Apr 22, 2022 at 3:20 PM Laurenz Albe wrote: > > > > The trigger function is bad and dangerous, because it relies on the current > > setting of "search_path". > > > > You notice that with logical replication, because "search_path

Re: logical replication worker can't find postgis function

2022-04-22 Thread Willy-Bas Loos
On Fri, Apr 22, 2022 at 3:20 PM Laurenz Albe wrote: > > The trigger function is bad and dangerous, because it relies on the > current setting of "search_path". > > You notice that with logical replication, because "search_path" is empty > to avoid security problems. > Thanks a lot! Do you mean t

Re: logical replication worker can't find postgis function

2022-04-22 Thread Laurenz Albe
On Fri, 2022-04-22 at 13:25 +0200, Willy-Bas Loos wrote: > I'm using logical replication on postgresql 13. On the subscriber, there's a > trigger on a table that calculates the area of the geometry that's in another > column. > I enabled the trigger with > ALTER TABLE atable ENABLE ALWAYS TRIGG

Logical subscription / publication lifetimes

2022-04-22 Thread andrew cooke
If I define a publication at time Tp, then load some data on the publisher, then start a subscription at time Ts, then load some more data on the publisher, does the subscriber get data from Tp or Ts onwards? Also, if a subscription is disabled and then re-enabled does it lose the data inbetween

logical replication worker can't find postgis function

2022-04-22 Thread Willy-Bas Loos
Hi! I'm using logical replication on postgresql 13. On the subscriber, there's a trigger on a table that calculates the area of the geometry that's in another column. I enabled the trigger with ALTER TABLE atable ENABLE ALWAYS TRIGGER atrigger; But the logical replication worker can't find st_are