Declare two variables in snapbuild.c as static.

Neither is accessed externally, I just seem to have missed the static
when writing the code.
Protect definition of SpinlockSemaArray, just like its declaration.

Found via clang's -Wmissing-variable-declarations.
Declare lwlock.c's LWLockAcquireCommon() as a static inline.

68a2e52bbaf98f136 has introduced LWLockAcquireCommon() containing the
previous contents of LWLockAcquire() plus added functionality. The
latter then calls it, just like LWLockAcquireWithVar(). Because the
majority of callers don't need the added functionality, declare the
common code as inline. The compiler then can optimize away the unused
code. Doing so is also useful when looking at profiles, to
differentiate the users.

Backpatch to 9.4, the first branch to contain LWLockAcquireCommon().
Fix s/pluggins/plugins/ typo in two comments.

Michael Paquier
Add valgrind suppression for padding bytes in twophase records.
Add skip-empty-xacts option to test_decoding for use in the regression tests.

The regression tests for contrib/test_decoding regularly failed on
postgres instances that were very slow. Either because the hardware
itself was slow or because very expensive debugging options like
CLOBBER_CACHE_ALWAYS were used.

The reason they failed was just that some additional transactions were
decoded. Analyze and vacuum, triggered by autovac.

To fix just add a option to test_decoding to only display transactions
in which a change was actually displayed. That's not pretty because it
removes information from the tests; but better than constantly failing
tests in very likely harmless ways.

Backpatch to 9.4 where logical decoding was introduced.

Discussion: 20140629142511.GA26930@awork2.anarazel.de
Fix unportable use of isspace().

Introduced in commit 11a020eb6.
Support ALTER SYSTEM RESET command.

This patch allows us to execute ALTER SYSTEM RESET command to
remove the configuration entry from postgresql.auto.conf.

Vik Fearing, reviewed by Amit Kapila and me.
Add psql PROMPT variable showing which line of a statement is being edited.

The new %l substitution shows the line number inside a (potentially
multi-line) statement starting from one.

Author: Sawada Masahiko, heavily editorialized by me.
Reviewed-By: Jeevan Chalke, Alvaro Herrera
Silence warning on new versions of clang.

Andres Freund
Refactor per-page logic common to all redo routines to a new function.

Every redo routine uses the same idiom to determine what to do to a page:
check if there's a backup block for it, and if not read, the buffer if the
block exists, and check its LSN. Refactor that into a common function,
XLogReadBufferForRedo, making all the redo routines shorter and more
readable.

This has no user-visible effect, and makes no changes to the WAL format.

Reviewed by Andres Freund, Alvaro Herrera, Michael Paquier.
Check number of parameters in RAISE statement at compile time.

The number of % parameter markers in RAISE statement should match the number
of parameters given. We used to check that at execution time, but we have
all the information needed at compile time, so let's check it at compile
time instead. It's generally better to find mistakes earlier.

Marko Tiikkaja, reviewed by Fabien Coelho
Issue clearer notice when inherited merged columns are moved

CREATE TABLE INHERIT moves user-specified columns to the location of the
inherited column.

Report by Fatal Majid
Document use of partial indexes for partial unique constraints

Report by Tomáš Greif

Backpatch through 9.4
Update URL reference material in /contrib/isn docs

Report by Peter Eisentraut
Allow \watch to display query execution time if \timing is enabled.

Previously \watch could not display the query execution time even
when \timing was enabled because it used PSQLexec instead of
SendQuery and that function didn't support \timing. This patch
introduces PSQLexecWatch and changes \watch so as to use it, instead.
PSQLexecWatch is the function to run the query, print its results and
display how long it took (only when \timing is enabled).

This patch also changes --echo-hidden so that it doesn't print
the query that \watch executes. Since \watch cannot execute
backslash command queries, they should not be printed even
when --echo-hidden is set.

Patch by me, review by Heikki Linnakangas and Michael Paquier
Update comment to reflect commit 1d41739e5a04b0e93304d24d864b6bfa3efc45f2.

Peter Geoghegan
Fix segmentation fault that an empty prepared statement could cause.

Back-patch to all supported branches.

Per bug #11335 from Haruka Takatsuka
doc: Remove dead link

The link to the NIST web page about DES standards leads to nowhere, and
according to archive.org has been forwarded to an unrelated page for
many years.  Therefore, just remove that link.  More up to date
information can be found via Wikipedia, for example.
Add tab-completion for reloptions like user_catalog_table.

Back-patch to 9.4 where user_catalog_table was added.

Review by Michael Paquier