pgsql: Transform proconfig for faster execution.
Transform proconfig for faster execution. Store function config settings in lists to avoid the need to parse and allocate for each function execution. Speedup is modest but significant. Additionally, this change also seems cleaner and supports some other performance improvements under discussion. Discussion: https://postgr.es/m/04c8592dbd694e4114a3ed87139a7a04e4363030.ca...@j-davis.com Reviewed-by: Nathan Bossart Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5765cfe18c595b5d8a7df3a62d253f60a00718ce Modified Files -- src/backend/utils/fmgr/fmgr.c | 29 +++- src/backend/utils/misc/guc.c | 45 --- src/include/utils/guc.h | 2 ++ 3 files changed, 60 insertions(+), 16 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/ae126929500918334a7ff3120da1c7f2f9a0fe53 Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/01bc42634e59e1e746eec236ac17247bdcc228e9 Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4caa9e33ecfe70359177b9689f33c6da55c3aa35 Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5a32af3f2c6106080da72e78a42c8fc3ab0584a1 Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1bc19dfcfea71e7ed03eff9d72072579bd678b4c Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7bed93a469bfa6954ce937b72ef1dc76fda7159e Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Remove test from commit fa2e874946.
Remove test from commit fa2e874946. The fix itself is fine, but the test revealed other problems related to parallel query that are not easily fixable. Remove the test for now to fix the buildfarm. Discussion: https://postgr.es/m/88825.1691665...@sss.pgh.pa.us Backpatch-through: 11 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bee263b0878cacec5e3d888ab666000edc3219de Modified Files -- src/test/isolation/expected/search-path-inval.out | 97 --- src/test/isolation/isolation_schedule | 1 - src/test/isolation/specs/search-path-inval.spec | 59 -- 3 files changed, 157 deletions(-)
pgsql: Last-minute updates for release notes.
Last-minute updates for release notes. Security: CVE-2023-39417, CVE-2023-39418 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5d81700859adc9462b9663789f4491611c3d11b8 Modified Files -- doc/src/sgml/release-13.sgml | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-)
pgsql: Last-minute updates for release notes.
Last-minute updates for release notes. Security: CVE-2023-39417, CVE-2023-39418 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/023fa8f326dad5e0f841fcc4247b449881215cb7 Modified Files -- doc/src/sgml/release-11.sgml | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-)
pgsql: Last-minute updates for release notes.
Last-minute updates for release notes. Security: CVE-2023-39417, CVE-2023-39418 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/93eb661713338b2b51f36ec397e42397b5e441e2 Modified Files -- doc/src/sgml/release-14.sgml | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-)
pgsql: Last-minute updates for release notes.
Last-minute updates for release notes. Security: CVE-2023-39417, CVE-2023-39418 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/948757fe493c1031d43bb082b6466db9a08f34a3 Modified Files -- doc/src/sgml/release-15.sgml | 89 +++- 1 file changed, 88 insertions(+), 1 deletion(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/919ebb023e74546c6293352556365091c5402366 Modified Files -- src/backend/commands/extension.c | 16 src/test/modules/test_extensions/Makefile | 6 +++-- .../test_extensions/expected/test_extensions.out | 30 ++ .../test_extensions/sql/test_extensions.sql| 17 +--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 60 insertions(+), 17 deletions(-)
pgsql: Last-minute updates for release notes.
Last-minute updates for release notes. Security: CVE-2023-39417, CVE-2023-39418 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c79434d7fcabdf2a5b27b235c0fb85912e686087 Modified Files -- doc/src/sgml/release-12.sgml | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d4648a74be07bfb23b449c722303c320297c0327 Modified Files -- src/backend/commands/extension.c | 21 +++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 30 ++ .../test_extensions/sql/test_extensions.sql| 17 +--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 63 insertions(+), 15 deletions(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/eb044d8f0aee1ba4950b0867f6ca9328374318db Modified Files -- src/backend/commands/extension.c | 16 src/test/modules/test_extensions/Makefile | 6 +++-- .../test_extensions/expected/test_extensions.out | 30 ++ .../test_extensions/sql/test_extensions.sql| 17 +--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 60 insertions(+), 17 deletions(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cd5f2a357014d5ed8205191f8e1fb180f1439599 Modified Files -- src/backend/commands/extension.c | 27 + src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 35 +++--- src/test/modules/test_extensions/meson.build | 2 ++ .../test_extensions/sql/test_extensions.sql| 20 ++--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 ++ 7 files changed, 79 insertions(+), 15 deletions(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b1b585e0fc3dd195bc2e338c80760bede08de5f1 Modified Files -- src/backend/commands/extension.c | 21 +++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 30 ++ .../test_extensions/sql/test_extensions.sql| 17 +--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 63 insertions(+), 15 deletions(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/de494ec14f6bd7f2676623a5934723a6c8ba51c2 Modified Files -- src/backend/commands/extension.c | 21 +++ src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 30 ++ .../test_extensions/sql/test_extensions.sql| 17 +--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 +++ 6 files changed, 63 insertions(+), 15 deletions(-)
pgsql: Fix RLS policy usage in MERGE.
Fix RLS policy usage in MERGE. If MERGE executes an UPDATE action on a table with row-level security, the code incorrectly applied the WITH CHECK clauses from the target table's INSERT policies to new rows, instead of the clauses from the table's UPDATE policies. In addition, it failed to check new rows against the target table's SELECT policies, if SELECT permissions were required (likely to always be the case). In addition, if MERGE executes a DO NOTHING action for matched rows, the code incorrectly applied the USING clauses from the target table's DELETE policies to existing target tuples. These policies were applied as checks that would throw an error, if they did not pass. Fix this, so that a MERGE UPDATE action applies the same RLS policies as a plain UPDATE query with a WHERE clause, and a DO NOTHING action does not apply any RLS checks (other than adding clauses from SELECT policies to the join). Back-patch to v15, where MERGE was introduced. Dean Rasheed, reviewed by Stephen Frost. Security: CVE-2023-39418 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cb2ae5741f2458a474ed3c31458d242e678ff229 Modified Files -- src/backend/executor/nodeModifyTable.c| 7 +-- src/backend/rewrite/rowsecurity.c | 85 ++- src/test/regress/expected/rowsecurity.out | 58 - src/test/regress/sql/rowsecurity.sql | 52 +++ 4 files changed, 152 insertions(+), 50 deletions(-)
pgsql: Reject substituting extension schemas or owners matching ["$'\].
Reject substituting extension schemas or owners matching ["$'\]. Substituting such values in extension scripts facilitated SQL injection when @extowner@, @extschema@, or @extschema:...@ appeared inside a quoting construct (dollar quoting, '', or ""). No bundled extension was vulnerable. Vulnerable uses do appear in a documentation example and in non-bundled extensions. Hence, the attack prerequisite was an administrator having installed files of a vulnerable, trusted, non-bundled extension. Subject to that prerequisite, this enabled an attacker having database-level CREATE privilege to execute arbitrary code as the bootstrap superuser. By blocking this attack in the core server, there's no need to modify individual extensions. Back-patch to v11 (all supported versions). Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and Christoph Berg. Security: CVE-2023-39417 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f53511010b72d7d314e22be7c63ef94792fee345 Modified Files -- src/backend/commands/extension.c | 27 + src/test/modules/test_extensions/Makefile | 2 ++ .../test_extensions/expected/test_extensions.out | 35 +++--- src/test/modules/test_extensions/meson.build | 2 ++ .../test_extensions/sql/test_extensions.sql| 20 ++--- .../test_extensions/test_ext_extschema--1.0.sql| 5 .../test_extensions/test_ext_extschema.control | 3 ++ 7 files changed, 79 insertions(+), 15 deletions(-)
pgsql: Fix RLS policy usage in MERGE.
Fix RLS policy usage in MERGE. If MERGE executes an UPDATE action on a table with row-level security, the code incorrectly applied the WITH CHECK clauses from the target table's INSERT policies to new rows, instead of the clauses from the table's UPDATE policies. In addition, it failed to check new rows against the target table's SELECT policies, if SELECT permissions were required (likely to always be the case). In addition, if MERGE executes a DO NOTHING action for matched rows, the code incorrectly applied the USING clauses from the target table's DELETE policies to existing target tuples. These policies were applied as checks that would throw an error, if they did not pass. Fix this, so that a MERGE UPDATE action applies the same RLS policies as a plain UPDATE query with a WHERE clause, and a DO NOTHING action does not apply any RLS checks (other than adding clauses from SELECT policies to the join). Back-patch to v15, where MERGE was introduced. Dean Rasheed, reviewed by Stephen Frost. Security: CVE-2023-39418 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c2e08b04c9e71ac6aabdc7d9b3f8e785e164d770 Modified Files -- src/backend/executor/nodeModifyTable.c| 7 +-- src/backend/rewrite/rowsecurity.c | 85 ++- src/test/regress/expected/rowsecurity.out | 58 - src/test/regress/sql/rowsecurity.sql | 52 +++ 4 files changed, 152 insertions(+), 50 deletions(-)
pgsql: Fix RLS policy usage in MERGE.
Fix RLS policy usage in MERGE. If MERGE executes an UPDATE action on a table with row-level security, the code incorrectly applied the WITH CHECK clauses from the target table's INSERT policies to new rows, instead of the clauses from the table's UPDATE policies. In addition, it failed to check new rows against the target table's SELECT policies, if SELECT permissions were required (likely to always be the case). In addition, if MERGE executes a DO NOTHING action for matched rows, the code incorrectly applied the USING clauses from the target table's DELETE policies to existing target tuples. These policies were applied as checks that would throw an error, if they did not pass. Fix this, so that a MERGE UPDATE action applies the same RLS policies as a plain UPDATE query with a WHERE clause, and a DO NOTHING action does not apply any RLS checks (other than adding clauses from SELECT policies to the join). Back-patch to v15, where MERGE was introduced. Dean Rasheed, reviewed by Stephen Frost. Security: CVE-2023-39418 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/67a007dc0cdb8578726c2000a7abc513109cb4a2 Modified Files -- src/backend/executor/nodeModifyTable.c| 7 +-- src/backend/rewrite/rowsecurity.c | 85 ++- src/test/regress/expected/rowsecurity.out | 58 - src/test/regress/sql/rowsecurity.sql | 52 +++ 4 files changed, 152 insertions(+), 50 deletions(-)
pgsql: Fix erroneous -Werror=missing-braces on old GCC
Fix erroneous -Werror=missing-braces on old GCC The buildfarm reports that this is an error on gcc (Debian 4.7.2-5) 4.7.2, 32-bit. The bug seems to be GCC bug 53119, which has obviously been fixed for years. Author: Tristan Partin Discussion: https://www.postgresql.org/message-id/flat/CT6HJ3U8068R.3A8SJMV02D9BC@gonk Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5e0c761d0a13c7b4f7c5de618ac38560d74d74d0 Modified Files -- src/bin/pgbench/pgbench.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)
pgsql: Update Solution.pm for new LoongArch CRC symbol
Update Solution.pm for new LoongArch CRC symbol Oversight in 4d14ccd6a, per report from Amit Kapila and Michael Paquier. Discussion: https://postgr.es/m/CAA4eK1LsV3KuyUt8tzZDjPcUds1XfVVeW3Wpeju_59DtRV0%3DxQ%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f25b18500a8405e6b800fb81b1dea2b875867143 Modified Files -- src/tools/msvc/Solution.pm | 1 + 1 file changed, 1 insertion(+)
Re: pgsql: Recalculate search_path after ALTER ROLE.
Jeff Davis writes: > On Wed, 2023-08-09 at 16:12 -0700, Jeff Davis wrote: >> I'm not sure yet, but this looks like a possible pre-existing bug, or >> some incorrect assumption I made in fa2e874946. > Before my commit the behavior is the same. Here's a minimal repro > ... > Given that it works fine without parallel query, I'm inclined to call > this a parallel query bug. The error is coming from RestoreGUCState(). Check. Seems like we need a way to restore the role GUC without performing a catalog lookup. I'll bet there are comparable bugs with search path, temp tablespace names, etc. > That being said, the buildfarm is red after my commit, so unless > someone sees a quick fix here, perhaps I should remove my isolation > test? I don't want to revert my whole commit, because it seems correct > and fixes a separate bug. Yes, just remove the test case for now. It might or might not be worth the trouble to put it back later. regards, tom lane
pgsql: Document RelationGetIndexAttrBitmap better
Document RelationGetIndexAttrBitmap better Commit 19d8e2308bc5 changed the list of set-of-columns that can be returned by RelationGetIndexAttrBitmap, but didn't update its "documentation". That was pretty hard to read already, so rewrite to make it more comprehensible, adding the missing values while at it. Backpatch to 16, like that commit. Discussion: https://postgr.es/m/20230809091155.7c7f3gttjk3dj4ze@alvherre.pgsql Reviewed-by: Tomas Vondra Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1b594a326a88bf1604360daa5a274096c0762fec Modified Files -- src/backend/utils/cache/relcache.c | 12 +--- src/include/utils/relcache.h | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-)
pgsql: Document RelationGetIndexAttrBitmap better
Document RelationGetIndexAttrBitmap better Commit 19d8e2308bc5 changed the list of set-of-columns that can be returned by RelationGetIndexAttrBitmap, but didn't update its "documentation". That was pretty hard to read already, so rewrite to make it more comprehensible, adding the missing values while at it. Backpatch to 16, like that commit. Discussion: https://postgr.es/m/20230809091155.7c7f3gttjk3dj4ze@alvherre.pgsql Reviewed-by: Tomas Vondra Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b57cfb439bd377cfe6d01b4254dde00ae54412ac Modified Files -- src/backend/utils/cache/relcache.c | 12 +--- src/include/utils/relcache.h | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-)
Re: pgsql: Recalculate search_path after ALTER ROLE.
On Wed, 2023-08-09 at 16:12 -0700, Jeff Davis wrote: > I'm not sure yet, but this looks like a possible pre-existing bug, or > some incorrect assumption I made in fa2e874946. Before my commit the behavior is the same. Here's a minimal repro (debug_parallel_query set to 'on' or 'regress'): s1: CREATE USER u1; SET SESSION AUTHORIZATION u1; s2: ALTER ROLE u1 RENAME TO u2; s1: SELECT 1; ERROR: role "u1" does not exist CONTEXT: while setting parameter "session_authorization" to "u1" Given that it works fine without parallel query, I'm inclined to call this a parallel query bug. The error is coming from RestoreGUCState(). That being said, the buildfarm is red after my commit, so unless someone sees a quick fix here, perhaps I should remove my isolation test? I don't want to revert my whole commit, because it seems correct and fixes a separate bug. Regards, Jeff Davis