1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +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:
Tom Lane
2021-05-12 13:14:10 -04:00
parent e6ccd1ce16
commit def5b065ff
230 changed files with 2408 additions and 2125 deletions

View File

@@ -1054,22 +1054,22 @@ _bt_lockbuf(Relation rel, Buffer buf, int access)
LockBuffer(buf, access);
/*
* It doesn't matter that _bt_unlockbuf() won't get called in the
* event of an nbtree error (e.g. a unique violation error). That
* won't cause Valgrind false positives.
* It doesn't matter that _bt_unlockbuf() won't get called in the event of
* an nbtree error (e.g. a unique violation error). That won't cause
* Valgrind false positives.
*
* The nbtree client requests are superimposed on top of the
* bufmgr.c buffer pin client requests. In the event of an nbtree
* error the buffer will certainly get marked as defined when the
* backend once again acquires its first pin on the buffer. (Of
* course, if the backend never touches the buffer again then it
* doesn't matter that it remains non-accessible to Valgrind.)
* The nbtree client requests are superimposed on top of the bufmgr.c
* buffer pin client requests. In the event of an nbtree error the buffer
* will certainly get marked as defined when the backend once again
* acquires its first pin on the buffer. (Of course, if the backend never
* touches the buffer again then it doesn't matter that it remains
* non-accessible to Valgrind.)
*
* Note: When an IndexTuple C pointer gets computed using an
* ItemId read from a page while a lock was held, the C pointer
* becomes unsafe to dereference forever as soon as the lock is
* released. Valgrind can only detect cases where the pointer
* gets dereferenced with no _current_ lock/pin held, though.
* Note: When an IndexTuple C pointer gets computed using an ItemId read
* from a page while a lock was held, the C pointer becomes unsafe to
* dereference forever as soon as the lock is released. Valgrind can only
* detect cases where the pointer gets dereferenced with no _current_
* lock/pin held, though.
*/
if (!RelationUsesLocalBuffers(rel))
VALGRIND_MAKE_MEM_DEFINED(BufferGetPage(buf), BLCKSZ);
@@ -2395,7 +2395,7 @@ _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, BlockNumber scanblkno,
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
while (P_ISDELETED(opaque) || opaque->btpo_next != target)
{
bool leftsibvalid = true;
bool leftsibvalid = true;
/*
* Before we follow the link from the page that was the left

View File

@@ -898,8 +898,8 @@ btree_xlog_unlink_page(uint8 info, XLogReaderState *record)
* top parent link when deleting leafbuf because it's the last page
* we'll delete in the subtree undergoing deletion.
*/
Buffer leafbuf;
IndexTupleData trunctuple;
Buffer leafbuf;
IndexTupleData trunctuple;
Assert(!isleaf);