From: | Ryo Kanbayashi <kanbayashi(dot)dev(at)gmail(dot)com> |
---|---|
To: | Andrew Jackson <andrewjackson947(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Torsten Förtsch <tfoertsch123(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [PATCH] PGSERVICEFILE as part of a normal connection string |
Date: | 2025-04-02 15:36:59 |
Message-ID: | CANOn0EwwybL01YuPgoU32nBS9rgeEpxY+EGsRDNQ1Q410-XK1A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Apr 1, 2025 at 6:26 AM Andrew Jackson
<andrewjackson947(at)gmail(dot)com> wrote:
>
> Hi,
>
> I am working on a feature adjacent to the connection service functionality and noticed some issues with the tests introduced in this thread. Basically they incorrectly invoke the append perl function by passing multiple strings to append when the function only takes one string to append. This caused the generated service files to not actually contain any connection parameters. The tests were only passing because the connect_ok perl function set the connection parameters as environment variables which covered up the misformed connection service file.
> The attached patch is much more strict in that it creates a dummy database that is not started and passes all queries though that and tests that the connection service file correctly overrides the environment variables set by the dummy databases' query functions
Andrew,
CC: Michael, Torsten
Thank you to find issues the tests.
I confirmed points you noticed and validity of your proposed
modifications with local execution and internal impl of connect_ok
func.
- Current usage of append_to_file func is wrong and not appropriate
service file is generated
- connect_ok perl func set the connection parameters as environment
variables which covered up the misformed connection service file
- https://github.com/postgres/postgres/blob/ea3f9b6da34a1a4dc2c0c118789587c2a85c78d7/src/test/perl/PostgreSQL/Test/Cluster.pm#L2576
- https://github.com/postgres/postgres/blob/ea3f9b6da34a1a4dc2c0c118789587c2a85c78d7/src/test/perl/PostgreSQL/Test/Cluster.pm#L2120
- https://github.com/postgres/postgres/blob/ea3f9b6da34a1a4dc2c0c118789587c2a85c78d7/src/test/perl/PostgreSQL/Test/Cluster.pm#L1718
- Your dummy node object introduced code works without problem and the
code is more strict than current code
I'll reflect your notice and suggestion to the patch current I'm working on :)
---
Great Regards,
Ryo Kanbayashi
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-04-02 15:37:41 | Re: Incorrect result of bitmap heap scan. |
Previous Message | Tom Lane | 2025-04-02 15:36:33 | Re: BTScanOpaqueData size slows down tests |