Re: How to know if a database has changed - Mailing list pgsql-general

From James Keener
Subject Re: How to know if a database has changed
Date
Msg-id 50A775BB-BED3-4840-9146-B1F9B3D91354@jimkeener.com
Whole thread Raw
In response to How to know if a database has changed  (marcelo <marcelo.nicolet@gmail.com>)
List pgsql-general
The two non elegant ways I can think of is checking the modification time on the files representing the database and a query that checks the pk of all tables. If they're ordered pk you could store the max of them and then compare, otherwise the max of an updated at column would work as well.

Jim

On December 11, 2017 11:48:44 AM EST, marcelo <marcelo.nicolet@gmail.com> wrote:
The installation I'm planning will manage several databases, but not all 
of them will change every day.
In order to planning/scripting the pg_dump usage, I would need to know
which databases had some change activity at the end of some day.
How can it be done?
TIA


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: pg_dump and logging
Next
From: Jaime Casanova
Date:
Subject: Re: How to know if a database has changed