On Wed, 5 Apr 2023 at 01:41, Greg Stark <[email protected]> wrote: > > On Wed, 29 Mar 2023 at 17:48, Justin Pryzby <[email protected]> wrote: > > > > The patch still occasionally fails its tests under freebsd. > > https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/42/3358 > > I wonder if some other test is behaving differently on FreeBSD and > leaving behind a prepared transaction or a zombie session in some idle > state or something like that? Is there anything (aside from > autovacuum) connecting or running in the background in the test > environment that could be creating a transaction id and holding back > snapshot xmin?
Ok, I've reproduced this here by running the tests under meson. It doesn't look like it's platform dependent. It seems under meson the different test suites are run in parallel or at least isolation/deadlock-parallel are still running stuff when the regression checks are running. If that's not expected then maybe something's not behaving as expected? I've attached pg_stat_activity from during the test run. Regardless it shows these tests are obviously not robust enough to include as they would break for anyone running make installcheck on a non-idle cluster. That's fine, as I said, the tests were just there to give a reviewer more confidence and I think it's fine to just not include them in the commit. -- greg
+select * from pg_stat_activity;
+ datid | datname | pid | leader_pid | usesysid | usename |
application_name | client_addr | client_hostname |
client_port | backend_start | xact_start
| query_start | state_change
| wait_event_type | wait_event | state | backend_xid
| backend_xmin | query_id | query
| backend_type
+--------+----------------------+---------+------------+----------+---------+------------------------------------------------+-------------+-----------------+-------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-----------------+---------------------+---------------------+-------------+--------------+----------+-------------------------------------------------------------------------------------------------+------------------------------
+ | | 3970033 | | | |
| | |
| Wed Apr 05 06:48:49.553102 2023 PDT |
| |
| Activity | AutoVacuumMain | |
| | |
| autovacuum launcher
+ | | 3970034 | | 10 | stark |
| | |
| Wed Apr 05 06:48:49.553252 2023 PDT |
| |
| Activity | LogicalLauncherMain | |
| | |
| logical replication launcher
+ 310614 | regression | 4011208 | | 10 | stark |
pg_regress/temp | |
| -1 | Wed Apr 05 07:03:44.593994 2023 PDT | Wed Apr 05 07:03:44.60988
2023 PDT | Wed Apr 05 07:03:44.60988 2023 PDT | Wed Apr 05 07:03:44.60988
2023 PDT | | | active |
| 209833 | | select * from pg_stat_activity;
| client backend
+ 310517 | isolation_regression | 4008269 | | 10 | stark |
isolation/deadlock-parallel/d1 | |
| -1 | Wed Apr 05 07:03:36.814753 2023 PDT |
| Wed Apr 05 07:03:36.991825 2023 PDT | Wed Apr 05 07:03:36.991914
2023 PDT | Client | ClientRead | idle |
| | | COMMIT;
| client backend
+ 310517 | isolation_regression | 4008287 | | 10 | stark |
isolation/deadlock-parallel/e2 | |
| -1 | Wed Apr 05 07:03:36.863847 2023 PDT | Wed Apr 05
07:03:36.896346 2023 PDT | Wed Apr 05 07:03:36.909923 2023 PDT | Wed Apr 05
07:03:36.909924 2023 PDT | IPC | ExecuteGather | active
| | 199816 | | SELECT lock_excl(2,x) FROM
bigt LIMIT 1; | client
backend
+ 310517 | isolation_regression | 4008266 | | 10 | stark |
isolation/deadlock-parallel/control connection | |
| -1 | Wed Apr 05 07:03:36.799023 2023 PDT |
| Wed Apr 05 07:03:44.603132 2023 PDT | Wed Apr 05 07:03:44.603182
2023 PDT | Client | ClientRead | idle |
| | | SELECT
pg_catalog.pg_isolation_test_session_is_blocked($1,
'{4008269,4008271,4008275,4008287}') | client backend
+ 310517 | isolation_regression | 4008271 | | 10 | stark |
isolation/deadlock-parallel/d2 | |
| -1 | Wed Apr 05 07:03:36.833044 2023 PDT | Wed Apr 05
07:03:36.895942 2023 PDT | Wed Apr 05 07:03:36.96132 2023 PDT | Wed Apr 05
07:03:36.961321 2023 PDT | IPC | BgWorkerShutdown | active
| | 199816 | | SET debug_parallel_query = on;
+| client
backend
+ | | | | | |
| | |
| |
| |
| | | |
| | | SET parallel_setup_cost =
0; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SET parallel_tuple_cost =
0; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SET
min_parallel_table_scan_size = 0; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SET
parallel_leader_participation = off; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SET
max_parallel_workers_per_gather = 3; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SELECT
sum(lock_share(1,x)) FROM bigt; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SET debug_parallel_query
= off; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | RESET
parallel_setup_cost; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | RESET
parallel_tuple_cost; +|
+ | | | | | |
| | |
| |
| |
| | | |
| | | SELECT lock_share(3,x)
FROM bigt LIMIT 1; |
+ 310517 | isolation_regression | 4008275 | | 10 | stark |
isolation/deadlock-parallel/e1 | |
| -1 | Wed Apr 05 07:03:36.850976 2023 PDT | Wed Apr 05 07:03:36.89612
2023 PDT | Wed Apr 05 07:03:36.899622 2023 PDT | Wed Apr 05 07:03:36.993716
2023 PDT | Client | ClientRead | idle in transaction |
| 199816 | | SELECT lock_excl(1,x) FROM bigt LIMIT 1;
| client backend
+ 310517 | isolation_regression | 4008298 | 4008287 | 10 | stark |
isolation/deadlock-parallel/e2 | |
| | Wed Apr 05 07:03:36.912145 2023 PDT | Wed Apr 05
07:03:36.896346 2023 PDT | Wed Apr 05 07:03:36.909923 2023 PDT | Wed Apr 05
07:03:36.914989 2023 PDT | Lock | advisory | active
| | 199816 | | SELECT lock_excl(2,x) FROM
bigt LIMIT 1; | parallel
worker
+ | | 3970030 | | | |
| | |
| Wed Apr 05 06:48:49.550514 2023 PDT |
| |
| Activity | BgWriterMain | |
| | |
| background writer
+ | | 3970029 | | | |
| | |
| Wed Apr 05 06:48:49.550371 2023 PDT |
| |
| Activity | CheckpointerMain | |
| | |
| checkpointer
+ | | 3970032 | | | |
| | |
| Wed Apr 05 06:48:49.552886 2023 PDT |
| |
| Activity | WalWriterMain | |
| | |
| walwriter
+(12 rows)
