Re: Use PG_FINALLY to simplify code

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Use PG_FINALLY to simplify code
Дата
Msg-id 20200930.190702.1001099867972309013.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Use PG_FINALLY to simplify code  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At Tue, 29 Sep 2020 23:10:52 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote in 
tgl> Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
tgl> > At Tue, 29 Sep 2020 01:03:13 +0000, "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com> wrote in 
tgl> >> Since PG_FINALLY can be used now, I think we can use PG_FINALLY to simplify code here.
tgl> 
tgl> > The patch removes PG_RETHROW(), which is crucial in the code
tgl> > path.
tgl> 
tgl> No, that's not a problem, because PG_FINALLY incorporates logic
tgl> to reproduce the PG_RE_THROW action if we get to the code block
tgl> due to an error being thrown.

Oops! Sorry. It's exactly the definition of finally block. 

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

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Resetting spilled txn statistics in pg_stat_replication