Re: Rare deadlock failure in create_am test

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>
Date: 2020-09-04T10:02:08Z
Lists: pgsql-hackers
On Fri, Sep 4, 2020 at 2:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> (There might be more such failures, but I only looked back six months,
> and these two are all I found in that window.)

Right:

 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=conchuela&dt=2020-09-03%2023:00:36
 | HEAD          | DragonflyBSD
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&dt=2020-04-08%2004:38:34
   | HEAD          | Debian
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=tern&dt=2020-03-30%2013:54:05
      | HEAD          | AIX
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=grison&dt=2020-03-24%2022:00:23
    | HEAD          | Raspbian
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=culicidae&dt=2020-03-03%2016:10:06
 | HEAD          | Debian
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=longfin&dt=2019-12-11%2023:59:06
   | HEAD          | macOS
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=longfin&dt=2019-12-11%2022:09:07
   | HEAD          | macOS
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2019-12-10%2003:46:12
 | REL9_6_STABLE |
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mandrill&dt=2019-07-10%2023:19:12
  | REL9_6_STABLE | AIX
 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dangomushi&dt=2018-06-23%2018:00:15
| HEAD          | Arch

> I'm inclined to think that the best fix is to put
>
> begin;
> lock table tenk2;
> ...
> commit;

Makes sense, except s/tenk2/fast_emp4000/, no?



Commits

  1. Fix rare deadlock failure in create_am regression test.