Re: [HACKERS] DROP TABLE inside transaction block

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] DROP TABLE inside transaction block
Дата
Msg-id 37D3145B.9179323E@krs.ru
обсуждение исходный текст
Ответ на DROP TABLE inside transaction block  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] DROP TABLE inside transaction block  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> 
> Pursuant to a phone conversation I had with Bruce, I added code this
> morning to reject DROP TABLE or DROP INDEX inside a transaction block;
> that is, you can't do BEGIN; DROP TABLE foo; END anymore.  The reason
> for rejecting this case is that we do the wrong thing if the transaction
> is later aborted.  Following BEGIN; DROP TABLE foo; ABORT, the system
> tables will claim that foo is still valid (since the changes to them
> were never committed) but we've already unlinked foo's physical file,
> and we can't get it back.  Solution: only allow DROP TABLE outside
> BEGIN, so that the user can't try to change his mind later.

What if table was created inside BEGIN/END?
Any reason to disallow DROP of local tables?

Vadim


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] md.c is feeling much better now, thank you
Следующее
От: Thomas Lockhart
Дата:
Сообщение: [HACKERS] main tree is (slightly) damaged