From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zahir Lalani <ZahirLalani@oliver.agency>
Cc: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Odd Shortcut behaviour in PG14
Date: Fri, 24 Nov 2023 10:34:45 -0500
Message-ID: <3307508.1700840085@sss.pgh.pa.us> (raw)
In-Reply-To: <DB9P251MB05462CC8CAB741157521ECEEA7B8A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM>
References: <DB9P251MB0546E102DB0B567C40205976A7B9A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM>
<CANzqJaCUroe03WUn1gdGK334ivyYPus338CfvMsBknudWGqFpg@mail.gmail.com>
<3170786.1700768723@sss.pgh.pa.us>
<DB9P251MB05462CC8CAB741157521ECEEA7B8A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM>
Zahir Lalani <ZahirLalani@oliver.agency> writes:
> Looking at the application logs this function is being called once per
> display row - it is running successfully around 10 times with the same
> input params. When it fails, it is with the same params!
You *still* haven't defined what you mean by "fails". We can't help
you effectively with such tiny dribs and drabs of information.
At the very least I'd like to see the whole query, because the
fragment you've shown us does not reveal what ekey is or why you
think the system should believe that it is or is not zero.
But it's also unclear why that should matter.
Having said that ... if the statement is being executed with a cached
plan (via a named statement, or PREPARE, or inside plpgsql) then
maybe the problem occurs if the plan switches from custom to generic?
If so, messing with the plan_cache_mode setting might provide a
workaround.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ZahirLalani@oliver.agency, ronljohnsonjr@gmail.com
Subject: Re: Odd Shortcut behaviour in PG14
In-Reply-To: <3307508.1700840085@sss.pgh.pa.us>
References: <DB9P251MB0546E102DB0B567C40205976A7B9A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM> <CANzqJaCUroe03WUn1gdGK334ivyYPus338CfvMsBknudWGqFpg@mail.gmail.com> <3170786.1700768723@sss.pgh.pa.us> <DB9P251MB05462CC8CAB741157521ECEEA7B8A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM> <3307508.1700840085@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox