Re: Use PG_FINALLY to simplify code - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use PG_FINALLY to simplify code
Date
Msg-id 806487.1601435452@sss.pgh.pa.us
Whole thread Raw
In response to Re: Use PG_FINALLY to simplify code  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Use PG_FINALLY to simplify code
List pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> At Tue, 29 Sep 2020 01:03:13 +0000, "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com> wrote in
>> Since PG_FINALLY can be used now, I think we can use PG_FINALLY to simplify code here.

> The patch removes PG_RETHROW(), which is crucial in the code
> path.

No, that's not a problem, because PG_FINALLY incorporates logic
to reproduce the PG_RE_THROW action if we get to the code block
due to an error being thrown.

The patch is nonetheless moot, because after a6b1f5365 those
two code paths are no longer identical.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NOTIFY docs fixup - emit and deliver consistency
Next
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: Disable WAL logging to speed up data loading