pgsql: hio: Release extension lock before initializing page / pinning V

2023-04-01 Thread Andres Freund
hio: Release extension lock before initializing page / pinning VM PageInit() while holding the extension lock is unnecessary after 0d1fe9f74e3 started to use RBM_ZERO_AND_LOCK - nobody can look at the new page before we release the page lock. PageInit() zeroes the page, which isn't that cheap, so

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

2023-04-01 Thread Andres Freund
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* va

pgsql: Pass down table relation into more index relation functions

2023-04-01 Thread Andres Freund
Pass down table relation into more index relation functions This is done in preparation for logical decoding on standby, which needs to include whether visibility affecting WAL records are about a (user) catalog table. Which is only known for the table, not the indexes. It's also nice to be able