pgsql: Improve error reporting of recovery test 027_stream_regress

2025-12-05 Thread Michael Paquier
Improve error reporting of recovery test 027_stream_regress Previously, the 027_stream_regress test reported the full contents of regression.diffs upon a test failure, when the standby and the primary were still alive. If a test fails quite badly, the amount of information reported can be really

pgsql: Add PostgreSQL::Test::Cluster::read_head_tail() helper to Postgr

2025-12-05 Thread Michael Paquier
Add PostgreSQL::Test::Cluster::read_head_tail() helper to PostgreSQL/Utils.pm This function reads the lines from a file and filters its contents to report its head and tail contents. The amount of contents to read from a file can be tuned by the environment variable PG_TEST_FILE_READ_LINES, that

pgsql: Fix text substring search for non-deterministic collations.

2025-12-05 Thread Tom Lane
Fix text substring search for non-deterministic collations. Due to an off-by-one error, the code failed to find matches at the end of the haystack. Fix by rewriting the loop. While at it, fix a comment that claimed that the function could find a zero-length match. Such a match could send a call

pgsql: Fix text substring search for non-deterministic collations.

2025-12-05 Thread Tom Lane
Fix text substring search for non-deterministic collations. Due to an off-by-one error, the code failed to find matches at the end of the haystack. Fix by rewriting the loop. While at it, fix a comment that claimed that the function could find a zero-length match. Such a match could send a call

pgsql: Fix test to work with non-8kB block sizes

2025-12-05 Thread Heikki Linnakangas
Fix test to work with non-8kB block sizes Author: Maxim Orlov Discussion: https://www.postgresql.org/message-id/CACG%3Dezbtm%2BLOzEMyLX7rzGcAv3ez3F6nNpSJjvZeMzed0Oe6Pw%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7c2061bdfba7c738dac1e2c14db51fa

pgsql: Add commit 86b276a4a9 to .git-blame-ignore-revs.

2025-12-05 Thread Nathan Bossart
Add commit 86b276a4a9 to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d0d873c382cd23f3a49511e2bda35b4bf068c92d Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Don't reset the pathlist of partitioned joinrels.

2025-12-05 Thread Robert Haas
Don't reset the pathlist of partitioned joinrels. apply_scanjoin_target_to_paths wants to avoid useless work and platform-specific dependencies by throwing away the path list created prior to applying the final scan/join target and constructing a whole new one using the final scan/join target. How

pgsql: Fix some cases of indirectly casting away const.

2025-12-05 Thread Tom Lane
Fix some cases of indirectly casting away const. Newest versions of gcc are able to detect cases where code implicitly casts away const by assigning the result of strchr() or a similar function applied to a "const char *" value to a target variable that's just "char *". This of course creates a h

pgsql: Stabilize tests some more

2025-12-05 Thread Álvaro Herrera
Stabilize tests some more Tests added by commits 90eae926abbb, 2bc7e886fc1b, bc32a12e0db2 have occasionally failed, depending on timing. Add some dependency markers to the spec to try and remove the instability. Author: Mihail Nikalayeu Discussion: https://postgr.es/m/202512041739.sgg3tb2yobe2@

pgsql: Fix setting next multixid's offset at offset wraparound

2025-12-05 Thread Heikki Linnakangas
Fix setting next multixid's offset at offset wraparound In commit 789d65364c, we started updating the next multixid's offset too when recording a multixid, so that it can always be used to calculate the number of members. I got it wrong at offset wraparound: we need to skip over offset 0. Fix that

pgsql: Fix setting next multixid's offset at offset wraparound

2025-12-05 Thread Heikki Linnakangas
Fix setting next multixid's offset at offset wraparound In commit 789d65364c, we started updating the next multixid's offset too when recording a multixid, so that it can always be used to calculate the number of members. I got it wrong at offset wraparound: we need to skip over offset 0. Fix that

pgsql: Fix setting next multixid's offset at offset wraparound

2025-12-05 Thread Heikki Linnakangas
Fix setting next multixid's offset at offset wraparound In commit 789d65364c, we started updating the next multixid's offset too when recording a multixid, so that it can always be used to calculate the number of members. I got it wrong at offset wraparound: we need to skip over offset 0. Fix that

pgsql: Fix setting next multixid's offset at offset wraparound

2025-12-05 Thread Heikki Linnakangas
Fix setting next multixid's offset at offset wraparound In commit 789d65364c, we started updating the next multixid's offset too when recording a multixid, so that it can always be used to calculate the number of members. I got it wrong at offset wraparound: we need to skip over offset 0. Fix that

pgsql: Fix setting next multixid's offset at offset wraparound

2025-12-05 Thread Heikki Linnakangas
Fix setting next multixid's offset at offset wraparound In commit 789d65364c, we started updating the next multixid's offset too when recording a multixid, so that it can always be used to calculate the number of members. I got it wrong at offset wraparound: we need to skip over offset 0. Fix that

pgsql: Fix setting next multixid's offset at offset wraparound

2025-12-05 Thread Heikki Linnakangas
Fix setting next multixid's offset at offset wraparound In commit 789d65364c, we started updating the next multixid's offset too when recording a multixid, so that it can always be used to calculate the number of members. I got it wrong at offset wraparound: we need to skip over offset 0. Fix that