Skip site navigation (1) Skip section navigation (2)

BUG #2463: postgres server crashes on "select count(*) from table;"

From: "Satya Prakash Tripathi" <sptripathi78(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2463: postgres server crashes on "select count(*) from table;"
Date: 2006-06-02 10:15:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2463
Logged by:          Satya Prakash Tripathi
Email address:      sptripathi78(at)yahoo(dot)com
PostgreSQL version: 8.1.3
Operating system:   Linux
Description:        postgres server crashes on "select count(*) from table;"

postgres server crashes on running "select count(*) from  table;" from psql

steps to reproduce :

1) create a test table:

CREATE TABLE test_tbl(
a          integer,
b          integer,
c          integer,
d          integer,
e          integer,
f          integer,
g          integer,
h          integer,
i          integer);

run a script to do inserts in this table in a loop.
example script:

#set -x
PSQL=`which psql`
while [ 1 ];
        if [ $x -eq 1000 ]; then
         ` echo "delete from test_tbl;" | $PSQL -q test_db`
        #echo "loop: $x"
        ` echo "insert into test_tbl values(1,1,1,1,1,1,1,1,1);" | $PSQL -q
        x=`expr $x + 1`
        y=`expr $y + 1`
        echo " no of inserts(y)=$y"  > $FILE


now on psql client, run select command as following:

test_db=# select count(*) from test_tbl;
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and
repeat your command.
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded. 

On this, postgres server crashes and terminates psql client connection.

I have seen postgres crashing without running this command too.


pgsql-bugs by date

Next:From: Tom LaneDate: 2006-06-02 13:57:24
Subject: Re: BUG #2463: postgres server crashes on "select count(*) from table;"
Previous:From: William ZHANGDate: 2006-06-02 10:12:56
Subject: Re: missing or erroneous pg_hba.conf file

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group