Re: [HACKERS] Happy column dropping

Поиск
Список
Период
Сортировка
От Chris Bitmead
Тема Re: [HACKERS] Happy column dropping
Дата
Msg-id 388D0F76.6C04FADA@bitmead.com
обсуждение исходный текст
Ответ на RE: [HACKERS] Happy column dropping  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Ответы Re: [HACKERS] Happy column dropping  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> 
> "Hiroshi Inoue" <Inoue@tpf.co.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
> 
> ************


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Happy column dropping
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Happy column dropping