From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | william(dot)duclot(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower |
Date: | 2022-07-07 03:06:59 |
Message-ID: | 2732256.1657163219@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> I've been looking for a good excuse to commit Andy's NOT NULL patch so
> that he has some more foundations for the other work he's doing. This
> might be that excuse.
> Does anyone think differently?
While I don't have any problem with tracking column NOT NULL flags
in RelOptInfo once the planner has a use for that info, I'm not sure
that we have a solid use-case for it quite yet. In particular, the
fact that the table column is marked NOT NULL doesn't mean that any
particular occurrence of that column's Var can be freely assumed to be
non-null. The patch I'm working on to label Vars that have possibly
been nulled by outer joins [1] seems like essential infrastructure for
doing anything very useful with the info.
Maybe that objection doesn't apply to build_minmax_path's usage in
particular, but that's an awfully narrow use-case.
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/830269(dot)1656693747(at)sss(dot)pgh(dot)pa(dot)us
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-07-07 03:13:18 | Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower |
Previous Message | David Rowley | 2022-07-07 01:54:46 | Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-07-07 03:13:18 | Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower |
Previous Message | Masahiko Sawada | 2022-07-07 02:50:36 | Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns |