[COMMITTERS] pgsql: Move comment about test slightly closer to test.
Move comment about test slightly closer to test. The addition of a TestForOldSnapshot() call here has made the referent of this comment slightly less clear, so move the comment to compensate. Amit Kapila (as part of the parallel index scan patch) Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/8a815e3fc318b441a5e8a37e4129660d81e1e012 Modified Files -- src/backend/access/nbtree/nbtsearch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Tweak catalog indexing abstraction for upcoming WARM
Tweak catalog indexing abstraction for upcoming WARM Split the existing CatalogUpdateIndexes into two different routines, CatalogTupleInsert and CatalogTupleUpdate, which do both the heap insert/update plus the index update. This removes over 300 lines of boilerplate code all over src/backend/catalog/ and src/backend/commands. The resulting code is much more pleasing to the eye. Also, by encapsulating what happens in detail during an UPDATE, this facilitates the upcoming WARM patch, which is going to add a few more lines to the update case making the boilerplate even more boring. The original CatalogUpdateIndexes is removed; there was only one use left, and since it's just three lines, we can as well expand it in place there. We could keep it, but WARM is going to break all the UPDATE out-of-core callsites anyway, so there seems to be no benefit in doing so. Author: Pavan Deolasee Discussion: https://www.postgr.es/m/CABOikdOcFYSZ4vA2gYfs=m2cdxzxx4qgheeiw3fu9pcfkhl...@mail.gmail.com Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/2f5c9d9c9cec436e55847ec580606d7e88067df6 Modified Files -- src/backend/catalog/aclchk.c | 72 +++-- src/backend/catalog/heap.c | 46 +++-- src/backend/catalog/index.c| 14 +-- src/backend/catalog/indexing.c | 44 ++-- src/backend/catalog/pg_aggregate.c | 4 +- src/backend/catalog/pg_collation.c | 5 +- src/backend/catalog/pg_constraint.c| 17 +--- src/backend/catalog/pg_conversion.c| 5 +- src/backend/catalog/pg_db_role_setting.c | 15 +-- src/backend/catalog/pg_depend.c| 3 +- src/backend/catalog/pg_enum.c | 13 +-- src/backend/catalog/pg_largeobject.c | 4 +- src/backend/catalog/pg_namespace.c | 4 +- src/backend/catalog/pg_operator.c | 17 +--- src/backend/catalog/pg_proc.c | 6 +- src/backend/catalog/pg_publication.c | 3 +- src/backend/catalog/pg_range.c | 3 +- src/backend/catalog/pg_shdepend.c | 20 +--- src/backend/catalog/pg_type.c | 16 +-- src/backend/catalog/toasting.c | 5 +- src/backend/commands/alter.c | 9 +- src/backend/commands/amcmds.c | 3 +- src/backend/commands/analyze.c | 7 +- src/backend/commands/cluster.c | 9 +- src/backend/commands/comment.c | 16 +-- src/backend/commands/dbcommands.c | 21 +--- src/backend/commands/event_trigger.c | 9 +- src/backend/commands/extension.c | 15 +-- src/backend/commands/foreigncmds.c | 29 ++ src/backend/commands/functioncmds.c| 21 ++-- src/backend/commands/matview.c | 4 +- src/backend/commands/opclasscmds.c | 16 +-- src/backend/commands/operatorcmds.c| 3 +- src/backend/commands/policy.c | 20 +--- src/backend/commands/proclang.c| 7 +- src/backend/commands/publicationcmds.c | 9 +- src/backend/commands/schemacmds.c | 6 +- src/backend/commands/seclabel.c| 15 +-- src/backend/commands/sequence.c| 6 +- src/backend/commands/subscriptioncmds.c| 9 +- src/backend/commands/tablecmds.c | 156 - src/backend/commands/tablespace.c | 10 +- src/backend/commands/trigger.c | 18 +--- src/backend/commands/tsearchcmds.c | 31 ++ src/backend/commands/typecmds.c| 18 +--- src/backend/commands/user.c| 21 ++-- src/backend/replication/logical/origin.c | 3 +- src/backend/rewrite/rewriteDefine.c| 19 +--- src/backend/rewrite/rewriteSupport.c | 5 +- src/backend/storage/large_object/inv_api.c | 12 +-- src/backend/utils/cache/relcache.c | 3 +- src/include/catalog/indexing.h | 4 +- 52 files changed, 256 insertions(+), 594 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: pg_dump: Fix handling of ALTER DEFAULT PRIVILEGES
pg_dump: Fix handling of ALTER DEFAULT PRIVILEGES In commit 23f34fa, we changed how ACLs were handled to use the new pg_init_privs catalog and to dump out the ACL commands as REVOKE+GRANT combinations instead of trying to REVOKE all rights always and then GRANT back just the ones which were in place. Unfortunately, the DEFAULT PRIVILEGES system didn't quite get the correct treatment with this change and ended up (incorrectly) only including positive GRANTs instead of both the REVOKEs and GRANTs necessary to preserve the correct privileges. There are only a couple cases where such REVOKEs are possible because, generally speaking, there's few rights which exist on objects by default to be revoked. Examples of REVOKEs which weren't being correctly preserved are when privileges are REVOKE'd from the creator/owner, like so: ALTER DEFAULT PRIVILEGES FOR ROLE myrole REVOKE SELECT ON TABLES FROM myrole; or when other default privileges are being revoked, such as EXECUTE rights granted to public for functions: ALTER DEFAULT PRIVILEGES FOR ROLE myrole REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; Fix this by correctly working out what the correct REVOKE statements are (if any) and dump them out, just as we do for everything else. Noticed while developing additional regression tests for pg_dump, which will be landing shortly. Back-patch to 9.6 where the bug was introduced. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/e2090d9d20d8091c9478a674d9c22fc8006909ce Modified Files -- src/bin/pg_dump/dumputils.c | 23 - src/bin/pg_dump/dumputils.h | 4 ++- src/bin/pg_dump/pg_dump.c | 63 - src/bin/pg_dump/pg_dump.h | 3 +++ 4 files changed, 78 insertions(+), 15 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: pg_dump: Fix handling of ALTER DEFAULT PRIVILEGES
pg_dump: Fix handling of ALTER DEFAULT PRIVILEGES In commit 23f34fa, we changed how ACLs were handled to use the new pg_init_privs catalog and to dump out the ACL commands as REVOKE+GRANT combinations instead of trying to REVOKE all rights always and then GRANT back just the ones which were in place. Unfortunately, the DEFAULT PRIVILEGES system didn't quite get the correct treatment with this change and ended up (incorrectly) only including positive GRANTs instead of both the REVOKEs and GRANTs necessary to preserve the correct privileges. There are only a couple cases where such REVOKEs are possible because, generally speaking, there's few rights which exist on objects by default to be revoked. Examples of REVOKEs which weren't being correctly preserved are when privileges are REVOKE'd from the creator/owner, like so: ALTER DEFAULT PRIVILEGES FOR ROLE myrole REVOKE SELECT ON TABLES FROM myrole; or when other default privileges are being revoked, such as EXECUTE rights granted to public for functions: ALTER DEFAULT PRIVILEGES FOR ROLE myrole REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; Fix this by correctly working out what the correct REVOKE statements are (if any) and dump them out, just as we do for everything else. Noticed while developing additional regression tests for pg_dump, which will be landing shortly. Back-patch to 9.6 where the bug was introduced. Branch -- REL9_6_STABLE Details --- http://git.postgresql.org/pg/commitdiff/eb5e9d90df7536d0cf5c0d669d874f91b7be36d6 Modified Files -- src/bin/pg_dump/dumputils.c | 23 - src/bin/pg_dump/dumputils.h | 4 ++- src/bin/pg_dump/pg_dump.c | 63 - src/bin/pg_dump/pg_dump.h | 3 +++ 4 files changed, 78 insertions(+), 15 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: perltidy pg_dump TAP tests
perltidy pg_dump TAP tests The pg_dump TAP tests have gotten pretty far from what perltidy thinks they should be, so fix that, and in passing use long-form argument names with arguments passed via "=" in a similar vein to 58da833. No functional changes here, just whitespace and changing runs from "-f" to "--file=", and similar. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/6af8b89adba16f97bee0d3b01256861e10d0e4f1 Modified Files -- src/bin/pg_dump/t/001_basic.pl| 14 +- src/bin/pg_dump/t/002_pg_dump.pl | 727 +- src/bin/pg_dump/t/010_dump_connstr.pl | 169 3 files changed, 477 insertions(+), 433 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: test_pg_dump: perltidy cleanup
test_pg_dump: perltidy cleanup As pointed out by Alvaro, we actually use perltidy on the perl scripts in the source tree, so go back to the results of a perltidy run for the test_pg_dump TAP script. To make it look slightly less tragic, I changed most of the independent arguments into long-form single arguments (eg: -f file.sql changed to be --file=file.sql) to avoid having them confusingly split across lines due to perltidy. Back-patch to 9.6, as the last patch was. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/58da8334308c26107ebb7ee06c99589e14bd882b Modified Files -- src/test/modules/test_pg_dump/t/001_base.pl | 885 1 file changed, 377 insertions(+), 508 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: test_pg_dump: perltidy cleanup
test_pg_dump: perltidy cleanup As pointed out by Alvaro, we actually use perltidy on the perl scripts in the source tree, so go back to the results of a perltidy run for the test_pg_dump TAP script. To make it look slightly less tragic, I changed most of the independent arguments into long-form single arguments (eg: -f file.sql changed to be --file=file.sql) to avoid having them confusingly split across lines due to perltidy. Back-patch to 9.6, as the last patch was. Branch -- REL9_6_STABLE Details --- http://git.postgresql.org/pg/commitdiff/3e9c36165377b07ffb182c366e295ac48ea5d5ba Modified Files -- src/test/modules/test_pg_dump/t/001_base.pl | 885 1 file changed, 377 insertions(+), 508 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers