Prevent object capture in CREATE/ALTER EXTENSION scripts
Thread notes
1 note#bug
hackorum-bot#bug
@global #bug
Hi Hackers,
We would like to propose hardening name resolution during extension
installation and upgrade scripts, so that a script cannot be made to
reach an object that another role planted in the extension's
installation schema.
Problem
=======
A CREATE EXTENSION or ALTER EXTENSION ... UPDATE script runs as the
invoking role, or as the bootstrap superuser for a trusted extension
installed by a non-superuser. Either way a captured reference runs
another role's code with elevated rights.
Say the script calls f('abc'). The literal has type "unknown", so if
the extension defines f(varchar) but another role has already created
f(text) in the same schema, both are candidates. They sit in the same
schema, so search-path position cannot break the tie, and
func_select_candidate() falls back to type preference: text is the
preferred type of the string category, so f(text) wins, and the script
runs that role's function with its own privileges. Writing
@extschema@.f('abc') changes nothing: qualification pins the schema the
plant sits in, not the signature.
Neither existing defense covers this. The search_path pinning from
7eeb1d9861b ("Make contrib modules' installation scripts more
secure.") only keeps the plant out of the other schemas on the path,
not out of the extension's own target schema, which is necessarily
first. And the ownership checks from b9b21acc766 ("In extensions,
don't replace objects not belonging to the extension.") guard what a
script creates, not what it references.
The same applies to operators: CREATE OPERATOR only requires a function
the creating role can execute. Nor is it limited to overloads: a domain
or table planted under the name of a required extension's type or config
table captures the reference outright, and its CHECK constraint or
triggers then run with the script's privileges.
The only precondition is that some other role can create objects in
the installation schema. Hosted platforms that run whitelisted
extension scripts as superuser on a user's behalf make that the normal
case, not an odd configuration.
This hazard is documented: "Security Considerations for Extension
Scripts" describes these trojan objects and tells authors to
schema-qualify every name and add explicit casts [1]https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-SECURITY-SCRIPTS. That advice is
correct, but it puts the whole burden on the author getting every call
site right, and one uncast call is enough, so a resolution-time
backstop seems worthwhile.
Proposed change
===============
Two patches attached:
0001 - propagates the extension-script state to parallel workers.
creating_extension and CurrentExtensionObject are backend-local
globals, so a worker never saw them. Work that a worker does on behalf
of a script, such as parse-analyzing a parallel-safe function's body at
run time, therefore ran as though no script were in progress and would
skip the check that 0002 adds. Both values now ride through
FixedParallelState the same way the current user id and the
temp-namespace state already do. No visible effect on its own.
0002 - makes name resolution ignore untrusted objects while
creating_extension is set. An object is trusted if it is in pg_catalog,
owned by a superuser, owned by the role the script is running as, or a
member of the extension being installed or of one it requires; the last
rule reads pg_depend, and only where the cheaper tests fail.
The search-path lookups for relations, types, functions and operators
all apply the test. For functions and operators it happens as
candidates are gathered, not in the callers that resolve the
ambiguity: the gather loop collapses duplicate signatures to the one
earliest on the path, so a plant in the extension's own schema would
otherwise displace a required extension's identical function. It is
also the single place every caller passes through, including
LookupFuncNameInternal() and regprocedure input; the operator test in
OpernameGetOprid() likewise covers binary_oper_exact(),
LookupOperName(), and so CREATE OPERATOR CLASS, and regoperator.
Caches need the same treatment. oper() and left_oper() skip the
operator lookaside cache while creating_extension, and CachedPlanSource
records whether it was analyzed inside a script, including on the
plpgsql simple-expression fast path, since a plan analyzed beforehand
in a session whose search_path matches the one the script pins would
otherwise be reused inside it.
If nothing trusted remains, resolution fails as though the object did
not exist, with a detail saying a candidate was ignored. If a trusted
candidate exists but does not match, the usual argument-type error is
raised and the ignored candidate is mentioned in a hint. Outside
extension scripts every object is trusted, so ordinary parsing is
unchanged.
0002 adds regression tests for planted overloads, references with no
trusted candidate, "superuser = false" extensions, updates run by
another role, required extensions, cached plans and parallel workers.
What this does not cover
========================
The filtering only applies while the script runs. An extension's own
function bodies resolve names when they execute, with
creating_extension false again, so a planted overload can still
capture those calls after installation, usually with the caller's
privileges, though SECURITY DEFINER puts the elevated case back on the
table. Covering that wants a different mechanism; script time seems
worth doing on its own, being the window where a captured reference is
most likely to run as a superuser.
Trust is by ownership, not by name. A script that references an object
owned by another ordinary role, including one that belongs to an
extension outside its direct requires list, now fails even with a
schema-qualified name. Such references should be rare, but this is a
behavior change for existing scripts.
Operator classes and families, collations, text search objects,
conversions, statistics objects and casts still take unfiltered lookup
paths; none looked like a route to running an unprivileged role's code,
but we may have missed one. The lookups that resolve by exact name also
have no flags word to carry the "candidate ignored" detail.
Related work
============
Jelte Fennema-Nio's "extensions with an owned schema" [2]/messages/by-id/CAGECzQQzDqDzakBkR71ZkQ1N1ffTjAaruRSqppQAKu3WF+6rNQ@mail.gmail.com starts from
the same observation and gives the extension a fresh schema, removing
the precondition. It is opt-in and only for new extensions, so the two
look complementary.
The "sandboxing untrusted code" thread [3]/messages/by-id/CA+TgmoYiumw-yR8nUUX_8qdihPd0ZmT29ch0VR_r+kw+o7QJvQ@mail.gmail.com makes a point we tried to
honor: a check that rejects what a human reads as harmless gets
switched off. A script references built-ins, its own objects and its
required extensions', and the trust rule accepts all three regardless
of who owns them.
Does this approach seem reasonable?
[1]: https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-SECURITY-SCRIPTS
https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-SECURITY-SCRIPTS
[2]: /messages/by-id/CAGECzQQzDqDzakBkR71ZkQ1N1ffTjAaruRSqppQAKu3WF+6rNQ@mail.gmail.com
/messages/by-id/CAGECzQQzDqDzakBkR71ZkQ1N1ffTjAaruRSqppQAKu3WF+6rNQ@mail.gmail.com
[3]: /messages/by-id/CA+TgmoYiumw-yR8nUUX_8qdihPd0ZmT29ch0VR_r+kw+o7QJvQ@mail.gmail.com
/messages/by-id/CA+TgmoYiumw-yR8nUUX_8qdihPd0ZmT29ch0VR_r+kw+o7QJvQ@mail.gmail.com
Best regards
Jan Nidzwetzki
Fabrízio de Royes Mello
--
Jan Nidzwetzki
PlanetScale Postgres Core Team
Attachments:
t253701_10001-Propagate-extension-script-state-to-parallel-workers.patchtext/plain; charset=UTF-8; name=0001-Propagate-extension-script-state-to-parallel-workers.patchDownload+36-1
0002-Prefer-trusted-candidates-when-resolving-names-in-ex.patchtext/plain; charset=UTF-8; name=0002-Prefer-trusted-candidates-when-resolving-names-in-ex.patchDownload+1008-50
Hi Jan,
I'm interested in looking into this issue, I'll sure to reproduce it in my
machine tomorrow and let you know about it.
Best Regards,
Osama Abdul Qader
On Mon, 7 Sept, 2026, 8:09 pm Jan Nidzwetzki, <jan@planetscale.com> wrote:
Show quoted text
Hi Hackers,
We would like to propose hardening name resolution during extension
installation and upgrade scripts, so that a script cannot be made to
reach an object that another role planted in the extension's
installation schema.Problem
=======A CREATE EXTENSION or ALTER EXTENSION ... UPDATE script runs as the
invoking role, or as the bootstrap superuser for a trusted extension
installed by a non-superuser. Either way a captured reference runs
another role's code with elevated rights.Say the script calls f('abc'). The literal has type "unknown", so if
the extension defines f(varchar) but another role has already created
f(text) in the same schema, both are candidates. They sit in the same
schema, so search-path position cannot break the tie, and
func_select_candidate() falls back to type preference: text is the
preferred type of the string category, so f(text) wins, and the script
runs that role's function with its own privileges. Writing
@extschema@.f('abc') changes nothing: qualification pins the schema the
plant sits in, not the signature.Neither existing defense covers this. The search_path pinning from
7eeb1d9861b ("Make contrib modules' installation scripts more
secure.") only keeps the plant out of the other schemas on the path,
not out of the extension's own target schema, which is necessarily
first. And the ownership checks from b9b21acc766 ("In extensions,
don't replace objects not belonging to the extension.") guard what a
script creates, not what it references.The same applies to operators: CREATE OPERATOR only requires a function
the creating role can execute. Nor is it limited to overloads: a domain
or table planted under the name of a required extension's type or config
table captures the reference outright, and its CHECK constraint or
triggers then run with the script's privileges.The only precondition is that some other role can create objects in
the installation schema. Hosted platforms that run whitelisted
extension scripts as superuser on a user's behalf make that the normal
case, not an odd configuration.This hazard is documented: "Security Considerations for Extension
Scripts" describes these trojan objects and tells authors to
schema-qualify every name and add explicit casts [1]. That advice is
correct, but it puts the whole burden on the author getting every call
site right, and one uncast call is enough, so a resolution-time
backstop seems worthwhile.Proposed change
===============Two patches attached:
0001 - propagates the extension-script state to parallel workers.
creating_extension and CurrentExtensionObject are backend-local
globals, so a worker never saw them. Work that a worker does on behalf
of a script, such as parse-analyzing a parallel-safe function's body at
run time, therefore ran as though no script were in progress and would
skip the check that 0002 adds. Both values now ride through
FixedParallelState the same way the current user id and the
temp-namespace state already do. No visible effect on its own.0002 - makes name resolution ignore untrusted objects while
creating_extension is set. An object is trusted if it is in pg_catalog,
owned by a superuser, owned by the role the script is running as, or a
member of the extension being installed or of one it requires; the last
rule reads pg_depend, and only where the cheaper tests fail.The search-path lookups for relations, types, functions and operators
all apply the test. For functions and operators it happens as
candidates are gathered, not in the callers that resolve the
ambiguity: the gather loop collapses duplicate signatures to the one
earliest on the path, so a plant in the extension's own schema would
otherwise displace a required extension's identical function. It is
also the single place every caller passes through, including
LookupFuncNameInternal() and regprocedure input; the operator test in
OpernameGetOprid() likewise covers binary_oper_exact(),
LookupOperName(), and so CREATE OPERATOR CLASS, and regoperator.Caches need the same treatment. oper() and left_oper() skip the
operator lookaside cache while creating_extension, and CachedPlanSource
records whether it was analyzed inside a script, including on the
plpgsql simple-expression fast path, since a plan analyzed beforehand
in a session whose search_path matches the one the script pins would
otherwise be reused inside it.If nothing trusted remains, resolution fails as though the object did
not exist, with a detail saying a candidate was ignored. If a trusted
candidate exists but does not match, the usual argument-type error is
raised and the ignored candidate is mentioned in a hint. Outside
extension scripts every object is trusted, so ordinary parsing is
unchanged.0002 adds regression tests for planted overloads, references with no
trusted candidate, "superuser = false" extensions, updates run by
another role, required extensions, cached plans and parallel workers.What this does not cover
========================The filtering only applies while the script runs. An extension's own
function bodies resolve names when they execute, with
creating_extension false again, so a planted overload can still
capture those calls after installation, usually with the caller's
privileges, though SECURITY DEFINER puts the elevated case back on the
table. Covering that wants a different mechanism; script time seems
worth doing on its own, being the window where a captured reference is
most likely to run as a superuser.Trust is by ownership, not by name. A script that references an object
owned by another ordinary role, including one that belongs to an
extension outside its direct requires list, now fails even with a
schema-qualified name. Such references should be rare, but this is a
behavior change for existing scripts.Operator classes and families, collations, text search objects,
conversions, statistics objects and casts still take unfiltered lookup
paths; none looked like a route to running an unprivileged role's code,
but we may have missed one. The lookups that resolve by exact name also
have no flags word to carry the "candidate ignored" detail.Related work
============Jelte Fennema-Nio's "extensions with an owned schema" [2] starts from
the same observation and gives the extension a fresh schema, removing
the precondition. It is opt-in and only for new extensions, so the two
look complementary.The "sandboxing untrusted code" thread [3] makes a point we tried to
honor: a check that rejects what a human reads as harmless gets
switched off. A script references built-ins, its own objects and its
required extensions', and the trust rule accepts all three regardless
of who owns them.Does this approach seem reasonable?
[1]
https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-SECURITY-SCRIPTS
[2]/messages/by-id/CAGECzQQzDqDzakBkR71ZkQ1N1ffTjAaruRSqppQAKu3WF+6rNQ@mail.gmail.com
[3]/messages/by-id/CA+TgmoYiumw-yR8nUUX_8qdihPd0ZmT29ch0VR_r+kw+o7QJvQ@mail.gmail.com
Best regards
Jan Nidzwetzki
Fabrízio de Royes Mello--
Jan Nidzwetzki
PlanetScale Postgres Core Team
Greetings of the day Jan.
I've reproduced the exact bug you were talking about and also I reviewed
the patch series and tested the reported overload-resolution issue locally.
I was able to reproduce the problem on the unpatched code. An unprivileged
role could create an overloaded function in the extension's target schema,
and an extension script calling f('abc') could resolve to the
attacker-owned f(text) instead of the extension's trusted f(varchar). The
same issue was also reproducible for operators.
I then tested the patches separately:
- Patch 0001, which propagates the extension-script state to parallel
workers, did not by itself change the overload-resolution result.
- With patch 0002 applied, the extension script correctly resolved the
call to the extension-owned f(varchar), and the operator resolved to the
trusted implementation as well.
I also reviewed the relevant changes in namespace.c, parse_func.c,
parse_oper.c, plancache.c, parallel.c, and extension.c. In particular, the
candidate filtering based on ObjectIsTrustedInExtensionScript() prevents
untrusted objects from participating in name resolution while an extension
script is being executed. The plan-cache changes also account for the fact
that the same query can be analyzed differently inside and outside an
extension script.
The regression tests cover the main cases, including overloaded functions
and operators, rejection when only an untrusted candidate exists, extension
objects owned by non-superusers, parallel workers, required extensions, and
cached plans.
Based on the reproduction and the code/test review, I don't see a
correctness or security issue with the patch series. My conclusion is that
the patch fixes the reported overload-capture issue in the extension-script
name-resolution paths I tested.
Regards,
Osama Abdul Qader
On Mon, Sep 7, 2026 at 8:46 PM Osama Abdul Qader <
osamaabdulqader.cs@gmail.com> wrote:
Show quoted text
Hi Jan,
I'm interested in looking into this issue, I'll sure to reproduce it in my
machine tomorrow and let you know about it.Best Regards,
Osama Abdul QaderOn Mon, 7 Sept, 2026, 8:09 pm Jan Nidzwetzki, <jan@planetscale.com> wrote:
Hi Hackers,
We would like to propose hardening name resolution during extension
installation and upgrade scripts, so that a script cannot be made to
reach an object that another role planted in the extension's
installation schema.Problem
=======A CREATE EXTENSION or ALTER EXTENSION ... UPDATE script runs as the
invoking role, or as the bootstrap superuser for a trusted extension
installed by a non-superuser. Either way a captured reference runs
another role's code with elevated rights.Say the script calls f('abc'). The literal has type "unknown", so if
the extension defines f(varchar) but another role has already created
f(text) in the same schema, both are candidates. They sit in the same
schema, so search-path position cannot break the tie, and
func_select_candidate() falls back to type preference: text is the
preferred type of the string category, so f(text) wins, and the script
runs that role's function with its own privileges. Writing
@extschema@.f('abc') changes nothing: qualification pins the schema the
plant sits in, not the signature.Neither existing defense covers this. The search_path pinning from
7eeb1d9861b ("Make contrib modules' installation scripts more
secure.") only keeps the plant out of the other schemas on the path,
not out of the extension's own target schema, which is necessarily
first. And the ownership checks from b9b21acc766 ("In extensions,
don't replace objects not belonging to the extension.") guard what a
script creates, not what it references.The same applies to operators: CREATE OPERATOR only requires a function
the creating role can execute. Nor is it limited to overloads: a domain
or table planted under the name of a required extension's type or config
table captures the reference outright, and its CHECK constraint or
triggers then run with the script's privileges.The only precondition is that some other role can create objects in
the installation schema. Hosted platforms that run whitelisted
extension scripts as superuser on a user's behalf make that the normal
case, not an odd configuration.This hazard is documented: "Security Considerations for Extension
Scripts" describes these trojan objects and tells authors to
schema-qualify every name and add explicit casts [1]. That advice is
correct, but it puts the whole burden on the author getting every call
site right, and one uncast call is enough, so a resolution-time
backstop seems worthwhile.Proposed change
===============Two patches attached:
0001 - propagates the extension-script state to parallel workers.
creating_extension and CurrentExtensionObject are backend-local
globals, so a worker never saw them. Work that a worker does on behalf
of a script, such as parse-analyzing a parallel-safe function's body at
run time, therefore ran as though no script were in progress and would
skip the check that 0002 adds. Both values now ride through
FixedParallelState the same way the current user id and the
temp-namespace state already do. No visible effect on its own.0002 - makes name resolution ignore untrusted objects while
creating_extension is set. An object is trusted if it is in pg_catalog,
owned by a superuser, owned by the role the script is running as, or a
member of the extension being installed or of one it requires; the last
rule reads pg_depend, and only where the cheaper tests fail.The search-path lookups for relations, types, functions and operators
all apply the test. For functions and operators it happens as
candidates are gathered, not in the callers that resolve the
ambiguity: the gather loop collapses duplicate signatures to the one
earliest on the path, so a plant in the extension's own schema would
otherwise displace a required extension's identical function. It is
also the single place every caller passes through, including
LookupFuncNameInternal() and regprocedure input; the operator test in
OpernameGetOprid() likewise covers binary_oper_exact(),
LookupOperName(), and so CREATE OPERATOR CLASS, and regoperator.Caches need the same treatment. oper() and left_oper() skip the
operator lookaside cache while creating_extension, and CachedPlanSource
records whether it was analyzed inside a script, including on the
plpgsql simple-expression fast path, since a plan analyzed beforehand
in a session whose search_path matches the one the script pins would
otherwise be reused inside it.If nothing trusted remains, resolution fails as though the object did
not exist, with a detail saying a candidate was ignored. If a trusted
candidate exists but does not match, the usual argument-type error is
raised and the ignored candidate is mentioned in a hint. Outside
extension scripts every object is trusted, so ordinary parsing is
unchanged.0002 adds regression tests for planted overloads, references with no
trusted candidate, "superuser = false" extensions, updates run by
another role, required extensions, cached plans and parallel workers.What this does not cover
========================The filtering only applies while the script runs. An extension's own
function bodies resolve names when they execute, with
creating_extension false again, so a planted overload can still
capture those calls after installation, usually with the caller's
privileges, though SECURITY DEFINER puts the elevated case back on the
table. Covering that wants a different mechanism; script time seems
worth doing on its own, being the window where a captured reference is
most likely to run as a superuser.Trust is by ownership, not by name. A script that references an object
owned by another ordinary role, including one that belongs to an
extension outside its direct requires list, now fails even with a
schema-qualified name. Such references should be rare, but this is a
behavior change for existing scripts.Operator classes and families, collations, text search objects,
conversions, statistics objects and casts still take unfiltered lookup
paths; none looked like a route to running an unprivileged role's code,
but we may have missed one. The lookups that resolve by exact name also
have no flags word to carry the "candidate ignored" detail.Related work
============Jelte Fennema-Nio's "extensions with an owned schema" [2] starts from
the same observation and gives the extension a fresh schema, removing
the precondition. It is opt-in and only for new extensions, so the two
look complementary.The "sandboxing untrusted code" thread [3] makes a point we tried to
honor: a check that rejects what a human reads as harmless gets
switched off. A script references built-ins, its own objects and its
required extensions', and the trust rule accepts all three regardless
of who owns them.Does this approach seem reasonable?
[1]
https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-SECURITY-SCRIPTS
[2]/messages/by-id/CAGECzQQzDqDzakBkR71ZkQ1N1ffTjAaruRSqppQAKu3WF+6rNQ@mail.gmail.com
[3]/messages/by-id/CA+TgmoYiumw-yR8nUUX_8qdihPd0ZmT29ch0VR_r+kw+o7QJvQ@mail.gmail.com
Best regards
Jan Nidzwetzki
Fabrízio de Royes Mello--
Jan Nidzwetzki
PlanetScale Postgres Core Team
Hi,
On 08.09.26 08:53, Osama Abdul Qader wrote:
I've reproduced the exact bug you were talking about and also I reviewed
the patch series and tested the reported overload-resolution issue locally.
Thanks for the detailed review and for testing the patches.
I have now registered the patch in the Commitfest for tracking:
https://commitfest.postgresql.org/patch/7276/
Feel free to add yourself as a reviewer there if you would like.
Best regards
Jan
--
Jan Nidzwetzki
PlanetScale Postgres Core Team
Hi,
Thank you for your reply, I'm happy that my review was useful to you.
And sure I'll like to add myself as a reviewer there.
Have a nice day,
Osama Abdul Qader.
On Tue, 15 Sept, 2026, 1:42 pm Jan Nidzwetzki, <jan@planetscale.com> wrote:
Show quoted text
Hi,
On 08.09.26 08:53, Osama Abdul Qader wrote:
I've reproduced the exact bug you were talking about and also I reviewed
the patch series and tested the reported overload-resolution issuelocally.
Thanks for the detailed review and for testing the patches.
I have now registered the patch in the Commitfest for tracking:
https://commitfest.postgresql.org/patch/7276/Feel free to add yourself as a reviewer there if you would like.
Best regards
Jan--
Jan Nidzwetzki
PlanetScale Postgres Core Team
Hi all,
I tested the latest patch series for preventing object capture in
CREATE/ALTER EXTENSION scripts.
First, I was able to reproduce the reported issue. With f(varchar)
owned by the trusted role and an attacker-owned f(text) in the same
schema, the call f('abc') from the extension script resolved to the
attacker-owned function and returned ATTACKER FUNCTION.
I then tested patch 0001 alone. The behavior was unchanged, and the
extension script still resolved the call to ATTACKER FUNCTION.
After applying both patches, I repeated the test with the varchar
function owned by a superuser and the text function owned by a
non-superuser. This time, the extension was created successfully and
the result was:
SELECT * FROM test_ext.capture_result;
TRUSTED FUNCTION
I also checked the normal function calls outside the extension script:
f('abc'::varchar) -> TRUSTED FUNCTION
f('abc'::text) -> ATTACKER FUNCTION
f('abc') ->ATTACKER FUNCTION
So the normal function resolution behavior remains unchanged.
The regression tests added by the patch also passed successfully:
Overall, the patch worked as expected in my testing. The extension
script now selects the trusted candidate instead of the attacker-owned
candidate when both overloads are present.
Regards,
solai
Hi solai,
On 22.09.26 06:13, solai v wrote:
[...]
Overall, the patch worked as expected in my testing. The extension
script now selects the trusted candidate instead of the attacker-owned
candidate when both overloads are present.
Thank you so much for the review.
While testing the patch further, I found a gap with schema-qualified
names. In v1, the trust check for relations and types was applied only
when the script used an unqualified name and the lookup went through
RelnameGetRelid() or TypenameGetTypidExtended(). A reference such as
@extschema@.foo took the qualified branch of RangeVarGetRelidExtended()
or LookupTypeNameExtended() and was not checked at all. Functions and
operators were not affected, since their candidate lookup handles both
versions in one place.
v2 adds the check to those two branches, so an untrusted match is
treated as nonexistent there too. I also added tests for this case; I
slightly adjusted the commit message and rebased the patch set against
master.
Best regards
Jan
--
Jan Nidzwetzki
PlanetScale Postgres Core Team
Attachments:
t253701_7v2-0001-Propagate-extension-script-state-to-parallel-work.patchtext/plain; charset=UTF-8; name=v2-0001-Propagate-extension-script-state-to-parallel-work.patchDownload+36-1
v2-0002-Prefer-trusted-candidates-when-resolving-names-in.patchtext/plain; charset=UTF-8; name=v2-0002-Prefer-trusted-candidates-when-resolving-names-in.patchDownload+1250-56
Hi Hackers,
To confirm the patch works with existing extensions, I ran additional
tests. I installed various extensions on both a patched and an unpatched
server. I tested contrib and src/test/modules on master (95 extensions),
and all postgresql-18-* packages from apt.postgresql.org plus contrib
(171 extensions) on a backport of this patch to 18.6 (since there are no
extension packages for master).
I installed each extension as a superuser and, when possible (trusted or
superuser = false), also as a non-superuser. I also did this in
databases that already had objects owned by a non-superuser. I updated
extensions from older versions to the current one and repeated the
installs with debug_parallel_query set to regress. Only a few scripts
actually ran queries in parallel workers, and they behaved the same on
both servers. For each run, I compared the results of every statement
and checked which objects the extension's members pointed to using
pg_depend.
I found no differences between the patched and unpatched servers. The
regression tests for contrib and 35 third-party extensions also gave the
same results. For the third-party regression tests, I only included
extensions that run their tests with a plain PGXS "make installcheck".
I'm happy to share the scripts I used if anyone wants to rerun the tests.
Best regards
Jan
--
Jan Nidzwetzki
PlanetScale