1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Pre-beta mechanical code beautification.

Run pgindent, pgperltidy, and reformat-dat-files.

This set of diffs is a bit larger than typical.  We've updated to
pg_bsd_indent 2.1.2, which properly indents variable declarations that
have multi-line initialization expressions (the continuation lines are
now indented one tab stop).  We've also updated to perltidy version
20230309 and changed some of its settings, which reduces its desire to
add whitespace to lines to make assignments etc. line up.  Going
forward, that should make for fewer random-seeming changes to existing
code.

Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
This commit is contained in:
Tom Lane
2023-05-19 17:24:48 -04:00
parent df6b19fbbc
commit 0245f8db36
402 changed files with 4756 additions and 4427 deletions

View File

@@ -357,14 +357,15 @@ dsm_impl_posix_resize(int fd, off_t size)
/*
* Block all blockable signals, except SIGQUIT. posix_fallocate() can run
* for quite a long time, and is an all-or-nothing operation. If we
* allowed SIGUSR1 to interrupt us repeatedly (for example, due to recovery
* conflicts), the retry loop might never succeed.
* allowed SIGUSR1 to interrupt us repeatedly (for example, due to
* recovery conflicts), the retry loop might never succeed.
*/
if (IsUnderPostmaster)
sigprocmask(SIG_SETMASK, &BlockSig, &save_sigmask);
pgstat_report_wait_start(WAIT_EVENT_DSM_ALLOCATE);
#if defined(HAVE_POSIX_FALLOCATE) && defined(__linux__)
/*
* On Linux, a shm_open fd is backed by a tmpfs file. If we were to use
* ftruncate, the file would contain a hole. Accessing memory backed by a
@@ -374,8 +375,8 @@ dsm_impl_posix_resize(int fd, off_t size)
* SIGBUS later.
*
* We still use a traditional EINTR retry loop to handle SIGCONT.
* posix_fallocate() doesn't restart automatically, and we don't want
* this to fail if you attach a debugger.
* posix_fallocate() doesn't restart automatically, and we don't want this
* to fail if you attach a debugger.
*/
do
{
@@ -383,9 +384,9 @@ dsm_impl_posix_resize(int fd, off_t size)
} while (rc == EINTR);
/*
* The caller expects errno to be set, but posix_fallocate() doesn't
* set it. Instead it returns error numbers directly. So set errno,
* even though we'll also return rc to indicate success or failure.
* The caller expects errno to be set, but posix_fallocate() doesn't set
* it. Instead it returns error numbers directly. So set errno, even
* though we'll also return rc to indicate success or failure.
*/
errno = rc;
#else