Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting log information from PostgreSQL

Tags:

postgresql

My application uses PostgreSQL for storing data. I need to gather information about all user actions (any INSERTs, UPDATEs or DELETEs) executed on the database. This made me wonder whether PostgreSQL provides any default implementations/tables for this? As per my prior searches, I haven't found anything usable yet - however proper confirmation to my suspicions would be nice. If PostgreSQL truly doesn't provide any default implementations for this, then I will design my own history table.

like image 891
Ansuman Bebarta Avatar asked Sep 10 '26 20:09

Ansuman Bebarta


1 Answers

PostgreSQL supports several methods for logging server messages, including stderr, csvlog and syslog. On Windows, eventlog is also supported. Set this parameter to a list of desired log destinations separated by commas. The default is to log to stderr only. This parameter can only be set in the postgresql.conf file or on the server command line.

SEE HERE

like image 82
PSR Avatar answered Sep 15 '26 07:09

PSR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!