Thread: any body using Solaris8 with postgresql 7.3.3
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
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 -----------------------------------------------------------------
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
Weiping He <laser@zhengmai.com.cn> 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
Tom Lane wrote: >Weiping He <laser@zhengmai.com.cn> 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
Weiping He <laser@zhengmai.com.cn> 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 </dev/null in there too, 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
Tom Lane wrote: >Weiping He <laser@zhengmai.com.cn> 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 </dev/null in there too, >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
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
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 <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
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 <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
Andrew Sullivan <andrew@libertyrms.info> 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
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
Tom Lane wrote: >Hm. My first thought was that you needed a </dev/null in there too, >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