pgsql: Assert only valid flag bits are passed to visibilitymap_set()

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Assert only valid flag bits are passed to visibilitymap_set()
Date: 2023-04-02 02:19:31
Message-ID: E1pinJZ-000w0f-OJ@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Assert only valid flag bits are passed to visibilitymap_set()

If visibilitymap_set() is called with flags containing a higher bit than
VISIBILITYMAP_ALL_FROZEN, the state of neighboring pages is affected. While
there was an assertion that *some* valid bits were set, it did not check
that *only* valid bits were. Change that.

Discussion: https://postgr.es/m/20230331043300.gux3s5wzrapqi4oe@awork3.anarazel.de

Branch
------
master

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

Modified Files
--------------
src/backend/access/heap/visibilitymap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2023-04-02 03:37:50 pgsql: Pass down table relation into more index relation functions
Previous Message Andres Freund 2023-04-02 00:54:20 pgsql: hio: Release extension lock before initializing page / pinning V