From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Shayon Mukherjee <shayonj(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch) |
Date: | 2024-11-25 23:18:48 |
Message-ID: | CAApHDvqNjTUc3JUyGA26706_zBzaPenj1O0DbfKjLbPoAs+hnA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 26 Nov 2024 at 11:34, Shayon Mukherjee <shayonj(at)gmail(dot)com> wrote:
> Thank you for the guidance and tips. I was wondering if updating in-place is preferable or not, since my first instinct was to avoid it. I did not notice any breakage last time, unless I was looking in the wrong place (possibly?). I did notice the min update when a not-in-place update was performed, but I didn't notice any issues (as mentioned in [1]) from it, via logs, index usage, or other common operations. Let me write up some more test cases to check if there is a risk of indexcheckxmin running out or other issues, and I'll get back here.
Another safer option could be to disallow the enable/disable ALTER
TABLE if indcheckxmin is true. We do have and use
ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE for these sorts of issues.
There are other existing failure modes relating to indexes that can
depend on what another session has done, e.g. MarkInheritDetached()
can fail if another session detached an index concurrently. I could
respect an argument that this one might be worse than that as its
timing dependent rather than dependent on what another session has
done.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-11-25 23:21:14 | Re: Self contradictory examining on rel's baserestrictinfo |
Previous Message | Tom Lane | 2024-11-25 23:12:33 | Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE |