Assert there is no duplicated exit callbacks
Assert there is no duplicated exit callbacks
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 <hlinnaka@iki.fi>
Дата:
湏〠⼴㔱㈯‵㜰㔺′䵐楑杮楱杮娠潨⁵牷瑯㩥‾瑁慴档摥椠慰捴潴愠獳牥⁴桴牥獩渠畤汰捩瑡摥攠楸⁴慣汬慢正⁉潤❮⁴敲敭扭牥琠慨⁴癥牥戠敥牰扯敬‾汁湯桴慷ⱹ䤠搠睯杮慲敤琠敨爠湵楴敭∠湥畯桧爠潯≭挠敨正琠湡‾獡敳瑲潩㩮琠敨挠污扬捡獫愠敲爠来獩整敲湩瀠敲瑴⁹楦數湩瑩慩楬慺楴湯‾潣敤瀠瑡ⱨ琠畨獡敳瑲潩獩朠潯湥畯桧琠牰癥湥⁴癯牥潬歯琠敨敲晉‾敷搠湯琧愠牧敥眠瑩桴獩桴湥琠敨搠灵楬慣楴湯挠敨正猠慨汬愠獬畢灭‾潴爠湵楴敭挠敨正⁉潤❮⁴桴湩湡⁹景琠楨獩渠敥敤效歩楫
Re: Assert there is no duplicated exit callbacks
От:
Qingqing Zhou <zhouqq.postgres@gmail.com>
Дата:
Hmm, the email text seems corrupted? Regards, Qingqing On Wed, Apr 15, 2015 at 10:03 AM, Heikki Linnakangas wrote: > 湏〠⼴㔱㈯‵㜰㔺′䵐楑杮楱杮娠潨⁵牷瑯㩥‾瑁慴档摥椠慰捴潴愠獳牥⁴
Re: Assert there is no duplicated exit callbacks
От:
David Fetter <david@fetter.org>
Дата:
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 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