From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, michael(at)paquier(dot)xyz |
Subject: | Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch |
Date: | 2024-08-26 18:14:28 |
Message-ID: | ZszGBMK1D4hCsRnD@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Aug 26, 2024 at 01:35:52PM -0400, Robert Haas wrote:
> On Mon, Aug 26, 2024 at 1:26 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> While it is apparently pretty uncommon to use pgstattuple on sequences,
>> this is arguably a bug that should be fixed and back-patched.
>
> I don't understand what would make it a bug.
>
>> IMHO it would be good to establish some level of consistency here.
>
> Sure, consistency is good, all other things being equal, but just
> saying "well this used to work one way and now it works another way"
> isn't enough to say that there is a bug, or that something should be
> changed.
The reason I think it's arguably a bug is because it used to work fine and
then started ERROR-ing after commit 4b82664. I'm fine with saying that we
don't think it's useful and intentionally deprecating it, but AFAICT no
such determination has been made. I see no discussion about this on the
thread for commit 4b82664, and the only caller of pgstat_heap()
intentionally calls into the affected function for sequences (and has since
pgstattuple was introduced 18 years ago):
if (RELKIND_HAS_TABLE_AM(rel->rd_rel->relkind) ||
rel->rd_rel->relkind == RELKIND_SEQUENCE)
{
return pgstat_heap(rel, fcinfo);
}
--
nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2024-08-26 18:25:53 | Re: Fix memory counter update in reorderbuffer |
Previous Message | Ayush Vatsa | 2024-08-26 18:09:35 | Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch |