pgsql: Fix subscriber invalid memory access on DDL.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix subscriber invalid memory access on DDL.
Date: 2019-12-18 03:06:15
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix subscriber invalid memory access on DDL.

This patch allows building the local relmap cache for a subscribed
relation after processing pending invalidation messages and potential
relcache updates. Without this, the attributes in the local cache don't
tally with the updated relcache entry leading to invalid memory access.

Reported-by Jehan-Guillaume de Rorthais
Author: Jehan-Guillaume de Rorthais and Vignesh C
Reviewed-by: Amit Kapila
Backpatch-through: 10
Discussion: https://postgr.es/m/20191025175929.7e90dbf5@firost

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/04c8a69c0cccbc271e0feeb22a74c69fbd87c37e

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

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-12-18 07:25:49 pgsql: Refactor attribute mappings used in logical tuple conversion
Previous Message Michael Paquier 2019-12-18 02:09:34 pgsql: Doc: Improve readability of options for REINDEX