Re: Useless "Replica Identity: NOTHING" noise from psql \d

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Useless "Replica Identity: NOTHING" noise from psql \d
Date: 2013-12-17 14:37:09
Message-ID: CA+TgmoYmxLYA7G2nhrOkWLvz5t6FbUwx61Ahens=_MnhKkWnrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 16, 2013 at 7:25 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2013-12-14 17:43:36 +0100, Andres Freund wrote:
>> On 2013-12-14 11:27:53 -0500, Tom Lane wrote:
>> > In HEAD:
>> >
>> > regression=# \d pg_depend
>> > Table "pg_catalog.pg_depend"
>> > Column | Type | Modifiers
>> > -------------+---------+-----------
>> > classid | oid | not null
>> > objid | oid | not null
>> > objsubid | integer | not null
>> > refclassid | oid | not null
>> > refobjid | oid | not null
>> > refobjsubid | integer | not null
>> > deptype | "char" | not null
>> > Indexes:
>> > "pg_depend_depender_index" btree (classid, objid, objsubid)
>> > "pg_depend_reference_index" btree (refclassid, refobjid, refobjsubid)
>> > Replica Identity: NOTHING
>> >
>> > Where did that last line come from, and who thinks it's so important
>> > that it should appear by default? It seems absolutely content-free
>> > even if I were using whatever feature it refers to, since it is
>> > (I presume) the default state.
>>
>> Hm. Yes, that's slightly inellegant. It's shown because it's not
>> actually the normal default normal tables. Just for system tables. Maybe
>> we should just set it to default (in pg_class) for system tables as
>> well, and just change it in the relcache.
>
> Hm. I don't like that choice much after thinking for a bit. Seems to
> make querying the catalog unneccessarily complex.
> How about making it conditional on the table's namespace instead? That
> will do the wrong thing if somebody moves a table to pg_catalog and
> configures a replica identity, but I think we can live with that, given
> how many other things work strangely around that.
>
> Patch attached.

I vote for showing it only with +, but regardless of whether the value
matches the expected default. I'd keep the relkind test, though,
because I think I noticed that it currently shows up for indexes,
which is dumb.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2013-12-17 14:44:00 Re: BUG #8676: Bug Money JSON
Previous Message Robert Haas 2013-12-17 14:34:19 Re: pg_rewarm status