My postgres is not logging anymore

Started by Maila Fatticcionialmost 11 years ago4 messagesgeneral
Jump to latest
#1Maila Fatticcioni
mfatticcioni@mbigroup.it

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello.
I have a postgres cluster made by two nodes with OS Ubuntu 14.04.
About two weeks ago I did a minor update of postgres to the version
9.4.1-1.pgdg70+1. After I had to shutdown the machines and I could
start them just last week.
Since then postgresql has been stopping logging on both nodes. If I
destroy the log file and I do a restart, a new file is created but it
remains empty. I have tried to change some configuration parameters
with no success. I have tried to restart postgres on both nodes and
relocate the service as well - nothing. Apart from this everything is
working fine and my applications don't show any errors during the
connection to the database. Any ideas about how to have back the log?

Here my configuration file postgresql.conf:

- ---------------------------------------------------------
listen_addresses = '*'

work_mem = 32MB
wal_level = 'hot_standby'
synchronous_commit = on

checkpoint_segments = 128
checkpoint_completion_target = 0.9

archive_mode = on
archive_command = 'rsync -e ssh -a %p
postgres@172.31.7.1:/var/lib/postgresql/pg_archive/%f'

max_wal_senders = 5
wal_keep_segments = 32

hot_standby = on
max_standby_streaming_delay = 30s
wal_receiver_status_interval = 2s
hot_standby_feedback = on

log_min_messages = error
log_min_error_statement = error
log_min_duration_statement = 10000

log_connections = on
log_disconnections = on
log_duration = on
log_error_verbosity = terse
log_statement = 'all'
log_timezone = 'localtime'

datestyle = 'iso, mdy'
timezone = 'localtime'
default_text_search_config = 'pg_catalog.english'
restart_after_crash = off
- ---------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlWCkK0ACgkQi2q3wPb3FcM84ACfQVc4mMWLx/c9cSEBPFsmvDia
vLEAoMj+nWBOueJwM3eafcx8AfMMYcUl
=Gkgk
-----END PGP SIGNATURE-----

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In reply to: Maila Fatticcioni (#1)
Re: My postgres is not logging anymore

On 18/06/2015 10:34, Maila Fatticcioni wrote:

Hello.
I have a postgres cluster made by two nodes with OS Ubuntu 14.04.
About two weeks ago I did a minor update of postgres to the version
9.4.1-1.pgdg70+1. After I had to shutdown the machines and I could
start them just last week.
Since then postgresql has been stopping logging on both nodes. If I
destroy the log file and I do a restart, a new file is created but it
remains empty. I have tried to change some configuration parameters
with no success. I have tried to restart postgres on both nodes and
relocate the service as well - nothing. Apart from this everything is
working fine and my applications don't show any errors during the
connection to the database. Any ideas about how to have back the log?

Here my configuration file postgresql.conf:

What have you got set for the following? - Here's what they're set to on
my laptop (Windows 7, PG 9.4):

log_destination = 'stderr'
logging_collector = on
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_file_mode = 0600
log_truncate_on_rotation = off
log_rotation_age = 1d
log_rotation_size = 10MB

The comments in postgresql.conf indicate that log_destintion and
logging_collector, at least, need to be set as above to generate log files.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Maila Fatticcioni
mfatticcioni@mbigroup.it
In reply to: Raymond O'Donnell (#2)
Re: My postgres is not logging anymore

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/18/2015 11:48 AM, Raymond O'Donnell wrote:

On 18/06/2015 10:34, Maila Fatticcioni wrote:

Hello. I have a postgres cluster made by two nodes with OS Ubuntu
14.04. About two weeks ago I did a minor update of postgres to
the version 9.4.1-1.pgdg70+1. After I had to shutdown the
machines and I could start them just last week. Since then
postgresql has been stopping logging on both nodes. If I destroy
the log file and I do a restart, a new file is created but it
remains empty. I have tried to change some configuration
parameters with no success. I have tried to restart postgres on
both nodes and relocate the service as well - nothing. Apart from
this everything is working fine and my applications don't show
any errors during the connection to the database. Any ideas about
how to have back the log?

Here my configuration file postgresql.conf:

What have you got set for the following? - Here's what they're set
to on my laptop (Windows 7, PG 9.4):

log_destination = 'stderr' logging_collector = on log_filename =
'postgresql-%Y-%m-%d_%H%M%S.log' log_file_mode = 0600
log_truncate_on_rotation = off log_rotation_age = 1d
log_rotation_size = 10MB

The comments in postgresql.conf indicate that log_destintion and
logging_collector, at least, need to be set as above to generate
log files.

Ray.

I set up the logs using the parameters:
log_connections = on
log_disconnections = on
log_duration = on
log_error_verbosity = terse
log_statement = 'all'
log_timezone = 'localtime'

I think it would be enough to get the log in the file
/var/log/postgresql/postgresql-9.4-main.log . If I set the
logging_collector up the log would became
/var/lib/postgresql/9.4/main/pg_log/postgresql-2015-06-18_XXXXX.log .
I don't understand why postgresql logged before my update and now it
doesn't work anymore.

Best Regards,
Maila Fatticcioni

- --
______________________________________________________________
Maila Fatticcioni
______________________________________________________________
Mediterranean Broadband Infrastructure s.r.l.
via Francesco Squartini n°7
56121 Ospedaletto (PI) - ITALY
______________________________________________________________
Phone: +39(050)3870851 Fax: +39(050)3870809
______________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlWCtc8ACgkQi2q3wPb3FcNt+ACguyNKJa0N4MIKsoovbxeokAzO
ctoAoIrWRgMseZMOaM2YomXqRhgnhRDy
=GL75
-----END PGP SIGNATURE-----

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In reply to: Maila Fatticcioni (#3)
Re: My postgres is not logging anymore

On 18/06/2015 13:13, Maila Fatticcioni wrote:

On 06/18/2015 11:48 AM, Raymond O'Donnell wrote:

On 18/06/2015 10:34, Maila Fatticcioni wrote:

Hello. I have a postgres cluster made by two nodes with OS Ubuntu
14.04. About two weeks ago I did a minor update of postgres to
the version 9.4.1-1.pgdg70+1. After I had to shutdown the
machines and I could start them just last week. Since then
postgresql has been stopping logging on both nodes. If I destroy
the log file and I do a restart, a new file is created but it
remains empty. I have tried to change some configuration
parameters with no success. I have tried to restart postgres on
both nodes and relocate the service as well - nothing. Apart from
this everything is working fine and my applications don't show
any errors during the connection to the database. Any ideas about
how to have back the log?

Here my configuration file postgresql.conf:

What have you got set for the following? - Here's what they're set
to on my laptop (Windows 7, PG 9.4):

log_destination = 'stderr' logging_collector = on log_filename =
'postgresql-%Y-%m-%d_%H%M%S.log' log_file_mode = 0600
log_truncate_on_rotation = off log_rotation_age = 1d
log_rotation_size = 10MB

The comments in postgresql.conf indicate that log_destintion and
logging_collector, at least, need to be set as above to generate
log files.

Ray.

I set up the logs using the parameters:
log_connections = on
log_disconnections = on
log_duration = on
log_error_verbosity = terse
log_statement = 'all'
log_timezone = 'localtime'

I think it would be enough to get the log in the file
/var/log/postgresql/postgresql-9.4-main.log . If I set the

Well, according to the comments in postgresql.conf - which you really
should read if you haven't already - you need logging_collector to be on
in order to log to a file at all. Read this too:

http://www.postgresql.org/docs/9.4/static/runtime-config-logging.html

logging_collector up the log would became
/var/lib/postgresql/9.4/main/pg_log/postgresql-2015-06-18_XXXXX.log .

Just change log_filename to whatever you like.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general