pgsql: Fix explicit valgrind interaction in read_stream.c.

2025-02-20 Thread Thomas Munro
Fix explicit valgrind interaction in read_stream.c. This is a back-patch of commits 2a8a0067 and 2509b857 into REL_17_STABLE. It's doesn't fix any known live bug in PostgreSQL v17 itself, but an extension could in theory have used the per-buffer data feature and seen spurious errors under Valgrin

pgsql: Fix explicit valgrind interaction in read_stream.c.

2025-02-14 Thread Thomas Munro
Fix explicit valgrind interaction in read_stream.c. By calling wipe_mem() on per-buffer data memory that has been released, we are also telling Valgrind that the memory is "noaccess". We need to set it to "undefined" before giving it to the registered callback to fill in, when a slot is reused.