From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: BUG #17212: pg_amcheck fails on checking temporary relations |
Date: | 2021-10-07 01:03:11 |
Message-ID: | CAH2-WzmptBKhrhVs_-Eaw7VMbG_u_e40EObmT1nR5XE-v6HbPw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Wed, Oct 6, 2021 at 2:28 PM Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> wrote:
>> It is the most consistent with the general design of the system, for
>> reasons that are pretty deeply baked into the system. I'm reminded of
>> the fact that REINDEX CONCURRENTLY's completion became blocked due to
>> similar trepidations. Understandably so.
>
>
> I may mistake, but I recall the fact that all indexes builds started during some other (long) index build do not finish with indexes usable for selects until that long index is built. This may and may not be a source of amcheck misbehavior. Just a note what could be possibly considered.
I may have been unclear. I meant that work on the REINDEX CONCURRENTLY
feature (several years ago) was very difficult. It seemed to challenge
what "Postgres relation" really means.
Various community members had concerns about the definition at the
time. Remember, plain REINDEX actually gets a full AccessExclusiveLock
on the target index relation. This is practically as bad as getting
the same lock on the table itself for most users -- which is very
disruptive indeed. It's much more disruptive than plain CREATE INDEX
-- CREATE INDEX generally only blocks write DML. Whereas REINDEX tends
to block both writes and reads (in practice, barring some narrow cases
with prepared statements that are too confusing to users to be worth
discussing). Which is surprising in itself to users. Why should plain
REINDEX be so different to plain CREATE INDEX?
The weird (but also helpful) thing about the implementation of REINDEX
CONCURRENTLY is that we can have *two* pg_class entries for what the
user thinks of as one index/relation. Having two pg_class entries is
also why plain REINDEX had problems that plain CREATE INDEX never had
-- having only one pg_class entry was actually the true underlying
problem, all along.
Sometimes we have to make a difficult choice between "weird rules but
nice behavior" (as with REINDEX CONCURRENTLY), and "nice rules but
weird behavior" (as with plain REINDEX).
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Cliff Sizer | 2021-10-07 05:37:42 | Fwd: BUG #17216: No Password Provided Error - uncaught exception |
Previous Message | Peter Geoghegan | 2021-10-06 23:12:15 | Re: BUG #17212: pg_amcheck fails on checking temporary relations |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-10-07 01:53:57 | Re: More business with $Test::Builder::Level in the TAP tests |
Previous Message | Fujii Masao | 2021-10-07 00:46:47 | Re: [EXTERNAL] Re: PQcancel does not use tcp_user_timeout, connect_timeout and keepalive settings |