| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY |
| Date: | 2025-11-28 17:30:40 |
| Message-ID: | 202511281713.yypi63ed3y6z@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello,
Here's a slightly different approach for the fix proposed in your 0003.
I wasn't happy with the idea of opening all indexes twice in
infer_arbiter_indexes(), so I instead made it collect all Relations from
those indexes in an initial loop, then process them in the two places
that wanted them, and we close them all again together. I think this
also makes the code clearer. We no longer have the "next" goto label to
close the index at the bottom of the loop, but instead we can just do
"continue" cleanly.
I also rewrote some comments. I may not have done all the edits I
wanted, but ran out of time today and I think this is in pretty good
shape.
I tried under CATCACHE_FORCE_RELEASE and saw no problems.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
| Attachment | Content-Type | Size |
|---|---|---|
| v14-0003-ON-CONFLICT-Consider-indexes-matching-constraint.patch | text/x-diff | 24.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2025-11-28 17:52:20 | Re: Periodic authorization expiration checks using GoAway message |
| Previous Message | Jelte Fennema-Nio | 2025-11-28 17:18:57 | Re: Periodic authorization expiration checks using GoAway message |