0

Is there any way to detect data changes on postgresql wihtout touching the database structure (creating :procedures ,triggers ...).

We thought about a listener that keep listening to log file and parse it in order to know if there are a data change (insert / delete / modification).

I am not sure if the log parsing is efficient enough for such a deal.

7
  • 1
    For what kind of deal? What are you trying to do? Why can't you change the db? Why must you know when the data changes? Can't you use a different mechanism (such as having the party that changes the database notify you that it has done something)? Commented Mar 27, 2017 at 10:17
  • 3
    Logical replication maybe? jdbc.postgresql.org/documentation/head/replication.html Commented Mar 27, 2017 at 10:21
  • @Kayaman I have two components(A,B), A uses the real db but B uses a partial cache of the db. This is the reason behind the data change management ,making the cache synchronized with the original db each time there are a data change. Commented Mar 27, 2017 at 10:36
  • @a_horse_with_no_name I will have a look on this Commented Mar 27, 2017 at 10:36
  • Yeah, don't roll your own solutions for things like this. Commented Mar 27, 2017 at 10:42

1 Answer 1

1

You should tell your target and why you can not change the structure for a better help.

But maybe that could help https://dzone.com/articles/audit-log-database-changes-in-postgresql

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.