Re: Allowing TRUNCATE of FK target when session_replication_role=replica

2023-10-31 Thread Euler Taveira
On Tue, Oct 31, 2023, at 3:21 PM, Hannu Krosing wrote: > One thing though re: > > The former is true but the latter is not. Logical replication requires > > wal_level = logical. That's also true for skipping FSM. > > wal_level=logical is only needed *at provider* side, at least when > running pg

Re: Allowing TRUNCATE of FK target when session_replication_role=replica

2023-10-31 Thread Hannu Krosing
Thanks for the pointers. One thing though re: > The former is true but the latter is not. Logical replication requires > wal_level = logical. That's also true for skipping FSM. wal_level=logical is only needed *at provider* side, at least when running pglogical. Also, even for native logical rep

Re: Allowing TRUNCATE of FK target when session_replication_role=replica

2023-10-31 Thread Euler Taveira
On Tue, Oct 31, 2023, at 5:09 AM, Hannu Krosing wrote: > Currently we do not allow TRUNCATE of a table when any Foreign Keys > point to that table. It is allowed iif you *also* truncate all tables referencing it. > At the same time we do allow one to delete all rows when > session_replication_rol

Allowing TRUNCATE of FK target when session_replication_role=replica

2023-10-31 Thread Hannu Krosing
Hi Currently we do not allow TRUNCATE of a table when any Foreign Keys point to that table. At the same time we do allow one to delete all rows when session_replication_role=replica This causes all kinds of pain when trying to copy in large amounts of data, especially at the start of logical rep