Re: unlogged tables

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: unlogged tables
Дата
Msg-id AANLkTimQ-JmVGJ595f2oLiV5d8WASqQBLKoTd846HZoK@mail.gmail.com
обсуждение исходный текст
Ответ на Re: unlogged tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unlogged tables  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Nov 15, 2010 at 18:25, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marti Raudsepp <marti@juffo.org> writes:
>> Would there be a problem with invoking this trigger from the session
>> that first touches the table?
>
> Other than security?

Right, I guess that would only make sense with SECURITY DEFINER.

On Mon, Nov 15, 2010 at 18:22, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Nov 15, 2010 at 10:54 AM, Marti Raudsepp <marti@juffo.org> wrote:
>> Just wondering, have you thought of any mechanisms how application
>> code might detect that an unlogged table was truncated due to restart?

> Yeah, this infrastructure doesn't really allow that.  The truncate
> happens way too early on in startup to execute any user-provided code.

The truncate itself can be performed early and set a flag somewhere
that would invoke a trigger on the first access. I suppose it cannot
be called a "truncate trigger" then.

Or maybe provide hooks for pgAgent instead?

Do you see any alternatives to be notified of unlogged table
truncates? Without notification, this feature would seem to have
limited usefulness.

Regards,
Marti


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

Предыдущее
От: Eric Davies
Дата:
Сообщение: Re: SQL/MED estimated time of arrival?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: unlogged tables