Wednesday, 14 August 2024

How to check LOG file location

 


 1)  Check the log file 

postgres=# show data_directory ;
     data_directory
-------------------------
 /u02/PostgreSQL/10/data
(1 row)


postgres=# show log_directory ;
 log_directory
---------------
 log
(1 row)



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



postgres=#
postgres=# select pg_current_logfile();
          pg_current_logfile
--------------------------------------
 log/postgresql-2021-10-24_000000.log
(1 row)

No comments:

Post a Comment

Master and Slave - Sync check - PostgreSQL

  1) Run the below Query on Primary:- SELECT     pid,     usename,     application_name,     client_addr,     state,     sync_state,     sen...