pgsql: Remove redundant relkind check

2023-01-16 Thread John Naylor
Remove redundant relkind check Ranier Vilela Reviewed by Justin Pryzby Discussion: https://www.postgresql.org/message-id/CAEudQAp2R2fbbi0OHHhv_n4%3DCh0t1VtjObR9YMqtGKHJ%2BfaUFQ%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/15eb1228800a35042ef318

pgsql: Remove dead code in formatting.c

2023-01-16 Thread John Naylor
Remove dead code in formatting.c Remove some code guarded by IS_MINUS() or IS_PLUS(), where the entire stanza is inside an else-block where both of these are false. This should slightly improve test coverage. While at it, remove coding that apparently assumes that unsetting a bit is so expensive

pgsql: Improve the code to decide and process the apply action.

2023-01-16 Thread Amit Kapila
Improve the code to decide and process the apply action. The code that decides the apply action missed to handle non-transactional messages and we didn't catch it in our testing as currently such messages are simply ignored by the apply worker. This was introduced by changes in commit 216a784829.

pgsql: Fix typo in comment.

2023-01-16 Thread Amit Kapila
Fix typo in comment. Author: Osumi Takamichi Discussion: https://postgr.es/m/tycpr01mb83737ea140c79b7d099f65e8ed...@tycpr01mb8373.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4f985aba6963b8669325e1c58585d04257977fda Modified Files

pgsql: Track behavior of \1 in pg_ident.conf when quoted

2023-01-16 Thread Michael Paquier
Track behavior of \1 in pg_ident.conf when quoted Entries of pg-user in pg_ident.conf that are quoted and include '\1' allow a replacement from a subexpression in a system user regexp. This commit adds a test to track this behavior and a note in the documentation, as it could be affected by the u

pgsql: Don't presort ORDER BY/DISTINCT Aggrefs with volatile functions

2023-01-16 Thread David Rowley
Don't presort ORDER BY/DISTINCT Aggrefs with volatile functions In 1349d2790, we gave the planner the ability to provide ORDER BY/DISTINCT Aggrefs with presorted input so that nodeAgg would not have to perform sorts during execution. That commit failed to properly consider the implications of if

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Create common infrastructure for cross-version upgrade testing.

2023-01-16 Thread Tom Lane
Create common infrastructure for cross-version upgrade testing. To test pg_upgrade across major PG versions, we have to be able to modify or drop any old objects with no-longer-supported properties, and we have to be able to deal with cosmetic changes in pg_dump output. Up to now, the buildfarm an

pgsql: Tighten up VACUUM's approach to setting VM bits.

2023-01-16 Thread Peter Geoghegan
Tighten up VACUUM's approach to setting VM bits. Tighten up the way that visibilitymap_set() is called: request that both the all-visible and all-frozen bits get set whenever the all-frozen bit is set, regardless of what we think we know about the present state of the all-visible bit. Also make s

pgsql: Assorted improvements to SECURITY DEFINER functions documentatio

2023-01-16 Thread Robert Haas
Assorted improvements to SECURITY DEFINER functions documentation. Add a cross-reference from the part of the page that introdues SECURITY INVOKER and SECURITY DEFINER to the part of the page that talks about writing SECURITY DEFINER functions safely, so that users are less likely to miss it. Rem

pgsql: More documentation update for GRANT ... WITH SET OPTION.

2023-01-16 Thread Robert Haas
More documentation update for GRANT ... WITH SET OPTION. Update the reference pages for various ALTER commands that mentioned that you must be a member of role that will be the new owner to instead say that you must be able to SET ROLE to the new owner. Update ddl.sgml's generate statement on this

pgsql: Add BufFileRead variants with short read and EOF detection

2023-01-16 Thread Peter Eisentraut
Add BufFileRead variants with short read and EOF detection Most callers of BufFileRead() want to check whether they read the full specified length. Checking this at every call site is very tedious. This patch provides additional variants BufFileReadExact() and BufFileReadMaybeEOF() that include t

pgsql: Fix some BufFileRead() error reporting

2023-01-16 Thread Peter Eisentraut
Fix some BufFileRead() error reporting Remove "%m" from error messages where errno would be bogus. Add short read byte counts where appropriate. This is equivalent to what was done in 7897e3bb902c557412645b82120f4d95f7474906, but some code was apparently developed concurrently to that and not up

pgsql: Fix some BufFileRead() error reporting

2023-01-16 Thread Peter Eisentraut
Fix some BufFileRead() error reporting Remove "%m" from error messages where errno would be bogus. Add short read byte counts where appropriate. This is equivalent to what was done in 7897e3bb902c557412645b82120f4d95f7474906, but some code was apparently developed concurrently to that and not up

pgsql: Fix some BufFileRead() error reporting

2023-01-16 Thread Peter Eisentraut
Fix some BufFileRead() error reporting Remove "%m" from error messages where errno would be bogus. Add short read byte counts where appropriate. This is equivalent to what was done in 7897e3bb902c557412645b82120f4d95f7474906, but some code was apparently developed concurrently to that and not up

pgsql: Fix some BufFileRead() error reporting

2023-01-16 Thread Peter Eisentraut
Fix some BufFileRead() error reporting Remove "%m" from error messages where errno would be bogus. Add short read byte counts where appropriate. This is equivalent to what was done in 7897e3bb902c557412645b82120f4d95f7474906, but some code was apparently developed concurrently to that and not up