Re: RFC: Restructuring pg_aggregate

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: RFC: Restructuring pg_aggregate
Дата
Msg-id 001701c1e2b2$e7b10a40$0200a8c0@SOL
обсуждение исходный текст
Ответ на Re: RFC: Restructuring pg_aggregate  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: DROP COLUMN (was RFC: Restructuring pg_aggregate)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> 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?)

OK, sounds fair.  However, is there a more aggressive way of reclaiming the
space?  The problem with updating all the rows to null for that column is
that the on-disk size is doubled anyway, right?  So, could a VACUUM FULL
process do the nulling for us?  Vacuum works outside of normal transaction
constraints anyway...?

Also, it seems to me that at some point we are forced to break client
compatibility.  Either we add attisdropped field to pg_attribute, or we use
Hiroshi's (-1 * attnum - offset) idea.  Both Tom and Hiroshi have good
reasons for each of these - would it be possible for you guys to post with
your reasons for and against both the techniques.  I just want to get to an
implementation specification we all agree on that can be written up and then
the coding can proceed.  Maybe we should add it to the 'Postgres Major
Projects' page - and remove those old ones that have already been
implemented.

Chris




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Scanner performance (was Re: 7.3 schedule)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Suggestions please: names for function cachabilityattributes