Re: pg_ctlcluster not logging error (memory problem likely)

Lists: pgsql-admin
From: Tony Webb <amw(at)sanger(dot)ac(dot)uk>
To: pgsql-admin(at)postgresql(dot)org
Subject: pg_ctlcluster not logging error (memory problem likely)
Date: 2009-03-26 09:26:13
Message-ID: 49CB4A35.1030002@sanger.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi,

I'm trying to find out why my cluster won't start. It looks like I'm
pushing up max_connections too high although I think my memory and
semaphore settings are OK. Thing is, when the cluster fails to start I
can't see any errors in pg_log or in /var/log/messages.

When the cluster is up and running it seems to write normally to these
locations.

Could pg_ctlcluster be writing somewhere else? can I do something to see
more verbose messages (more than the empty string) other than setting
log parameters in postgres.conf?

I'm running 8.3 on Debian btw.

Cheers

Pif

--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tony Webb <amw(at)sanger(dot)ac(dot)uk>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_ctlcluster not logging error (memory problem likely)
Date: 2009-03-26 22:35:35
Message-ID: 28229.1238106935@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Tony Webb <amw(at)sanger(dot)ac(dot)uk> writes:
> I'm trying to find out why my cluster won't start. It looks like I'm
> pushing up max_connections too high although I think my memory and
> semaphore settings are OK. Thing is, when the cluster fails to start I
> can't see any errors in pg_log or in /var/log/messages.

> When the cluster is up and running it seems to write normally to these
> locations.

> Could pg_ctlcluster be writing somewhere else?

I'm not familar with pg_ctlcluster, but it seems possible that the
Debian setup is such that messages issued early in startup go somewhere
else than where messages go once the postmaster is fully up and running.
In particular, until the postmaster has absorbed the logging settings
in postgresql.conf, it's *always* going to write to its stderr. I've
seen startup scripts that send postmaster stderr to /dev/null :-(
because they suppose that pointing log_destination to syslog or some
such means that everything of interest will go there.

Advice is to look into the startup script, see where it sends
postmaster's stderr, and fix that if it's not someplace you can read.

regards, tom lane


From: Tony Webb <amw(at)sanger(dot)ac(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_ctlcluster not logging error (memory problem likely)
Date: 2009-03-27 09:20:19
Message-ID: 49CC9A53.3020403@sanger.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Tom Lane wrote:
> Tony Webb <amw(at)sanger(dot)ac(dot)uk> writes:
>
>> I'm trying to find out why my cluster won't start. It looks like I'm
>> pushing up max_connections too high although I think my memory and
>> semaphore settings are OK. Thing is, when the cluster fails to start I
>> can't see any errors in pg_log or in /var/log/messages.
>>
>
>
>> When the cluster is up and running it seems to write normally to these
>> locations.
>>
>
>
>> Could pg_ctlcluster be writing somewhere else?
>>
>
> I'm not familar with pg_ctlcluster, but it seems possible that the
> Debian setup is such that messages issued early in startup go somewhere
> else than where messages go once the postmaster is fully up and running.
> In particular, until the postmaster has absorbed the logging settings
> in postgresql.conf, it's *always* going to write to its stderr. I've
> seen startup scripts that send postmaster stderr to /dev/null :-(
> because they suppose that pointing log_destination to syslog or some
> such means that everything of interest will go there.
>
> Advice is to look into the startup script, see where it sends
> postmaster's stderr, and fix that if it's not someplace you can read.
>
> regards, tom lane
>
Thanks Tom.

Good advice - I'll check out the pg_ctlcluster script.

I've not looked yet. I'm hoping it's a shell script, not perl :-).

Cheers

Pif

--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.