Re: When do vacuumed pages/tuples become available for reuse? - Mailing list pgsql-general

From rihad
Subject Re: When do vacuumed pages/tuples become available for reuse?
Date
Msg-id 874426b2-2e1f-4896-3bd7-7cdc064fabe1@mail.ru
Whole thread Raw
In response to Re: When do vacuumed pages/tuples become available for reuse?  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
On 04/12/2019 08:39 AM, Michael Lewis wrote:
Way to many indexes. I'm going to have a hard time convincing our programmers to get rid of any of them )

You can create (concurrently) an identical index with a new name, then drop old version concurrently and repeat for each. It doesn't help you figure out the root cause and how to prevent it from happening again, but gets you to a fresh start at least.

Thanks for the tip. I believe other than increasing load temporarily creating a new index, dropping the old one and renaming the new one to the old one are transparent and (almost) lock-less operations? What would happen to user queries during DROP INDEX? Would they block on it, or, being unable to read it without blocking, will they pick the new one based on the same column(s)? And, likewise, is ALTER INDEX ... RENAME ... an instant operation, I hope?

pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: When do vacuumed pages/tuples become available for reuse?
Next
From: Tiffany Thang
Date:
Subject: multiple indexes on the same column