Re: Add some tests for pg_stat_statements compatibility verification under contrib

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Erica Zhang <ericazhangy(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add some tests for pg_stat_statements compatibility verification under contrib
Date: 2021-03-09 09:09:37
Message-ID: 20210309090937.4eca74eme7jvcvhi@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Mar 09, 2021 at 11:35:14AM +0800, Erica Zhang wrote:
> Hi All,
> On the master branch, it is possible to install multiple versions of pg_stat_statements with CREATE EXTENSION, but all the tests in sql/ on look at the latest version available, without testing past compatibility.
>
> Since we support to install lowest version 1.4 currently, add some tests to verify compatibility, upgrade from lower versions of pg_stat_statements.

The upgrade scripts are already tested as postgres will install 1.4 and perform
all upgrades to reach the default version.

But an additional thing being tested here is the ABI compatibility when there's
a mismatch between the library and the SQL definition, which seems like a
reasonable thing to test.

Looking at the patch:

+SELECT * FROM pg_available_extensions WHERE name = 'pg_stat_statements' and installed_version = '1.4';

What is this supposed to test? All those tests will break every time we change
the default version, which will add maintenance efforts. It could be good to
have one test breaking when changing the version to remind us to add a test for
the new version, but not more.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-03-09 09:14:41 Re: [HACKERS] Custom compression methods
Previous Message Joel Jacobson 2021-03-09 09:00:34 Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]