Re: [HACKERS] DROP TABLE inside transaction block

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: [HACKERS] DROP TABLE inside transaction block
Дата
Msg-id
8091.936572048@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
DROP TABLE inside transaction block Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] DROP TABLE inside transaction block Michael Simms <grim@argh.demon.co.uk>
Re: [HACKERS] DROP TABLE inside transaction block Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] DROP TABLE inside transaction block Michael Simms <grim@argh.demon.co.uk>
Re: [HACKERS] DROP TABLE inside transaction block Bruce Momjian <maillist@candle.pha.pa.us>
Michael Simms  writes:
>> (Of course, what would be really nice is if it just worked, but I don't
>> see any way to make that happen without major changes.  Simply
>> postponing the unlink to end of transaction isn't workable; consider
>> BEGIN; DROP TABLE foo; CREATE TABLE foo; ...)

> Cant you just rename to a unique name, maybee in another directory,

Not if other backends are also accessing the table.  Remember that to
make this really work, the DROP would have to be invisible to other
backends until commit.

I think that to make this work correctly, we'd have to give up naming
table datafiles after the tables, and use a table's OID or some such
as its file name.  Ugly, and a pain in the neck for debugging and
maintenance.  And we'd still need to postpone the unlink till commit.

The amount of work needed seems vastly more than the feature is worth...
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Michael Simms
Дата:
От: Michael Simms
Дата:
FAQ