pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedErrorlog empty
15+ messages / 6 participants
[nested] [flat]
* Errorlog empty
@ 2015-03-11 20:28 Rossi, Maria <maria.rossi@us.pgds.com>
0 siblings, 1 reply; 15+ messages in thread
From: Rossi, Maria @ 2015-03-11 20:28 UTC (permalink / raw)
To: pgsql-admin
Hi,
The errorlog is empty. I turned on 'log_connections', then logged-on to the instance. But still the errorlog is empty. I would have expected connections would appear at the log.
Any ideas why?
I am new to Postgres, so please excuse my questions.
Maria
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-11 21:37 Gilberto Castillo <gilberto.castillo@etecsa.cu>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
0 siblings, 1 reply; 15+ messages in thread
From: Gilberto Castillo @ 2015-03-11 21:37 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; +Cc: pgsql-admin
> Hi,
> The errorlog is empty. I turned on 'log_connections', then logged-on to
> the instance. But still the errorlog is empty. I would have expected
> connections would appear at the log.
> Any ideas why?
> I am new to Postgres, so please excuse my questions.
>
> Maria
My configuration:
log_destination = 'stderr'
logging_collector = on --necesita restart
log_min_duration_statement = 0
log_line_prefix = '%t [%p]: [%l-1] [%r]: user=%u '
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
Saludos,
Gilberto Castillo
La Habana, Cuba
---
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu
Visit our web-site: <http://www.kaspersky.com;, <http://www.viruslist.com;
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 05:02 Shreeyansh Dba <shreeyansh2014@gmail.com>
parent: Gilberto Castillo <gilberto.castillo@etecsa.cu>
0 siblings, 1 reply; 15+ messages in thread
From: Shreeyansh Dba @ 2015-03-12 05:02 UTC (permalink / raw)
To: gilberto.castillo@etecsa.cu; +Cc: Rossi, Maria <maria.rossi@us.pgds.com>; pgsql-admin
On Thu, Mar 12, 2015 at 3:07 AM, Gilberto Castillo <
gilberto.castillo@etecsa.cu> wrote:
>
>
> > Hi,
> > The errorlog is empty. I turned on 'log_connections', then logged-on to
> > the instance. But still the errorlog is empty. I would have expected
> > connections would appear at the log.
> > Any ideas why?
> > I am new to Postgres, so please excuse my questions.
> >
> > Maria
>
> My configuration:
>
>
> log_destination = 'stderr'
> logging_collector = on --necesita restart
> log_min_duration_statement = 0
> log_line_prefix = '%t [%p]: [%l-1] [%r]: user=%u '
> log_checkpoints = on
> log_connections = on
> log_disconnections = on
> log_lock_waits = on
> log_temp_files = 0
>
> Saludos,
> Gilberto Castillo
> La Habana, Cuba
>
> ---
> This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE
> running at host imx3.etecsa.cu
> Visit our web-site: <http://www.kaspersky.com;, <http://www.viruslist.com;
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
> Hi,
In postgresql.conf file you will find some ERROR REPORTING AND LOGGING
parameters.
These parameters are responsible for error log generation:
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
Under When to log:
log_min_error_statement = error
log_min_duration_statement = 0
Under What to log:
log_line_prefix = '%t [%p]: [%l-1] [%r]: user=%u '
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
I think changing these parameters will start the error logs in the pg_log
folder of your data directory.
Thanks & Regards,
Ajinkya Bangale
Database Administrator
ajinkya.bangale@shreeyansh.com
Office: +919552687400/8400
www.shreeyansh.com
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 15:29 Rossi, Maria <maria.rossi@us.pgds.com>
parent: Shreeyansh Dba <shreeyansh2014@gmail.com>
0 siblings, 1 reply; 15+ messages in thread
From: Rossi, Maria @ 2015-03-12 15:29 UTC (permalink / raw)
To: Shreeyansh Dba <shreeyansh2014@gmail.com>; gilberto.castillo@etecsa.cu <gilberto.castillo@etecsa.cu>; +Cc: pgsql-admin
The logging_collector is on, but I don’t know if it was restarted after it was turned on. I did run a ‘pg_ctl reload’, but still it did not log any msgs.
Does it need an actual restart? I cannot simply do that because this is production, has to be scheduled.
Thanks.
Maria
From: Shreeyansh Dba [mailto:shreeyansh2014@gmail.com]
Sent: Thursday, March 12, 2015 1:03 AM
To: gilberto.castillo@etecsa.cu
Cc: Rossi, Maria; Postgres Maillist
Subject: Re: [ADMIN] Errorlog empty
On Thu, Mar 12, 2015 at 3:07 AM, Gilberto Castillo <gilberto.castillo@etecsa.cu<mailto:gilberto.castillo@etecsa.cu>> wrote:
> Hi,
> The errorlog is empty. I turned on 'log_connections', then logged-on to
> the instance. But still the errorlog is empty. I would have expected
> connections would appear at the log.
> Any ideas why?
> I am new to Postgres, so please excuse my questions.
>
> Maria
My configuration:
log_destination = 'stderr'
logging_collector = on --necesita restart
log_min_duration_statement = 0
log_line_prefix = '%t [%p]: [%l-1] [%r]: user=%u '
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
Saludos,
Gilberto Castillo
La Habana, Cuba
---
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu<http://imx3.etecsa.cu;
Visit our web-site: <http://www.kaspersky.com;, <http://www.viruslist.com;
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Hi,
In postgresql.conf file you will find some ERROR REPORTING AND LOGGING parameters.
These parameters are responsible for error log generation:
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
Under When to log:
log_min_error_statement = error
log_min_duration_statement = 0
Under What to log:
log_line_prefix = '%t [%p]: [%l-1] [%r]: user=%u '
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
I think changing these parameters will start the error logs in the pg_log folder of your data directory.
Thanks & Regards,
Ajinkya Bangale
Database Administrator
ajinkya.bangale@shreeyansh.com<mailto:ajinkya.bangale@shreeyansh.com>
Office: +919552687400/8400
www.shreeyansh.com<http://www.shreeyansh.com/;
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 15:52 Igor Neyman <ineyman@perceptron.com>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
0 siblings, 1 reply; 15+ messages in thread
From: Igor Neyman @ 2015-03-12 15:52 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; Shreeyansh Dba <shreeyansh2014@gmail.com>; gilberto.castillo@etecsa.cu <gilberto.castillo@etecsa.cu>; +Cc: pgsql-admin
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Rossi, Maria
Sent: Thursday, March 12, 2015 11:29 AM
To: 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
Cc: Postgres Maillist
Subject: Re: [ADMIN] Errorlog empty
The logging_collector is on, but I don’t know if it was restarted after it was turned on. I did run a ‘pg_ctl reload’, but still it did not log any msgs.
Does it need an actual restart? I cannot simply do that because this is production, has to be scheduled.
Thanks.
Maria
After ‘pg_ctl reload’ you can check current value of any parameter (including logging_collector) by issuing:
Show <parameter_name>
i.e.: show logging_collector;
Regards,
Igor Neyman
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 15:54 Rossi, Maria <maria.rossi@us.pgds.com>
parent: Igor Neyman <ineyman@perceptron.com>
0 siblings, 1 reply; 15+ messages in thread
From: Rossi, Maria @ 2015-03-12 15:54 UTC (permalink / raw)
To: Igor Neyman <ineyman@perceptron.com>; Shreeyansh Dba <shreeyansh2014@gmail.com>; gilberto.castillo@etecsa.cu <gilberto.castillo@etecsa.cu>; +Cc: pgsql-admin
It is 'on'.
postgres=# show logging_collector;
logging_collector
-------------------
on
(1 row)
postgres=#
Maria
-----Original Message-----
From: Igor Neyman [mailto:ineyman@perceptron.com]
Sent: Thursday, March 12, 2015 11:52 AM
To: Rossi, Maria; 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
Cc: Postgres Maillist
Subject: RE: [ADMIN] Errorlog empty
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Rossi, Maria
Sent: Thursday, March 12, 2015 11:29 AM
To: 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
Cc: Postgres Maillist
Subject: Re: [ADMIN] Errorlog empty
The logging_collector is on, but I don’t know if it was restarted after it was turned on. I did run a ‘pg_ctl reload’, but still it did not log any msgs.
Does it need an actual restart? I cannot simply do that because this is production, has to be scheduled.
Thanks.
Maria
After ‘pg_ctl reload’ you can check current value of any parameter (including logging_collector) by issuing:
Show <parameter_name>
i.e.: show logging_collector;
Regards,
Igor Neyman
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 16:11 Igor Neyman <ineyman@perceptron.com>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
0 siblings, 1 reply; 15+ messages in thread
From: Igor Neyman @ 2015-03-12 16:11 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; Shreeyansh Dba <shreeyansh2014@gmail.com>; gilberto.castillo@etecsa.cu <gilberto.castillo@etecsa.cu>; +Cc: pgsql-admin
> -----Original Message-----
> From: Rossi, Maria [mailto:maria.rossi@us.pgds.com]
> Sent: Thursday, March 12, 2015 11:55 AM
> To: Igor Neyman; 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
> Cc: Postgres Maillist
> Subject: RE: [ADMIN] Errorlog empty
>
> It is 'on'.
>
> postgres=# show logging_collector;
> logging_collector
> -------------------
> on
> (1 row)
>
> postgres=#
>
>
>
> Maria
>
> -----Original Message-----
> From: Igor Neyman [mailto:ineyman@perceptron.com]
> Sent: Thursday, March 12, 2015 11:52 AM
> To: Rossi, Maria; 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
> Cc: Postgres Maillist
> Subject: RE: [ADMIN] Errorlog empty
>
> From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-
> owner@postgresql.org] On Behalf Of Rossi, Maria
> Sent: Thursday, March 12, 2015 11:29 AM
> To: 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
> Cc: Postgres Maillist
> Subject: Re: [ADMIN] Errorlog empty
>
> The logging_collector is on, but I don’t know if it was restarted after it was
> turned on. I did run a ‘pg_ctl reload’, but still it did not log any msgs.
> Does it need an actual restart? I cannot simply do that because this is
> production, has to be scheduled.
>
> Thanks.
>
> Maria
>
>
> After ‘pg_ctl reload’ you can check current value of any parameter (including
> logging_collector) by issuing:
>
> Show <parameter_name>
>
> i.e.: show logging_collector;
>
>
> Regards,
> Igor Neyman
What about other parameters?
Log_destination
Log_filename
Log_directory
Log_connections
Log_disconnections
Regards,
Igor Neyman
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 17:12 Rossi, Maria <maria.rossi@us.pgds.com>
parent: Igor Neyman <ineyman@perceptron.com>
0 siblings, 2 replies; 15+ messages in thread
From: Rossi, Maria @ 2015-03-12 17:12 UTC (permalink / raw)
To: Igor Neyman <ineyman@perceptron.com>; Shreeyansh Dba <shreeyansh2014@gmail.com>; gilberto.castillo@etecsa.cu <gilberto.castillo@etecsa.cu>; +Cc: pgsql-admin
Igor,
Here's the other 'log' configs: Thanks.
postgres=# show log_destination;
log_destination
-----------------
stderr
(1 row)
postgres=# show log_filename;
log_filename
---------------
gp07error.log
(1 row)
postgres=# show log_directory;
log_directory
-----------------------------
/dba/pgsql/gp07/pg_errorlog
(1 row)
postgres=# show log_connections;
log_connections
-----------------
on
(1 row)
postgres=# show log_disconnections;
log_disconnections
--------------------
on
(1 row)
postgres=#
Maria A Rossi
Database Administration
PGDS (US)
email: maria.rossi@us.pgds.com
cell phone: 517.256.4392
work phone: 517.367.3099
work phone extension: 23099
-----Original Message-----
From: Igor Neyman [mailto:ineyman@perceptron.com]
Sent: Thursday, March 12, 2015 12:11 PM
To: Rossi, Maria; 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
Cc: Postgres Maillist
Subject: RE: [ADMIN] Errorlog empty
> -----Original Message-----
> From: Rossi, Maria [mailto:maria.rossi@us.pgds.com]
> Sent: Thursday, March 12, 2015 11:55 AM
> To: Igor Neyman; 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
> Cc: Postgres Maillist
> Subject: RE: [ADMIN] Errorlog empty
>
> It is 'on'.
>
> postgres=# show logging_collector;
> logging_collector
> -------------------
> on
> (1 row)
>
> postgres=#
>
>
>
> Maria
>
> -----Original Message-----
> From: Igor Neyman [mailto:ineyman@perceptron.com]
> Sent: Thursday, March 12, 2015 11:52 AM
> To: Rossi, Maria; 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
> Cc: Postgres Maillist
> Subject: RE: [ADMIN] Errorlog empty
>
> From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-
> owner@postgresql.org] On Behalf Of Rossi, Maria
> Sent: Thursday, March 12, 2015 11:29 AM
> To: 'Shreeyansh Dba'; gilberto.castillo@etecsa.cu
> Cc: Postgres Maillist
> Subject: Re: [ADMIN] Errorlog empty
>
> The logging_collector is on, but I don’t know if it was restarted
> after it was turned on. I did run a ‘pg_ctl reload’, but still it did not log any msgs.
> Does it need an actual restart? I cannot simply do that because this
> is production, has to be scheduled.
>
> Thanks.
>
> Maria
>
>
> After ‘pg_ctl reload’ you can check current value of any parameter
> (including
> logging_collector) by issuing:
>
> Show <parameter_name>
>
> i.e.: show logging_collector;
>
>
> Regards,
> Igor Neyman
What about other parameters?
Log_destination
Log_filename
Log_directory
Log_connections
Log_disconnections
Regards,
Igor Neyman
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 17:39 Scott Ribe <scott_ribe@elevated-dev.com>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
1 sibling, 1 reply; 15+ messages in thread
From: Scott Ribe @ 2015-03-12 17:39 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; +Cc: pgsql-admin
On Mar 12, 2015, at 11:12 AM, Rossi, Maria <maria.rossi@us.pgds.com> wrote:
>
> Igor,
>
> Here's the other 'log' configs: Thanks.
>
> postgres=# show log_destination;
> log_destination
> -----------------
> stderr
> (1 row)
>
> postgres=# show log_filename;
> log_filename
> ---------------
> gp07error.log
> (1 row)
>
> postgres=# show log_directory;
> log_directory
> -----------------------------
> /dba/pgsql/gp07/pg_errorlog
> (1 row)
>
> postgres=# show log_connections;
> log_connections
> -----------------
> on
> (1 row)
>
> postgres=# show log_disconnections;
> log_disconnections
> --------------------
> on
> (1 row)
>
What about logging_collector? If that's not set, I think your log filename will be ignored and messages will go to stderr. See: <http://www.postgresql.org/docs/9.4/static/runtime-config-logging.html;
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-12 18:17 Gilberto Castillo <gilberto.castillo@etecsa.cu>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
1 sibling, 0 replies; 15+ messages in thread
From: Gilberto Castillo @ 2015-03-12 18:17 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; +Cc: 'Igor Neyman' <ineyman@perceptron.com>; 'Shreeyansh Dba' <shreeyansh2014@gmail.com>; gilberto.castillo@etecsa.cu <gilberto.castillo@etecsa.cu>; pgsql-admin
> Igor,
>
> Here's the other 'log' configs: Thanks.
>
> postgres=# show log_destination;
> log_destination
> -----------------
> stderr
> (1 row)
>
> postgres=# show log_filename;
> log_filename
> ---------------
> gp07error.log
> (1 row)
>
> postgres=# show log_directory;
> log_directory
> -----------------------------
> /dba/pgsql/gp07/pg_errorlog
> (1 row)
Check is exist this directry pg_errorlog and permission
Saludos,
Gilberto Castillo
La Habana, Cuba
---
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu
Visit our web-site: <http://www.kaspersky.com;, <http://www.viruslist.com;
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-13 05:13 Shreeyansh Dba <shreeyansh2014@gmail.com>
parent: Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 1 reply; 15+ messages in thread
From: Shreeyansh Dba @ 2015-03-13 05:13 UTC (permalink / raw)
To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Rossi, Maria <maria.rossi@us.pgds.com>; pgsql-admin
On Thu, Mar 12, 2015 at 11:09 PM, Scott Ribe <scott_ribe@elevated-dev.com>
wrote:
> On Mar 12, 2015, at 11:12 AM, Rossi, Maria <maria.rossi@us.pgds.com>
> wrote:
> >
> > Igor,
> >
> > Here's the other 'log' configs: Thanks.
> >
> > postgres=# show log_destination;
> > log_destination
> > -----------------
> > stderr
> > (1 row)
> >
> > postgres=# show log_filename;
> > log_filename
> > ---------------
> > gp07error.log
> > (1 row)
> >
> > postgres=# show log_directory;
> > log_directory
> > -----------------------------
> > /dba/pgsql/gp07/pg_errorlog
> > (1 row)
> >
> > postgres=# show log_connections;
> > log_connections
> > -----------------
> > on
> > (1 row)
> >
> > postgres=# show log_disconnections;
> > log_disconnections
> > --------------------
> > on
> > (1 row)
> >
>
> What about logging_collector? If that's not set, I think your log filename
> will be ignored and messages will go to stderr. See: <
> http://www.postgresql.org/docs/9.4/static/runtime-config-logging.html;
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
Hi,
Reload is fine no need to restart.
you can check whether parameters are configured using
SHOW <parameter-name>;
May be there some permission issue to the log_destination folder.So once
check the permissions and
Try
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_file_mode = 0600
And let me know the output.
--
Thanks & Regards
Ajinkya Bangale
Database Administrator
Ph: +91-9552688400 / 7400
Email ID: *ajinkya.bangale@shreeyansh.com <ajinkya.bangale@shreeyansh.com>*
www.shreeyansh.com
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-13 10:02 Rossi, Maria <maria.rossi@us.pgds.com>
parent: Shreeyansh Dba <shreeyansh2014@gmail.com>
0 siblings, 1 reply; 15+ messages in thread
From: Rossi, Maria @ 2015-03-13 10:02 UTC (permalink / raw)
To: Shreeyansh Dba <shreeyansh2014@gmail.com>; Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin
Shreeyansh, Scott,
Thanks for responding. Here’s the value of a couple log parms
gp07> psql -d postgres -c"show log_file_mode"
log_file_mode
---------------
0600
(1 row)
gp07> psql -d postgres -c"show log_filename"
log_filename
---------------
gp07error.log
(1 row)
gp07> psql -d postgres -c"show logging_collector"
logging_collector
-------------------
on
(1 row)
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:
-rw-rw-r-- 1 psgdba dbagroup 298 Mar 13 05:43 gl07error.log
dbagroup members are: psgdba and instance-owner.
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: Shreeyansh Dba [mailto:shreeyansh2014@gmail.com]
Sent: Friday, March 13, 2015 1:14 AM
To: Scott Ribe
Cc: Rossi, Maria; Postgres Maillist
Subject: Re: [ADMIN] Errorlog empty
On Thu, Mar 12, 2015 at 11:09 PM, Scott Ribe <scott_ribe@elevated-dev.com<mailto:scott_ribe@elevated-dev.com>> wrote:
On Mar 12, 2015, at 11:12 AM, Rossi, Maria <maria.rossi@us.pgds.com<mailto:maria.rossi@us.pgds.com>> wrote:
>
> Igor,
>
> Here's the other 'log' configs: Thanks.
>
> postgres=# show log_destination;
> log_destination
> -----------------
> stderr
> (1 row)
>
> postgres=# show log_filename;
> log_filename
> ---------------
> gp07error.log
> (1 row)
>
> postgres=# show log_directory;
> log_directory
> -----------------------------
> /dba/pgsql/gp07/pg_errorlog
> (1 row)
>
> postgres=# show log_connections;
> log_connections
> -----------------
> on
> (1 row)
>
> postgres=# show log_disconnections;
> log_disconnections
> --------------------
> on
> (1 row)
>
What about logging_collector? If that's not set, I think your log filename will be ignored and messages will go to stderr. See: <http://www.postgresql.org/docs/9.4/static/runtime-config-logging.html;
--
Scott Ribe
scott_ribe@elevated-dev.com<mailto:scott_ribe@elevated-dev.com>
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Hi,
Reload is fine no need to restart.
you can check whether parameters are configured using
SHOW <parameter-name>;
May be there some permission issue to the log_destination folder.So once check the permissions and
Try
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_file_mode = 0600
And let me know the output.
--
Thanks & Regards
Ajinkya Bangale
Database Administrator
Ph: +91-9552688400 / 7400
Email ID: ajinkya.bangale@shreeyansh.com<mailto:ajinkya.bangale@shreeyansh.com>
www.shreeyansh.com<http://www.shreeyansh.com/;
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-13 11:55 Matheus de Oliveira <matioli.matheus@gmail.com>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
0 siblings, 1 reply; 15+ messages in thread
From: Matheus de Oliveira @ 2015-03-13 11:55 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; Scott Ribe <scott_ribe@elevated-dev.com>; pgsql-admin
On Fri, Mar 13, 2015 at 7:02 AM, Rossi, Maria <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
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-16 00:38 Rossi, Maria <maria.rossi@us.pgds.com>
parent: Matheus de Oliveira <matioli.matheus@gmail.com>
0 siblings, 1 reply; 15+ messages in thread
From: Rossi, Maria @ 2015-03-16 00:38 UTC (permalink / raw)
To: Matheus de Oliveira <matioli.matheus@gmail.com>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; Scott Ribe <scott_ribe@elevated-dev.com>; pgsql-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/;
^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: Errorlog empty
@ 2015-03-16 13:36 Matheus de Oliveira <matioli.matheus@gmail.com>
parent: Rossi, Maria <maria.rossi@us.pgds.com>
0 siblings, 0 replies; 15+ messages in thread
From: Matheus de Oliveira @ 2015-03-16 13:36 UTC (permalink / raw)
To: Rossi, Maria <maria.rossi@us.pgds.com>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; Scott Ribe <scott_ribe@elevated-dev.com>; pgsql-admin
On Sun, Mar 15, 2015 at 9:38 PM, Rossi, Maria <maria.rossi@us.pgds.com>
wrote:
> 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.
>
No problem. It happens... ;-)
Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres
^ permalink raw reply [nested|flat] 15+ messages in thread
end of thread, other threads:[~2015-03-16 13:36 UTC | newest]
Thread overview: 15+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 20:28 Errorlog empty Rossi, Maria <maria.rossi@us.pgds.com>
2015-03-11 21:37 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
2015-03-12 05:02 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2015-03-12 15:29 ` Rossi, Maria <maria.rossi@us.pgds.com>
2015-03-12 15:52 ` Igor Neyman <ineyman@perceptron.com>
2015-03-12 15:54 ` Rossi, Maria <maria.rossi@us.pgds.com>
2015-03-12 16:11 ` Igor Neyman <ineyman@perceptron.com>
2015-03-12 17:12 ` Rossi, Maria <maria.rossi@us.pgds.com>
2015-03-12 17:39 ` Scott Ribe <scott_ribe@elevated-dev.com>
2015-03-13 05:13 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2015-03-13 10:02 ` Rossi, Maria <maria.rossi@us.pgds.com>
2015-03-13 11:55 ` Matheus de Oliveira <matioli.matheus@gmail.com>
2015-03-16 00:38 ` Rossi, Maria <maria.rossi@us.pgds.com>
2015-03-16 13:36 ` Matheus de Oliveira <matioli.matheus@gmail.com>
2015-03-12 18:17 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>
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