Re: Add some tests for pg_stat_statements compatibility verification under contrib

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Erica Zhang <ericazhangy(at)qq(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add some tests for pg_stat_statements compatibility verification under contrib
Date: 2021-09-30 02:12:21
Message-ID: YVUdBROiWDFTAPE6@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 25, 2021 at 04:16:08PM +0900, Michael Paquier wrote:
> I was just looking at your patch, and I think that you should move all
> the past compatibility tests into a separate test file, in a way
> consistent to what we do in contrib/pageinspect/ for
> oldextversions.sql. I would suggest to use the same file names, while
> on it.

The current commit fest is ending, and it would be a waste to do
nothing here, so I have looked at what you proposed and reworked it.
The patch was blindly testing pg_stat_statements_reset() in all the
versions bumped with the same query on pg_stat_statements done each
time, which does not help in checking the actual parts of the code
that have changed, and there are two of them:
- pg_stat_statements_reset() execution got authorized for
pg_read_all_stats once in 1.6.
- pg_stat_statements() has been extended in 1.8, so we could just have
one query stressing this function in the tests for <= 1.7.

There is also no need for tests on 1.9, which is the latest version.
Tests for this one should be added once we bump the code to the next
version. At the end I finish with the attached, counting for the
back-and-forth game with pg_read_all_stats.
--
Michael

Attachment Content-Type Size
v4-0001-Add-some-tests-for-past-versions-of-pg_stat_state.patch text/x-diff 11.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-09-30 02:15:15 Re: On login trigger: take three
Previous Message Tang 2021-09-30 01:15:18 RE: Logical replication timeout problem