pg-history-viewer icon indicating copy to clipboard operation
pg-history-viewer copied to clipboard

Using jsonb instead of hstore

Open posikifi opened this issue 3 years ago • 4 comments

Hi!

This is maybe suggestion and/or question: is it possible to change storage of audit-tables from hstore to jsonb?

Pros

  • jsonb is part of core PostgreSQL, hstore still needs extension
  • jsonb is newer has more functionalities (?)

Cons

  • It work, no need to change
  • plugin need modification

Peformance: there is a lot of discussion about this, but I haven't seen permanent answer. It depends.

P

posikifi avatar May 05 '21 13:05 posikifi

I agree and the upstream pg_audit has been abandoned and switched to jsonb logic. To me it is essentially a matter of funding. I could be interested in supporting a part of it if efforts can be merged. This tool can really be helpful in many applications!

cc @vpicavet @ponceta please gather other potential funders / contributors here if you hear of some interest.

haubourg avatar May 05 '21 14:05 haubourg

I also suggest that we will include/merge https://gitlab.com/Oslandia/audit_trigger into this project.

Another suggestion is that we rename audit_trigger to history_trigger (or something). Reasoning: pgAudit is more auditing (including select etc.) and it has totally different scope.

I can use some time for this and is external funding is needed, let's see what we can do.

posikifi avatar May 06 '21 05:05 posikifi

@posikifi There is (was) a PR for this purpose https://gitlab.com/Oslandia/audit_trigger/-/merge_requests/2/diffs

It takes a little time to update and test, but I know this was discussed a few years ago.

lbartoletti avatar May 06 '21 05:05 lbartoletti