Re: last insert/update for a table

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: last insert/update for a table
Дата
Msg-id 4B58349D020000250002E98E@gw.wicourts.gov
обсуждение исходный текст
Ответ на last insert/update for a table  (Kevin Kempter <kevink@consistentstate.com>)
Список pgsql-admin
Kevin Kempter <kevink@consistentstate.com> wrote:

> is there a system catalog query or function that will show me the
> last time  an insert or update occurred for a specified table ?

That would be rather expensive to maintain.  You could almost count
on looking at the timestamps on the underlying files, except that
various maintenance, like setting hint bits and vacuuming, would
cause changes there in addition to inserts and updates.

If this is some sort of audit because of suspected inappropriate
actions, be sure you capture a copy of the database ASAP.  You might
be able to figure something useful based on the xmin and xmax values
for tuples.  Without knowing exactly why you want this, it's hard to
offer specific advice.

-Kevin

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

Предыдущее
От: Uwe Bartels
Дата:
Сообщение: vacuum + autovacuum
Следующее
От: Kevin Kempter
Дата:
Сообщение: query to list all user tables and related constraints