Re: [PATCH] Extending FK check skipping on replicas to ADD FK and TRUNCATE

2025-07-06 Thread Hannu Krosing
And now it also passes tests. Still learning about the git way of generating PostgreSQL patches, that's why there are two separate ones On Sun, Jul 6, 2025 at 4:30 PM Hannu Krosing wrote: > > Managed to send wrong patch earlier, this one actually compiles > > On Sun, Jul 6, 2025 at 1:48 PM Hannu

Re: [PATCH] Extending FK check skipping on replicas to ADD FK and TRUNCATE

2025-07-06 Thread Hannu Krosing
Managed to send wrong patch earlier, this one actually compiles On Sun, Jul 6, 2025 at 1:48 PM Hannu Krosing wrote: > > Here is a rebased patch > > this time I did not indent the part under > if(SessionReplicationRole != SESSION_REPLICATION_ROLE_REPLICA) > { > ... ( > } > > so it is immediately o

Re: [PATCH] Extending FK check skipping on replicas to ADD FK and TRUNCATE

2025-07-06 Thread Hannu Krosing
Here is a rebased patch this time I did not indent the part under if(SessionReplicationRole != SESSION_REPLICATION_ROLE_REPLICA) { ... ( } so it is immediately obviuos from the patch what is added. I can add the indent later, or just let pg_ident take care of this in due time On Sat, May 24, 20

Re: [PATCH] Extending FK check skipping on replicas to ADD FK and TRUNCATE

2025-05-24 Thread Hannu Krosing
I would also argue for treating this as a bug and back-porting to all supported versions - a quick look at v13 seems to confirm that the wrapped code has not changed at least since then. I don't think we can claim the current state is Working As Intended unless someone stands up and says they real

[PATCH] Extending FK check skipping on replicas to ADD FK and TRUNCATE

2025-05-24 Thread Hannu Krosing
Hello Everybody, Currently setting `session_replication_role` to `replica` disables foreign key checks allowing, among other things, free table copy order and faster CDC apply in logical replication. But two other cases of foreign keys are still restricted or blocked even with this setting 1. F