From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
---|---|
To: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: multi-install PostgresNode fails with older postgres versions |
Date: | 2021-04-07 16:08:31 |
Message-ID: | 58AA12F8-EDC0-47BB-8314-58080CE6FCD4@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Apr 7, 2021, at 7:37 AM, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com> wrote:
>
> Hi all,
>
> First, sorry to step in this discussion this late. I didn't noticed it before :(
Not a problem.
> I did some work about these compatibility issues in late 2020 to use
> PostgresNode in the check_pgactivity TAP tests.
>
> See https://github.com/ioguix/check_pgactivity/tree/tests/t/lib
>
> PostgresNode.pm, TestLib.pm, SimpleTee.pm and RecursiveCopy.pm comes unchanged
> from PostgreSQL source file (see headers and COPYRIGHT.pgsql).
>
> Then, I'm using the facet class PostgresNodeFacet to extend it with some more
> methods. Finaly, I created one class per majpr version, each inheriting from the
> next version. That means 13 inherits from PostgresNodeFacet.pm, 12 inherits from
> 13, 11 inherits from 12, etc.
>
> When I'm creating a new node, I'm using the "pgaTester" factory class. It
> relies on PATH to check the major version using pg_config, then loads the
> appropriate class.
>
> That means some class overrides almost no methods but version(), which returns
> the major version. Eg.:
> https://github.com/ioguix/check_pgactivity/blob/tests/t/lib/PostgresNode12.pm
>
> From tests, I can check the node version using this method, eg.:
>
> skip "skip non-compatible test on PostgreSQL 8.0 and before", 3
> unless $node->version <= 8.0;
>
> Of course, there's a lot of duplicate code between classes, but my main goal
> was to keep PostgresNode.pm unchanged from upstream so I can easily update it.
I see that.
> And here is a demo test file:
> https://github.com/ioguix/check_pgactivity/blob/tests/t/01-streaming_delta.t
>
> My limited set of tests are working with versions back to 9.0 so far.
>
> My 2¢
Hmm, I took a look. I'm not sure that we're working on the same problem, but I might have missed something.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Borisov | 2021-04-07 16:08:37 | Re: [PATCH] Improve treatment of page special and page header alignment during page init. |
Previous Message | Andrew Dunstan | 2021-04-07 15:54:36 | Re: multi-install PostgresNode fails with older postgres versions |