Re: [HACKERS] Dropping tables...

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Dropping tables...
Дата
Msg-id 35C2E8BF.C0CD9F6C@krs.ru
обсуждение исходный текст
Ответ на ...  (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>)
Список pgsql-hackers
Vadim Mikheev wrote:
>
> Andreas Zeugswetter wrote:
> >
> > I would say allow the drop table, of course only if no update or
> > intent update (select for update) lock is on it.
> > This is how Informix behaves. Otherwise it will become very
> > hard to drop tables altogether.
>
> Ok, currently, table can't be dropped if SELECTed by another
> running transaction.
>
> Would we like to change this ?!

Due to the lack of shared catalog cache I would like to
preserve current behaviour:

System catalogs are scanned by transaction once on first open
of relation and so there is no way for trasnaction to know if
relation was dropped by another backend. If relation file
will not be closed by Virtual file descriptor code (fd.c)
then subsequent operations over relation will be ok
else -> elog(ERROR, "cannot open _relation_") from smgr.c
or even worse if relation will be re-created in the meantime...

We wouldn't like these unpredictable results, yes ?

Vadim

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: AW: [HACKERS] OR clause status report
Следующее
От: Bruce Momjian
Дата:
Сообщение: OR clause - check code