From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Subject: | Re: Test to dump and restore objects left behind by regression |
Date: | 2024-12-27 12:46:49 |
Message-ID: | 35C961F7-7943-455B-AAB5-17E7440656E7@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 20 Dec 2024, at 11:01, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> On Wed, Dec 18, 2024 at 7:39 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>
>>> On 18 Dec 2024, at 12:28, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>> + if ( $ENV{PG_TEST_EXTRA}
>> + && $ENV{PG_TEST_EXTRA} =~ /\bregress_dump_test\b/)
>> Should this also test that $oldnode and $newnode have matching pg_version to
>> keep this from running in a cross-version upgrade test? While it can be argued
>> that running this in a cross-version upgrade is breaking it and getting to keep
>> both pieces, it's also not ideal to run a resource intensive test we know will
>> fail. (It can't be done at this exact callsite, just picked to illustrate.)
>
> You already wrote it in parenthesis. At the exact callsite $oldnode
> and $newnode can not be of different versions. In fact newnode is yet
> to be created at this point. But $oldnode has the same version as the
> server run from the code. In a cross-version upgrade this test will
> not be executed. I am confused as to what this comment is about.
Sure, it can't be checked until $newnode is created, but it seems like a cheap
test to ensure it's not executed as part of someones cross-version tests.
>> + my $format_spec = substr($format, 0, 1);
>> This doesn't seem great for readability, how about storing the formats and
>> specfiers in an array of Perl hashes which can be iterated over with
>> descriptive names, like $format{'name'} and $format{'spec'}?
>
> Instead of an array of hashes, I used a single hash with format
> description as key and format spec as value. Hope that's acceptable.
LGTM.
--
Daniel Gustafsson
From | Date | Subject | |
---|---|---|---|
Next Message | Ilia Evdokimov | 2024-12-27 12:53:35 | Re: Exists pull-up application with JoinExpr |
Previous Message | Vladlen Popolitov | 2024-12-27 12:44:21 | Bug and memory leaks with access to file links with long names (Windows, MSVS) |