T
T
trprbr2019-06-12 17:01:13
PostgreSQL
trprbr, 2019-06-12 17:01:13

Auditing changes to a database table with "read-only" permissions?

There is access to a remote PostgreSQL database with "read-only" rights.
Without using PostgreSQL's internal data change auditing capabilities, how can I periodically monitor what changes have occurred in several tables of this database?
Export tables to files and then compare them?
Create a local database, throw different versions of tables into it, and compare there already?
Which way is easier and more efficient?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2019-06-12
@BorisKorobkov

Read-only can't "control" anything.
1. As you already wrote, periodically dump and compare with the previous dump. Perversion.
2. With rw rights, hang all tables once with triggers (write all changes to a new table) and then r read the log. Crutches.
3. Set up replication with root rights and read log. The most correct option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question