| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | Aman Ganapathy <aman(at)stack-auth(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 02:57:33 |
| Message-ID: | CALdSSPjMRLnmSScJu8pc3Xpb1ZoiV5Om7mQKA9pfaADLr9AVAQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Thu, 3 Dec 2026 at 23:58, Aman Ganapathy <aman(at)stack-auth(dot)com> wrote:
>
> Hi,
>
> Thanks for taking a look! I've attached a patch and a potential test.
>
> RememberAllDependentForRebuilding() doesn't lock the objects it sees in
> pg_depend, so if something is dropped in between, the lookup fails.
> 0001 looks them up with missing_ok = true and skips the ones that are
> gone, since an object that has been dropped no longer uses the column.
> If the object is still there, you get the same error as before.
>
> 0002 adds an injection point and a small isolation test that drops a
> view while the ALTER is waiting. Without 0001 it fails with "could not
> find tuple for rule". From #19967, I see that narrow tests may not be
> worth it, so I split the test out from the patch in case it is better
> to leave it out.
>
> Both are against master. make check passes with 0001 on its own, and
> make check in src/test/modules/injection_points passes with both.
>
> Thanks
> Aman
>
Please avoid top posting on there lists [0].
Your isolation test reproduces the issue, unpatched binary runs with
ERROR: could not find tuple for rule for me . Fix looks ok
[0] https://wiki.postgresql.org/wiki/Mailing_Lists
--
Best regards,
Kirill Reshke
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-12-04 03:43:25 | Re: BUG #19801: atan2d underflow causes equivalent queries to return different results |
| Previous Message | Srinath Reddy Sadipiralla | 2026-12-04 00:06:37 | Re: BUG #19952: psql \d+ omits nondefault replica identity for partitioned tables |