Re: [HACKERS] Happy column dropping

From: Chris Bitmead <chris(at)bitmead(dot)com>
To: PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Happy column dropping
Date: 2000-01-25 02:50:30
Message-ID: 388D0F76.6C04FADA@bitmead.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> > But I'm now inclined to generate unique relation file name each time
> > in order to have different file names for different versions of a same
> > relation oid. Without chainging relation oids,we would be to do
> > nothing about their attributes/constraints etc.
>
> I was thinking about adding a "version number" to the pg_class entry
> for a relation, and then having its actual filename look like

Well, if you are going to re-write the files in place on update, a
version number seems like overkill. All you need is version "a" and
"b". Every time you do a change it swaps from version RELATIONOID_a to
RELATIONOID_b , or RELATIONOID_b to RELATIONOID_a. Or you could just go
for RELATIONOID and RELATIONOID_new and do a rename (although I guess
you're trying to avoid that).

>
> RELATIONOID_vVERSION.SEGMENT
>
> Then we have:
>
> * Table rename: doesn't change the filename at all
>
> * VACUUM with rebuild or ADD/DROP COLUMN: write new data into
> files with an incremented version number. Also heap_update
> the pg_class tuple with new version number. At instant of
> commit, voila: the new files are valid, the old ones aren't.
> Works for indexes, too.
>
> > Anyway this must be decided after sufficient discussion.
> > It's not the time to do it now.
>
> Agreed. I think we are too close to 7.0 beta to consider doing this.
> We can start thinking about it for 7.1 though.
>
> regards, tom lane
>
> ************

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Mascari 2000-01-25 02:50:45 Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Previous Message Bruce Momjian 2000-01-25 02:48:46 Re: [HACKERS] Happy column dropping