Re: Bugs in pgoutput.c

2022-02-04 Thread Amit Kapila
On Thu, Feb 3, 2022 at 5:24 PM Amit Kapila wrote: > > On Thu, Feb 3, 2022 at 8:18 AM Tom Lane wrote: > > > > Amit Kapila writes: > > > Tom, is it okay for you if I go ahead with this patch after some testing? > > > > I've been too busy to get back to it, so sure. > > > > Thanks. I have tested

Re: Bugs in pgoutput.c

2022-02-03 Thread Amit Kapila
On Thu, Feb 3, 2022 at 8:18 AM Tom Lane wrote: > > Amit Kapila writes: > > Tom, is it okay for you if I go ahead with this patch after some testing? > > I've been too busy to get back to it, so sure. > Thanks. I have tested the patch by generating an invalidation message for table DDL before

Re: Bugs in pgoutput.c

2022-02-02 Thread Tom Lane
Amit Kapila writes: > Tom, is it okay for you if I go ahead with this patch after some testing? I've been too busy to get back to it, so sure. regards, tom lane

Re: Bugs in pgoutput.c

2022-02-02 Thread Amit Kapila
On Sat, Jan 29, 2022 at 8:32 AM Amit Kapila wrote: > > On Thu, Jan 6, 2022 at 3:42 AM Tom Lane wrote: > > > > Commit 6ce16088b caused me to look at pgoutput.c's handling of > > cache invalidations, and I was pretty appalled by what I found. > > > > * rel_sync_cache_relation_cb does the wrong

Re: Bugs in pgoutput.c

2022-01-28 Thread Amit Kapila
On Thu, Jan 6, 2022 at 3:42 AM Tom Lane wrote: > > Commit 6ce16088b caused me to look at pgoutput.c's handling of > cache invalidations, and I was pretty appalled by what I found. > > * rel_sync_cache_relation_cb does the wrong thing when called for > a cache flush (i.e., relid == 0). Instead of

Re: Bugs in pgoutput.c

2022-01-06 Thread Amit Kapila
On Fri, Jan 7, 2022 at 1:28 AM Tom Lane wrote: > > Amit Kapila writes: > > > + * *during* a callback if we do any syscache or table access in the > > + * callback. > > > As we don't take locks on tables, can invalidation events be accepted > > during table access? I could be missing something

Re: Bugs in pgoutput.c

2022-01-06 Thread Robert Haas
On Thu, Jan 6, 2022 at 2:58 PM Tom Lane wrote: > That might be okay for the system catalog entries, but I don't see > how it prevents some other session from dropping the table entirely, > thereby causing the on-disk storage to go away. Is it guaranteed > that logical decoding will never try to

Re: Bugs in pgoutput.c

2022-01-06 Thread Tom Lane
Amit Kapila writes: > On Thu, Jan 6, 2022 at 3:42 AM Tom Lane wrote: >> Also ... maybe I'm not looking in the right place, but I do not >> see anything anywhere in logical decoding that is taking any lock >> on the relation being processed. How can that be safe? > We don't need to acquire a

Re: Bugs in pgoutput.c

2022-01-05 Thread Amit Kapila
On Thu, Jan 6, 2022 at 3:42 AM Tom Lane wrote: > > Commit 6ce16088b caused me to look at pgoutput.c's handling of > cache invalidations, and I was pretty appalled by what I found. > > * rel_sync_cache_relation_cb does the wrong thing when called for > a cache flush (i.e., relid == 0). Instead of

Bugs in pgoutput.c

2022-01-05 Thread Tom Lane
Commit 6ce16088b caused me to look at pgoutput.c's handling of cache invalidations, and I was pretty appalled by what I found. * rel_sync_cache_relation_cb does the wrong thing when called for a cache flush (i.e., relid == 0). Instead of invalidating all RelationSyncCache entries as it should,