mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +03:00
reviewed by Neil Conway. This patch adds the following DDL command variants: RESET SESSION, RESET TEMP, RESET PLANS, CLOSE ALL, and DEALLOCATE ALL. RESET SESSION is intended for use by connection pool software and the like, in order to reset a client session to something close to its initial state. Note that while most of these command variants can be executed inside a transaction block (but are not transaction-aware!), RESET SESSION cannot. While this is inconsistent, it is intended to catch programmer mistakes: RESET SESSION in an open transaction block is probably unintended.
47 lines
1.5 KiB
C
47 lines
1.5 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* async.h
|
|
* Asynchronous notification: NOTIFY, LISTEN, UNLISTEN
|
|
*
|
|
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $PostgreSQL: pgsql/src/include/commands/async.h,v 1.35 2007/04/12 06:53:48 neilc Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef ASYNC_H
|
|
#define ASYNC_H
|
|
|
|
extern bool Trace_notify;
|
|
|
|
/* notify-related SQL statements */
|
|
extern void Async_Notify(const char *relname);
|
|
extern void Async_Listen(const char *relname);
|
|
extern void Async_Unlisten(const char *relname);
|
|
extern void Async_UnlistenAll(void);
|
|
|
|
/* perform (or cancel) outbound notify processing at transaction commit */
|
|
extern void AtCommit_Notify(void);
|
|
extern void AtAbort_Notify(void);
|
|
extern void AtSubStart_Notify(void);
|
|
extern void AtSubCommit_Notify(void);
|
|
extern void AtSubAbort_Notify(void);
|
|
extern void AtPrepare_Notify(void);
|
|
|
|
/* signal handler for inbound notifies (SIGUSR2) */
|
|
extern void NotifyInterruptHandler(SIGNAL_ARGS);
|
|
|
|
/*
|
|
* enable/disable processing of inbound notifies directly from signal handler.
|
|
* The enable routine first performs processing of any inbound notifies that
|
|
* have occurred since the last disable.
|
|
*/
|
|
extern void EnableNotifyInterrupt(void);
|
|
extern bool DisableNotifyInterrupt(void);
|
|
|
|
extern void notify_twophase_postcommit(TransactionId xid, uint16 info,
|
|
void *recdata, uint32 len);
|
|
|
|
#endif /* ASYNC_H */
|