Discussion:
Server-side killing of database connection (7.3.4)
(too old to reply)
Rune Froysa
2004-02-13 09:11:37 UTC
Permalink
I need to kill a connected database user. I'm able to find the pid
associated with the troublesome user. However, if I try killing the
process with any of INT, TERM or QUIT, all connected database users
get the message:

WARNING: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.

Is it possible to kill a connected user without shuting down the
database? I.e. something like "alter system kill session" in oracle.

Regards,
Rune Frøysa

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Jeremy Smith
2004-02-15 02:24:40 UTC
Permalink
I know this isn't strictly a postgresql question, but I'm sure it applies to
others out there using psql. If I am working in psql from SSH and switch to
another window, it seems that there is a very short window of time before
the window freezes and doesn't allow any more input. Does anyone know how
to change the setting that controls how much time the window can remain
without input before it shuts down?

Thanks,
Jeremy


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Tom Lane
2004-02-15 16:56:16 UTC
Permalink
Post by Jeremy Smith
I know this isn't strictly a postgresql question, but I'm sure it applies to
others out there using psql. If I am working in psql from SSH and switch to
another window, it seems that there is a very short window of time before
the window freezes and doesn't allow any more input.
Never heard of such a problem before. What's your environment, and
would you give a more complete description of the problem?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Tsirkin Evgeny
2004-02-15 07:10:20 UTC
Permalink
Do you use PuTTy as the ssh client? If yes then here you are ,it
is the connection problem .i have it all the time and did not found
what to do with.Actually that is not only putty problem ,but for
example linux ssh client at least does not just freeze - it says
something like 'connection timeout'.Just as a proof that this
is an ssh problem and not postgres - i have 2 servers with the
same config but on diff networks - one neither have a freeze while
the other all the time.
Evgeny
Post by Tom Lane
Post by Jeremy Smith
I know this isn't strictly a postgresql question, but I'm sure it applies to
others out there using psql. If I am working in psql from SSH and switch to
another window, it seems that there is a very short window of time before
the window freezes and doesn't allow any more input.
Never heard of such a problem before. What's your environment, and
would you give a more complete description of the problem?
regards, tom lane
---------------------------(end of broadcast)---------------------------
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Tom Lane
2004-02-15 05:34:39 UTC
Permalink
Post by Rune Froysa
I need to kill a connected database user. I'm able to find the pid
associated with the troublesome user. However, if I try killing the
process with any of INT, TERM or QUIT, all connected database users
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
Better take another look at how you're doing that kill. It is not
sending the signal number you think it is.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Jeremy Smith
2004-02-15 19:50:43 UTC
Permalink
I looked at putty's help documentation and found a keep-alive setting that will send empty packets every so often to keep the session active. It's pretty much the same thing that happens when FTPing to a remote server, and this is of course the same recourse used to keep FTPs from timing out as well.

Jeremy

-----Original Message-----
From: Tsirkin Evgeny [mailto:***@mail.jct.ac.il]
Sent: Sunday, February 15, 2004 2:10 AM
To: Tom Lane; ***@highboard.com
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] SSH connection timing out


Do you use PuTTy as the ssh client? If yes then here you are ,it
is the connection problem .i have it all the time and did not found
what to do with.Actually that is not only putty problem ,but for
example linux ssh client at least does not just freeze - it says
something like 'connection timeout'.Just as a proof that this
is an ssh problem and not postgres - i have 2 servers with the
same config but on diff networks - one neither have a freeze while
the other all the time.
Evgeny
Post by Tom Lane
Post by Jeremy Smith
I know this isn't strictly a postgresql question, but I'm sure it
applies to
others out there using psql. If I am working in psql from SSH and
switch to
another window, it seems that there is a very short window of time
before
the window freezes and doesn't allow any more input.
Never heard of such a problem before. What's your environment, and
would you give a more complete description of the problem?
regards, tom lane
---------------------------(end of broadcast)---------------------------
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Bruce Momjian
2004-02-17 15:21:46 UTC
Permalink
Post by Jeremy Smith
I looked at putty's help documentation and found a keep-alive
setting that will send empty packets every so often to keep the
session active. It's pretty much the same thing that happens
when FTPing to a remote server, and this is of course the same
recourse used to keep FTPs from timing out as well.
I also find Putty SSH bursty when redrawing the screen, so locally I
just use putty telnet connections.

--
Bruce Momjian | http://candle.pha.pa.us
***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
t***@jct.ac.il
2004-02-16 09:22:20 UTC
Permalink
do you mean the "seconds between keepalive" ?
and thanks i will try it.
Post by Jeremy Smith
I looked at putty's help documentation and found a keep-alive setting that
will send empty packets every so often to keep the session active. It's
pretty much the same thing that happens when FTPing to a remote server, and
this is of course the same recourse used to keep FTPs from timing out as
well.
Jeremy
-----Original Message-----
Sent: Sunday, February 15, 2004 2:10 AM
Subject: Re: [ADMIN] SSH connection timing out
Do you use PuTTy as the ssh client? If yes then here you are ,it
is the connection problem .i have it all the time and did not found
what to do with.Actually that is not only putty problem ,but for
example linux ssh client at least does not just freeze - it says
something like 'connection timeout'.Just as a proof that this
is an ssh problem and not postgres - i have 2 servers with the
same config but on diff networks - one neither have a freeze while
the other all the time.
Evgeny
Post by Tom Lane
Post by Jeremy Smith
I know this isn't strictly a postgresql question, but I'm sure it
applies to
others out there using psql. If I am working in psql from SSH and
switch to
another window, it seems that there is a very short window of time
before
the window freezes and doesn't allow any more input.
Never heard of such a problem before. What's your environment, and
would you give a more complete description of the problem?
regards, tom lane
---------------------------(end of broadcast)---------------------------
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Christian Frabel
2004-03-01 13:49:11 UTC
Permalink
I look for theese backports, someone could help?

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Peter Eisentraut
2004-03-01 18:40:38 UTC
Permalink
Post by Christian Frabel
I look for theese backports, someone could help?
For postgresql, see http://people.debian.org/~elphick/.

About phppgadmin, I don't know of one. I happened to look at building one
yesterday, but it would seem to entail an update of php4, which was a little
too much for my taste at that time.


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

Jeremy Smith
2004-02-15 19:24:20 UTC
Permalink
Hi Evgeny,

yes I am PUTTY. I knew it wasn't a postgres problem, but thought there might be some server variable controlling timeout. I didn't know that other SSH clients didn't have the same thing happen. Since I am logging to my machine remotely, I can't use the linux ssh client, but I'll see if anything else is out there.

Jeremy

-----Original Message-----
From: Tsirkin Evgeny [mailto:***@mail.jct.ac.il]
Sent: Sunday, February 15, 2004 2:10 AM
To: Tom Lane; ***@highboard.com
Cc: pgsql-***@postgresql.org
Subject: Re: [ADMIN] SSH connection timing out


Do you use PuTTy as the ssh client? If yes then here you are ,it
is the connection problem .i have it all the time and did not found
what to do with.Actually that is not only putty problem ,but for
example linux ssh client at least does not just freeze - it says
something like 'connection timeout'.Just as a proof that this
is an ssh problem and not postgres - i have 2 servers with the
same config but on diff networks - one neither have a freeze while
the other all the time.
Evgeny
Post by Tom Lane
Post by Jeremy Smith
I know this isn't strictly a postgresql question, but I'm sure it
applies to
others out there using psql. If I am working in psql from SSH and
switch to
another window, it seems that there is a very short window of time
before
the window freezes and doesn't allow any more input.
Never heard of such a problem before. What's your environment, and
would you give a more complete description of the problem?
regards, tom lane
---------------------------(end of broadcast)---------------------------
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Loading...