Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset
Date: 2022-02-21 05:50:46
Message-ID: CAD21AoACPGYxUQzyPNYJ2kx6oJm5yJnxg81q81EwWKV8V07VGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Feb 21, 2022 at 2:36 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> Hi all,
> (Author and committer added in CC.)
>
> While reviewing the code of a bunch of SRF functions in the core code,
> I have noticed that the two functions mentioned in $subject are marked
> as proretset but both functions don't return a set of tuples, just one
> record for the object given in input. It is also worth noting that
> prorows is set to 1.

Thanks for pointing it out. Agreed.

>
> This looks like a copy-pasto error that has spread around. The error
> on pg_stat_get_subscription_worker is recent as of 8d74fc9, and the
> one on pg_stat_get_replication_slot has been introduced in 3fa17d3,
> meaning that REL_14_STABLE got it wrong for the second part.
>
> I am aware about the discussions on the parent view for the first
> case and its design issues, but it does not change the fact that we'd
> better address the second case on HEAD IMO.
>
> Thoughts?

Agreed.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-02-21 05:52:18 Re: Separate the result of \watch for each query execution (psql)
Previous Message Etsuro Fujita 2022-02-21 05:45:10 Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit