Re: Add pg_freespacemap extension sql test

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Fabrízio de Royes Mello <fabriziomello@gmail.com>, Dong Wook Lee <sh95119@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2022-03-27T17:18:46Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid instabilities with the regression tests of pg_freespacemap

  2. Add some basic regression tests for pg_freespacemap

Michael Paquier <michael@paquier.xyz> writes:
> Yes, we could extend that more.  For now, I am curious to see what the
> buildfarm has to say with the current contents of the patch, and I can
> keep an eye on the buildfarm today, so I have applied it.

It seems this is unstable under valgrind [1]:

--- /mnt/resource/bf/build/skink-master/HEAD/pgsql/contrib/pg_freespacemap/expected/pg_freespacemap.out	2022-03-24 09:39:43.974477703 +0000
+++ /mnt/resource/bf/build/skink-master/HEAD/pgsql.build/contrib/pg_freespacemap/results/pg_freespacemap.out	2022-03-27 17:07:23.896287669 +0000
@@ -60,6 +60,7 @@
     ORDER BY 1, 2;
        id        | blkno | is_avail 
 -----------------+-------+----------
+ freespace_tab   |     0 | t
  freespace_brin  |     0 | f
  freespace_brin  |     1 | f
  freespace_brin  |     2 | t
@@ -75,7 +76,7 @@
  freespace_hash  |     7 | f
  freespace_hash  |     8 | f
  freespace_hash  |     9 | f
-(15 rows)
+(16 rows)
 
 -- failures with incorrect block number
 SELECT * FROM pg_freespace('freespace_tab', -1);

skink has passed several runs since the commit went in, so it's
"unstable" not "fails consistently".  I see the test tries to
disable autovacuum on that table, so that doesn't seem to be
the problem ... what is?

			regards, tom lane

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2022-03-27%2008%3A26%3A20