Re: BUG #18440: Query does not prune partitions correctly or use index when prepared statements are used

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #18440: Query does not prune partitions correctly or use index when prepared statements are used
Дата
Msg-id CAKFQuwbARATm+9Pmri+4nva2vYPP6hOQDcH48YHUgL9urKokQQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18440: Query does not prune partitions correctly or use index when prepared statements are used  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Tue, Apr 16, 2024 at 11:56 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18440
Logged by:          Damir Ciganović-Janković
Email address:      damir.ciganovic.jankovic@gmail.com
PostgreSQL version: 15.6
Operating system:   Linux
Description:       

Note, same bug from
https://www.postgresql.org/message-id/17484-716a1fcbcb0e379b%40postgresql.org
, I was instructed to check on Postgres 14, but the issue is still present
in 15.6 and 16.2 versions.

Like with the other report this isn't a bug report.  It is a symptom of difficulty in explaining how all these complex features interact with each other and thus users having the wrong expectations.

Compare the plans for a circa v13 execution and a circa v14 execution to see what was gained.


In short, expecting even a custom plan of a prepared statement to match an unprepared statement is incorrect.  There is still considerable saved worked done without knowledge of parameters that has to be ignored, not discarded.

David J.

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae
Следующее
От: Noah Misch
Дата:
Сообщение: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae