Thread: min() and max() causing aborts

min() and max() causing aborts

From
Michael Davis
Date:
I pulled the latest version of the source tree yesterday and complied
PosgtreSQL 6.5.  The get the following error on any select statement
containing min() and max():

mp=> select max(addressid) from addresses;
pqReadData() -- backend closed the channel unexpectedly.       This probably means the backend terminated abnormally
beforeor
 
while processing the request.
We have lost the connection to the backend, so further processing is
impossible.  Terminating.


I am running Red Hat 5.1.

FYI, I also noticed failures in the regressions tests for int2 and int4 and
some others (int8 was okay).  I did not dig very deep into this but the only
error I could see with int2 and int4 occurred when the value that was being
inserted into the table was too large for the field.  For example, inserting
100000 into an int2 field.

Thanks, Michael


Re: [HACKERS] min() and max() causing aborts

From
Bruce Momjian
Date:
> I pulled the latest version of the source tree yesterday and complied
> PosgtreSQL 6.5.  The get the following error on any select statement
> containing min() and max():
> 
> mp=> select max(addressid) from addresses;
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally before or
> while processing the request.
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.

It was my commit of someone's memory cleanups yesterday that broke it. 
I will check into it.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [HACKERS] min() and max() causing aborts

From
Bruce Momjian
Date:
> I pulled the latest version of the source tree yesterday and complied
> PosgtreSQL 6.5.  The get the following error on any select statement
> containing min() and max():
> 
> mp=> select max(addressid) from addresses;
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally before or
> while processing the request.
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.
> 
> 
> I am running Red Hat 5.1.
> 
> FYI, I also noticed failures in the regressions tests for int2 and int4 and
> some others (int8 was okay).  I did not dig very deep into this but the only
> error I could see with int2 and int4 occurred when the value that was being
> inserted into the table was too large for the field.  For example, inserting
> 100000 into an int2 field.
> 

I recommend a clean compile and initdb to see if that fixes it.  Do you
see anything in the postmaster log file?

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [HACKERS] min() and max() causing aborts

From
Bruce Momjian
Date:
> I pulled the latest version of the source tree yesterday and complied
> PosgtreSQL 6.5.  The get the following error on any select statement
> containing min() and max():
> 
> mp=> select max(addressid) from addresses;
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally before or
> while processing the request.
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.

I have backed out the part of the patch I think was the problem.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026