]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Invalidate relcache for publications defined for all tables.
authorAmit Kapila <akapila@postgresql.org>
Wed, 8 Sep 2021 05:29:21 +0000 (10:59 +0530)
committerAmit Kapila <akapila@postgresql.org>
Wed, 8 Sep 2021 05:50:42 +0000 (11:20 +0530)
commit96e38fa5e549e9891b0f0dc3baf41e273ad3ede5
tree3e79e2402721e801918b3f9dca39aecf4036e62c
parent90b4647f63dae68181557d244717a7615831243d
Invalidate relcache for publications defined for all tables.

Updates/Deletes on a relation were allowed even without replica identity
after we define the publication for all tables. This would later lead to
an error on subscribers. The reason was that for such publications we were
not invalidating the relcache and the publication information for
relations was not getting rebuilt. Similarly, we were not invalidating the
relcache after dropping of such publications which will prohibit
Updates/Deletes without replica identity even without any publication.

Author: Vignesh C and Hou Zhijie
Reviewed-by: Hou Zhijie, Kyotaro Horiguchi, Amit Kapila
Backpatch-through: 10, where it was introduced
Discussion: https://postgr.es/m/CALDaNm0pF6zeWqCA8TCe2sDuwFAy8fCqba=nHampCKag-qLixg@mail.gmail.com
src/backend/commands/publicationcmds.c
src/test/regress/expected/publication.out
src/test/regress/sql/publication.sql