Re: How to know if a database has changed

Andreas Kretschmer <andreas@a-kretschmer.de>

From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-general@lists.postgresql.org
Date: 2017-12-11T17:26:15Z
Lists: pgsql-general

Am 11.12.2017 um 17:48 schrieb marcelo:
> 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
>

I think you can use logical replication. Take a view at 
https://github.com/eulerto/wal2json (for instance, there are other 
solutions available), just capture the wal and check for changes for 
every database.

it's just a rough idea...



Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com