472,789 Members | 1,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 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 1679
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
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.