On Thu, Nov 25, 2010 at 3:18 PM, KaiGai Kohei <kaigai@ak.jp.nec.com> wrote:
> The attached patch is revised version.
>
> - Logging part within auth_delay was removed. This module now focuses on
> injection of a few seconds delay on authentication failed.
> - Documentation parts were added like any other contrib modules.
Something like the following is not required? Though I'm not sure
if there is the case where auth_delay is unload.
----------------------------
void
_PG_fini(void)
{/* Uninstall hooks. */ ClientAuthentication_hook = original_client_auth_hook;
}
----------------------------
+ if (status != STATUS_OK)
+ {
+ sleep(auth_delay_seconds);
+ }
We should use pg_usleep rather than sleep?
+ DefineCustomIntVariable("auth_delay.seconds",
+ "Seconds to be delayed on authentication failed",
+ NULL,
+ &auth_delay_seconds,
+ 2,
+ 0, INT_MAX,
+ PGC_POSTMASTER,
+ GUC_UNIT_S,
+ NULL,
+ NULL);
Can we relax the context from PGC_POSTMASTER to PGC_SIGHUP?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center