Force the default wal_sync_method to be fdatasync on Linux (Tom Lane, Marti
Raudsepp)

The default on Linux has actually been fdatasync for many years, but recent kernel
changes caused PostgreSQL
to choose open_datasync instead.
This choice did not result in any performance improvement,
and caused outright failures on certain filesystems,
notably ext4 with the data=journal mount option.

It is possible to have a "concurrent" page split in a temporary
index, if for example there is an open cursor scanning the
index when an insertion is done. GiST failed to detect this
case and hence could deliver wrong results when execution
of the cursor continued.

Fix error checking during early connection processing
(Tom Lane)

The check for too many child processes was skipped in
some cases, possibly leading to postmaster crash when
attempting to add the new child process to fixed-size
arrays.

Improve efficiency of window functions (Tom Lane)

Certain cases where a large number of tuples needed to
be read in advance, but work_mem
was large enough to allow them all to be held in memory,
were unexpectedly slow. percent_rank(), cume_dist() and ntile() in particular were subject to
this problem.