| From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
|---|---|
| To: | Alexander Kukushkin <cyberdemn(at)gmail(dot)com> |
| Cc: | Andreas Karlsson <andreas(at)proxel(dot)se>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: tiny step toward threading: reduce dependence on setlocale() |
| Date: | 2025-10-24 02:37:25 |
| Message-ID: | cbe16b204af8c288c965051cd98243182aacee5e.camel@j-davis.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, 2025-09-25 at 11:31 +0200, Alexander Kukushkin wrote:
> Hi Jeff,
>
> On Thu, 25 Sept 2025 at 11:08, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> > Committed v2-0001.
> >
>
>
> 06421b084364 commit broke possibility to
> call GetSharedSecurityLabel() from ClientAuthentication_hook.
> Now GetSharedSecurityLabel() calls fail with the error "cannot read
> pg_class without having selected a database".
...
> pg_shseclabel.provider data type is TEXT with collation C.
> When doing btree lookup by (objoid, classoid, provider) we need to
> take into account collation.
> varstr_cmp() was used to make an exception for C collation, and now
> it has to do a cache lookup for pg_collation to determine that this
> is a C collation.
> However, caches are not yet initialized at the moment
> when ClientAuthentication_hook is executed, and they can't be,
> because database access is not yet allowed.
>
> Or, in other words, this commit made shared pg_catalog relations
> depend on non shared relations.
Thank you, patch attached, intended for backport to 18.
Are you aware of any way to encounter this bug without using an
extension?
Regards,
Jeff Davis
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Special-case-C_COLLATION_OID-in-pg_newlocale_from.patch | text/x-patch | 2.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2025-10-24 02:40:03 | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |
| Previous Message | Quan Zongliang | 2025-10-24 01:57:51 | Re: Include extension path on pg_available_extensions |