pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix cache look-up failures while applying changes in logical rep
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix cache look-up failures while applying changes in logical rep
@ 2022-06-15 05:03  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2022-06-15 05:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix cache look-up failures while applying changes in logical replication.

While building a new attrmap which maps partition attribute numbers to
remoterel's, we incorrectly update the map for dropped column attributes.
Later, it caused cache look-up failure when we tried to use the map to
fetch the information about attributes.

This also fixes the partition map cache invalidation which was using the
wrong type cast to fetch the entry. We were using stale partition map
entry after invalidation which leads to the assertion or cache look-up
failure.

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/16f5a8da76f21576987790df828082cb7bb1bdad

Modified Files
--------------
src/backend/replication/logical/relation.c | 62 ++++++++++++++++++------------
src/test/subscription/t/013_partition.pl   | 58 +++++++++++++++++++++++++---
2 files changed, 90 insertions(+), 30 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix cache look-up failures while applying changes in logical rep
@ 2022-06-15 05:03  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2022-06-15 05:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix cache look-up failures while applying changes in logical replication.

While building a new attrmap which maps partition attribute numbers to
remoterel's, we incorrectly update the map for dropped column attributes.
Later, it caused cache look-up failure when we tried to use the map to
fetch the information about attributes.

This also fixes the partition map cache invalidation which was using the
wrong type cast to fetch the entry. We were using stale partition map
entry after invalidation which leads to the assertion or cache look-up
failure.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5a97b1325453d641a795710a92b233c665b662b1

Modified Files
--------------
src/backend/replication/logical/relation.c | 62 ++++++++++++++++++------------
src/test/subscription/t/013_partition.pl   | 56 +++++++++++++++++++++++++--
2 files changed, 89 insertions(+), 29 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix cache look-up failures while applying changes in logical rep
@ 2022-06-15 05:03  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2022-06-15 05:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix cache look-up failures while applying changes in logical replication.

While building a new attrmap which maps partition attribute numbers to
remoterel's, we incorrectly update the map for dropped column attributes.
Later, it caused cache look-up failure when we tried to use the map to
fetch the information about attributes.

This also fixes the partition map cache invalidation which was using the
wrong type cast to fetch the entry. We were using stale partition map
entry after invalidation which leads to the assertion or cache look-up
failure.

Reported-by: Shi Yu
Author: Hou Zhijie, Shi Yu
Reviewed-by: Amit Langote, Amit Kapila
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/d457cb4e8a5e25fe16420cb91cb8450d8fca49d3

Modified Files
--------------
src/backend/replication/logical/relation.c | 62 ++++++++++++++++++------------
src/test/subscription/t/013_partition.pl   | 58 +++++++++++++++++++++++++---
2 files changed, 90 insertions(+), 30 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-06-15 05:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 05:03 pgsql: Fix cache look-up failures while applying changes in logical rep Amit Kapila <akapila@postgresql.org>
2022-06-15 05:03 pgsql: Fix cache look-up failures while applying changes in logical rep Amit Kapila <akapila@postgresql.org>
2022-06-15 05:03 pgsql: Fix cache look-up failures while applying changes in logical rep Amit Kapila <akapila@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox