Hi ,

Please refer this small testcase -

Open postgresql.conf file and set -

log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log1'
log_filename = 'abcd-%Y-%m-%d_%H%M%S.log'

restart the server  , connect   to psql terminal and create adminpack extension and fire pg_logdir_ls function

postgres=# create extension adminpack;
CREATE EXTENSION
postgres=# SELECT filename, filetime FROM pg_logdir_ls() AS A(filetime timestamp, filename text) ORDER BY filetime ASC; ERROR:  the log_filename parameter must equal 'postgresql-%Y-%m-%d_%H%M%S.log'
postgres=#

postgres=# show log_filename ;
      log_filename
-------------------------
 abcd-%Y-%m-%d_%H%M%S.log
(1 row)

postgres=#

Is this an expected , if so - any work around ?

--
regards,tushar
EnterpriseDB  https://www.enterprisedb.com/
The Enterprise PostgreSQL Company


Reply via email to