Connecting Tech Pros Worldwide Forums | Help | Site Map

Logs for PostgreSQL

Newbie
 
Join Date: Feb 2009
Posts: 2
#1: Feb 20 '09
Hello..

I need help on logs.. im still working on my system and finally i already have a functional system.. however i have an issue on systems logs, where i record every action the user takes...

Actually, i created a new table for logs and inserted data into it after every user's action.. but when i checked on the table's rows.. there are about 22000 results. is that a bad or good thing? is there any way i can reduce it? any suggestion for recording logs in postgresql?? will it affect the database's maximum storage or capacity..

thank in advance...

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,737
#2: Feb 20 '09

re: Logs for PostgreSQL


I found this thread languishing in Feedback, so I moved it over for you guys to look at, and bumped it.
Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 293
#3: Feb 22 '09

re: Logs for PostgreSQL


Well if you log every insert, the log table is as big as many inserts have been made.
1) You can backup the log table with pg_dump tools and clear the table when backup done.
2) Why don't you log inserts with postgres loggin daemon? It is enough to set some parameters in postgresql.conf file and all sql statements would be put into the file.
Reply

Tags
logs, postgresql


Similar PostgreSQL Database bytes