Re: pgsql: injection_points: Remove portions related to custom pgstats

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: pgsql: injection_points: Remove portions related to custom pgstats
Дата
Msg-id ebfa8b0a-5858-4167-884c-499e70fce2cd@iki.fi
обсуждение исходный текст
Ответ на Re: pgsql: injection_points: Remove portions related to custom pgstats  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: injection_points: Remove portions related to custom pgstats
Список pgsql-committers
On 09/12/2025 19:40, Tom Lane wrote:
> Perhaps another alternative is to add "DROP EXTENSION
> injection_points" at the end of the test scripts in the
> problematic modules.

It's a little tricky if a module has more than one test that uses the 
extension. Namely src/test/modules/nbtree which I added recently has two 
test scripts, nbtree_incomplete_splits.sql and 
nbtree_half_dead_pages.sql, and both of them do "create extension if not 
exists injection_points;". They run concurrently, so they race on which 
one creates the extension first. We can't do the same for DROP EXTENSION 
at the end.

Maybe that's not a great design in the first place, though. Perhaps that 
module should use a schedule file:

# create injection_points extension before the actual tests
test: test_setup

test: nbtree_incomplete_splits nbtree_half_dead_pages

# drop injection_points extension because it cannot be pg_upgraded.
test: test_clean

- Heikki




В списке pgsql-committers по дате отправления: