Обсуждение: Assert there is no duplicated exit callbacks

Поиск
Список
Период
Сортировка

Assert there is no duplicated exit callbacks

От
Qingqing Zhou
Дата:
Attached is a patch to assert there is no duplicated exit callbacks.

Along the way, I downgrade the runtime "enough room" check to an
assertion: the callbacks are registered in pretty fixed initialization
code path, thus assertion is good enough to prevent overlook there. If
we don't agree with this, then the duplication check shall also bump
to runtime checks.

Regards,
Qingqing

Вложения

Re: Assert there is no duplicated exit callbacks

От
Heikki Linnakangas
Дата:
湏〠⼴㔱㈯㄰‵㜰㔺′䵐‬楑杮楱杮娠潨⁵牷瑯㩥਍‾瑁慴档摥椠⁳⁡慰捴⁨潴愠獳牥⁴桴牥⁥獩渠畤汰捩瑡摥攠楸⁴慣汬慢正⹳਍਍⁉潤❮⁴敲敭扭牥琠慨⁴癥牥戠敥⁡牰扯敬⹭਍਍‾汁湯⁧桴⁥慷ⱹ䤠搠睯杮慲敤琠敨爠湵楴敭∠湥畯桧爠潯≭挠敨正琠湡਍‾獡敳瑲潩㩮琠敨挠污扬捡獫愠敲爠来獩整敲⁤湩瀠敲瑴⁹楦數⁤湩瑩慩楬慺楴湯਍‾潣敤瀠瑡ⱨ琠畨⁳獡敳瑲潩獩朠潯⁤湥畯桧琠牰癥湥⁴癯牥潬歯琠敨敲‮晉਍‾敷搠湯琧愠牧敥眠瑩⁨桴獩‬桴湥琠敨搠灵楬慣楴湯挠敨正猠慨汬愠獬畢灭਍‾潴爠湵楴敭挠敨正⹳਍਍⁉潤❮⁴桴湩湡⁹景琠楨⁳獩渠敥敤⹤਍਍‭效歩楫਍਍਍

Re: Assert there is no duplicated exit callbacks

От
Qingqing Zhou
Дата:
Hmm, the email text seems corrupted?

Regards,
Qingqing

On Wed, Apr 15, 2015 at 10:03 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> 湏〠⼴㔱㈯㄰‵㜰㔺′䵐‬楑杮楱杮娠潨⁵牷瑯㩥਍‾瑁慴档摥椠⁳⁡慰捴⁨潴愠獳牥⁴

Re: Assert there is no duplicated exit callbacks

От
David Fetter
Дата:
On Wed, Apr 15, 2015 at 11:14:43AM -0700, Qingqing Zhou wrote:
> Hmm, the email text seems corrupted?

I think it was an encoding issue.  Here's what I got when I piped it
through less.

Cheers,
David.

On 04/15/2015 07:52 PM, Qingqing Zhou wrote:
> Attached is a patch to assert there is no duplicated exit callbacks.

I don't remember that ever been a problem.

> Along the way, I downgrade the runtime "enough room" check to an
> assertion: the callbacks are registered in pretty fixed initialization
> code path, thus assertion is good enough to prevent overlook there. If
> we don't agree with this, then the duplication check shall also bump
> to runtime checks.

I don't think any of this is needed.

- Heikki
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate