473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

psql leaking?

Hello,

Today I tried connecting to my database locally via psql. I got the usual
welcome & basic help messages, but it never got to the prompt: it just
hung. So I checked top and the psql process was increasing in size at
quite a rate (up to a gig in under 30 seconds).

I'd been using psql with no problems only a couple of hours ago, and I
haven't installed anything for at least a couple of days that I can think
of.

The first thing I did was to pg_dumpall a backup and try recompiling the
server. That didn't work, so I tried doing initdb again. No joy. So I
upgraded to 7.4.5 (was 7.4.3 before), and again no joy. Note that it
happens just after I've run initdb, so even when my database has gone
nowhere near it: this is effectively a clean compile and install that is
failing at this point.

I've turned logging up full and got this (starting from when I run the
psql command):

2004-09-04 16:43:29 DEBUG: forked new backend, pid=23315 socket=8
2004-09-04 16:43:29 DEBUG: /usr/bin/postmaster child[23315]: starting
with (
2004-09-04 16:43:29 DEBUG: postgres
2004-09-04 16:43:29 DEBUG: -v196608
2004-09-04 16:43:29 DEBUG: -p
2004-09-04 16:43:29 DEBUG: template1
2004-09-04 16:43:29 DEBUG: )
2004-09-04 16:43:29 DEBUG: InitPostgres
2004-09-04 16:44:53 LOG: unexpected EOF on client connection
2004-09-04 16:44:53 DEBUG: proc_exit(0)
2004-09-04 16:44:53 DEBUG: shmem_exit(0)
2004-09-04 16:44:53 DEBUG: exit(0)
2004-09-04 16:44:53 DEBUG: reaping dead processes
2004-09-04 16:44:53 DEBUG: child process (PID 23315) exited with exit
code 0

The LOG is the point at which I CTRL+C the client.

I'm suspecting that there's a problem with one of the libraries that psql
uses: I really can't see this being a psql bug as I'd have noticed it
before: there must be something else going on. Trouble is, I don't know
what libraries it uses other than glibc (which I'm currently recompiling
just in case).

I'm at a loss, and can't think of anything else. This has just happened
totally unprompted and without any real clues that I can see.

Anyone else have any ideas?

Thanks.

--

Russell Brown

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
2 1715
A little more information that I've realised I didn't supply. The server
(well, it's a desktop machine really) is running on Gentoo Linux, 2.6.7
kernel. There are no problems with PHP accessing the database (from the
same machine), and psql doesn't have a problem with either having SQL
files directed at it or running individual commands via the -c option. It
seems to be just when trying to get an interactive prompt. I've tried
recompiling readline but that didn't fix it (my recompile of glic appears
to have not succeeded too). Each of those recompiles was followed by a
recompile of PostgreSQL. I've run ldconfig and also revdep-rebuild, with
no effect.

I'm convinced that there's a library that I've missed that I need to
recompile but I can't for the life of me think of what it is...

On Sat, 04 Sep 2004 17:05:32 +0100, Russ Brown <po******@dot4dot.plus.com>
wrote:
Hello,

Today I tried connecting to my database locally via psql. I got the
usual welcome & basic help messages, but it never got to the prompt: it
just hung. So I checked top and the psql process was increasing in size
at quite a rate (up to a gig in under 30 seconds).

I'd been using psql with no problems only a couple of hours ago, and I
haven't installed anything for at least a couple of days that I can
think of.

The first thing I did was to pg_dumpall a backup and try recompiling the
server. That didn't work, so I tried doing initdb again. No joy. So I
upgraded to 7.4.5 (was 7.4.3 before), and again no joy. Note that it
happens just after I've run initdb, so even when my database has gone
nowhere near it: this is effectively a clean compile and install that is
failing at this point.

I've turned logging up full and got this (starting from when I run the
psql command):

2004-09-04 16:43:29 DEBUG: forked new backend, pid=23315 socket=8
2004-09-04 16:43:29 DEBUG: /usr/bin/postmaster child[23315]: starting
with (
2004-09-04 16:43:29 DEBUG: postgres
2004-09-04 16:43:29 DEBUG: -v196608
2004-09-04 16:43:29 DEBUG: -p
2004-09-04 16:43:29 DEBUG: template1
2004-09-04 16:43:29 DEBUG: )
2004-09-04 16:43:29 DEBUG: InitPostgres
2004-09-04 16:44:53 LOG: unexpected EOF on client connection
2004-09-04 16:44:53 DEBUG: proc_exit(0)
2004-09-04 16:44:53 DEBUG: shmem_exit(0)
2004-09-04 16:44:53 DEBUG: exit(0)
2004-09-04 16:44:53 DEBUG: reaping dead processes
2004-09-04 16:44:53 DEBUG: child process (PID 23315) exited with exit
code 0

The LOG is the point at which I CTRL+C the client.

I'm suspecting that there's a problem with one of the libraries that
psql uses: I really can't see this being a psql bug as I'd have noticed
it before: there must be something else going on. Trouble is, I don't
know what libraries it uses other than glibc (which I'm currently
recompiling just in case).

I'm at a loss, and can't think of anything else. This has just happened
totally unprompted and without any real clues that I can see.

Anyone else have any ideas?

Thanks.


--

Russell Brown

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2
"Russ Brown" <po******@dot4dot.plus.com> writes:
A little more information that I've realised I didn't supply. The server
(well, it's a desktop machine really) is running on Gentoo Linux, 2.6.7
kernel. There are no problems with PHP accessing the database (from the
same machine), and psql doesn't have a problem with either having SQL
files directed at it or running individual commands via the -c option. It
seems to be just when trying to get an interactive prompt. I've tried
recompiling readline but that didn't fix it (my recompile of glic appears
to have not succeeded too). Each of those recompiles was followed by a
recompile of PostgreSQL. I've run ldconfig and also revdep-rebuild, with
no effect.


Gentoo? Have you perhaps updated any library sources recently? If it's
an actual recently-introduced bug then no amount of recompiling is going
to make it go away.

The interactive-only aspect does seem to point the finger at readline,
but I wouldn't swear to that. You might try recompiling --without-readline
just to see.

Another approach is to make a debug build and then use gdb to get an
idea of where it's looping.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); ...
4
by: Phil Campaigne | last post by:
Hi All, I just installed postgresql 7.3.4 as an upgrade to 7.3.2 and all went well untill I tried to log into a database that I successfully created. Here are the steps in question: bash-2.05b$...
7
by: Willem Herremans | last post by:
I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also...
4
by: Brendan Jurd | last post by:
Hello all, I just wanted to pass on some information about compatibility between the psql client and the postgres server. On a particular network, my workstation and the server are both debian...
15
by: Dino Vliet | last post by:
Hi folks, probably this is a question you've heard so many times but I wasn't able to find a solution to it. I'm using a shell script to create a textfile for me. It looks like...
1
by: Josué Maldonado | last post by:
Hello List, I'm having this issue with beta 8.0 C:\pgsql\bin>pg_dump -U postgres farmacia > xfar.sql Password: C:\pgsql\bin>psql -U postgres farmacia2 < xfar.sql Password: psql: FATAL: ...
33
by: John Sidney-Woollett | last post by:
With the advent of postgres v8, would it be possible to change the default behaviour of psql from AUTOCOMMIT=ON to AUTOCOMMIT=OFF ? Although this might break backward compatibility, it might be...
2
by: Patrick Hatcher | last post by:
Just installed and started Pg8.0 beta 2 When I tried to connect via psql, I received an error message: $ psql -Upostgres template1 psql: relocation error: psql: undefined symbol:...
3
by: oksofar | last post by:
Hello - I'm running PG 8.1 on Windows XP. I've installed the server to run as a service. The psql command fails to connect to the server, although I can connect with other clients. When I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.