Count locked pages that don't need vacuuming as scanned.

Previously, if VACUUM skipped vacuuming a page because it's pinned, it
didn't count that page as scanned. However, that meant that relfrozenxid
was not bumped up either, which prevented anti-wraparound vacuum from
doing its job.

Report by Миша Тюрин, analysis and patch by Sergey Burladyn and Jeff Janes.
Backpatch to 9.2, where the skip-locked-pages behavior was introduced.
Use cstring_to_text_with_len when length is known.

This avoids a potentially-expensive extra call to strlen().

David Rowley
Replace appendPQExpBuffer(..., <constant>) with appendPQExpBufferStr

Arguably makes the code a bit more readable, and might give a small
performance gain.

David Rowley
Spell SQL keywords in uppercase in pg_dump's query.

The server won't care, but let's be consistent.

David Rowley.
unaccent:  Revert patch 9299f6179838cef8aa1123f6fb76f0d3d6f2decc

The reverted patch to change functions from strict to immutable was
incorrect and needs additional research.
pg_upgrade: Report full disk better

Previously, pg_upgrade would abort copy_file() on a short write without
setting errno, which the caller would report as an error with the
message "Success".  We assume ENOSPC in that case, as we do elsewhere in
the code.  Also set errno in some other error cases in copy_file() to
avoid bogus "Success" error messages.

This was broken in 6b711cf37c228749b6a8cef50e16e3c587d18dd4, so 9.2 and
before are OK.
Add tab completion for \pset in psql.

Pavel Stehule, reviewed by Ian Lawrence Barwick
pg_upgrade:  avoid ALTER COLUMN TYPE on inherited columns

This only affects upgrades from 8.3 currently, and is harmless as the
child just generates an error in the script, but we should get it right
in case we ever need this for more complex uses.

Per report from Peter Eisentraut
docs:  update page format to specify page checksum field

Backpatch to 9.3

Per report from Steffen Hildebrandt
ecpg: Split off mmfatal() from mmerror()

This allows decorating mmfatal() with noreturn compiler hints, leading
to better diagnostics.