Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–94 unchanged (94 lines)
95 Assert(startup_data_len == 0);
96
97 AuxiliaryProcessMainCommon();
98
99 /*
100 * Properly accept or ignore signals the postmaster might send us
101 *
102 * We have no particular use for SIGINT at the moment, but seems
103 * reasonable to treat like SIGTERM.
104 */
105 pqsignal(SIGHUP, SignalHandlerForConfigReload);
106 pqsignal(SIGINT, SignalHandlerForShutdownRequest);
107 pqsignal(SIGTERM, SignalHandlerForShutdownRequest);
108 /* SIGQUIT handler was already set up by InitPostmasterChild */
109 pqsignal(SIGALRM, SIG_IGN);
110 pqsignal(SIGPIPE, SIG_IGN);
111 pqsignal(SIGUSR1, procsignal_sigusr1_handler);
112 pqsignal(SIGUSR2, SIG_IGN); /* not used */
…lines 113–273 unchanged (161 lines)

After

…lines 1–91 unchanged (91 lines)
92 int left_till_hibernate;
93 bool hibernating;
94
95 Assert(startup_data_len == 0);
96
97 AuxiliaryProcessMainCommon();
98
99 /*
100 * Properly accept or ignore signals the postmaster might send us
101 */
102 pqsignal(SIGHUP, SignalHandlerForConfigReload);
103 pqsignal(SIGINT, SIG_IGN); /* no query to cancel */
104 pqsignal(SIGTERM, SignalHandlerForShutdownRequest);
105 /* SIGQUIT handler was already set up by InitPostmasterChild */
106 pqsignal(SIGALRM, SIG_IGN);
107 pqsignal(SIGPIPE, SIG_IGN);
108 pqsignal(SIGUSR1, procsignal_sigusr1_handler);
109 pqsignal(SIGUSR2, SIG_IGN); /* not used */
…lines 110–270 unchanged (161 lines)

Before

translation_unit
comment "/*----------------------------------------------------------"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "postgres.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<signal.h>"
preproc_include
#include "#include"
system_lib_string "<unistd.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/xlog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "libpq/pqsignal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "miscadmin.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "pgstat.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/auxprocess.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/interrupt.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/walwriter.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/aio_subsys.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/bufmgr.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/condition_variable.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/fd.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/lwlock.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/proc.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/procsignal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/smgr.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/hsearch.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/memutils.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/resowner.h"
" "\""
comment "/*\n * GUC parameters\n */"
declaration
primitive_type "int"
init_declarator
identifier "WalWriterDelay"
= "="
number_literal "200"
; ";"
declaration
primitive_type "int"
init_declarator
identifier "WalWriterFlushAfter"
= "="
identifier "DEFAULT_WAL_WRITER_FLUSH_AFTER"
; ";"
comment "/*\n * Number of do-nothing loops before lengthening the dela"...
preproc_def
#define "#define"
identifier "LOOPS_UNTIL_HIBERNATE"
preproc_arg "50"
preproc_def
#define "#define"
identifier "HIBERNATE_FACTOR"
preproc_arg "25"
comment "/*\n * Main entry point for walwriter process\n *\n * This is i"...
function_definition
primitive_type "void"
function_declarator
identifier "WalWriterMain"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
primitive_type "void"
pointer_declarator
* "*"
identifier "startup_data"
, ","
parameter_declaration
primitive_type "size_t"
identifier "startup_data_len"
) ")"
compound_statement
{ "{"
declaration
type_identifier "sigjmp_buf"
identifier "local_sigjmp_buf"
; ";"
declaration
type_identifier "MemoryContext"
identifier "walwriter_context"
; ";"
declaration
primitive_type "int"
identifier "left_till_hibernate"
; ";"
declaration
primitive_type "bool"
identifier "hibernating"
; ";"
expression_statement
call_expression
identifier "Assert"
argument_list
( "("
binary_expression
identifier "startup_data_len"
== "=="
number_literal "0"
) ")"
; ";"
expression_statement
call_expression
identifier "AuxiliaryProcessMainCommon"
argument_list
( "("
) ")"
; ";"
comment "/*\n\t * Properly accept or ignore signals the postmaster migh"...
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGHUP"
, ","
identifier "SignalHandlerForConfigReload"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGINT"
, ","
identifier "SignalHandlerForShutdownRequest"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGTERM"
, ","
identifier "SignalHandlerForShutdownRequest"
) ")"
; ";"
comment "/* SIGQUIT handler was already set up by InitPostmasterChild"...
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGALRM"
, ","
identifier "SIG_IGN"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGPIPE"
, ","
identifier "SIG_IGN"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGUSR1"
, ","
identifier "procsignal_sigusr1_handler"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGUSR2"
, ","
identifier "SIG_IGN"
) ")"
; ";"
comment "/* not used */"
comment "/*\n\t * Reset some signals that are accepted by postmaster bu"...
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGCHLD"
, ","
identifier "SIG_DFL"
) ")"
; ";"
comment "/*\n\t * Create a memory context that we will do all our work "...
expression_statement
assignment_expression
identifier "walwriter_context"
= "="
call_expression
identifier "AllocSetContextCreate"
argument_list
( "("
identifier "TopMemoryContext"
, ","
string_literal
" "\""
string_content "Wal Writer"
" "\""
, ","
identifier "ALLOCSET_DEFAULT_SIZES"
) ")"
; ";"
expression_statement
call_expression
identifier "MemoryContextSwitchTo"
argument_list
( "("
identifier "walwriter_context"
) ")"
; ";"
comment "/*\n\t * If an exception is encountered, processing resumes he"...
if_statement (+160 nodes collapsed)
comment "/* We can now handle ereport(ERROR) */"
expression_statement
assignment_expression
identifier "PG_exception_stack"
= "="
pointer_expression
& "&"
identifier "local_sigjmp_buf"
; ";"
comment "/*\n\t * Unblock signals (they were blocked when the postmaste"...
expression_statement
call_expression
identifier "sigprocmask"
argument_list
( "("
identifier "SIG_SETMASK"
, ","
pointer_expression
& "&"
identifier "UnBlockSig"
, ","
null
NULL "NULL"
) ")"
; ";"
comment "/*\n\t * Reset hibernation state after any error.\n\t */"
expression_statement
assignment_expression
identifier "left_till_hibernate"
= "="
identifier "LOOPS_UNTIL_HIBERNATE"
; ";"
expression_statement
assignment_expression
identifier "hibernating"
= "="
false "false"
; ";"
expression_statement
call_expression
identifier "SetWalWriterSleeping"
argument_list
( "("
false "false"
) ")"
; ";"
comment "/*\n\t * Advertise our proc number that backends can use to wa"...
expression_statement
assignment_expression
field_expression
identifier "ProcGlobal"
-> "->"
field_identifier "walwriterProc"
= "="
identifier "MyProcNumber"
; ";"
comment "/*\n\t * Loop forever\n\t */"
for_statement (+165 nodes collapsed)
} "}"

After

translation_unit
comment "/*----------------------------------------------------------"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "postgres.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<signal.h>"
preproc_include
#include "#include"
system_lib_string "<unistd.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/xlog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "libpq/pqsignal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "miscadmin.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "pgstat.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/auxprocess.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/interrupt.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/walwriter.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/aio_subsys.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/bufmgr.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/condition_variable.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/fd.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/lwlock.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/proc.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/procsignal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/smgr.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/hsearch.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/memutils.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/resowner.h"
" "\""
comment "/*\n * GUC parameters\n */"
declaration
primitive_type "int"
init_declarator
identifier "WalWriterDelay"
= "="
number_literal "200"
; ";"
declaration
primitive_type "int"
init_declarator
identifier "WalWriterFlushAfter"
= "="
identifier "DEFAULT_WAL_WRITER_FLUSH_AFTER"
; ";"
comment "/*\n * Number of do-nothing loops before lengthening the dela"...
preproc_def
#define "#define"
identifier "LOOPS_UNTIL_HIBERNATE"
preproc_arg "50"
preproc_def
#define "#define"
identifier "HIBERNATE_FACTOR"
preproc_arg "25"
comment "/*\n * Main entry point for walwriter process\n *\n * This is i"...
function_definition
primitive_type "void"
function_declarator
identifier "WalWriterMain"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
primitive_type "void"
pointer_declarator
* "*"
identifier "startup_data"
, ","
parameter_declaration
primitive_type "size_t"
identifier "startup_data_len"
) ")"
compound_statement
{ "{"
declaration
type_identifier "sigjmp_buf"
identifier "local_sigjmp_buf"
; ";"
declaration
type_identifier "MemoryContext"
identifier "walwriter_context"
; ";"
declaration
primitive_type "int"
identifier "left_till_hibernate"
; ";"
declaration
primitive_type "bool"
identifier "hibernating"
; ";"
expression_statement
call_expression
identifier "Assert"
argument_list
( "("
binary_expression
identifier "startup_data_len"
== "=="
number_literal "0"
) ")"
; ";"
expression_statement
call_expression
identifier "AuxiliaryProcessMainCommon"
argument_list
( "("
) ")"
; ";"
comment "/*\n\t * Properly accept or ignore signals the postmaster migh"...
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGHUP"
, ","
identifier "SignalHandlerForConfigReload"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGINT"
, ","
identifier "SIG_IGN"
) ")"
; ";"
comment "/* no query to cancel */"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGTERM"
, ","
identifier "SignalHandlerForShutdownRequest"
) ")"
; ";"
comment "/* SIGQUIT handler was already set up by InitPostmasterChild"...
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGALRM"
, ","
identifier "SIG_IGN"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGPIPE"
, ","
identifier "SIG_IGN"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGUSR1"
, ","
identifier "procsignal_sigusr1_handler"
) ")"
; ";"
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGUSR2"
, ","
identifier "SIG_IGN"
) ")"
; ";"
comment "/* not used */"
comment "/*\n\t * Reset some signals that are accepted by postmaster bu"...
expression_statement
call_expression
identifier "pqsignal"
argument_list
( "("
identifier "SIGCHLD"
, ","
identifier "SIG_DFL"
) ")"
; ";"
comment "/*\n\t * Create a memory context that we will do all our work "...
expression_statement
assignment_expression
identifier "walwriter_context"
= "="
call_expression
identifier "AllocSetContextCreate"
argument_list
( "("
identifier "TopMemoryContext"
, ","
string_literal
" "\""
string_content "Wal Writer"
" "\""
, ","
identifier "ALLOCSET_DEFAULT_SIZES"
) ")"
; ";"
expression_statement
call_expression
identifier "MemoryContextSwitchTo"
argument_list
( "("
identifier "walwriter_context"
) ")"
; ";"
comment "/*\n\t * If an exception is encountered, processing resumes he"...
if_statement (+160 nodes collapsed)
comment "/* We can now handle ereport(ERROR) */"
expression_statement
assignment_expression
identifier "PG_exception_stack"
= "="
pointer_expression
& "&"
identifier "local_sigjmp_buf"
; ";"
comment "/*\n\t * Unblock signals (they were blocked when the postmaste"...
expression_statement
call_expression
identifier "sigprocmask"
argument_list
( "("
identifier "SIG_SETMASK"
, ","
pointer_expression
& "&"
identifier "UnBlockSig"
, ","
null
NULL "NULL"
) ")"
; ";"
comment "/*\n\t * Reset hibernation state after any error.\n\t */"
expression_statement
assignment_expression
identifier "left_till_hibernate"
= "="
identifier "LOOPS_UNTIL_HIBERNATE"
; ";"
expression_statement
assignment_expression
identifier "hibernating"
= "="
false "false"
; ";"
expression_statement
call_expression
identifier "SetWalWriterSleeping"
argument_list
( "("
false "false"
) ")"
; ";"
comment "/*\n\t * Advertise our proc number that backends can use to wa"...
expression_statement
assignment_expression
field_expression
identifier "ProcGlobal"
-> "->"
field_identifier "walwriterProc"
= "="
identifier "MyProcNumber"
; ";"
comment "/*\n\t * Loop forever\n\t */"
for_statement (+165 nodes collapsed)
} "}"