any body using Solaris8 with postgresql 7.3.3

Поиск
Список
Период
Сортировка
Искать

any body using Solaris8 with postgresql 7.3.3

От:
Weiping He <laser@zhengmai.com.cn>
Дата:
Hi, all,

    I've met a wierd problem on a Solaris 8/sparc box with postgresql 7.3.3:

    the server would automatically shutdown after a period of time of not
    operating. The log show something like this:

    pmdie 2

    anybody using this combo ever met this kind of problem?

    Any help would be very appreciated.

    Thanks and regards

Laser

Re: any body using Solaris8 with postgresql 7.3.3

От:
Martin Marques <martin@bugs.unl.edu.ar>
Дата:
On Vie 04 Jul 2003 03:52, Weiping He wrote:
> Hi, all,
>
>     I've met a wierd problem on a Solaris 8/sparc box with postgresql
> 7.3.3:
>
>     the server would automatically shutdown after a period of time of
> not operating. The log show something like this:
>
>     pmdie 2
>
>     anybody using this combo ever met this kind of problem?

I've had (and have actually) PostgreSQL 7.3.x on Solaris/SPARC and never 
saw this problem.
Comment a bit more about the problem. Configuration? Installed from 
source? etc....

From my point of view PostgreSQL is great, even on Solaris (I have some 
Linux boxes with PG as well).

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------

Re: any body using Solaris8 with postgresql 7.3.3

От:
Weiping He <laser@zhengmai.com.cn>
Дата:
Martin Marques wrote:

>On Vie 04 Jul 2003 03:52, Weiping He wrote:
>  
>
>>Hi, all,
>>
>>    I've met a wierd problem on a Solaris 8/sparc box with postgresql
>>7.3.3:
>>
>>    the server would automatically shutdown after a period of time of
>>not operating. The log show something like this:
>>
>>    pmdie 2
>>
>>    anybody using this combo ever met this kind of problem?
>>    
>>
>
>I've had (and have actually) PostgreSQL 7.3.x on Solaris/SPARC and never 
>saw this problem.
>Comment a bit more about the problem. Configuration? Installed from 
>source? etc....
>
>From my point of view PostgreSQL is great, even on Solaris (I have some 
>Linux boxes with PG as well).
>
>  
>
yes, I install it from the source, compiled using gcc 2.95.3, the locale 
should be default
(en_US I think),  the box got 1G ram and 2 cpus, so I don't think there 
is any resource
problem (I've set shmmax to about 800M and adjust the postgresql.conf 
setting accordingly),
now I'm suspecting the limit of file descriptior which is only 512 on my 
box, but, I still
don't know why it would automatically shutdown.

yeah, I also think PostgreSQL is great, but my experience with 
PostgreSQL mainly on
linux/bsd/AIX, not so familiar with Solaris...

Any hints?

Thanks for your help

Laser

Re: any body using Solaris8 with postgresql 7.3.3

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Weiping He  writes:
>     I've met a wierd problem on a Solaris 8/sparc box with postgresql 7.3.3:
>     the server would automatically shutdown after a period of time of not
>     operating. The log show something like this:
>     pmdie 2

Assuming signal 2 is SIGINT on Solaris (look in /usr/include/signal.h
to make sure, but that's pretty standard), this would indicate that
something is sending SIGINT to the postmaster.  The postmaster will
interpret that as a fast shutdown request.  So the problem is not with
the postmaster, but with whatever is sending the signal.

I suspect this isn't a platform problem so much as a setup mistake.
How are you launching the postmaster?  Is it possible it's still
connected to a controlling terminal?  (If so, the shell would probably
SIGINT the postmaster anytime you typed control-C.)

			regards, tom lane

Re: any body using Solaris8 with postgresql 7.3.3

От:
Weiping He <laser@zhengmai.com.cn>
Дата:
Tom Lane wrote:

>Weiping He  writes:
>  
>
>>    I've met a wierd problem on a Solaris 8/sparc box with postgresql 7.3.3:
>>    the server would automatically shutdown after a period of time of not
>>    operating. The log show something like this:
>>    pmdie 2
>>    
>>
>
>Assuming signal 2 is SIGINT on Solaris (look in /usr/include/signal.h
>to make sure, but that's pretty standard), this would indicate that
>something is sending SIGINT to the postmaster.  The postmaster will
>interpret that as a fast shutdown request.  So the problem is not with
>the postmaster, but with whatever is sending the signal.
>
>I suspect this isn't a platform problem so much as a setup mistake.
>How are you launching the postmaster?  Is it possible it's still
>connected to a controlling terminal?  (If so, the shell would probably
>SIGINT the postmaster anytime you typed control-C.)
>
>			regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html
>
>  
>
emm, I'll check that. My first start method is:
pg_ctl start -l ~/pgrun.log

(I've export PGDATA=/pgsqldata)

but it reports:
   pg_ctl: test: argument expected

I'm using ksh I think, which I've also test in 7.4-devl version, the 
same result,
ISTM a little bug in pg_ctl script, but still didn't dig into it to see 
if I can
found the problem.

Later I use:
pg_ctl start >pgrun.log 2>&1

to start the program, and it runs ok. but, then the pmdie 2...

Thanks

Laser




Re: any body using Solaris8 with postgresql 7.3.3

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Weiping He  writes:
> Later I use:
> pg_ctl start >pgrun.log 2>&1
> to start the program, and it runs ok. but, then the pmdie 2...

Hm.  My first thought was that you needed a 

Re: any body using Solaris8 with postgresql 7.3.3

От:
Weiping He <laser@zhengmai.com.cn>
Дата:
Tom Lane wrote:

>Weiping He  writes:
>  
>
>>Later I use:
>>pg_ctl start >pgrun.log 2>&1
>>to start the program, and it runs ok. but, then the pmdie 2...
>>    
>>
>
>Hm.  My first thought was that you needed a but it looks like pg_ctl does that for you.  The other likely
>possibility is that you need a "nohup" in front of all of this.
>
>We should check the theory though.  After you start the postmaster
>using the above command, if you type control-C (or whatever your
>favorite interrupt character is) on the same terminal, does the
>postmaster shut down?
>
>			regards, tom lane
>
>  
>
Ok, I'll test it. But needs more time, cause I can't access that box 
now, it's in office.
report back later.

Thanks

Laser

Re: any body using Solaris8 with postgresql 7.3.3

От:
Jonathan Bartlett <johnnyb@eskimo.com>
Дата:
I would add a nohup.

In addition, are you using the Solaris performance/process monitoring
tools?  I forget which one, maybe pfiles, would occasionally send wierd
signals to processes.  Check your cron listings to see if you're running
anything like that.

Jon


Re: any body using Solaris8 with postgresql 7.3.3

От:
Andrew Sullivan <andrew@libertyrms.info>
Дата:
On Fri, Jul 04, 2003 at 02:52:41PM +0800, Weiping He wrote:
> 
>    pmdie 2

Just a hunch, but could this have anything to do with power
management?  That's controlled by a program called pm.

A

-- 
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
                              M2P 2A8
                                         +1 416 646 3304 x110

Re: any body using Solaris8 with postgresql 7.3.3

От:
Andrew Sullivan <andrew@libertyrms.info>
Дата:
On Fri, Jul 04, 2003 at 03:45:04PM -0400, Andrew Sullivan wrote:
> On Fri, Jul 04, 2003 at 02:52:41PM +0800, Weiping He wrote:
> > 
> >    pmdie 2
> 
> Just a hunch, but could this have anything to do with power
> management?  That's controlled by a program called pm.

Hmm.  Not a program, after all.  My memory must be failing.  It's
/dev/pm.  A quick scan of a couple man pages doesn't reveal anything
about pmdie, and reading man pm doesn't give me anything to suspect
it.  

A

-- 
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
                              M2P 2A8
                                         +1 416 646 3304 x110

Re: any body using Solaris8 with postgresql 7.3.3

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andrew Sullivan  writes:
>> On Fri, Jul 04, 2003 at 02:52:41PM +0800, Weiping He wrote:
>>> pmdie 2
>> 
>> Just a hunch, but could this have anything to do with power
>> management?  That's controlled by a program called pm.

Nah, it's coming from the postmaster's signal-catching subroutine.

/*
 * pmdie -- signal handler for processing various postmaster signals.
 */
static void
pmdie(SIGNAL_ARGS)
{
	int			save_errno = errno;

	PG_SETMASK(&BlockSig);

	elog(DEBUG2, "pmdie %d", postgres_signal_arg);



			regards, tom lane

Re: any body using Solaris8 with postgresql 7.3.3

От:
Mark Kirkwood <markir@paradise.net.nz>
Дата:
On starting postmaster processes on Solaris 8 :

I have left 'em running for months (by mistake) - started from a 
terminal using :

$ pg_ctl -l ./pg.log start
$ exit

Is is possible that you have ksh or bash is configured in an unusual 
manner ?
Also I log in using ssh, not telnet or a "real" console - altho I am 
unsure what difference that might make.

In addition I have never seen the shell moan about syntax errors in 
pg_ctl (currently using Pg 7.3.3). Unfortunately I can't recall if I set 
the postgres user to have bash or ksh as its default shell (I am away 
from the box at the moment), so maybe try using bash if you are 
currently using ksh or vice versa...

regards

Mark





Re: any body using Solaris8 with postgresql 7.3.3

От:
Weiping He <laser@zhengmai.com.cn>
Дата:
Tom Lane wrote:

>Hm.  My first thought was that you needed a but it looks like pg_ctl does that for you.  The other likely
>possibility is that you need a "nohup" in front of all of this.
>
>We should check the theory though.  After you start the postmaster
>using the above command, if you type control-C (or whatever your
>favorite interrupt character is) on the same terminal, does the
>postmaster shut down?
>
>			regards, tom lane
>
>  
>
report back:

yes, Tom is right, it's because the control-C on the consol cause the
pmdie 2,
simple test without redirect the log would show the effect of control-C
clearly。
And I have to:

nohup pg_ctl start >logfile 2>&1&
exit
and relogin to system, then the server would be very stable.
I think put the start script into system startup script would be no problem.
But now the question is, why Solaris shows the difference? and how can I
circumvent it?

Thanks

Laser

FAQ