Re: PATCH: Unlogged tables re-initialization tests - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PATCH: Unlogged tables re-initialization tests
Date
Msg-id 20180313164642.4fkgzox3rugtonne@alvherre.pgsql
Whole thread Raw
In response to Re: PATCH: Unlogged tables re-initialization tests  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Responses Re: PATCH: Unlogged tables re-initialization tests  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Dagfinn Ilmari Mannsåker wrote:

> $SIG{__DIE__} gets called even for exceptions that would be caught by a
> surrunding eval block, so this should at the very least be:
> 
>     $SIG{__DIE__} = sub { BAIL_OUT(@_) unless $^S };
> 
> However, that is still wrong, because die() and BAIL_OUT() mean
> different things: die() aborts the current test script, while BAIL_OUT()
> aborts the entire 'prove' run, i.e. all subsequent scripts in the same
> test directory.

Sounds like 'die' is the correct thing, then, and that BAIL_OUT should
be called sparingly ... for example this one in PostgresNode::start
seems like an overreaction:
    BAIL_OUT("node \"$name\" is already running") if defined $self->{_pid};

Yes?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: PATCH: Exclude temp relations from base backup
Next
From: Michail Nikolaev
Date:
Subject: Re: [WIP PATCH] Index scan offset optimisation using visibility map