| From: | Aman Ganapathy <aman(at)stack-auth(dot)com> |
|---|---|
| To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19968: ALTER COLUMN TYPE fails with internal errors if a dependent object is dropped concurrently |
| Date: | 2026-12-04 17:43:11 |
| Message-ID: | CA+jUSqTJN_Nd6RZGRgyiZRFW+2=JnBkKjH4V5QZJ3-SdDuVNgw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Thu, Dec 3, 2026 at 9:00 PM Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
> Putting this on a second thought, I can agree we should avoid XX000
> error code in sql-reachable scenarios, but for 0A000 (your drop
> function case) - why not to leave everything as-is?
> If somebody drops functions concurrently with an alter type and
> receives an error due to race - a simple retry would make everything
> done, and your NULL guard would not prevent all types of races of this
> kind anyway, so why bother at all?
Yeah I see what you mean. I think it makes sense to leave the 0A000 case
as is then. The idea was to avoid the "(null)" in the DETAIL and handle
it the same way as the other cases, but on a second look it reads like
special casing, and you're right, it isn't worth it here. I've dropped
it in v2. I kept 0002 unchanged.
Thanks
Aman
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Fix-ALTER-COLUMN-TYPE-when-a-dependent-object-is-.patch | application/octet-stream | 2.7 KB |
| v2-0002-Add-a-test-for-ALTER-COLUMN-TYPE-with-a-concurren.patch | application/octet-stream | 4.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Jan Nidzwetzki | 2026-12-04 16:37:32 | Re: dbase_redo: XLOG_DBASE_CREATE_FILE_COPY replay empties live database |