| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: pg_stash_advice: dump file with overlong stash name crashes worker in a restart loop |
| Date: | 2026-05-29 23:21:21 |
| Message-ID: | CA+TgmoZFRNQCO5QZ_E2=_LkZrbOiF0q3MRA5qQnTAoAOdM4vJQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, May 29, 2026 at 3:43 PM Ayush Tiwari
<ayushtiwari(dot)slg01(at)gmail(dot)com> wrote:
> 1. Is the PG_RETURN_NULL() on NULL stash name / query ID intentional, or is
> it a leftover from an earlier shape of the function? It looks a bit like
> an attempt to emulate STRICT for just the first two arguments, but the
> effect is that an accidental NULL (say, a scalar subquery that returned
> no rows) silently does nothing rather than telling the user something
> went wrong.
It's intentional, and your guess about emulating STRICT functions is
correct. Of course, this function could choose to throw an ERROR in
such cases, and that wouldn't be wrong, but I couldn't think of a
reason to do it that way, so I didn't.
> 2. While there, I noticed the function's header comment says "If the second
> argument is NULL, we delete any existing advice stash entry", but the
> code actually keys the delete path off the third argument (advice_string,
> PG_ARGISNULL(2)). I think the comment is just stale, does that match
> your understanding?
Yes, I suppose that needs to say "third".
--
Robert Haas
EDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dilip Kumar | 2026-05-30 00:31:05 | Re: Proposal: Conflict log history table for Logical Replication |
| Previous Message | Alvaro Herrera | 2026-05-29 22:25:12 | Re: Adding REPACK [concurrently] |