pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rossi, Maria <maria.rossi@us.pgds.com>
To: Matheus de Oliveira <matioli.matheus@gmail.com>
Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>
Cc: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Postgres Maillist <pgsql-admin@postgresql.org>
Subject: Re: Errorlog empty
Date: Mon, 16 Mar 2015 00:38:53 +0000
Message-ID: <33A4D5087BF0D44DA69C5EEF666BC1D74259617F@USPRMBP01A.pgdsresource.local> (raw)
In-Reply-To: <CAJghg4JK6+Wiv5yuoxMbSq+nSNmxK1wYnnwd930giNn+WimS1g@mail.gmail.com>
References: <33A4D5087BF0D44DA69C5EEF666BC1D7425134BF@usprmbp01c>
	<41590.192.168.207.54.1426109878.squirrel@webmail.etecsa.cu>
	<CAGDYbUNgbC80GFeHvYUEnm7UjGtVm6t7CY=mrdbRC7U9XUKH9w@mail.gmail.com>
	<33A4D5087BF0D44DA69C5EEF666BC1D7425351AA@usprmbp01c>
	<A76B25F2823E954C9E45E32FA49D70ECCD3EE214@mail.corp.perceptron.com>
	<33A4D5087BF0D44DA69C5EEF666BC1D742535EE4@usprmbp01c>
	<A76B25F2823E954C9E45E32FA49D70ECCD3EE263@mail.corp.perceptron.com>
	<33A4D5087BF0D44DA69C5EEF666BC1D74253840D@usprmbp01c>
	<9F324809-D3A1-4AE0-A193-37D7B0971028@elevated-dev.com>
	<CAGDYbUNec-iES8d4owy5US-SPL3Z7cUr8d5mufrwaCTdygHLsQ@mail.gmail.com>
	<33A4D5087BF0D44DA69C5EEF666BC1D742556148@usprmbp01c>
	<CAJghg4JK6+Wiv5yuoxMbSq+nSNmxK1wYnnwd930giNn+WimS1g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Matheus,

Thanks for the response.     I disabled the errorlog monitor and after the postgres was bounced, errorlog is growing  again!!     I will revise the monitor script to run the pg_rotate_logfile function.
BTW,  I did not purposely hid that piece of information.  I just found out about it as I dug  more into the problem.

Thanks.

Maria A Rossi
Database Administration
PGDS (US)
email: maria.rossi@us.pgds.com<mailto:maria.rossi@us.pgds.com>
cell phone: 517.256.4392
work phone: 517.367.3099
work phone extension: 23099

From: Matheus de Oliveira [mailto:matioli.matheus@gmail.com]
Sent: Friday, March 13, 2015 7:55 AM
To: Rossi, Maria
Cc: Shreeyansh Dba; Scott Ribe; Postgres Maillist
Subject: Re: [ADMIN] Errorlog empty


On Fri, Mar 13, 2015 at 7:02 AM, Rossi, Maria <maria.rossi@us.pgds.com<mailto:maria.rossi@us.pgds.com>> wrote:
Also, we have a monitor that checks the errorlog.  This monitor appends the current log to an archive file (example,  errorlog.201503), then touch a new ‘error.log’.  After  the touch, the new errorlog is not written to anymore, until postgres is bounced.     I should also note that  new error.log is owned by the monitor ID:

That is a very important bit of information that you seem to have hidden from the list since the beginning. If an external process is moving the file that PostgreSQL is currently writting to, then it must somehow make the PostgreSQL's logger process aware of that. To do that you can call pg_rotate_logfile function:
    $ psql -c "SELECT pg_rotate_logfile()"
Although if you remove the file before calling it, you can lose some information in between, so I recommend using a log_filename that has date/time information (like the default one), so you can call pg_rotate_logfile, wait for PostgreSQL to create a new one, then you are safe to move the old ones to whatever location you want.

Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres<http://www.dextra.com.br/postgres/;


view thread (15+ messages)  latest in thread

Message-ID: <33A4D5087BF0D44DA69C5EEF666BC1D74259617F@USPRMBP01A.pgdsresource.local>
Permalink:  ../33A4D5087BF0D44DA69C5EEF666BC1D74259617F@USPRMBP01A.pgdsresource.local/
Also on:    postgresql.org/message-id/33A4D5087BF0D44DA69C5EEF666BC1D74259617F@USPRMBP01A.pgdsresource.local

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: maria.rossi@us.pgds.com, matioli.matheus@gmail.com, shreeyansh2014@gmail.com, scott_ribe@elevated-dev.com
  Subject: Re: Errorlog empty
  In-Reply-To: <33A4D5087BF0D44DA69C5EEF666BC1D74259617F@USPRMBP01A.pgdsresource.local>
  References: <33A4D5087BF0D44DA69C5EEF666BC1D7425134BF@usprmbp01c> <41590.192.168.207.54.1426109878.squirrel@webmail.etecsa.cu> <CAGDYbUNgbC80GFeHvYUEnm7UjGtVm6t7CY=mrdbRC7U9XUKH9w@mail.gmail.com> <33A4D5087BF0D44DA69C5EEF666BC1D7425351AA@usprmbp01c> <A76B25F2823E954C9E45E32FA49D70ECCD3EE214@mail.corp.perceptron.com> <33A4D5087BF0D44DA69C5EEF666BC1D742535EE4@usprmbp01c> <A76B25F2823E954C9E45E32FA49D70ECCD3EE263@mail.corp.perceptron.com> <33A4D5087BF0D44DA69C5EEF666BC1D74253840D@usprmbp01c> <9F324809-D3A1-4AE0-A193-37D7B0971028@elevated-dev.com> <CAGDYbUNec-iES8d4owy5US-SPL3Z7cUr8d5mufrwaCTdygHLsQ@mail.gmail.com> <33A4D5087BF0D44DA69C5EEF666BC1D742556148@usprmbp01c> <CAJghg4JK6+Wiv5yuoxMbSq+nSNmxK1wYnnwd930giNn+WimS1g@mail.gmail.com> <33A4D5087BF0D44DA69C5EEF666BC1D74259617F@USPRMBP01A.pgdsresource.local>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox