Re: Unused(?) field Form_pg_sequence.sequence_name, not updated by seq rename

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused(?) field Form_pg_sequence.sequence_name, not updated by seq rename
Date: 2015-12-15 05:05:26
Message-ID: 14203.1450155926@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Craig Ringer <craig(at)2ndquadrant(dot)com> writes:
> Does anyone know why Form_pg_sequence has a field sequence_name that
> duplicates the sequence's name from pg_class ?

It's historical, for sure. We won't be removing it in the foreseeable
future because of on-disk-compatibility issues. But you might want to
read the pghackers archives, five or ten years back, where we speculated
about redoing sequences to combine them all into one system catalog
(ie, store one row per sequence not one relation per). Aside from
application compatibility issues, the stumbling block seemed to be how to
separate transactional from nontransactional updates. That particular
problem is also why ALTER SEQUENCE RENAME can't update the sequence's copy
of the relation name: the wrong things happen if you roll back.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message amul sul 2015-12-15 05:16:42 small query, about skipping dump in dumpAttrDef
Previous Message Craig Ringer 2015-12-15 04:40:04 Unused(?) field Form_pg_sequence.sequence_name, not updated by seq rename