Обсуждение: psql won't stayed connected

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

psql won't stayed connected

От
"Kevin Izzet"
Дата:


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:  Kevin.Izzet@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

Re: psql won't stayed connected

От
Tom Lane
Дата:
"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> 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

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

Re: psql won't stayed connected

От
"Kevin Izzet"
Дата:


Hi Tom,


Thanks for the reply but forgive my ignorance but how do I setup the debugger breakpoint ?




Regards

Kevin Izzet

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



"Tom Lane" <tgl@sss.pgh.pa.us>

05/08/2004 20:13

       
        To:        "Kevin Izzet" <Kevin.Izzet@nsc.com>
        cc:        pgsql-admin@postgresql.org
        Subject:        Re: [ADMIN] psql won't stayed connected



"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> 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

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






*************************************************************************************
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

Re: psql won't stayed connected

От
Tom Lane
Дата:
"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Thanks for the reply but forgive my ignorance but how do I setup the
> debugger breakpoint ?

Something like this:

    PGOPTIONS="-W 30" psql ...
    Use ps to determine PID of backend connected to psql
    gdb /path/to/postgres-executable PID-of-backend
    gdb> break proc_exit
    gdb> continue
    (wait for rest of timeout to expire)
    gdb will report reaching proc_exit breakpoint
    gdb> bt
    ... interesting result is here ...
    gdb> quit

If you've never done this before it will probably take you more than 30
seconds to get into gdb --- adjust the W option accordingly.

            regards, tom lane

Re: psql won't stayed connected

От
"Kevin Izzet"
Дата:

Hi Tom,

Managed to get the debugger to work and here are the results, don't understand the results mind :-)

#0  0x08155d55 in proc_exit ()
#1  0x08161c17 in PostgresMain ()
#2  0x0813eee0 in BackendFork ()
#3  0x0813e8d6 in BackendStartup ()
#4  0x0813d1c6 in ServerLoop ()
#5  0x0813cda3 in PostmasterMain ()
#6  0x08110f56 in main ()

Thanks for your help sofar...

p.s. Installed phpPgAdmin and that appears to work fine, don't know if that makes any difference




Regards

Kevin Izzet

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



"Tom Lane" <tgl@sss.pgh.pa.us>

06/08/2004 15:41

       
        To:        "Kevin Izzet" <Kevin.Izzet@nsc.com>
        cc:        pgsql-admin@postgresql.org
        Subject:        Re: [ADMIN] psql won't stayed connected



"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Thanks for the reply but forgive my ignorance but how do I setup the
> debugger breakpoint ?

Something like this:

                PGOPTIONS="-W 30" psql ...
                Use ps to determine PID of backend connected to psql
                gdb /path/to/postgres-executable PID-of-backend
                gdb> break proc_exit
                gdb> continue
                (wait for rest of timeout to expire)
                gdb will report reaching proc_exit breakpoint
                gdb> bt
                ... interesting result is here ...
                gdb> quit

If you've never done this before it will probably take you more than 30
seconds to get into gdb --- adjust the W option accordingly.

                                                  regards, tom lane






*************************************************************************************
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

Re: psql won't stayed connected

От
Tom Lane
Дата:
"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Managed to get the debugger to work and here are the results, don't
> understand the results mind :-)

> #0  0x08155d55 in proc_exit ()
> #1  0x08161c17 in PostgresMain ()
> #2  0x0813eee0 in BackendFork ()
> #3  0x0813e8d6 in BackendStartup ()

Hmph.  Well, AFAICS the only way for PostgresMain to call proc_exit()
directly is if it's seen EOF from the client (ie, connection closure).
So what you've really got is either a broken copy of psql on the Solaris
machine, or some kind of network issue that's causing the connection to
be closed almost immediately after establishment.  The latter seems a
bit odd, since at the very least the connection-request packet must have
got through, but ...

If you have strace or ktrace or similar on the Solaris machine, tracing
psql's kernel calls might be revealing.  What you want to watch for is
whether psql is exiting with the connection still open, or whether it
receives an EOF indication and then quits.

BTW, what authorization mode are you trying to use for this connection?
You might experiment with some different ones to see if the behavior
changes.  Also, what about turning SSL on or off?

            regards, tom lane

Re: psql won't stayed connected

От
"Kevin Izzet"
Дата:

Hi Tom,

Below is an extract from a truss of the psql login, looks fine to me, I used the same source to build the Solaris client as I used for building the

linux server, I have also installed the client on a separate Linux server and get the same results.....

I've tried using ident,md5 and trust for login , when using md5 the command scrolls offf the window repeatedly asking for a password, the only way to stop it
is to kill the pid of the psql command or stop/restart the server......

We don't have ssl setup here and I unfortunately don't have the time to work on that one....

Your help is much appreciated......

937:    stat64("/home/kevini/.pgpass", 0xFFBEEEC8)      Err#2 ENOENT
937:    open("/etc/netconfig", O_RDONLY|O_LARGEFILE)    = 4
937:    brk(0x00048C48)                                 = 0
937:    brk(0x0004AC48)                                 = 0
937:    fcntl(4, F_DUPFD, 0x00000100)                   Err#22 EINVAL
937:    read(4, " # p r a g m a   i d e n".., 1024)     = 1024
937:    read(4, " t s           t p i _ c".., 1024)     = 215
937:    read(4, 0x00048C00, 1024)                       = 0
937:    lseek(4, 0, SEEK_SET)                           = 0
937:    read(4, " # p r a g m a   i d e n".., 1024)     = 1024
937:    read(4, " t s           t p i _ c".., 1024)     = 215
937:    read(4, 0x00048C00, 1024)                       = 0
937:    close(4)                                        = 0
937:    open("/dev/udp", O_RDONLY)                      = 4
937:    ioctl(4, 0xC00C6982, 0xFFBEEB7C)                = 0
937:    close(4)                                        = 0
937:    door_info(3, 0xFFBECB00)                        = 0
937:    door_call(3, 0xFFBECAE8)                        = 0
937:    door_info(3, 0xFFBECA80)                        = 0
937:    door_call(3, 0xFFBECA68)                        = 0
937:    brk(0x0004AC48)                                 = 0
937:    brk(0x0004CC48)                                 = 0
937:    so_socket(2, 2, 0, "", 1)                       = 4
937:    setsockopt(4, 6, 1, 0xFFBEEC2C, 4, 1)           = 0
937:    fstat64(4, 0xFFBEEAC8)                          = 0
937:    getsockopt(4, 65535, 8192, 0xFFBEEBC8, 0xFFBEEBC4, 0) = 0
937:    setsockopt(4, 65535, 8192, 0xFFBEEBC8, 4, 0)    = 0
937:    fcntl(4, F_SETFL, 0x00000080)                   = 0
937:    connect(4, 0x0003F300, 16, 1)                   Err#150 EINPROGRESS
937:    poll(0xFFBEED78, 1, -1)                         = 1
937:    getsockopt(4, 65535, 4103, 0xFFBEEE5C, 0xFFBEEE58, 1) = 0
937:    getsockname(4, 0x0003F978, 0x0003FA78, 1)       = 0
937:    poll(0xFFBEED78, 1, -1)                         = 1
937:    sigaction(SIGPIPE, 0xFFBEEAC8, 0xFFBEEB48)      = 0
937:    send(4, "\0\0\0 #\003\0\0 u s e r".., 35, 0)    = 35
937:    sigaction(SIGPIPE, 0xFFBEEAC8, 0xFFBEEB48)      = 0
937:    poll(0xFFBEED78, 1, -1)                         = 1
937:    recv(4, " R\0\0\0\b\0\0\0\0 N\0\0".., 16384, 0) = 75
937:    write(2, " D E B U G :     I n i t".., 21)      = 21
937:    poll(0xFFBEED78, 1, -1)                         = 1
937:    recv(4, " S\0\0\01E c l i e n t _".., 16384, 0) = 155
937:    access("/home/kevini/.psqlrc-7.4.3", 4)         Err#2 ENOENT
937:    access("/home/kevini/.psqlrc", 4)               Err#2 ENOENT
937:    getcontext(0xFFBEEDE0)
937:    sigaction(SIGINT, 0xFFBEEED8, 0xFFBEEF58)       = 0
937:    ioctl(0, TCGETA, 0xFFBEE9BC)                    Err#6 ENXIO
937:    fstat64(0, 0xFFBEEA30)                          = 0
937:    brk(0x0004CC48)                                 = 0
937:    brk(0x0004EC48)                                 = 0
937:    read(0, 0x0004ADB4, 8192)                       = 0
937:    sigaction(SIGINT, 0xFFBEEED8, 0xFFBEEF58)       = 0
937:    sigaction(SIGPIPE, 0xFFBEECC0, 0xFFBEED40)      = 0
937:    send(4, " X\0\0\004", 5, 0)                     = 5
937:    sigaction(SIGPIPE, 0xFFBEECC0, 0xFFBEED40)      = 0
937:    close(4)                                        = 0
937:    sigaction(SIGPIPE, 0xFFBEEF10, 0xFFBEEF90)      = 0
937:    llseek(0, 0, SEEK_CUR)                          = 0
937:    _exit(0)



Regards

Kevin Izzet

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



"Tom Lane" <tgl@sss.pgh.pa.us>

06/08/2004 17:40

       
        To:        "Kevin Izzet" <Kevin.Izzet@nsc.com>
        cc:        pgsql-admin@postgresql.org
        Subject:        Re: [ADMIN] psql won't stayed connected



"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Managed to get the debugger to work and here are the results, don't
> understand the results mind :-)

> #0  0x08155d55 in proc_exit ()
> #1  0x08161c17 in PostgresMain ()
> #2  0x0813eee0 in BackendFork ()
> #3  0x0813e8d6 in BackendStartup ()

Hmph.  Well, AFAICS the only way for PostgresMain to call proc_exit()
directly is if it's seen EOF from the client (ie, connection closure).
So what you've really got is either a broken copy of psql on the Solaris
machine, or some kind of network issue that's causing the connection to
be closed almost immediately after establishment.  The latter seems a
bit odd, since at the very least the connection-request packet must have
got through, but ...

If you have strace or ktrace or similar on the Solaris machine, tracing
psql's kernel calls might be revealing.  What you want to watch for is
whether psql is exiting with the connection still open, or whether it
receives an EOF indication and then quits.

BTW, what authorization mode are you trying to use for this connection?
You might experiment with some different ones to see if the behavior
changes.  Also, what about turning SSL on or off?

                                                  regards, tom lane






*************************************************************************************
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

Re: psql won't stayed connected

От
Tom Lane
Дата:
"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Below is an extract from a truss of the psql login, looks fine to me,

Not really.  Here we have the successful connection to the server:

> 937:    send(4, "\0\0\0 #\003\0\0 u s e r".., 35, 0)    = 35
> 937:    sigaction(SIGPIPE, 0xFFBEEAC8, 0xFFBEEB48)      = 0
> 937:    poll(0xFFBEED78, 1, -1)                         = 1
> 937:    recv(4, " R\0\0\0\b\0\0\0\0 N\0\0".., 16384, 0) = 75
> 937:    write(2, " D E B U G :     I n i t".., 21)      = 21
> 937:    poll(0xFFBEED78, 1, -1)                         = 1
> 937:    recv(4, " S\0\0\01E c l i e n t _".., 16384, 0) = 155

and here is psql doing its normal initialization:

> 937:    access("/home/kevini/.psqlrc-7.4.3", 4)         Err#2 ENOENT
> 937:    access("/home/kevini/.psqlrc", 4)               Err#2 ENOENT
> 937:    getcontext(0xFFBEEDE0)
> 937:    sigaction(SIGINT, 0xFFBEEED8, 0xFFBEEF58)       = 0
> 937:    ioctl(0, TCGETA, 0xFFBEE9BC)                    Err#6 ENXIO
> 937:    fstat64(0, 0xFFBEEA30)                          = 0
> 937:    brk(0x0004CC48)                                 = 0
> 937:    brk(0x0004EC48)                                 = 0

and here it's trying to read the first command from stdin,
and getting EOF back:

> 937:    read(0, 0x0004ADB4, 8192)                       = 0

whereupon it quite correctly decides to close up shop:

> 937:    sigaction(SIGINT, 0xFFBEEED8, 0xFFBEEF58)       = 0
> 937:    sigaction(SIGPIPE, 0xFFBEECC0, 0xFFBEED40)      = 0
> 937:    send(4, " X\0\0\004", 5, 0)                     = 5
> 937:    sigaction(SIGPIPE, 0xFFBEECC0, 0xFFBEED40)      = 0
> 937:    close(4)                                        = 0
> 937:    sigaction(SIGPIPE, 0xFFBEEF10, 0xFFBEEF90)      = 0
> 937:    llseek(0, 0, SEEK_CUR)                          = 0
> 937:    _exit(0)

So why the heck is it getting EOF from stdin?  You're not doing
anything as silly as "psql </dev/null" are you?

            regards, tom lane

Re: psql won't stayed connected

От
"Kevin Izzet"
Дата:

Hi Tom,

Nope nothing silly, just trying to get a command line connection......

Am I maybe missing some kind of default logicals ?
Am I correct in thinking that apart from compiling the client from source I don't need to modify any of the conf files ?

The fact that I get the same result from a Linux Client as a Solaris client may point to something I've configured wrongly......

:-(


Regards

Kevin Izzet

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



"Tom Lane" <tgl@sss.pgh.pa.us>

09/08/2004 15:45

       
        To:        "Kevin Izzet" <Kevin.Izzet@nsc.com>
        cc:        pgsql-admin@postgresql.org
        Subject:        Re: [ADMIN] psql won't stayed connected



"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Below is an extract from a truss of the psql login, looks fine to me,

Not really.  Here we have the successful connection to the server:

> 937:    send(4, "\0\0\0 #\003\0\0 u s e r".., 35, 0)    = 35
> 937:    sigaction(SIGPIPE, 0xFFBEEAC8, 0xFFBEEB48)      = 0
> 937:    poll(0xFFBEED78, 1, -1)                         = 1
> 937:    recv(4, " R\0\0\0\b\0\0\0\0 N\0\0".., 16384, 0) = 75
> 937:    write(2, " D E B U G :     I n i t".., 21)      = 21
> 937:    poll(0xFFBEED78, 1, -1)                         = 1
> 937:    recv(4, " S\0\0\01E c l i e n t _".., 16384, 0) = 155

and here is psql doing its normal initialization:

> 937:    access("/home/kevini/.psqlrc-7.4.3", 4)         Err#2 ENOENT
> 937:    access("/home/kevini/.psqlrc", 4)               Err#2 ENOENT
> 937:    getcontext(0xFFBEEDE0)
> 937:    sigaction(SIGINT, 0xFFBEEED8, 0xFFBEEF58)       = 0
> 937:    ioctl(0, TCGETA, 0xFFBEE9BC)                    Err#6 ENXIO
> 937:    fstat64(0, 0xFFBEEA30)                          = 0
> 937:    brk(0x0004CC48)                                 = 0
> 937:    brk(0x0004EC48)                                 = 0

and here it's trying to read the first command from stdin,
and getting EOF back:

> 937:    read(0, 0x0004ADB4, 8192)                       = 0

whereupon it quite correctly decides to close up shop:

> 937:    sigaction(SIGINT, 0xFFBEEED8, 0xFFBEEF58)       = 0
> 937:    sigaction(SIGPIPE, 0xFFBEECC0, 0xFFBEED40)      = 0
> 937:    send(4, " X\0\0\004", 5, 0)                     = 5
> 937:    sigaction(SIGPIPE, 0xFFBEECC0, 0xFFBEED40)      = 0
> 937:    close(4)                                        = 0
> 937:    sigaction(SIGPIPE, 0xFFBEEF10, 0xFFBEEF90)      = 0
> 937:    llseek(0, 0, SEEK_CUR)                          = 0
> 937:    _exit(0)

So why the heck is it getting EOF from stdin?  You're not doing
anything as silly as "psql </dev/null" are you?

                                                  regards, tom lane






*************************************************************************************
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

Re: psql won't stayed connected

От
Tom Lane
Дата:
"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Am I maybe missing some kind of default logicals ?

Darn if I know.

> The fact that I get the same result from a Linux Client as a Solaris
> client may point to something I've configured wrongly......

I could believe that on Solaris but on Linux it's very unlikely that the
default configuration wouldn't work.  The common factor is more likely
pilot error ;-).  How *exactly* are you invoking psql, anyway?  Could
we see a cut-and-paste from your terminal session?

            regards, tom lane

Re: psql won't stayed connected

От
"Kevin Izzet"
Дата:


Ok  get to the Donkey Ears for this week......   :-(


We run all our apps from a central Linux HA service, when we add a new app we add a new link via a wrapper which allows the
app to choose the correct OS and path for running that app........

The default for the apps is to have an & at the end of the command line so that the command is spawned.........ooooooooooppppppppsssssssss

So psql was doing exactly what I asked it too, running and backgrounding..... DUH...........


Apologies for wasting your time Tom, will have to drink more black coffee and try not to multi task so much..............


Regards

Kevin Izzet

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



"Tom Lane" <tgl@sss.pgh.pa.us>

09/08/2004 16:45

       
        To:        "Kevin Izzet" <Kevin.Izzet@nsc.com>
        cc:        pgsql-admin@postgresql.org
        Subject:        Re: [ADMIN] psql won't stayed connected



"Kevin Izzet" <Kevin.Izzet@nsc.com> writes:
> Am I maybe missing some kind of default logicals ?

Darn if I know.

> The fact that I get the same result from a Linux Client as a Solaris
> client may point to something I've configured wrongly......

I could believe that on Solaris but on Linux it's very unlikely that the
default configuration wouldn't work.  The common factor is more likely
pilot error ;-).  How *exactly* are you invoking psql, anyway?  Could
we see a cut-and-paste from your terminal session?

                                                  regards, tom lane






*************************************************************************************
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

Re: psql won't stayed connected

От
dalgoda@ix.netcom.com (Mike Castle)
Дата:
In article <20230.1091810425@sss.pgh.pa.us>,
Tom Lane  <tgl@sss.pgh.pa.us> wrote:
>If you have strace or ktrace or similar on the Solaris machine, tracing
>psql's kernel calls might be revealing.  What you want to watch for is
>whether psql is exiting with the connection still open, or whether it
>receives an EOF indication and then quits.

I believe it's called truss on Solaris (but it has been a number of years
since I've been on such a box).

mrc
--
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

Re: psql won't stayed connected

От
jseymour@linxnet.com (Jim Seymour)
Дата:
dalgoda@ix.netcom.com (Mike Castle) wrote:
>
> In article <20230.1091810425@sss.pgh.pa.us>,
> Tom Lane  <tgl@sss.pgh.pa.us> wrote:
> >If you have strace or ktrace or similar on the Solaris machine, tracing
> >psql's kernel calls might be revealing.  What you want to watch for is
> >whether psql is exiting with the connection still open, or whether it
> >receives an EOF indication and then quits.
>
> I believe it's called truss on Solaris (but it has been a number of years
> since I've been on such a box).

Truss it is.

Jim