Re: [PATCHES] minor fix of elevel in fd.c

2006-06-12 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > "Tom Lane" <[EMAIL PROTECTED]> wrote >>> True, but current code just check the return value of AllocateABC() then >>> decide to upgrade elevel to FATAL. >> >> Where? > In ValidatePgVersion(), FindMyDatabase(), etc -- though in practice this > error ca

Re: [PATCHES] minor fix of elevel in fd.c

2006-06-12 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > > > True, but current code just check the return value of AllocateABC() then > > decide to upgrade elevel to FATAL. > > Where? > In ValidatePgVersion(), FindMyDatabase(), etc -- though in practice this error can hardly happen anyway. Regards, Qingqing --

Re: [PATCHES] minor fix of elevel in fd.c

2006-06-12 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes: > On Mon, 12 Jun 2006, Tom Lane wrote: >> That is not what we do for upgrading errors. Use a critical section in >> a caller that doesn't want elog(ERROR). > True, but current code just check the return value of AllocateABC() then > decide to upgrade elev

Re: [PATCHES] minor fix of elevel in fd.c

2006-06-12 Thread Qingqing Zhou
On Mon, 12 Jun 2006, Tom Lane wrote: > "Qingqing Zhou" <[EMAIL PROTECTED]> writes: > > AllocateFile() and AllocateDir() should return the control to the caller > > since we might want to upgrade the elevel. > > That is not what we do for upgrading errors. Use a critical section in > a caller th

Re: [PATCHES] minor fix of elevel in fd.c

2006-06-12 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > AllocateFile() and AllocateDir() should return the control to the caller > since we might want to upgrade the elevel. That is not what we do for upgrading errors. Use a critical section in a caller that doesn't want elog(ERROR).

[PATCHES] minor fix of elevel in fd.c

2006-06-11 Thread Qingqing Zhou
AllocateFile() and AllocateDir() should return the control to the caller since we might want to upgrade the elevel. BTW: Seems this premature-elog-error problem (we talked about it in an old thread and fix the dynahash code) also exists in some other places (e.g. the assign_hook functions), but no