Re: Statistics Import and Export

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, jian he <jian(dot)universality(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org
Subject: Re: Statistics Import and Export
Date: 2025-02-26 19:54:16
Message-ID: CAAKRu_bWEqUfxhODfJ-XbZC75vq=P6DYOKK6biyey=yM1Ah3Hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 25, 2025 at 6:41 PM Corey Huinker <corey(dot)huinker(at)gmail(dot)com> wrote:
>
> 0003 - converting some of the deleted pg_set* tests into pg_restore* tests to keep the error coverage that they had.

I haven't really followed this thread and am not sure where the right
place is to drop this question, so I'll just do it here.

I have a patch that is getting thwacked around by the churn in
stats_import.sql, and it occurred to me that I don't see why all the
negative tests for pg_restore_relation_stats() need to have all the
parameters provided. For example, in both of these tests, you are
testing the relation parameter but including all these other fields.
It's fine if there is a reason to do that, but otherwise, it makes the
test file longer and makes the test case less clear IMO.

-- error: argument name is NULL
SELECT pg_restore_relation_stats(
'relation', '0'::oid::regclass,
'version', 150000::integer,
NULL, '17'::integer,
'reltuples', 400::real,
'relallvisible', 4::integer);

-- error: argument name is an integer
SELECT pg_restore_relation_stats(
'relation', '0'::oid::regclass,
'version', 150000::integer,
17, '17'::integer,
'reltuples', 400::real,
'relallvisible', 4::integer);

- Melanie

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-02-26 20:00:53 Re: Doc: clarify possibility of ephemeral discrepancies between state and wait_event in pg_stat_activity
Previous Message Daniel Verite 2025-02-26 19:44:56 Re: pgbench client-side performance issue on large scripts