Allowing REINDEX to have an optional name - Mailing list pgsql-hackers

From Simon Riggs
Subject Allowing REINDEX to have an optional name
Date
Msg-id CANbhV-H=NH6Om4-X6cRjDWfH_Mu1usqwkuYVp-hwdB_PSHWRfg@mail.gmail.com
Whole thread Raw
Responses Re: Allowing REINDEX to have an optional name  (Bernd Helmle <mailings@oopsware.de>)
Re: Allowing REINDEX to have an optional name  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
A minor issue, and patch.

REINDEX DATABASE currently requires you to write REINDEX DATABASE
dbname, which makes this a little less usable than we might like.

REINDEX on the catalog can cause deadlocks, which also makes REINDEX
DATABASE not much use in practice, and is the reason there is no test
for REINDEX DATABASE. Another reason why it is a little less usable
than we might like.

Seems we should do something about these historic issues in the name
of product usability.

Attached patch allows new syntax for REINDEX DATABASE, without needing
to specify dbname. That version of the command skips catalog tables,
as a way of avoiding the known deadlocks. Patch also adds a test.

-- 
Simon Riggs                http://www.EnterpriseDB.com/

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply
Next
From: Amit Kapila
Date:
Subject: Re: Support logical replication of DDLs