aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/adt/date.c2
-rw-r--r--src/backend/utils/adt/pgstatfuncs.c4
-rw-r--r--src/backend/utils/mmgr/generation.c62
-rw-r--r--src/backend/utils/sort/tuplesort.c7
4 files changed, 37 insertions, 38 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 04e737d0808..307b5e86295 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -2231,7 +2231,7 @@ timetz_hash_extended(PG_FUNCTION_ARGS)
Int64GetDatumFast(key->time),
seed));
thash ^= DatumGetUInt64(hash_uint32_extended(key->zone,
- DatumGetInt64(seed)));
+ DatumGetInt64(seed)));
PG_RETURN_UINT64(thash);
}
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 8d9e7c10ae7..04cf209b5b6 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -921,8 +921,8 @@ pg_stat_get_backend_activity(PG_FUNCTION_ARGS)
int32 beid = PG_GETARG_INT32(0);
PgBackendStatus *beentry;
const char *activity;
- char *clipped_activity;
- text *ret;
+ char *clipped_activity;
+ text *ret;
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
activity = "<backend information not available>";
diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c
index 31342ad69b0..19390fa5818 100644
--- a/src/backend/utils/mmgr/generation.c
+++ b/src/backend/utils/mmgr/generation.c
@@ -46,7 +46,7 @@
#define Generation_BLOCKHDRSZ MAXALIGN(sizeof(GenerationBlock))
#define Generation_CHUNKHDRSZ sizeof(GenerationChunk)
-typedef struct GenerationBlock GenerationBlock; /* forward reference */
+typedef struct GenerationBlock GenerationBlock; /* forward reference */
typedef struct GenerationChunk GenerationChunk;
typedef void *GenerationPointer;
@@ -62,9 +62,9 @@ typedef struct GenerationContext
/* Generational context parameters */
Size blockSize; /* standard block size */
- GenerationBlock *block; /* current (most recently allocated) block */
+ GenerationBlock *block; /* current (most recently allocated) block */
dlist_head blocks; /* list of blocks */
-} GenerationContext;
+} GenerationContext;
/*
* GenerationBlock
@@ -155,7 +155,7 @@ static void GenerationDelete(MemoryContext context);
static Size GenerationGetChunkSpace(MemoryContext context, void *pointer);
static bool GenerationIsEmpty(MemoryContext context);
static void GenerationStats(MemoryContext context, int level, bool print,
- MemoryContextCounters *totals);
+ MemoryContextCounters *totals);
#ifdef MEMORY_CONTEXT_CHECKING
static void GenerationCheck(MemoryContext context);
@@ -207,10 +207,10 @@ static MemoryContextMethods GenerationMethods = {
*/
MemoryContext
GenerationContextCreate(MemoryContext parent,
- const char *name,
- Size blockSize)
+ const char *name,
+ Size blockSize)
{
- GenerationContext *set;
+ GenerationContext *set;
/* Assert we padded GenerationChunk properly */
StaticAssertStmt(Generation_CHUNKHDRSZ == MAXALIGN(Generation_CHUNKHDRSZ),
@@ -233,10 +233,10 @@ GenerationContextCreate(MemoryContext parent,
/* Do the type-independent part of context creation */
set = (GenerationContext *) MemoryContextCreate(T_GenerationContext,
- sizeof(GenerationContext),
- &GenerationMethods,
- parent,
- name);
+ sizeof(GenerationContext),
+ &GenerationMethods,
+ parent,
+ name);
set->blockSize = blockSize;
@@ -250,7 +250,7 @@ GenerationContextCreate(MemoryContext parent,
static void
GenerationInit(MemoryContext context)
{
- GenerationContext *set = (GenerationContext *) context;
+ GenerationContext *set = (GenerationContext *) context;
set->block = NULL;
dlist_init(&set->blocks);
@@ -266,7 +266,7 @@ GenerationInit(MemoryContext context)
static void
GenerationReset(MemoryContext context)
{
- GenerationContext *set = (GenerationContext *) context;
+ GenerationContext *set = (GenerationContext *) context;
dlist_mutable_iter miter;
AssertArg(GenerationIsValid(set));
@@ -324,9 +324,9 @@ GenerationDelete(MemoryContext context)
static void *
GenerationAlloc(MemoryContext context, Size size)
{
- GenerationContext *set = (GenerationContext *) context;
- GenerationBlock *block;
- GenerationChunk *chunk;
+ GenerationContext *set = (GenerationContext *) context;
+ GenerationBlock *block;
+ GenerationChunk *chunk;
Size chunk_size = MAXALIGN(size);
/* is it an over-sized chunk? if yes, allocate special block */
@@ -460,9 +460,9 @@ GenerationAlloc(MemoryContext context, Size size)
static void
GenerationFree(MemoryContext context, void *pointer)
{
- GenerationContext *set = (GenerationContext *) context;
- GenerationChunk *chunk = GenerationPointerGetChunk(pointer);
- GenerationBlock *block;
+ GenerationContext *set = (GenerationContext *) context;
+ GenerationChunk *chunk = GenerationPointerGetChunk(pointer);
+ GenerationBlock *block;
/* Allow access to private part of chunk header. */
VALGRIND_MAKE_MEM_DEFINED(chunk, GENERATIONCHUNK_PRIVATE_LEN);
@@ -474,7 +474,7 @@ GenerationFree(MemoryContext context, void *pointer)
if (chunk->requested_size < chunk->size)
if (!sentinel_ok(pointer, chunk->requested_size))
elog(WARNING, "detected write past chunk end in %s %p",
- ((MemoryContext)set)->name, chunk);
+ ((MemoryContext) set)->name, chunk);
#endif
#ifdef CLOBBER_FREED_MEMORY
@@ -520,9 +520,9 @@ GenerationFree(MemoryContext context, void *pointer)
static void *
GenerationRealloc(MemoryContext context, void *pointer, Size size)
{
- GenerationContext *set = (GenerationContext *) context;
- GenerationChunk *chunk = GenerationPointerGetChunk(pointer);
- GenerationPointer newPointer;
+ GenerationContext *set = (GenerationContext *) context;
+ GenerationChunk *chunk = GenerationPointerGetChunk(pointer);
+ GenerationPointer newPointer;
Size oldsize;
/* Allow access to private part of chunk header. */
@@ -535,7 +535,7 @@ GenerationRealloc(MemoryContext context, void *pointer, Size size)
if (chunk->requested_size < oldsize)
if (!sentinel_ok(pointer, chunk->requested_size))
elog(WARNING, "detected write past chunk end in %s %p",
- ((MemoryContext)set)->name, chunk);
+ ((MemoryContext) set)->name, chunk);
#endif
/*
@@ -652,7 +652,7 @@ GenerationGetChunkSpace(MemoryContext context, void *pointer)
static bool
GenerationIsEmpty(MemoryContext context)
{
- GenerationContext *set = (GenerationContext *) context;
+ GenerationContext *set = (GenerationContext *) context;
return dlist_is_empty(&set->blocks);
}
@@ -670,9 +670,9 @@ GenerationIsEmpty(MemoryContext context)
*/
static void
GenerationStats(MemoryContext context, int level, bool print,
- MemoryContextCounters *totals)
+ MemoryContextCounters *totals)
{
- GenerationContext *set = (GenerationContext *) context;
+ GenerationContext *set = (GenerationContext *) context;
Size nblocks = 0;
Size nchunks = 0;
Size nfreechunks = 0;
@@ -698,8 +698,8 @@ GenerationStats(MemoryContext context, int level, bool print,
for (i = 0; i < level; i++)
fprintf(stderr, " ");
fprintf(stderr,
- "Generation: %s: %zu total in %zd blocks (%zd chunks); %zu free (%zd chunks); %zu used\n",
- ((MemoryContext)set)->name, totalspace, nblocks, nchunks, freespace,
+ "Generation: %s: %zu total in %zd blocks (%zd chunks); %zu free (%zd chunks); %zu used\n",
+ ((MemoryContext) set)->name, totalspace, nblocks, nchunks, freespace,
nfreechunks, totalspace - freespace);
}
@@ -726,7 +726,7 @@ GenerationStats(MemoryContext context, int level, bool print,
static void
GenerationCheck(MemoryContext context)
{
- GenerationContext *gen = (GenerationContext *) context;
+ GenerationContext *gen = (GenerationContext *) context;
char *name = context->name;
dlist_iter iter;
@@ -818,4 +818,4 @@ GenerationCheck(MemoryContext context)
}
}
-#endif /* MEMORY_CONTEXT_CHECKING */
+#endif /* MEMORY_CONTEXT_CHECKING */
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 34af8d6334b..3c23ac75a09 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1591,8 +1591,7 @@ puttuple_common(Tuplesortstate *state, SortTuple *tuple)
case TSS_BUILDRUNS:
/*
- * Save the tuple into the unsorted array (there must be
- * space)
+ * Save the tuple into the unsorted array (there must be space)
*/
state->memtuples[state->memtupcount++] = *tuple;
@@ -2742,8 +2741,8 @@ dumptuples(Tuplesortstate *state, bool alltuples)
int i;
/*
- * Nothing to do if we still fit in available memory and have array
- * slots, unless this is the final call during initial run generation.
+ * Nothing to do if we still fit in available memory and have array slots,
+ * unless this is the final call during initial run generation.
*/
if (state->memtupcount < state->memtupsize && !LACKMEM(state) &&
!alltuples)