public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: pg_stop_backup() v2 incorrectly marked as proretset
Date: Wed, 02 Mar 2022 17:22:35 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
At Wed, 2 Mar 2022 16:46:01 +0900, Michael Paquier <[email protected]> wrote in
> Hi all,
>
> In my hunt looking for incorrect SRFs, I have noticed a new case of a
> system function marked as proretset while it builds and returns only
> one record. And this is a popular one: pg_stop_backup(), labelled
> v2.
>
> This leads to a lot of unnecessary work, as the function creates a
> tuplestore it has no need for with the usual set of checks related to
> SRFs. The logic can be be simplified as of the attached.
>
> Thoughts?
That direction seems find to me.
But the patch forgets to remove an useless variable.
> /* Initialise attributes information in the tuple descriptor */
> tupdesc = CreateTemplateTupleDesc(PG_STOP_BACKUP_V2_COLS);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "lsn",
> PG_LSNOID, -1, 0);
I think we can use get_call_resuilt_type here.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
view thread (2+ messages)
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pg_stop_backup() v2 incorrectly marked as proretset
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox