pgsql: Make some xlogreader messages more accurate

2023-03-01 Thread Peter Eisentraut
Make some xlogreader messages more accurate When you have some invalid WAL, you often get a message like "wanted 24, got 0". This is a bit incorrect, since it really wanted *at least* 24, not exactly 24. This updates the messages to that effect, and also adds that detail to one message where it

pgsql: pageinspect: Fix crash with gist_page_items()

2023-03-01 Thread Michael Paquier
pageinspect: Fix crash with gist_page_items() Attempting to use this function with a raw page not coming from a GiST index would cause a crash, as it was missing the same sanity checks as gist_page_items_bytea(). This slightly refactors the code so as all the basic validation checks for GiST page

pgsql: pageinspect: Fix crash with gist_page_items()

2023-03-01 Thread Michael Paquier
pageinspect: Fix crash with gist_page_items() Attempting to use this function with a raw page not coming from a GiST index would cause a crash, as it was missing the same sanity checks as gist_page_items_bytea(). This slightly refactors the code so as all the basic validation checks for GiST page

pgsql: pageinspect: Fix crash with gist_page_items()

2023-03-01 Thread Michael Paquier
pageinspect: Fix crash with gist_page_items() Attempting to use this function with a raw page not coming from a GiST index would cause a crash, as it was missing the same sanity checks as gist_page_items_bytea(). This slightly refactors the code so as all the basic validation checks for GiST page

pgsql: Avoid fetching one past the end of translate()'s "to" parameter.

2023-03-01 Thread Tom Lane
Avoid fetching one past the end of translate()'s "to" parameter. This is usually harmless, but if you were very unlucky it could provoke a segfault due to the "to" string being right up against the end of memory. Found via valgrind testing (so we might've found it earlier, except that our regress

pgsql: Avoid fetching one past the end of translate()'s "to" parameter.

2023-03-01 Thread Tom Lane
Avoid fetching one past the end of translate()'s "to" parameter. This is usually harmless, but if you were very unlucky it could provoke a segfault due to the "to" string being right up against the end of memory. Found via valgrind testing (so we might've found it earlier, except that our regress

pgsql: Avoid fetching one past the end of translate()'s "to" parameter.

2023-03-01 Thread Tom Lane
Avoid fetching one past the end of translate()'s "to" parameter. This is usually harmless, but if you were very unlucky it could provoke a segfault due to the "to" string being right up against the end of memory. Found via valgrind testing (so we might've found it earlier, except that our regress

pgsql: Avoid fetching one past the end of translate()'s "to" parameter.

2023-03-01 Thread Tom Lane
Avoid fetching one past the end of translate()'s "to" parameter. This is usually harmless, but if you were very unlucky it could provoke a segfault due to the "to" string being right up against the end of memory. Found via valgrind testing (so we might've found it earlier, except that our regress

pgsql: Avoid fetching one past the end of translate()'s "to" parameter.

2023-03-01 Thread Tom Lane
Avoid fetching one past the end of translate()'s "to" parameter. This is usually harmless, but if you were very unlucky it could provoke a segfault due to the "to" string being right up against the end of memory. Found via valgrind testing (so we might've found it earlier, except that our regress

pgsql: Avoid fetching one past the end of translate()'s "to" parameter.

2023-03-01 Thread Tom Lane
Avoid fetching one past the end of translate()'s "to" parameter. This is usually harmless, but if you were very unlucky it could provoke a segfault due to the "to" string being right up against the end of memory. Found via valgrind testing (so we might've found it earlier, except that our regress

pgsql: Fix condition in pg_dump TAP test

2023-03-01 Thread Tomas Vondra
Fix condition in pg_dump TAP test The condition checking compression support was parenthesized incorrectly after adding lz4, so fix that. Reported-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.or

pgsql: Improve wording in pg_dump compression docs

2023-03-01 Thread Tomas Vondra
Improve wording in pg_dump compression docs A couple minor corrections in pg_dump comments and docs, related to the recently introduced compression API. Reported-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://gi