Re: Discovering time of last database write

Поиск
Список
Период
Сортировка
От Andy Dale
Тема Re: Discovering time of last database write
Дата
Msg-id faa313130701080022m7acabc91g966b1dcf8eeea301@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Discovering time of last database write  (Scott Marlowe <smarlowe@g2switchworks.com>)
Ответы Re: Discovering time of last database write  (Bruno Wolff III <bruno@wolff.to>)
Re: Discovering time of last database write  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
Hi,

Sorry for the slight delay in my response.

I am using 3 PostgreSQL databases and writing to them using an SQL proxy.  These databases have a high write volume.  On rebooting all 3 servers for OS/Software updates, i would like to figure out which was the last written to DB (this is assuming the DB/Servers are not all taken down at the same time), the times are kept in sync with NTP.

I imagine it is possible to get this behaviour with after triggers, but this means i have to attach the same trigger to each table ??

Thanks,

Andy

On 04/01/07, Scott Marlowe <smarlowe@g2switchworks.com> wrote:
On Thu, 2007-01-04 at 11:11, Andy Dale wrote:
> Hi,
>
> I need to be able to determine the last time (and date) that a
> database was written to.  I know it could be possible just to check
> the last modified dates in the PGDATA directory, but i need to compare
> the last write time of 3 databases (connecting via JDBC).  Hopefully
> the last write date is contained somewhere in a system table
> (information schema) but i have no idea of the table(s) i would need
> to query.

Bad news, it's not generally stored.

Good news, it's not that hard to implement.

Perhaps if you give us the bigger picture we can make more logical
suggestions on how to accomplish it.

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

Предыдущее
От: Christopher Browne
Дата:
Сообщение: Re: Slony across platforms
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Discovering time of last database write