pgsql: Fix use of relcache TriggerDesc field introduced by commit 05c84

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix use of relcache TriggerDesc field introduced by commit 05c84
Date: 2021-03-12 09:49:10
Message-ID: E1lKePu-0002Ez-Tl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix use of relcache TriggerDesc field introduced by commit 05c8482f7f.

The commit added code which used a relcache TriggerDesc field across
another cache access, which it shouldn't because the relcache doesn't
guarantee it won't get moved.

Diagnosed-by: Tom Lane
Author: Greg Nancarrow
Reviewed-by: Hou Zhijie, Amit Kapila
Discussion: https://postgr.es/m/2309260.1615485644@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/util/clauses.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2021-03-12 10:16:21 pgsql: Fix size overflow in calculation introduced by commits d6ad34f3
Previous Message Thomas Munro 2021-03-12 06:55:21 pgsql: Add condition variable for walreceiver shutdown.