Re: unlogged tables

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: unlogged tables
Дата
Msg-id AANLkTi=n-PcrnYzHWG9JNoGkk0SHoOA3kudCC+7O5TMQ@mail.gmail.com
обсуждение исходный текст
Ответ на unlogged tables  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: unlogged tables  (Robert Haas <robertmhaas@gmail.com>)
Re: unlogged tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Nov 14, 2010 at 02:16, Robert Haas <robertmhaas@gmail.com> wrote:
> Here is a series of three patches related to unlogged tables.

Just wondering, have you thought of any mechanisms how application
code might detect that an unlogged table was truncated due to restart?
While polling with something like "SELECT 1 FROM table LIMIT 1" might
work, it's an awful hack.

One obvious use case for these unlogged tables would be materalized
views. I think it would be useful to execute e.g. a TRUNCATE trigger
so that an the view could be initialized. If an exclusive lock were
passed on to the trigger procedure, this could even be done in a
race-condition-free manner as far as I can tell.

Would there be a problem with invoking this trigger from the session
that first touches the table?

Regards,
Marti


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: SSI update
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI update