Re: pg_createsubscriber TAP test wrapping makes command options hard to read. - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Date
Msg-id 3b6b2595-9822-4e4f-91ee-b6a44dc4b542@app.fastmail.com
Whole thread Raw
In response to Re: pg_createsubscriber TAP test wrapping makes command options hard to read.  (Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>)
Responses Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
List pgsql-hackers
On Mon, Jan 20, 2025, at 5:42 PM, Dagfinn Ilmari Mannsåker wrote:
Peter Smith <smithpb2250@gmail.com> writes:

>
> In your v4 patch, there is a fragment (below) that replaces a  double
> '--verbose' switch with just a single '--verbose'.
>
> As I have only recently learned, the '--verbose'' switch has a
> cumulative effect [1], so the original double '--verbose' was probably
> deliberate so it should be kept that way.

I was going to say that if it were deliberate, I would have expected the
two `--verbose` swithces to be together, but then I noticed that the
--recovery-timeout switch was added later (commit 04c8634c0c4d), rather
haphazardly between them.  Still, I would have expected a comment as to
why this command was being invoked extra-verbosely, but I'll restore it
in the next version.

I ran pgperltidy before the final version and one of the things I didn't
understand at the time is why it is not stable. I just kept similar pattern
from other test files. Good to know that the fat comma has a nice formatting.
It is kind of annoying to keep version 20230309 around to run perltidy. Do we
have any other alternatives? (I know that perltidier is a hack to work around
some perltidy ugliness. Unfortunately, these pre/post filters are a sign that
perltidy does not intend to add such feature.)

The double --verbose is intentional to (i) show extra information and (ii) make
sure it won't break. The commit 04c8634c0c4 that added the recovery timeout
option separated the doubled verbose option; it was not intentional. We can
certainly keep them together.

I checked your patch with perltidy 20220613-1 and it looks good to me.


--
Euler Taveira

pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: XMLDocument (SQL/XML X030)
Next
From: Tom Lane
Date:
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.