Re: Add some tests for pg_stat_statements compatibility verification under contrib
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Erica Zhang <ericazhangy@qq.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-09-30T02:12:21Z
Lists: pgsql-hackers
Attachments
- v4-0001-Add-some-tests-for-past-versions-of-pg_stat_state.patch (text/x-diff) patch v4-0001
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
Commits
-
pg_stat_statements: Add some tests for older versions still usable
- 2b0da0365bec 15.0 landed