Re: Allowing REINDEX to have an optional name

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bernd Helmle <mailings(at)oopsware(dot)de>
Cc: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Subject: Re: Allowing REINDEX to have an optional name
Date: 2022-05-31 12:09:29
Message-ID: YpYFeT4BYZowbFUM@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 31, 2022 at 11:04:58AM +0200, Bernd Helmle wrote:
> And we already have a situation where this already happens with REINDEX
> DATABASE: if you use CONCURRENTLY, it skips system catalogs already and
> prints a warning. In both cases there are good technical reasons to
> skip catalog indexes and to change the workflow to use separate
> commands.

The case with CONCURRENTLY is different though: the option will never
work on system catalogs so we have to skip them. Echoing with others
on this thread, I don't think that we should introduce a different
behavior on what's basically the same grammar. That's just going to
lead to more confusion. So REINDEX DATABASE with or without a
database name appended to it should always mean to reindex the
catalogs on top of the existing relations.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-05-31 12:20:53 Re: "ERROR: latch already owned" on gharial
Previous Message Laurenz Albe 2022-05-31 11:02:27 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands