Re: RFC: Restructuring pg_aggregate - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RFC: Restructuring pg_aggregate
Date
Msg-id 1824.1018542155@sss.pgh.pa.us
Whole thread Raw
In response to Re: RFC: Restructuring pg_aggregate  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: RFC: Restructuring pg_aggregate  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> The real problem here is the fact that there are now missing attnos in
> pg_attribute.  Either that's handled or we renumber the attnos - which is
> also quite hard?

Updating pg_attribute per se is not so hard --- just store new copies of
all the rows for the table.  However, propagating the changes into other
places could be quite painful (I'm thinking of column numbers in stored
constraints, rules, etc).

It seems to me that reducing the column to NULLs already gets you the
majority of the space savings.  I don't think there is a case to be made
that getting back that last bit is worth the pain involved, either in
implementation effort or direct runtime costs (do you really want a DROP
COLUMN to force an immediate rewrite of the whole table?)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: help with bison
Next
From: Bruce Momjian
Date:
Subject: Re: RFC: Restructuring pg_aggregate