Re: [HACKERS] DROP TABLE inside transaction block

Поиск
Список
Период
Сортировка
От Michael Simms
Тема Re: [HACKERS] DROP TABLE inside transaction block
Дата
Msg-id 199909052311.AAA01019@argh.demon.co.uk
обсуждение исходный текст
Ответ на Re: [HACKERS] DROP TABLE inside transaction block  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> 
> Michael Simms <grim@argh.demon.co.uk> 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.

Could you not then:

send a notification to all other backends

Put something into the table header that any new backend that tries to use it
is informed that the correct table is stored elsewhere.

I dont know, Im just throwing ideas here {:-)
                    Michael Simms


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] DROP TABLE inside transaction block
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] md.c is feeling much better now, thank you