mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files". The only change worthy of note is that pgindent messed up the formatting of launcher.c's struct LogicalRepWorkerId, which led me to notice that that struct wasn't used at all anymore, so I just took it out.
This commit is contained in:
@@ -2636,7 +2636,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
NULL
|
||||
},
|
||||
&vacuum_defer_cleanup_age,
|
||||
0, 0, 1000000, /* see ComputeXidHorizons */
|
||||
0, 0, 1000000, /* see ComputeXidHorizons */
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
@@ -3257,6 +3257,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
NULL
|
||||
},
|
||||
&autovacuum_freeze_max_age,
|
||||
|
||||
/*
|
||||
* see pg_resetwal and vacuum_failsafe_age if you change the
|
||||
* upper-limit value.
|
||||
@@ -3513,9 +3514,9 @@ static struct config_int ConfigureNamesInt[] =
|
||||
0,
|
||||
#endif
|
||||
0, 5,
|
||||
#else /* not CLOBBER_CACHE_ENABLED */
|
||||
#else /* not CLOBBER_CACHE_ENABLED */
|
||||
0, 0, 0,
|
||||
#endif /* not CLOBBER_CACHE_ENABLED */
|
||||
#endif /* not CLOBBER_CACHE_ENABLED */
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ static void RecordConstLocation(JumbleState *jstate, int location);
|
||||
const char *
|
||||
CleanQuerytext(const char *query, int *location, int *len)
|
||||
{
|
||||
int query_location = *location;
|
||||
int query_len = *len;
|
||||
int query_location = *location;
|
||||
int query_len = *len;
|
||||
|
||||
/* First apply starting offset, unless it's -1 (unknown). */
|
||||
if (query_location >= 0)
|
||||
@@ -95,11 +95,12 @@ JumbleState *
|
||||
JumbleQuery(Query *query, const char *querytext)
|
||||
{
|
||||
JumbleState *jstate = NULL;
|
||||
|
||||
if (query->utilityStmt)
|
||||
{
|
||||
query->queryId = compute_utility_query_id(querytext,
|
||||
query->stmt_location,
|
||||
query->stmt_len);
|
||||
query->stmt_location,
|
||||
query->stmt_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,12 +138,12 @@ JumbleQuery(Query *query, const char *querytext)
|
||||
static uint64
|
||||
compute_utility_query_id(const char *query_text, int query_location, int query_len)
|
||||
{
|
||||
uint64 queryId;
|
||||
uint64 queryId;
|
||||
const char *sql;
|
||||
|
||||
/*
|
||||
* Confine our attention to the relevant part of the string, if the
|
||||
* query is a portion of a multi-statement source string.
|
||||
* Confine our attention to the relevant part of the string, if the query
|
||||
* is a portion of a multi-statement source string.
|
||||
*/
|
||||
sql = CleanQuerytext(query_text, &query_location, &query_len);
|
||||
|
||||
@@ -150,9 +151,8 @@ compute_utility_query_id(const char *query_text, int query_location, int query_l
|
||||
query_len, 0));
|
||||
|
||||
/*
|
||||
* If we are unlucky enough to get a hash of zero(invalid), use
|
||||
* queryID as 2 instead, queryID 1 is already in use for normal
|
||||
* statements.
|
||||
* If we are unlucky enough to get a hash of zero(invalid), use queryID as
|
||||
* 2 instead, queryID 1 is already in use for normal statements.
|
||||
*/
|
||||
if (queryId == UINT64CONST(0))
|
||||
queryId = UINT64CONST(2);
|
||||
|
||||
Reference in New Issue
Block a user