Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)
Date: 2003-04-01 01:27:21
Message-ID: 20030401012721.0505E475D91@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Claudio Natoli (claudio(dot)natoli(at)memetrics(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)

Long Description

Configuration
=============
WinNT 4.0.0 (build 1381 w/ SP6)
Cygwin 1.3.22-1 w/ cygipc-1.13-2
Postgres 7.3.2-1
[PostgreSQL 7.3.2 on i686-pc-cygwin, compiled by GCC gcc (GCC) 3.2 20020927 (prerelease)]

Note: Problem may be limited to Windows installation (cygipc?); have reproduced on "virgin" Win2K; have not been able to reproduce under Linux

Steps to reproduce
==================

With a running postmaster:

* (A) Connect to some existing database with psql (eg. psql -d test_me)
- leave this psql running

* (B) In another window, issue a command like the following:
psql -d test_me < test.sql > /tmp/out

where test.sql is a file composed of many, many thousands of the following pair of statements:
create table dud_table (f integer);
drop table dud_table;

Invariably, after some period of time, the second connection (B) will hang. Exiting (A) does not cause (B) to recover, although it does appear crucial to have a connection other than (B) open in order to exercise the bug. (B) will recover if the postmaster is shutdown.

Note: There are many variation on this theme, such as starting (A) whilst (B) is running.

FYI, encountered this when running unit-tests for our system (which connects to postgres via ODBC). One test, which drops and create a handful of tables along with various other database operations, occasionally hangs. Originally believed the problem to be in our system, then perhaps ODBC, before iterating to the minimalist example above.

Sample Code

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-04-01 01:42:23 Re: Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)
Previous Message Tom Lane 2003-03-31 21:43:44 Re: [ADMIN] Can't connect to my postgresql