Re: [GENERAL] Discovering time of last database write

2007-01-10 Thread Andy Dale
Hi Erik, Can you elaborate a bit more on what you mean by pg_class, as looking at it i cannot figure out how to get the last write time from the pg_class table. Cheers, Andy On 08/01/07, Erik Jones <[EMAIL PROTECTED]> wrote: Scott Marlowe wrote: > On Mon, 2007-01-08 at 03:26, Andy Dale wrote

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Michael Nolan
On several occasions I have thought that each row in a table should have a SYSTEM COLUMN which gave the timestamp of the last update of that row. This could get a bit expensive on space and in some cases might be redundant with (or have a slightly different value from) a user-maintained timestamp

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Andy Dale
Hi, I am still not so certain about adding a timestamp column to each table, as within a few months the table will be quite big. My current thinking is to have a trigger per table that overwrties a single value in a single utility table after every write, this will be far quicker to select when

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Erik Jones
Scott Marlowe wrote: On Mon, 2007-01-08 at 03:26, Andy Dale wrote: Ok. The SQL Proxy i am using (HA-JDBC) has some limitations with regard to getting it's "cluster" back into sync. If ha-jdbc uses the wrong DB (one that has been out of action for a while) as the starting point for the clust

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Scott Marlowe
On Mon, 2007-01-08 at 03:26, Andy Dale wrote: > Ok. > > The SQL Proxy i am using (HA-JDBC) has some limitations with regard to > getting it's "cluster" back into sync. If ha-jdbc uses the wrong DB > (one that has been out of action for a while) as the starting point > for the cluster it will then

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Scott Marlowe
On Mon, 2007-01-08 at 02:22, Andy Dale wrote: > 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 figu

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Andy Dale
Ok. The SQL Proxy i am using (HA-JDBC) has some limitations with regard to getting it's "cluster" back into sync. If ha-jdbc uses the wrong DB (one that has been out of action for a while) as the starting point for the cluster it will then try and delete stuff from the other DB's on their introd

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Bruno Wolff III
On Mon, Jan 08, 2007 at 09:22:05 +0100, Andy Dale <[EMAIL PROTECTED]> wrote: > 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/Softwa

Re: [GENERAL] Discovering time of last database write

2007-01-08 Thread Andy Dale
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 th

Re: [GENERAL] Discovering time of last database write

2007-01-04 Thread Scott Marlowe
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