Partial index causing wrong results to be returned on 8.1.3

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Partial index causing wrong results to be returned on 8.1.3
Дата
Msg-id 1156824337.4526.12.camel@localhost.localdomain
обсуждение исходный текст
Ответы Re: Partial index causing wrong results to be returned on 8.1.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I could not duplicate this on any identical database, but thought I
would report it here, just for completeness. I've tried reindexing,
vacuuming, etc. Explain plans all look normal.

Version is 8.1.3
\d bigtable
...
"bigtable_status_partial" btree (status) WHERE status::text <>
'shipped'::text
=20
=20
greg=3D> select (select count(*) from bigtable where status  =3D 'shipped')
            + (select count(*) from bigtable where status <> 'shipped')
       UNION select count(*) from bigtable;
 ?column?
----------
  1185213
  1600569
=20
greg=3D> drop index bigtable_status_partial;
=20
greg=3D> select (select count(*) from bigtable where status  =3D 'shipped')
            + (select count(*) from bigtable where status <> 'shipped')
       UNION select count(*) from bigtable;
 ?column?
----------
  1185213
(1 row)

--
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200608290003
http://biglumber.com/x/web?pk=3D2529DF6AB8F79407E94445B4BC9B906714964AC8

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Gin Indexes cause server to crash on Windows"
Дата:
Сообщение: BUG #2595: Gin Indexes cause server to crash on Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Partial index causing wrong results to be returned on 8.1.3