Re: PostgeSQL problem (server crashed?)

From: Edwin Pauli <edwin(at)epauli(dot)dyndns(dot)org>
To: Frank Finner <postgresql(at)finner(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgeSQL problem (server crashed?)
Date: 2004-03-14 23:46:41
Message-ID: 4054EEE1.3090207@epauli.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank Finner wrote:
> The error messages above have nothing in common with a corrupt database. These are faulty queries. I
> recommend to shut down the webserver and (re)start the database engine with statement logging
> enabled (not to messages but to a sparate logfile), and afterwards start the webserver again, to
> see, what query causes these errors.

I've shutdown the Apache-webserver, increased the log level from
Postgres and log everything to /usr/local/pgsql/errlog. After that, i
tried to start the Postgres server with the following command:

# su -l pgsql /usr/local/bin/pg_ctl -w start > /usr/local/pgsql/errlog
2>&1 &

epauli# cat errlog
DEBUG: /usr/local/bin/postmaster: PostmasterMain: initial environ dump:
waiting for postmaster to start...DEBUG:
-----------------------------------------
.DEBUG: USER=pgsql
DEBUG: MAIL=/var/mail/pgsql
DEBUG: HOME=/usr/local/pgsql
DEBUG: PGLIB=/usr/local/lib
DEBUG: TERM=xterm-color
DEBUG: BLOCKSIZE=K
DEBUG:
PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/local/pgsql/bin
DEBUG: SHELL=/bin/sh
DEBUG: PGDATA=/usr/local/pgsql/data
DEBUG: FTP_PASSIVE_MODE=YES
DEBUG: -----------------------------------------
DEBUG: found "/usr/local/bin/postgres" using argv[0]
DEBUG: invoking IpcMemoryCreate(size=8970240)
DEBUG: found "/usr/local/bin/postmaster" using argv[0]
............................................................failed
pg_ctl: postmaster does not start

Everything other than the last line look good.
The server don't start

> Did you check your script
> home/epauli/WWW/qst-new/_inc/main.inc.php very carefully?

Yes. Everythings look good. This PHP script was changed at Mar 6
15:27, and the problem was begin saturday (Mar 13) at 20.19.

> Maybe, if you show us the queries and, if possible, the corresponding table structure, we can find
> out more.

This are the query where the error occures.
INSERT INTO sessies ( phpsessid, tijd, ipadres, waar ) VALUES
('".session_id()."','now()','".$_SERVER['REMOTE_ADDR']."','".$pagina2[1]."')";

The variable $pagina2 is created as follow:

$pagina1 = $_SERVER[PHP_SELF];
$pagina2 = split ( "/",$pagina1 );

This query running a few months without problems, so i think it's not
a problem with PHP, but with Postgres. Or is this opinion wrong?

--
Edwin Pauli

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-03-14 23:49:02 Re: Expression indexes and casts
Previous Message Martijn van Oosterhout 2004-03-14 23:09:54 Re: Sorting by numerical order