mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
Clean up newlines following left parentheses
Most came in during the 17 cycle, so backpatch there. Some (particularly reorderbuffer.h) are very old, but backpatching doesn't seem useful. Like commitsc9d2977519
,c4f113e8fe
.
This commit is contained in:
@ -110,12 +110,9 @@ typedef struct BloomOptions
|
|||||||
* FreeBlockNumberArray - array of block numbers sized so that metadata fill
|
* FreeBlockNumberArray - array of block numbers sized so that metadata fill
|
||||||
* all space in metapage.
|
* all space in metapage.
|
||||||
*/
|
*/
|
||||||
typedef BlockNumber FreeBlockNumberArray[
|
typedef BlockNumber FreeBlockNumberArray[MAXALIGN_DOWN(BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData))
|
||||||
MAXALIGN_DOWN(
|
- MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions)))
|
||||||
BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData))
|
/ sizeof(BlockNumber)];
|
||||||
- MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions))
|
|
||||||
) / sizeof(BlockNumber)
|
|
||||||
];
|
|
||||||
|
|
||||||
/* Metadata of bloom index */
|
/* Metadata of bloom index */
|
||||||
typedef struct BloomMetaPageData
|
typedef struct BloomMetaPageData
|
||||||
|
@ -205,8 +205,8 @@ AppendIncrementalManifestData(IncrementalBackupInfo *ib, const char *data,
|
|||||||
* time for an incremental parse. We'll do all but the last MIN_CHUNK
|
* time for an incremental parse. We'll do all but the last MIN_CHUNK
|
||||||
* so that we have enough left for the final piece.
|
* so that we have enough left for the final piece.
|
||||||
*/
|
*/
|
||||||
json_parse_manifest_incremental_chunk(
|
json_parse_manifest_incremental_chunk(ib->inc_state, ib->buf.data,
|
||||||
ib->inc_state, ib->buf.data, ib->buf.len - MIN_CHUNK, false);
|
ib->buf.len - MIN_CHUNK, false);
|
||||||
/* now remove what we just parsed */
|
/* now remove what we just parsed */
|
||||||
memmove(ib->buf.data, ib->buf.data + (ib->buf.len - MIN_CHUNK),
|
memmove(ib->buf.data, ib->buf.data + (ib->buf.len - MIN_CHUNK),
|
||||||
MIN_CHUNK + 1);
|
MIN_CHUNK + 1);
|
||||||
@ -232,8 +232,8 @@ FinalizeIncrementalManifest(IncrementalBackupInfo *ib)
|
|||||||
oldcontext = MemoryContextSwitchTo(ib->mcxt);
|
oldcontext = MemoryContextSwitchTo(ib->mcxt);
|
||||||
|
|
||||||
/* Parse the last chunk of the manifest */
|
/* Parse the last chunk of the manifest */
|
||||||
json_parse_manifest_incremental_chunk(
|
json_parse_manifest_incremental_chunk(ib->inc_state, ib->buf.data,
|
||||||
ib->inc_state, ib->buf.data, ib->buf.len, true);
|
ib->buf.len, true);
|
||||||
|
|
||||||
/* Done with the buffer, so release memory. */
|
/* Done with the buffer, so release memory. */
|
||||||
pfree(ib->buf.data);
|
pfree(ib->buf.data);
|
||||||
|
@ -1374,8 +1374,8 @@ init_database_collation(void)
|
|||||||
default_locale.collate_is_c = true;
|
default_locale.collate_is_c = true;
|
||||||
default_locale.ctype_is_c = (strcmp(datlocale, "C") == 0);
|
default_locale.ctype_is_c = (strcmp(datlocale, "C") == 0);
|
||||||
|
|
||||||
default_locale.info.builtin.locale = MemoryContextStrdup(
|
default_locale.info.builtin.locale = MemoryContextStrdup(TopMemoryContext,
|
||||||
TopMemoryContext, datlocale);
|
datlocale);
|
||||||
}
|
}
|
||||||
else if (dbform->datlocprovider == COLLPROVIDER_ICU)
|
else if (dbform->datlocprovider == COLLPROVIDER_ICU)
|
||||||
{
|
{
|
||||||
|
3
src/backend/utils/cache/relcache.c
vendored
3
src/backend/utils/cache/relcache.c
vendored
@ -5643,8 +5643,7 @@ RelationGetExclusionInfo(Relation indexRelation,
|
|||||||
|
|
||||||
/* We want the exclusion constraint owning the index */
|
/* We want the exclusion constraint owning the index */
|
||||||
if ((conform->contype != CONSTRAINT_EXCLUSION &&
|
if ((conform->contype != CONSTRAINT_EXCLUSION &&
|
||||||
!(conform->conperiod && (
|
!(conform->conperiod && (conform->contype == CONSTRAINT_PRIMARY
|
||||||
conform->contype == CONSTRAINT_PRIMARY
|
|
||||||
|| conform->contype == CONSTRAINT_UNIQUE))) ||
|
|| conform->contype == CONSTRAINT_UNIQUE))) ||
|
||||||
conform->conindid != RelationGetRelid(indexRelation))
|
conform->conindid != RelationGetRelid(indexRelation))
|
||||||
continue;
|
continue;
|
||||||
|
@ -204,8 +204,7 @@ load_backup_manifest(char *backup_directory)
|
|||||||
(long long int) statbuf.st_size);
|
(long long int) statbuf.st_size);
|
||||||
}
|
}
|
||||||
bytes_left -= rc;
|
bytes_left -= rc;
|
||||||
json_parse_manifest_incremental_chunk(
|
json_parse_manifest_incremental_chunk(inc_state, buffer, rc, bytes_left == 0);
|
||||||
inc_state, buffer, rc, bytes_left == 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release the incremental state memory */
|
/* Release the incremental state memory */
|
||||||
|
@ -182,9 +182,8 @@ json_parse_manifest_incremental_shutdown(JsonManifestParseIncrementalState *incs
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
json_parse_manifest_incremental_chunk(
|
json_parse_manifest_incremental_chunk(JsonManifestParseIncrementalState *incstate,
|
||||||
JsonManifestParseIncrementalState *incstate, const char *chunk, size_t size,
|
const char *chunk, size_t size, bool is_last)
|
||||||
bool is_last)
|
|
||||||
{
|
{
|
||||||
JsonParseErrorType res,
|
JsonParseErrorType res,
|
||||||
expected;
|
expected;
|
||||||
|
@ -74,22 +74,14 @@ icu_test()
|
|||||||
bool prop_hex_digit = pg_u_prop_hex_digit(code);
|
bool prop_hex_digit = pg_u_prop_hex_digit(code);
|
||||||
bool prop_join_control = pg_u_prop_join_control(code);
|
bool prop_join_control = pg_u_prop_join_control(code);
|
||||||
|
|
||||||
bool icu_prop_alphabetic = u_hasBinaryProperty(
|
bool icu_prop_alphabetic = u_hasBinaryProperty(code, UCHAR_ALPHABETIC);
|
||||||
code, UCHAR_ALPHABETIC);
|
bool icu_prop_lowercase = u_hasBinaryProperty(code, UCHAR_LOWERCASE);
|
||||||
bool icu_prop_lowercase = u_hasBinaryProperty(
|
bool icu_prop_uppercase = u_hasBinaryProperty(code, UCHAR_UPPERCASE);
|
||||||
code, UCHAR_LOWERCASE);
|
bool icu_prop_cased = u_hasBinaryProperty(code, UCHAR_CASED);
|
||||||
bool icu_prop_uppercase = u_hasBinaryProperty(
|
bool icu_prop_case_ignorable = u_hasBinaryProperty(code, UCHAR_CASE_IGNORABLE);
|
||||||
code, UCHAR_UPPERCASE);
|
bool icu_prop_white_space = u_hasBinaryProperty(code, UCHAR_WHITE_SPACE);
|
||||||
bool icu_prop_cased = u_hasBinaryProperty(
|
bool icu_prop_hex_digit = u_hasBinaryProperty(code, UCHAR_HEX_DIGIT);
|
||||||
code, UCHAR_CASED);
|
bool icu_prop_join_control = u_hasBinaryProperty(code, UCHAR_JOIN_CONTROL);
|
||||||
bool icu_prop_case_ignorable = u_hasBinaryProperty(
|
|
||||||
code, UCHAR_CASE_IGNORABLE);
|
|
||||||
bool icu_prop_white_space = u_hasBinaryProperty(
|
|
||||||
code, UCHAR_WHITE_SPACE);
|
|
||||||
bool icu_prop_hex_digit = u_hasBinaryProperty(
|
|
||||||
code, UCHAR_HEX_DIGIT);
|
|
||||||
bool icu_prop_join_control = u_hasBinaryProperty(
|
|
||||||
code, UCHAR_JOIN_CONTROL);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compare with ICU for character classes using:
|
* Compare with ICU for character classes using:
|
||||||
|
@ -50,8 +50,8 @@ struct JsonManifestParseContext
|
|||||||
extern void json_parse_manifest(JsonManifestParseContext *context,
|
extern void json_parse_manifest(JsonManifestParseContext *context,
|
||||||
const char *buffer, size_t size);
|
const char *buffer, size_t size);
|
||||||
extern JsonManifestParseIncrementalState *json_parse_manifest_incremental_init(JsonManifestParseContext *context);
|
extern JsonManifestParseIncrementalState *json_parse_manifest_incremental_init(JsonManifestParseContext *context);
|
||||||
extern void json_parse_manifest_incremental_chunk(
|
extern void json_parse_manifest_incremental_chunk(JsonManifestParseIncrementalState *incstate,
|
||||||
JsonManifestParseIncrementalState *incstate, const char *chunk, size_t size,
|
const char *chunk, size_t size,
|
||||||
bool is_last);
|
bool is_last);
|
||||||
extern void json_parse_manifest_incremental_shutdown(JsonManifestParseIncrementalState *incstate);
|
extern void json_parse_manifest_incremental_shutdown(JsonManifestParseIncrementalState *incstate);
|
||||||
|
|
||||||
|
@ -482,45 +482,38 @@ typedef void (*ReorderBufferRollbackPreparedCB) (ReorderBuffer *rb,
|
|||||||
TimestampTz prepare_time);
|
TimestampTz prepare_time);
|
||||||
|
|
||||||
/* start streaming transaction callback signature */
|
/* start streaming transaction callback signature */
|
||||||
typedef void (*ReorderBufferStreamStartCB) (
|
typedef void (*ReorderBufferStreamStartCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr first_lsn);
|
XLogRecPtr first_lsn);
|
||||||
|
|
||||||
/* stop streaming transaction callback signature */
|
/* stop streaming transaction callback signature */
|
||||||
typedef void (*ReorderBufferStreamStopCB) (
|
typedef void (*ReorderBufferStreamStopCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr last_lsn);
|
XLogRecPtr last_lsn);
|
||||||
|
|
||||||
/* discard streamed transaction callback signature */
|
/* discard streamed transaction callback signature */
|
||||||
typedef void (*ReorderBufferStreamAbortCB) (
|
typedef void (*ReorderBufferStreamAbortCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr abort_lsn);
|
XLogRecPtr abort_lsn);
|
||||||
|
|
||||||
/* prepare streamed transaction callback signature */
|
/* prepare streamed transaction callback signature */
|
||||||
typedef void (*ReorderBufferStreamPrepareCB) (
|
typedef void (*ReorderBufferStreamPrepareCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr prepare_lsn);
|
XLogRecPtr prepare_lsn);
|
||||||
|
|
||||||
/* commit streamed transaction callback signature */
|
/* commit streamed transaction callback signature */
|
||||||
typedef void (*ReorderBufferStreamCommitCB) (
|
typedef void (*ReorderBufferStreamCommitCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr commit_lsn);
|
XLogRecPtr commit_lsn);
|
||||||
|
|
||||||
/* stream change callback signature */
|
/* stream change callback signature */
|
||||||
typedef void (*ReorderBufferStreamChangeCB) (
|
typedef void (*ReorderBufferStreamChangeCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
Relation relation,
|
Relation relation,
|
||||||
ReorderBufferChange *change);
|
ReorderBufferChange *change);
|
||||||
|
|
||||||
/* stream message callback signature */
|
/* stream message callback signature */
|
||||||
typedef void (*ReorderBufferStreamMessageCB) (
|
typedef void (*ReorderBufferStreamMessageCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr message_lsn,
|
XLogRecPtr message_lsn,
|
||||||
bool transactional,
|
bool transactional,
|
||||||
@ -528,16 +521,14 @@ typedef void (*ReorderBufferStreamMessageCB) (
|
|||||||
const char *message);
|
const char *message);
|
||||||
|
|
||||||
/* stream truncate callback signature */
|
/* stream truncate callback signature */
|
||||||
typedef void (*ReorderBufferStreamTruncateCB) (
|
typedef void (*ReorderBufferStreamTruncateCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
int nrelations,
|
int nrelations,
|
||||||
Relation relations[],
|
Relation relations[],
|
||||||
ReorderBufferChange *change);
|
ReorderBufferChange *change);
|
||||||
|
|
||||||
/* update progress txn callback signature */
|
/* update progress txn callback signature */
|
||||||
typedef void (*ReorderBufferUpdateProgressTxnCB) (
|
typedef void (*ReorderBufferUpdateProgressTxnCB) (ReorderBuffer *rb,
|
||||||
ReorderBuffer *rb,
|
|
||||||
ReorderBufferTXN *txn,
|
ReorderBufferTXN *txn,
|
||||||
XLogRecPtr lsn);
|
XLogRecPtr lsn);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user