pg_logdir_ls function throwing an error if log_filename name is notdefault - Mailing list pgsql-hackers

From tushar
Subject pg_logdir_ls function throwing an error if log_filename name is notdefault
Date
Msg-id 0f1624a2-e515-1f23-d7b7-b38a1a96b61a@enterprisedb.com
Whole thread Raw
Responses Re: pg_logdir_ls function throwing an error if log_filename name isnot default  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Hironobu SUZUKI
Date:
Subject: Re: pgbench - add pseudo-random permutation function
Next
From: Fabien COELHO
Date:
Subject: Re: pgbench - add pseudo-random permutation function