From: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
---|---|
To: | Tomas Vondra <tomas(at)vondra(dot)me> |
Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Michael Paquier <michael(at)paquier(dot)xyz>, Michael Banck <mbanck(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Changing the state of data checksums in a running cluster |
Date: | 2025-03-12 13:08:50 |
Message-ID: | 87zfhqz999.fsf@wibble.ilmari.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tomas Vondra <tomas(at)vondra(dot)me> writes:
> On 3/11/25 14:07, Dagfinn Ilmari Mannsåker wrote:
>> As the resident perl style pedant, I'd just like to complain about the
>> below:
>>
>> Tomas Vondra <tomas(at)vondra(dot)me> writes:
>>
>>> diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
>>> index 666bd2a2d4c..1c66360c16c 100644
>>> --- a/src/test/perl/PostgreSQL/Test/Cluster.pm
>>> +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
>>> @@ -3761,7 +3761,8 @@ sub checksum_enable_offline
>>> my ($self) = @_;
>>>
>>> print "### Enabling checksums in \"$self->data_dir\"\n";
>>> - PostgreSQL::Test::Utils::system_or_bail('pg_checksums', '-D', $self->data_dir, '-e');
>>> + PostgreSQL::Test::Utils::system_or_bail('pg_checksums', '-D',
>>> + $self->data_dir, '-e');
>>> return;
>>> }
>>
>>
>> This breaking between the command line options and its arguments is why
>> we're switching to using fat commas. We're also using long options for
>> improved self-documentation, so this should be written as:
>>
>> PostgreSQL::Test::Utils::system_or_bail('pg_checksums',
>> '--pgdata' => $self->data_dir,
>> '--enable');
>>
>> And likewise below in the disable method.
>>
>
> I don't know what fat comma is, but that's simply what perltidy did. I
> don't mind formatting it differently, if there's a better way.
Fat comma is the perlish name for the => arrow, which is semantically
equivalent to a comma (except it auto-quotes any immediately preceding
bareword), but looks fatter. Perltidy knows to not wrap lines around
them, keeping the key and value (or option and argument in this case)
together. See commit ce1b0f9da03 for a large (but not complete, I have
more patches pending) conversion to this new style.
- ilmari
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-03-12 13:16:41 | Re: Changing the state of data checksums in a running cluster |
Previous Message | torikoshia | 2025-03-12 12:57:31 | Re: Change log level for notifying hot standby is waiting non-overflowed snapshot |