| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Tighten ACL check in repack_is_permitted_for_relation() |
| Date: | 2026-08-17 15:56:19 |
| Message-ID: | aoMus7tN9VHnB-Jr@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
On 2026-Aug-04, Bharath Rupireddy wrote:
> repack_is_permitted_for_relation() uses pg_class_aclcheck_ext() to
> silently skip a concurrently-dropped relation. That's wrong for a
> caller that may already hold a lock on the relation whose ACL is
> checked, where missing a relation is not fine, and it makes the
> single-relation REPACK cases more brittle
> (https://www.postgresql.org/message-id/akPhEffRipH4isWF@nathan) So
> only detect a missing relation where that's expected, following the
> fix for vacuum_is_permitted_for_relation() in commit 824d5f6.
That makes sense. I think "missing OK" is a bit weird as an argument
here though; I prefer it as "already locked", inverting the boolean.
What do you think of this formulation?
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Learn about compilers. Then everything looks like either a compiler or
a database, and now you have two problems but one of them is fun."
https://twitter.com/thingskatedid/status/1456027786158776329
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Tighten-ACL-check-in-repack_is_permitted_for_rela.patch | text/x-diff | 5.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2026-08-17 16:12:07 | Re: BgBufferSync(): clarification about reusable_buffers variable |
| Previous Message | Ilia Evdokimov | 2026-08-17 15:55:18 | Re: COALESCE patch |