pgsql: Fix variable initialization when using buffering build with GiST

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix variable initialization when using buffering build with GiST
Date: 2019-07-10 06:17:05
Message-ID: E1hl5ub-0004eC-1E@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix variable initialization when using buffering build with GiST

This can cause valgrind to complain, as the flag marking a buffer as a
temporary copy was not getting initialized.

While on it, fill in with zeros newly-created buffer pages. This does
not matter when loading a block from a temporary file, but it makes the
push of an index tuple into a new buffer page safer.

This has been introduced by 1d27dcf, so backpatch all the way down to
9.4.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/15899-0d24fb273b3dd90c@postgresql.org
Backpatch-through: 9.4

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/access/gist/gistbuildbuffers.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-07-10 07:01:22 Re: pgsql: Propagate trigger arguments to partitions
Previous Message Alexander Korotkov 2019-07-10 04:52:06 pgsql: Assorted fixes for jsonpath documentation