Discussion:
psql won't stayed connected
(too old to reply)
Kevin Izzet
2004-08-05 16:05:32 UTC
Permalink
Hi All,

Just installed postgresql-7.4.3 for the first time and all appears to have
gone fine apart from :-

When I try to connect to a test database from a remote client the psql
appears to connect fine
but it then drops straight back to the command prompt without any errors
or messages.

I have enabled debugging but all I get on the client side is

bash-2.03$ psql -h ukl****** -d test -U kevin
bash-2.03$ DEBUG: InitPostgres
bash-2.03$

And on the serverside I get

Aug 5 17:01:38 uklnx04 postgres[27887]: [222-1] DEBUG: 00000: forked new
backend, pid=28522 socket=10
Aug 5 17:01:38 uklnx04 postgres[27887]: [222-2] LOCATION: BackendStartup,
postmaster.c:2235
Aug 5 17:01:38 uklnx04 postgres[28522]: [222-1] LOG: 00000: connection
received: host=madge.nsc.com port=44996
Aug 5 17:01:38 uklnx04 postgres[28522]: [222-2] LOCATION: BackendFork,
postmaster.c:2395
Aug 5 17:01:38 uklnx04 postgres[28522]: [223-1] LOG: 00000: connection
authorized: user=kevini database=test
Aug 5 17:01:38 uklnx04 postgres[28522]: [223-2] LOCATION: BackendFork,
postmaster.c:2457
Aug 5 17:01:38 uklnx04 postgres[28522]: [224-1] DEBUG: 00000:
/usr/local/pgsql/bin/postmaster child[28522]: starting with (
Aug 5 17:01:38 uklnx04 postgres[28522]: [224-2] LOCATION: BackendFork,
postmaster.c:2554
Aug 5 17:01:38 uklnx04 postgres[28522]: [225-1] DEBUG: 00000: postgres
Aug 5 17:01:38 uklnx04 postgres[28522]: [225-2] LOCATION: BackendFork,
postmaster.c:2557
Aug 5 17:01:38 uklnx04 postgres[28522]: [226-1] DEBUG: 00000: -v196608
Aug 5 17:01:38 uklnx04 postgres[28522]: [226-2] LOCATION: BackendFork,
postmaster.c:2557
Aug 5 17:01:38 uklnx04 postgres[28522]: [227-1] DEBUG: 00000: -p
Aug 5 17:01:38 uklnx04 postgres[28522]: [227-2] LOCATION: BackendFork,
postmaster.c:2557
Aug 5 17:01:38 uklnx04 postgres[28522]: [228-1] DEBUG: 00000: test
Aug 5 17:01:38 uklnx04 postgres[28522]: [228-2] LOCATION: BackendFork,
postmaster.c:2557
Aug 5 17:01:38 uklnx04 postgres[28522]: [229-1] DEBUG: 00000: )
Aug 5 17:01:38 uklnx04 postgres[28522]: [229-2] LOCATION: BackendFork,
postmaster.c:2559
Aug 5 17:01:38 uklnx04 postgres[28522]: [230-1] DEBUG: 00000:
InitPostgres
Aug 5 17:01:38 uklnx04 postgres[28522]: [230-2] LOCATION: PostgresMain,
postgres.c:2639
Aug 5 17:01:38 uklnx04 postgres[28522]: [231-1] DEBUG: 00000:
proc_exit(0)
Aug 5 17:01:38 uklnx04 postgres[28522]: [231-2] LOCATION: proc_exit,
ipc.c:95
Aug 5 17:01:38 uklnx04 postgres[28522]: [232-1] DEBUG: 00000:
shmem_exit(0)
Aug 5 17:01:38 uklnx04 postgres[28522]: [232-2] LOCATION: shmem_exit,
ipc.c:126
Aug 5 17:01:38 uklnx04 postgres[28522]: [233-1] DEBUG: 00000: exit(0)
Aug 5 17:01:38 uklnx04 postgres[28522]: [233-2] LOCATION: proc_exit,
ipc.c:113
Aug 5 17:01:38 uklnx04 postgres[27887]: [223-1] DEBUG: 00000: reaping
dead processes
Aug 5 17:01:38 uklnx04 postgres[27887]: [223-2] LOCATION: reaper,
postmaster.c:1819
Aug 5 17:01:38 uklnx04 postgres[27887]: [224-1] DEBUG: 00000: child
process (PID 28522) exited with exit code 0
Aug 5 17:01:38 uklnx04 postgres[27887]: [224-2] LOCATION: LogChildExit,
postmaster.c:2078

The server is running on a linux HA (Suse 9.0+DRBD+Heartbeat) and the
client is a Solaris box Solaris 8,
I have also tried connecting from a linux client on a remote box.
Connecting locally works fine....

Any help would be much appreciated, I'm trying to get a new project off
the ground :-)

Thanks in advance

Kevin

Database / Unix Administrator
Tel: (Code)+44(0)1475 655606
Fax: (Code)+44(0)1475 637755
Email: ***@nsc.com


*************************************************************************************
This email may contain confidential and privileged material for the sole
use of the intended recipient. Any review, use, distribution or disclosure
by others is prohibited. If you are not the intended or authorised
recipient please contact the sender by reply email and delete all copies
of this message
Tom Lane
2004-08-05 19:13:06 UTC
Permalink
Post by Kevin Izzet
InitPostgres
Aug 5 17:01:38 uklnx04 postgres[28522]: [230-2] LOCATION: PostgresMain,
postgres.c:2639
proc_exit(0)
Aug 5 17:01:38 uklnx04 postgres[28522]: [231-2] LOCATION: proc_exit,
ipc.c:95
That's pretty bizarre ... I didn't think there were any code paths that
would get to proc_exit without emitting an error message.

Can you set a debugger breakpoint at proc_exit and see what the call
stack looks like? (You can slow things down enough to attach to the
backend with gdb by using the -W switch:
PGOPTIONS="-W 30" psql ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly

Loading...