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

From Michael Paquier
Subject Re: Allowing REINDEX to have an optional name
Date
Msg-id YtYvbtPCW2ztdUHy@paquier.xyz
Whole thread Raw
In response to Re: Allowing REINDEX to have an optional name  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: Allowing REINDEX to have an optional name
List pgsql-hackers
On Mon, Jul 18, 2022 at 09:26:53PM -0500, Justin Pryzby wrote:
> Sorry, I meant to send this earlier..

No problem.

> It looks like you named the table "toast_relfilenodes", but then also store
> to it data for non-toast tables.

How about naming that index_relfilenodes?  One difference with what I
posted previously and 5fb5b6 is the addition of an extra regclass that
stores the parent table, for reference in the output.

> It's also a bit weird to call the column "relname" but use it to store the
> ::regclass.  You later need to cast the column to text, so you may as well
> store it as text, either relname or oid::regclass.

I have used "indname" at the end.

> It seems like cluster.sql does this more succinctly.

Except that this does not include the relfilenodes from the toast
indexes, which is something I wanted to add a check for when it comes
to both user tables and catalogs.

> Why {4,5} ?

Looks like a brain fade from here, while looking the relation names
this generated.  This could just match with an integer.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Peter Geoghegan
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum