Re: Last modification time of a database?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Erik Jones <ejones(at)engineyard(dot)com>
Cc: General postgres mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Last modification time of a database?
Date: 2009-03-24 00:00:15
Message-ID: 49C8228F.8090501@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik Jones wrote:

> Am I missing something obvious here? If not, has anyone come up with a
> reliable way to do this?

Triggers on all your tables that append to a logging table?

Have the client do it?

Note that you do *NOT* want to have triggers that attempt to UPDATE a
table to record the last modified time for that table. They'll cause
transactions that touch the same table to block waiting until the first
one commits/rolls back, so they'll ruin your concurrency. They may also
cause unexpected deadlock aborts of transactions.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Madison Kelly 2009-03-24 00:14:44 Re: Determining/Setting a server's time zone
Previous Message Craig Ringer 2009-03-23 23:54:43 Re: text column constraint, newbie question