1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Post-PG 10 beta1 pgindent run

perltidy run not included.
This commit is contained in:
Bruce Momjian
2017-05-17 16:31:56 -04:00
parent 8a94332478
commit a6fd7b7a5f
310 changed files with 3338 additions and 3171 deletions

View File

@@ -53,7 +53,7 @@ bool
pg_backend_random(char *dst, int len)
{
/* should not be called in postmaster */
Assert (IsUnderPostmaster || !IsPostmasterEnvironment);
Assert(IsUnderPostmaster || !IsPostmasterEnvironment);
return pg_strong_random(dst, len);
}
@@ -69,7 +69,7 @@ typedef struct
{
bool initialized;
unsigned short seed[3];
} BackendRandomShmemStruct;
} BackendRandomShmemStruct;
static BackendRandomShmemStruct *BackendRandomShmem;
@@ -106,7 +106,7 @@ pg_backend_random(char *dst, int len)
char *end = dst + len;
/* should not be called in postmaster */
Assert (IsUnderPostmaster || !IsPostmasterEnvironment);
Assert(IsUnderPostmaster || !IsPostmasterEnvironment);
LWLockAcquire(BackendRandomLock, LW_EXCLUSIVE);
@@ -124,8 +124,8 @@ pg_backend_random(char *dst, int len)
BackendRandomShmem->seed[2] = (unsigned short) (now.tv_usec >> 16);
/*
* Mix in the cancel key, generated by the postmaster. This adds
* what little entropy the postmaster had to the seed.
* Mix in the cancel key, generated by the postmaster. This adds what
* little entropy the postmaster had to the seed.
*/
BackendRandomShmem->seed[0] ^= (MyCancelKey);
BackendRandomShmem->seed[1] ^= (MyCancelKey >> 16);
@@ -141,7 +141,7 @@ pg_backend_random(char *dst, int len)
/*
* pg_jrand48 returns a 32-bit integer. Fill the next 4 bytes from it.
*/
r = (uint32) pg_jrand48(BackendRandomShmem->seed);
r = (uint32) pg_jrand48(BackendRandomShmem->seed);
for (j = 0; j < 4 && dst < end; j++)
{
@@ -155,4 +155,4 @@ pg_backend_random(char *dst, int len)
}
#endif /* HAVE_STRONG_RANDOM */
#endif /* HAVE_STRONG_RANDOM */

View File

@@ -151,7 +151,7 @@ static bool check_log_destination(char **newval, void **extra, GucSource source)
static void assign_log_destination(const char *newval, void *extra);
static bool check_wal_consistency_checking(char **newval, void **extra,
GucSource source);
GucSource source);
static void assign_wal_consistency_checking(const char *newval, void *extra);
#ifdef HAVE_SYSLOG
@@ -2212,7 +2212,7 @@ static struct config_int ConfigureNamesInt[] =
{"max_pred_locks_per_page", PGC_SIGHUP, LOCK_MANAGEMENT,
gettext_noop("Sets the maximum number of predicate-locked tuples per page."),
gettext_noop("If more than this number of tuples on the same page are locked "
"by a connection, those locks are replaced by a page level lock.")
"by a connection, those locks are replaced by a page level lock.")
},
&max_predicate_locks_per_page,
2, 0, INT_MAX,
@@ -2259,7 +2259,7 @@ static struct config_int ConfigureNamesInt[] =
GUC_UNIT_MB
},
&min_wal_size_mb,
5 * (XLOG_SEG_SIZE/ (1024 * 1024)), 2, MAX_KILOBYTES,
5 * (XLOG_SEG_SIZE / (1024 * 1024)), 2, MAX_KILOBYTES,
NULL, NULL, NULL
},
@@ -2270,7 +2270,7 @@ static struct config_int ConfigureNamesInt[] =
GUC_UNIT_MB
},
&max_wal_size_mb,
64 * (XLOG_SEG_SIZE/ (1024 * 1024)), 2, MAX_KILOBYTES,
64 * (XLOG_SEG_SIZE / (1024 * 1024)), 2, MAX_KILOBYTES,
NULL, assign_max_wal_size, NULL
},
@@ -2452,7 +2452,7 @@ static struct config_int ConfigureNamesInt[] =
NULL
},
&bgwriter_lru_maxpages,
100, 0, INT_MAX / 2, /* Same upper limit as shared_buffers */
100, 0, INT_MAX / 2, /* Same upper limit as shared_buffers */
NULL, NULL, NULL
},
@@ -6714,7 +6714,7 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_superuser)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser or a member of pg_read_all_settings to examine \"%s\"",
name)));
name)));
switch (record->vartype)
{
@@ -6764,7 +6764,7 @@ GetConfigOptionResetString(const char *name)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser or a member of pg_read_all_settings to examine \"%s\"",
name)));
name)));
switch (record->vartype)
{
@@ -8056,7 +8056,7 @@ GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser or a member of pg_read_all_settings to examine \"%s\"",
name)));
name)));
if (varname)
*varname = record->name;
@@ -8083,7 +8083,7 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow)
{
if ((conf->flags & GUC_NO_SHOW_ALL) ||
((conf->flags & GUC_SUPERUSER_ONLY) &&
!is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_SETTINGS)))
!is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_SETTINGS)))
*noshow = true;
else
*noshow = false;