pgpool2.git / summary / log / commit / refs
commit 854f88795d8fce5278ee9f7e24508460d79efcf3
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Apr 16 08:58:21 2012 +0000
Remove unused code and add some comments to POOL_SENT_MESSAGE and
POOL_SENT_MESSAGE_LIST structure.
Add new member "is_cache_safe" to POOL_SENT_MESSAGE structure to
implement memory cache for extended protocol message.
pool_session_context.h | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/pool_session_context.h b/pool_session_context.h
index 2e427dc6c..834bf5265 100644
--- a/pool_session_context.h
+++ b/pool_session_context.h
@@ -44,28 +44,23 @@ typedef enum {
POOL_REPEATABLE_READ, /* Rpeatable read */
POOL_SERIALIZABLE /* Serializable */
} POOL_TRANSACTION_ISOLATION;
-#ifdef NOT_USED
+
/*
- * where to send map for PREPARE/EXECUTE/DEALLOCATE
+ * Message content of extended query
*/
-#define POOL_MAX_PREPARED_STATEMENTS 128
-#define POOL_MAX_PREPARED_NAME 64
-
-typedef struct {
- int nelem; /* Number of elements */
- char name[POOL_MAX_PREPARED_STATEMENTS][POOL_MAX_PREPARED_NAME]; /* Prepared statement name */
- bool where_to_send[POOL_MAX_PREPARED_STATEMENTS][MAX_NUM_BACKENDS];
-} POOL_PREPARED_SEND_MAP;
-#endif /* NOT_USED */
typedef struct {
char kind; /* one of 'P':Parse, 'B':Bind or 'Q':Query(PREPARE) */
- int len; /* not network byte order */
+ int len; /* in host byte order */
char *contents;
int num_tsparams;
char *name; /* object name of prepared statement or portal */
POOL_QUERY_CONTEXT *query_context;
+ bool is_cache_safe; /* true if the query can be cached */
} POOL_SENT_MESSAGE;
+/*
+ * List of POOL_SENT_MESSAGE
+ */
typedef struct {
int capacity; /* capacity of list */
int size; /* number of elements */
[parent: 60c32958f85f]