pg_stat_statements: more test coverage

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-12-23T14:18:01Z
Lists: pgsql-hackers

Attachments

pg_stat_statements has some significant gaps in test coverage, 
especially around the serialization of data around server restarts, so I 
wrote a test for that and also made some other smaller tweaks to 
increase the coverage a bit.  These patches are all independent of each 
other.

After that, the only major function that isn't tested is gc_qtexts(). 
Maybe a future project.

Commits

  1. Revert "pg_stat_statements: Add coverage for entry_dealloc()"

  2. pg_stat_statements: Add TAP test for testing restarts

  3. pg_stat_statements: Add coverage for entry_dealloc()

  4. pg_stat_statements: Add test coverage for pg_stat_statements_1_8()

  5. pg_stat_statements: Add test coverage for pg_stat_statements_reset_1_7