Editing PostgreSQL logs

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
* <code>[[/var/log/]]postgresql/</code>
+
<pre>
* <code>[[/var/log/postgresql/postgresql-14-main.log]]</code>
+
show log_destination ;
* <code>[[~/brew/var/log/[email protected]]]</code>
+
log_destination
 +
-----------------
 +
stderr
 +
(1 row)
  
  [[zcat -f]] /var/log/postgresql/* | egrep "FATAL|ERROR"
+
show syslog_facility ;
[[zcat -f]] /var/log/postgresql/postgresql-*-main.log | egrep "FATAL|ERROR"
+
  syslog_facility
 +
-----------------
 +
local0
 +
(1 row)
  
  [[FATAL]] | [[ERROR]] | [[LOG]] | [[HINT]] | [[DETAIL]]
+
show syslog_ident ;
 +
  syslog_ident
 +
--------------
 +
postgres
 +
(1 row)
  
== Configuration ==
+
</pre>
  show log_destination ;
 
  log_destination
 
-----------------
 
  stderr
 
(1 row)
 
 
show syslog_facility ;
 
  syslog_facility
 
-----------------
 
  local0
 
(1 row)
 
 
show syslog_ident ;
 
  syslog_ident
 
--------------
 
  postgres
 
(1 row)
 
  
== Messages ==
 
  
  [[FATAL: the database system is in recovery mode]]
+
  ERROR:  duplicate key value violates [[unique constraint]] "YOUR_TEXT_HERE"
  [[FATAL:  could not create any TCP/IP sockets]]
+
LOG: [[autovacuum]]: found orphan temp table "TABLENAME"."duplicate_file_name$" in database "DATABASE_NAME"
  
[[ERROR: out of shared memory]]
 
  
[[ERROR:  duplicate key value violates unique constraint]] "YOUR_TEXT_HERE"
 
LOG:  [[autovacuum]]: [[found orphan temp table]] "TABLENAME"."duplicate_file_name$" in database "DATABASE_NAME"
 
 
ERROR:  duplicate key value violates unique constraint "YOUR_TEXT_HERE"
 
DETAIL:  Key (XXXXX, YYYYY)=(#####, -#######) [[already exists]].
 
STATEMENT:  insert into ZZZZXXXSS (xx_id, yy_id, zz_value) values ($1,$2,$3)
 
LOG:  received smart shutdown request
 
LOG:  [[autovacuum]] launcher shutting down
 
 
LOG:  all server processes terminated; reinitializing
 
LOG:  database system was interrupted; last known up at 2020-04-15 09:03:50 UTC
 
LOG:  database system was not properly shut down; automatic recovery in progress
 
LOG:  redo starts at 5/50DC63D0
 
LOG:  invalid record length at 5/50EC7A60
 
LOG:  redo done at 5/50EC7A28
 
LOG:  last completed transaction was at log time 2020-04-15 09:07:19.636273+00
 
LOG:  [[MultiXact]] member wraparound protections are now enabled
 
LOG:  database system is ready to accept connections
 
 
 
LOG:  database system was shut down at 2022-11-22 09:14:15 UTC
 
LOG:  [[MultiXact]] member wraparound protections are now enabled
 
LOG:  [[autovacuum]] launcher started
 
LOG:  [[database system is ready to accept connections]]
 
 
 
 
 
ERROR:  could not extend file "base/16385/t17_174219": [[No space left on device]]
 
 
WARNING:  terminating connection because of crash of another server process
 
DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
 
HINT:  In a moment you should be able to reconnect to the database and repeat your command.
 
  
 
== See also ==
 
== See also ==
* {{PostgreSQL logs}}
+
* {{PostgreSQL}}
  
 
[[Category:PostgreSQL]]
 
[[Category:PostgreSQL]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page:

Advertising: