Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios) - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)
Date
Msg-id 20030401012721.0505E475D91@postgresql.org
Whole thread Raw
Responses Re: Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Claudio Natoli (claudio.natoli@memetrics.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
toreproduce 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,
althoughit does appear crucial to have a connection other than (B) open in order to exercise the bug. (B) will recover
ifthe 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
dropsand create a handful of tables along with various other database operations, occasionally hangs. Originally
believedthe 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [ADMIN] Can't connect to my postgresql
Next
From: Tom Lane
Date:
Subject: Re: Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)