pgsql: Fix stale values in partition map entries on subscribers.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix stale values in partition map entries on subscribers.
Date: 2022-06-21 10:19:31
Message-ID: E1o3ayp-0016GH-Kf@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix stale values in partition map entries on subscribers.

We build the partition map entries on subscribers while applying the
changes for update/delete on partitions. The component relation in each
entry is closed after its use so we need to update it on successive use of
cache entries.

This problem was there since the original commit f1ac27bfda that
introduced this code but we didn't notice it till the recent commit
26b3455afa started to use the component relation of partition map cache
entry.

Reported-by: Tom Lane, as per buildfarm
Author: Amit Langote, Hou Zhijie
Reviewed-by: Amit Kapila, Shi Yu
Backpatch-through: 13, where it was introduced
Discussion: https://postgr.es/m/OSZPR01MB6310F46CD425A967E4AEF736FDA49@OSZPR01MB6310.jpnprd01.prod.outlook.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f0022a77d011411d8314e1e554e182d0ab8e142e

Modified Files
--------------
src/backend/replication/logical/relation.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2022-06-21 11:56:10 Re: pgsql: Fix partition table's REPLICA IDENTITY checking on the subscribe
Previous Message Peter Eisentraut 2022-06-21 09:33:51 pgsql: doc: Make some synopsis punctuation consistent