pgsql: Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to
Дата
Msg-id 20090211211116.9F6C97559ED@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to physically
get rid of the OID column.  This eliminates the problem discovered by Heikki
back in November that 8.4's suppression of "unnecessary" junk filtering in
INSERT/SELECT could lead to an Assert failure, or storing of oids into a table
that shouldn't have them if Asserts are off.  While that particular problem
could have been solved in other ways, it seems likely to be just a forerunner
of things to come if we continue to allow tables to contain rows that disagree
with the pg_class.relhasoids setting.  It's better to make this operation slow
than to sacrifice performance or risk bugs in more common code paths.

Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids.
This was a bit more controversial, but in view of the very small amount of
extra code needed given the current ALTER TABLE infrastructure, it seems best
to eliminate the asymmetry in features.

Modified Files:
--------------
    pgsql/doc/src/sgml/ref:
        alter_table.sgml (r1.103 -> r1.104)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_table.sgml?r1=1.103&r2=1.104)
    pgsql/src/backend/commands:
        tablecmds.c (r1.279 -> r1.280)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.279&r2=1.280)
    pgsql/src/backend/parser:
        gram.y (r2.657 -> r2.658)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.657&r2=2.658)
    pgsql/src/include/nodes:
        parsenodes.h (r1.390 -> r1.391)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.390&r2=1.391)
    pgsql/src/test/regress/expected:
        alter_table.out (r1.114 -> r1.115)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/alter_table.out?r1=1.114&r2=1.115)
    pgsql/src/test/regress/sql:
        alter_table.sql (r1.60 -> r1.61)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/alter_table.sql?r1=1.60&r2=1.61)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Tweak configure to attempt to add -qnoansialias to CFLAGS
Следующее
От: bmomjian@pgfoundry.org (User Bmomjian)
Дата:
Сообщение: pg-migrator - src: Add support for old/new superuser specification.