– Prevent a rowtype from being included in itself. Eventually we
might be able to allow that, but it’s not clear how many places need
to be fixed to prevent infinite recursion when there’s a direct or
indirect inclusion of a rowtype in itself. One such place is
CheckAttributeType(), which will recurse to stack overflow in cases
such as those exhibited in bug #5950 from Alex Perepelica. If we
were sure it was the only such place, we could easily modify the
code added by this patch to stop the recursion without a complaint
… but it probably isn’t the only such place. Hence, throw error
until such time as someone is excited enough about this type of
usage to put work into making it safe. Back-patch as far as 8.3.
8.2 doesn’t have the recursive call in CheckAttributeType in the
first place, so I see no need to add code there in the absence of
clear evidence of a problem elsewhere.http://git.postgresql.org/pg/commitdiff/eb51af71f241e8cb199790dee9ad246bb36b3287

– Support comments on FOREIGN DATA WRAPPER and SERVER objects. This
mostly involves making it work with the objectaddress.c framework,
which does most of the heavy lifting. In that vein, change
GetForeignDataWrapperOidByName to get_foreign_data_wrapper_oid and
GetForeignServerOidByName to get_foreign_server_oid, to match the
pattern we use for other object types. Robert Haas and Shigeru
Hanadahttp://git.postgresql.org/pg/commitdiff/50533a6dc515cc3182f52838275c9d2a1f587604

– Avoid possible hang during smart shutdown. If a smart shutdown
occurs just as a child is starting up, and the child subsequently
becomes a walsender, there is a race condition: the postmaster might
count the exstant backends, determine that there is one normal
backend, and wait for it to die off. Had the walsender transition
already occurred before the postmaster counted, it would have
proceeded with the shutdown. To fix this, have each child that
transforms into a walsender kick the postmaster just after doing so,
so that the state machine is certain to advance. Fujii Masaohttp://git.postgresql.org/pg/commitdiff/38b27792eae99f5b4db2411f5c57ef70f850df5f

– Rearrange “add column” logic to merge columns at exec time. The
previous coding set attinhcount too high in some cases, resulting in
an undumpable, undroppable column. Per bug #5856, reported by Naoya
Anzai. See also commit 31b6fc06d83c6de3644c8f2921eb7de0eb92fac3,
which fixes a similar bug in ALTER TABLE .. ADD CONSTRAINT. Patch
by Noah Misch.http://git.postgresql.org/pg/commitdiff/6c5723998594dffa5d47c3cf8c96ccf89c033aae

– Automatically terminate replication connections that are idle for
more than replication_timeout (a new GUC) milliseconds. The TCP
timeout is often too long, you want the master to notice a dead
connection much sooner. People complained about that in 9.0 too,
but with synchronous replication it’s even more important to notice
dead connections promptly. Fujii Masao and Heikki Linnakangashttp://git.postgresql.org/pg/commitdiff/754baa21f723255272c24dc5f9ab456858e361e3

– Check that we’ve reached end-of-backup also when we’re not
performing archive recovery. It’s possible to restore an online
backup without recovery.conf, by simply copying all the necessary
WAL files to pg_xlog. “pg_basebackup -x” does that too. That’s the
use case where this cross-check is useful. Backpatch to 9.0. We
used to do this in earlier versins, but in 9.0 the code was
inadvertently changed so that the check is only performed after
archive recovery. Fujii Masao.http://git.postgresql.org/pg/commitdiff/acf47401321ce55f06026a2f5d5512b404da3e55