mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@ -662,7 +662,7 @@ SnapBuildExportSnapshot(SnapBuild *builder)
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg_plural("exported logical decoding snapshot: \"%s\" with %u transaction ID",
|
||||
"exported logical decoding snapshot: \"%s\" with %u transaction IDs",
|
||||
"exported logical decoding snapshot: \"%s\" with %u transaction IDs",
|
||||
snap->xcnt,
|
||||
snapname, snap->xcnt)));
|
||||
return snapname;
|
||||
@ -866,7 +866,7 @@ SnapBuildAddCommittedTxn(SnapBuild *builder, TransactionId xid)
|
||||
(uint32) builder->committed.xcnt_space);
|
||||
|
||||
builder->committed.xip = repalloc(builder->committed.xip,
|
||||
builder->committed.xcnt_space * sizeof(TransactionId));
|
||||
builder->committed.xcnt_space * sizeof(TransactionId));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1169,10 +1169,10 @@ SnapBuildProcessRunningXacts(SnapBuild *builder, XLogRecPtr lsn, xl_running_xact
|
||||
* we have one.
|
||||
*/
|
||||
else if (txn == NULL &&
|
||||
builder->reorder->current_restart_decoding_lsn != InvalidXLogRecPtr &&
|
||||
builder->reorder->current_restart_decoding_lsn != InvalidXLogRecPtr &&
|
||||
builder->last_serialized_snapshot != InvalidXLogRecPtr)
|
||||
LogicalIncreaseRestartDecodingForSlot(lsn,
|
||||
builder->last_serialized_snapshot);
|
||||
builder->last_serialized_snapshot);
|
||||
}
|
||||
|
||||
|
||||
@ -1222,8 +1222,8 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
ereport(DEBUG1,
|
||||
(errmsg_internal("skipping snapshot at %X/%X while building logical decoding snapshot, xmin horizon too low",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
errdetail_internal("initial xmin horizon of %u vs the snapshot's %u",
|
||||
builder->initial_xmin_horizon, running->oldestRunningXid)));
|
||||
errdetail_internal("initial xmin horizon of %u vs the snapshot's %u",
|
||||
builder->initial_xmin_horizon, running->oldestRunningXid)));
|
||||
|
||||
|
||||
SnapBuildWaitSnapshot(running, builder->initial_xmin_horizon);
|
||||
@ -1303,10 +1303,10 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
Assert(TransactionIdIsNormal(builder->xmax));
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found initial starting point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
errdetail("Waiting for transactions (approximately %d) older than %u to end.",
|
||||
running->xcnt, running->nextXid)));
|
||||
(errmsg("logical decoding found initial starting point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
errdetail("Waiting for transactions (approximately %d) older than %u to end.",
|
||||
running->xcnt, running->nextXid)));
|
||||
|
||||
SnapBuildWaitSnapshot(running, running->nextXid);
|
||||
}
|
||||
@ -1327,10 +1327,10 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
SnapBuildStartNextPhaseAt(builder, running->nextXid);
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found initial consistent point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
errdetail("Waiting for transactions (approximately %d) older than %u to end.",
|
||||
running->xcnt, running->nextXid)));
|
||||
(errmsg("logical decoding found initial consistent point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
errdetail("Waiting for transactions (approximately %d) older than %u to end.",
|
||||
running->xcnt, running->nextXid)));
|
||||
|
||||
SnapBuildWaitSnapshot(running, running->nextXid);
|
||||
}
|
||||
@ -1570,7 +1570,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
|
||||
INIT_CRC32C(ondisk->checksum);
|
||||
COMP_CRC32C(ondisk->checksum,
|
||||
((char *) ondisk) + SnapBuildOnDiskNotChecksummedSize,
|
||||
SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize);
|
||||
SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize);
|
||||
ondisk_c += sizeof(SnapBuildOnDisk);
|
||||
|
||||
memcpy(&ondisk->builder, builder, sizeof(SnapBuild));
|
||||
@ -1729,7 +1729,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
|
||||
INIT_CRC32C(checksum);
|
||||
COMP_CRC32C(checksum,
|
||||
((char *) &ondisk) + SnapBuildOnDiskNotChecksummedSize,
|
||||
SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize);
|
||||
SnapBuildOnDiskConstantSize - SnapBuildOnDiskNotChecksummedSize);
|
||||
|
||||
/* read SnapBuild */
|
||||
pgstat_report_wait_start(WAIT_EVENT_SNAPBUILD_READ);
|
||||
|
Reference in New Issue
Block a user