pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_ctlcluster not logging error (memory problem likely)
6+ messages / 3 participants
[nested] [flat]
* pg_ctlcluster not logging error (memory problem likely)
@ 2009-03-26 09:26 Tony Webb <amw@sanger.ac.uk>
0 siblings, 1 reply; 6+ messages in thread
From: Tony Webb @ 2009-03-26 09:26 UTC (permalink / raw)
To: 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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_ctlcluster not logging error (memory problem likely)
@ 2009-03-26 22:35 Tom Lane <tgl@sss.pgh.pa.us>
parent: Tony Webb <amw@sanger.ac.uk>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2009-03-26 22:35 UTC (permalink / raw)
To: Tony Webb <amw@sanger.ac.uk>; +Cc: pgsql-admin
Tony Webb <amw@sanger.ac.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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_ctlcluster not logging error (memory problem likely)
@ 2009-03-27 09:20 Tony Webb <amw@sanger.ac.uk>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 6+ messages in thread
From: Tony Webb @ 2009-03-27 09:20 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Tom Lane wrote:
> Tony Webb <amw@sanger.ac.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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_ctlcluster not logging error (memory problem likely)
@ 2009-03-27 09:47 val <valiouk@yahoo.co.uk>
0 siblings, 1 reply; 6+ messages in thread
From: val @ 2009-03-27 09:47 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Tony Webb <amw@sanger.ac.uk>; +Cc: pgsql-admin
> Tom Lane wrote:
> > Tony Webb <amw@sanger.ac.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
>
It is a perl script :-). The purpose of which is to make it easier to start and stop several postgres clusters which might not even be the same version.
It usually writes to /var/log/postgresql/postgresql-X.X-main.log. But you can just try starting the postmaster from the command line with /etc/init.d/postgresql-X.X star, that way if there were any errors you will see them printed on the terminal.
Regards
Val
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_ctlcluster not logging error (memory problem likely)
@ 2009-03-27 09:58 Tony Webb <amw@sanger.ac.uk>
parent: val <valiouk@yahoo.co.uk>
0 siblings, 0 replies; 6+ messages in thread
From: Tony Webb @ 2009-03-27 09:58 UTC (permalink / raw)
To: val <valiouk@yahoo.co.uk>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin
Thanks Val. Yes, I checked the /var/log/postgresql directory but no joy.
Good idea re the init.d script although I may resort to pg_ctl as I dont
want to restart all of the clusters on this box.
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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_ctlcluster not logging error (memory problem likely)
@ 2009-03-27 10:21 val <valiouk@yahoo.co.uk>
0 siblings, 0 replies; 6+ messages in thread
From: val @ 2009-03-27 10:21 UTC (permalink / raw)
To: Tony Webb <amw@sanger.ac.uk>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin
Tony Webb <amw@sanger.ac.uk> wrote:
> Thanks Val. Yes, I checked the /var/log/postgresql
> directory but no joy.
>
Ok, I just had a quick look at the script and it seems that it will first check if you have got 'log_filename' or 'log_directory' configured in your postgresql.conf file. If not it will then check for a symbolic link named 'log' under your /etc/postgresql/$version/$cluster/ folder. And if this link doesn't exist it will fall back to using /var/log/postgresql.
Hope that helps.
Cheers
Val
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2009-03-27 10:21 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26 09:26 pg_ctlcluster not logging error (memory problem likely) Tony Webb <amw@sanger.ac.uk>
2009-03-26 22:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-03-27 09:20 ` Tony Webb <amw@sanger.ac.uk>
2009-03-27 09:47 Re: pg_ctlcluster not logging error (memory problem likely) val <valiouk@yahoo.co.uk>
2009-03-27 09:58 ` Tony Webb <amw@sanger.ac.uk>
2009-03-27 10:21 Re: pg_ctlcluster not logging error (memory problem likely) val <valiouk@yahoo.co.uk>
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