Re: Last modification time

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Last modification time
Дата
Msg-id 877j80ptm2.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Re: Last modification time  (Johan Vromans <jvromans@squirrel.nl>)
Список pgsql-general
Johan Vromans <jvromans@squirrel.nl> writes:

> Doug McNaught <doug@mcnaught.org> writes:
>> Yeah, LISTEN/NOTIFY is definitely a lighter-weight solution--I didn't
>> think of that before.
>
> LISTEN/NOTIFY looks like a synchronisation mechanism. You can notify a
> subscriber that something happened. But in my case, the report
> generating program runs only occasionally and will not be permanently
> running subscribed. I'm not sure how to use LISTEN/NOTIFY for that.

Well you need something trigger-based, because I don't think it would
be useful to look at modification dates on the database files or
anything like that (checkpoints, vacuum, rolled back transactions etc
would change those even when the user-visible data didn't change).
You could have the trigger update a single-row table and have the
report generator (or a wrapper) poll for it, or you could have it send
a NOTIFY to a little program sitting on a connection, which would then
kick off the report generator.

-Doug

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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Each foo must have a bar
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Last modification time