Re: interrupted tap tests leave postgres instances around

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: interrupted tap tests leave postgres instances around
Date: 2022-10-18 10:15:11
Message-ID: 20221018101511.ctzqz2hmj6u5coz5@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Oct-01, Andres Freund wrote:

> Perhaps the END{} routine should call $node->_update_pid(-1); if $exit_code !=
> 0 and _pid is undefined?

Yeah, that sounds reasonable.

> That does seem to reduce the incidence of "leftover" postgres
> instances. 001_start_stop.pl leaves some behind, but that makes sense, because
> it's bypassing the whole node management. But I still occasionally see some
> remaining processes if I crank up test concurrency.
>
> Ah! At least part of the problem is that sub stop() does BAIL_OUT, and of
> course it can fail as part of the shutdown.

I made teardown_node pass down fail_ok=>1 to avoid this problem, so we
no longer BAIL_OUT in that case.

> But there's still some that survive, where your perl.trace doesn't contain the
> node getting shut down...

Yeah, something's still unexplained. I'll get this pushed soon, which
already reduces the number of leftover instances a good amount.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

Attachment Content-Type Size
v2-0001-Better-handle-interrupting-TAP-tests.patch text/x-diff 1.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2022-10-18 10:18:25 Re: Exponentiation confusion
Previous Message Amit Kapila 2022-10-18 09:56:51 Re: Perform streaming logical transactions by background workers and parallel apply