Re: [HACKERS] query crashes backend - cvs - Mailing list pgsql-hackers

From Oleg Bartunov
Subject Re: [HACKERS] query crashes backend - cvs
Date
Msg-id Pine.GSO.3.96.SK.980916113741.28063B-100000@ra
Whole thread Raw
In response to Re: [HACKERS] query crashes backend - cvs  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Ok,
create table t0 ( a_id int4 NOT NULL, a varchar(10), a_t1_id int4);
create index a_id_t0 on t0 (a_id);
create index a_t1_id_t0 on t0 (a_t1_id);
COPY t0 FROM STDIN USING DELIMITERS '|';
1|at0|0
2|at0|0
\.

test=> \d t0

Table    = t0
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| a_id                             | int4 not null                    |     4 |
| a                                | varchar()                        |    10 |
| a_t1_id                          | int4                             |     4 |
+----------------------------------+----------------------------------+-------+
Indices:  a_id_t0
          a_t1_id_t0
test=> select * from t0 where a_id = 1 or a_id = 2 and a_t1_id  < 1;
a_id|a  |a_t1_id
----+---+-------
   1|at0|      0
   2|at0|      0
(2 rows)

test=> select * from t0 where (a_id = 1 or a_id = 2) and a_t1_id  < 1;
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.
This is Linux box, running  postgres from cvs
Linux om 2.1.117 #2 Tue Aug 25 21:05:29 MSD 1998 i586
Kernel modules         2.1.121
Gnu C                  egcs-2.91.57
Binutils               2.9.1.0.7
Linux C Library        5.4.46
Dynamic Linker (ld.so) 1.9.9
Linux C++ Library      27.1.4
Procps                 1.2.7
Mount                  2.8a
Net-tools              (1998-03-02)
Kbd
Sh-utils               1.16
This happens also on another Linux box:
Linux dv 2.0.34 #7 Wed Aug 26 14:05:30 MSD 1998 i586 unknown
Kernel modules         2.1.71
Gnu C                  2.7.2.3
Binutils               2.8.1.0.23
Linux C Library        5.4.44
Dynamic Linker (ld.so) 1.9.7
Linux C++ Library      27.2.8
Procps                 1.2.6
Procinfo               12
Mount                  2.7l
Net-tools              1.432.
Kbd                    0.94
Sh-utils               1.16

Again, 6.3.2 works fine.
Also, cvs has a problem with vacuum analyze

test=> vacuum analyze t0;
ERROR:  cannot write block -1 of  [] blind
test=> \q
11:53[om]:~/bin>psql test
Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: test

test=> \d t0
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally before or while processing the request.

I run postmaster as 'postmaster -i -S -D/usr/local/pgsql/data/ -o -Fe'
(note, no -B 1024 now, because number of buffers > 128 causes
vacuum analyze crash also, I've already posted several day s ago)


    Regards,
       Oleg


On Wed, 16 Sep 1998, Thomas G. Lockhart wrote:

> Date: Wed, 16 Sep 1998 05:14:13 +0000
> From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
> To: Oleg Bartunov <oleg@sai.msu.su>
> Cc: pgsql-hackers@postgreSQL.org
> Subject: Re: [HACKERS] query crashes backend - cvs
>
> > select * from work_flats where (METRO_ID = 81 or METRO_ID = 82) and
> >  DISTRICT_ID < 11;
> > crashes backend
> > pqReadData() -- backend closed the channel unexpectedly.
> > while
> > select * from work_flats where METRO_ID = 81 or METRO_ID = 82 and
> >  DISTRICT_ID < 11;
> > works ok.
> >
> > This happens with latest cvs, 6.3.2 has no problem.
>
> postgres=> select * from t where (METRO_ID = 81 or METRO_ID = 82) and
> postgres->  DISTRICT_ID < 11;
> metro_id|district_id
> --------+-----------
>       81|          1
>       82|          2
> (2 rows)
>
> More details please...
>
>                     - Tom
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] BETA1 Snapshot built...
Next
From: Andreas Zeugswetter
Date:
Subject: Re: [HACKERS] crash on new system views