From: | Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: REINDEX blocks virtually any queries but some prepared queries. |
Date: | 2022-04-07 11:37:57 |
Message-ID: | 449f275c-eeb9-3292-86c9-00aa6bda7609@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4/6/22 17:03, Peter Geoghegan wrote:
> On Wed, Apr 6, 2022 at 7:49 AM Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com> wrote:
>> From the documentation
>> (https://www.postgresql.org/docs/current/sql-reindex.html#id-1.9.3.162.7)
>> it sounds like REINDEX won't block read queries that don't need the
>> index. But it seems like the planner wants to take an ACCESS SHARE lock
>> on every indexes, regardless of the query, and so REINDEX actually
>> blocks any queries but some prepared queries whose plan have been cached.
>>
>> I wonder if it is a bug, or if the documentation should be updated. What
>> do you think?
>
> I've always thought that the docs for REINDEX, while technically
> accurate, are very misleading in practice.
>
Maybe something along this line? (patch attached)
Attachment | Content-Type | Size |
---|---|---|
0001-Doc-Elaborate-locking-considerations-for-REINDEX.patch | text/x-patch | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2022-04-07 11:38:27 | Re: OpenSSL deprectation warnings in Postgres 10-13 |
Previous Message | Yura Sokolov | 2022-04-07 11:14:59 | Re: BufferAlloc: don't take two simultaneous locks |