agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Turn visibilitymap_clear() Assert back into an error
2+ messages / 1 participants
[nested] [flat]

* pgsql: Turn visibilitymap_clear() Assert back into an error
@ 2026-07-17 20:48  Melanie Plageman <melanieplageman@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Melanie Plageman @ 2026-07-17 20:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Turn visibilitymap_clear() Assert back into an error

Commit ed62d26caca fixed a bug in clearing the visibility map and, while
doing so, made some incidental changes to visibilitymap_clear(). One of
them replaced the error thrown when the wrong buffer is passed to
visibilitymap_clear() with an Assert().

While anyone adding a new visibilitymap_clear() caller should be running
assert-enabled builds, visibilitymap_set() still reports the same
wrong-buffer condition with an elog(ERROR), so visibilitymap_clear()
should also do so for consistency. This change was also unrelated to
the bug fix and is better made as a separate commit. Restore the error.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwF_PzOv5y7ucFh7Fqqqa8ar83zYwvWugqarRD6%2B7GCtEQ%40mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4dbc54506c328a03070bf1a98309bdc05dac331d

Modified Files
--------------
src/backend/access/heap/visibilitymap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Turn visibilitymap_clear() Assert back into an error
@ 2026-07-17 20:50  Melanie Plageman <melanieplageman@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Melanie Plageman @ 2026-07-17 20:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Turn visibilitymap_clear() Assert back into an error

Commit ed62d26caca fixed a bug in clearing the visibility map and, while
doing so, made some incidental changes to visibilitymap_clear(). One of
them replaced the error thrown when the wrong buffer is passed to
visibilitymap_clear() with an Assert().

While anyone adding a new visibilitymap_clear() caller should be running
assert-enabled builds, visibilitymap_set() still reports the same
wrong-buffer condition with an elog(ERROR), so visibilitymap_clear()
should also do so for consistency. This change was also unrelated to
the bug fix and is better made as a separate commit. Restore the error.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwF_PzOv5y7ucFh7Fqqqa8ar83zYwvWugqarRD6%2B7GCtEQ%40mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3180ce3d7a836e7fbcf8946a0e0be9f263353481

Modified Files
--------------
src/backend/access/heap/visibilitymap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-17 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17 20:48 pgsql: Turn visibilitymap_clear() Assert back into an error Melanie Plageman <melanieplageman@gmail.com>
2026-07-17 20:50 pgsql: Turn visibilitymap_clear() Assert back into an error Melanie Plageman <melanieplageman@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox