Обсуждение: Bug #929: Client connection to postgresql hangs indefinitely (under possibly pathological scenarios)

Поиск
Список
Период
Сортировка

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

От
pgsql-bugs@postgresql.org
Дата:
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@postgresql.org writes:
> 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.

It would help if you would quantify how many create/drop pairs it takes.

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

If you've tried and failed to reproduce on Linux then the most likely
bet is that it's a Cygwin bug.  But it would be good to try on some
other Unixoid platforms before pointing a finger in that direction.

            regards, tom lane