pgpool2.git / summary / log / commit / refs
commit d494c63eb7bfca4169a4adba0371529ee7c5f4bf
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Fri Aug 17 04:29:54 2018 +0000
Deal with pgindent.
src/auth/pool_auth.c | 3 ++-
src/main/main.c | 3 +++
src/protocol/pool_proto_modules.c | 13 +++++++++----
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/auth/pool_auth.c b/src/auth/pool_auth.c
index 772e10d00..a405d7855 100644
--- a/src/auth/pool_auth.c
+++ b/src/auth/pool_auth.c
@@ -375,7 +375,7 @@ int pool_do_auth(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *cp)
from pool_read_message_length and recheck the pg_hba.conf settings.")));
}
- /*
+ /*-------------------------------------------------------------------------
* read authentication request kind.
*
* 0: authentication ok
@@ -389,6 +389,7 @@ int pool_do_auth(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *cp)
* in replication mode, we only support kind = 0, 3. this is because "salt"
* cannot be replicated.
* in non replication mode, we support kind = 0, 3, 4, 5
+ *-------------------------------------------------------------------------
*/
authkind = pool_read_int(cp);
diff --git a/src/main/main.c b/src/main/main.c
index 81a810d44..50d623833 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -200,6 +200,8 @@ int main(int argc, char **argv)
exit(1);
}
}
+
+#ifdef NOT_USED
//#ifdef USE_SSL
// /* global ssl init */
//#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined (LIBRESSL_VERSION_NUMBER))
@@ -209,6 +211,7 @@ int main(int argc, char **argv)
//#endif
// SSL_load_error_strings();
//#endif /* USE_SSL */
+#endif
myargv = save_ps_display_args(myargc, myargv);
/* create MemoryContexts */
diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c
index 27b164b8d..0ef7de64c 100644
--- a/src/protocol/pool_proto_modules.c
+++ b/src/protocol/pool_proto_modules.c
@@ -499,7 +499,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend,
}
}
- /*
+ /*---------------------------------------------------------------------------
* determine if we need to lock the table
* to keep SERIAL data consistency among servers
* conditions:
@@ -507,6 +507,7 @@ POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend,
* - protocol is V3
* - statement is INSERT
* - either "INSERT LOCK" comment exists or insert_lock directive specified
+ *---------------------------------------------------------------------------
*/
if (!RAW_MODE && !SL_MODE)
{
@@ -3085,13 +3086,14 @@ void raise_intentional_error_if_need(POOL_CONNECTION_POOL *backend)
}
}
-/*
+/*---------------------------------------------------
* Check various errors from backend. return values:
* 0: no error
* 1: deadlock detected
* 2: serialization error detected
* 3: query cancel
* detected: 4
+ *---------------------------------------------------
*/
static int check_errors(POOL_CONNECTION_POOL *backend, int backend_id)
{
@@ -3103,7 +3105,7 @@ static int check_errors(POOL_CONNECTION_POOL *backend, int backend_id)
if (detect_deadlock_error(CONNECTION(backend, backend_id), MAJOR(backend)) == SPECIFIED_ERROR)
return 1;
- /*
+ /*-----------------------------------------------------------------------------------
* Check serialization failure error and abort
* transactions on all nodes if so. Otherwise we allow
* data inconsistency among DB nodes. See following
@@ -3124,11 +3126,12 @@ static int check_errors(POOL_CONNECTION_POOL *backend, int backend_id)
* M:S1:COMMIT;
* M:S2:ERROR: could not serialize access due to concurrent update
* S:S2:UPDATE t1 SET i = i + 1; <-- success in UPDATE and data becomes inconsistent!
+ *-----------------------------------------------------------------------------------
*/
if (detect_serialization_error(CONNECTION(backend, backend_id), MAJOR(backend), true) == SPECIFIED_ERROR)
return 2;
- /*
+ /*-------------------------------------------------------------------------------
* check "SET TRANSACTION ISOLATION LEVEL must be called before any query" error.
* This happens in following scenario:
*
@@ -3139,7 +3142,9 @@ static int check_errors(POOL_CONNECTION_POOL *backend, int backend_id)
* S:S1:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
* M: <-- error
* S: <-- ok since no previous SELECT is sent. kind mismatch error occurs!
+ *-------------------------------------------------------------------------------
*/
+
if (detect_active_sql_transaction_error(CONNECTION(backend, backend_id), MAJOR(backend)) == SPECIFIED_ERROR)
return 3;
[parent: 88ebfda227f0]