commit 157aaa0edc54a3818ba09f243e7a7f975d025def Author: Alvaro Herrera Date: Tue Jun 26 11:55:27 2012 -0400 missed file diff --git a/src/include/storage/timeout.h b/src/include/storage/timeout.h new file mode 100644 index 0000000..7c6b2a2 --- /dev/null +++ b/src/include/storage/timeout.h @@ -0,0 +1,41 @@ +/*------------------------------------------------------------------------- + * + * timeout.h + * SIGALRM timeout API + * + * + * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/storage/timeout.h + * + *------------------------------------------------------------------------- + */ +#ifndef TIMEOUT_H +#define TIMEOUT_H + +#include "datatype/timestamp.h" +#include "storage/proctimeout.h" + +/* configurable options */ +extern int DeadlockTimeout; +extern int StatementTimeout; + +typedef enum TimeoutName +{ + AUTHENTICATION_TIMEOUT, + DEADLOCK_TIMEOUT, + STATEMENT_TIMEOUT, + STANDBY_DEADLOCK_TIMEOUT, + STANDBY_TIMEOUT, + TIMEOUT_MAX +} TimeoutName; + +extern void enable_timeout(TimeoutName tn, int delayms); +extern void disable_timeout(TimeoutName tn, bool keep_indicator); +extern void disable_all_timeouts(bool keep_indicators); +extern bool get_timeout_indicator(TimeoutName tn); +extern TimestampTz get_timeout_start(TimeoutName tn); +extern void handle_sig_alarm(SIGNAL_ARGS); + +#endif /* TIMEOUT_H */