Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, "Peter Smith" <smithpb2250(at)gmail(dot)com>
Cc: "Michael Paquier" <michael(at)paquier(dot)xyz>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Peter Eisentraut" <peter(at)eisentraut(dot)org>, "Euler Taveira" <euler(dot)taveira(at)enterprisedb(dot)com>
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Date: 2025-01-20 22:33:28
Message-ID: 3b6b2595-9822-4e4f-91ee-b6a44dc4b542@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 20, 2025, at 5:42 PM, Dagfinn Ilmari Mannsåker wrote:
> Peter Smith <smithpb2250(at)gmail(dot)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
EDB https://www.enterprisedb.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-01-20 22:49:56 Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Previous Message Chapman Flack 2025-01-20 22:21:21 Re: XMLDocument (SQL/XML X030)