Re: Logical replication - schema change not invalidating the relation cache - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Logical replication - schema change not invalidating the relation cache
Date
Msg-id 2342961.1672868861@sss.pgh.pa.us
Whole thread Raw
In response to Re: Logical replication - schema change not invalidating the relation cache  (vignesh C <vignesh21@gmail.com>)
Responses Re: Logical replication - schema change not invalidating the relation cache
List pgsql-hackers
vignesh C <vignesh21@gmail.com> writes:
> [ v3-0001-Fix-for-invalidating-logical-replication-relation.patch ]

(btw, please don't send multiple patch versions with the same number,
it's very confusing.)

I looked briefly at this patch.  I wonder why you wrote a whole new
callback function instead of just using rel_sync_cache_publication_cb
for this case too.

The bigger picture here though is that in examples such as the one
you gave at the top of the thread, it's not very clear to me that
there's *any* principled behavior.  If the connection between publisher
and subscriber tables is only the relation name, fine ... but exactly
which relation name applies?  If you've got a transaction that is both
inserting some data and renaming the table, it's really debatable which
insertions should be sent under which name(s).  So how much should we
actually care about such cases?  Do we really want to force a cache flush
any time somebody changes a (possibly unrelated) pg_namespace entry?
We could be giving up significant performance and not accomplishing much
except changing from one odd behavior to a different one.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Rework of collation code, extensibility
Next
From: Andres Freund
Date:
Subject: Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler?