Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unopionated log file selection #1

Open
adrianlzt opened this issue Mar 5, 2020 · 0 comments
Open

Unopionated log file selection #1

adrianlzt opened this issue Mar 5, 2020 · 0 comments

Comments

@adrianlzt
Copy link

I was trying to use your fdw but I find it is very opionated in how the config should be.

My logging configuration is csvlog but in a different folder (/var/log/postgresql) and rotation managed by logrotate.

Postgres config:

log_destination = 'csvlog'
logging_collector = on
log_directory = '/var/log/postgresql/'
log_filename = 'postgresql'
log_truncate_on_rotation = off
log_rotation_age = 0
log_rotation_size = 0

/etc/logrotate.d/postgres

/var/log/postgresql/postgresql.csv {
  rotate 14
  daily
  compress
  maxsize 2M
  nodelaycompress
  create 0600 postgres postgres
  dateext
  dateformat -%Y-%m-%d-%H
  postrotate
    sudo -u postgres /usr/pgsql-12/bin/pg_ctl logrotate -D /var/lib/pgsql/12/data
  endscript
}

The final paths are like:

/var/log/postgresql/postgresql.csv
/var/log/postgresql/postgresql.csv-2020-03-05-17.gz

I know this brokes in several parts the fdw.
I was thinking to make some adaptations to be able to use this logging configuration.

I have found a fdw to gzipped files.

Another problem will be the rotation, because I will not know in advance the naming scheme.

Before doing anything I wanted to ask for your opinion.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant