Fix typos
Add a GUC to report whether data page checksums are enabled.

Bernd Helmle
Rename various "freeze multixact" variables

It seems to make more sense to use "cutoff multixact" terminology
throughout the backend code; "freeze" is associated with replacing of an
Xid with FrozenTransactionId, which is not what we do for MultiXactIds.

Andres Freund
Some adjustments by Álvaro Herrera
Remove `proc` argument from LockCheckConflicts

This has been unused since commit 8563ccae2caf.

Noted by Antonin Houska
Typo fix.

Etsuro Fujita
Documentation correction.

Etsuro Fujita
Fix typo in comment.

Ian Lawrence Barwick
Fix compiler warning in WaitForBackgroundWorkerStartup().

Per complaint from Andrew Gierth.
BMI: Import old on-disk bitmap index patch

This patch from Gianni Ciolli and Gabriele Bartolini was posted to the
pgsql-patches mailinglist on 2008-11-01.  Here is the original mail from
Gianni Ciolli:

--

Hi to everybody,

following the useful feedback that we received from this list, we
would like to submit the patch for Bitmap Indexes for the november
CommitFest (joint work of me with Gabriele Bartolini, starting from
Gavin Sherry's patch).

There are two open issues (a bug that we are catching and something
missing in the catalog), but we think that it is worth to submit the
patch, for two reasons: because we are confident to fix the open
issues soon, and moreover because bitmap index seem to have their
non-trivial use cases (index creation is significantly faster than in
other types, and they occupy far less disk space, while queries are
only slightly faster).

What we have done:

 * We refactored Gavin Sherry's patch
   http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php
   using the new access method interface; in particular, we eliminate
   a large part of the code, which has been obsoleted by the new
   access method API.

   Now the interaction of the patch with the existing code is
   significantly smaller, and essentially limited to the catalog
   entries and the access method API.

 * We fixed some wrong behaviours due to the fact that the patch
   relies on some assumptions that are no longer true because of the
   evolution of PostgreSQL (HOT tuples break the assumption that
   during index scan tuples are scanned in TID increasing order).

 * We added a chapter to the manual, plus some references to bitmap
   index in the remaining test;

 * In a separate archive we enclose some performance tests (time and
   disk size), which show that bitmap index behave slightly better
   than btree in terms of speed, especially in certain cases specific
   of the index type (low-cardinality); the main advantage (according
   to some feedback that we received from this list) is that bitmap
   indexes are significantly smaller than any other type.

Current issues:

 * Our workaround for HOT tuples has still one bug; we are currently
   working on it and we expect to fix it soon. This bug can be
   reproduced by looking at the "rows" column of the performance test.

 * Two regression tests are failing (oidjoins and opr_sanity), due to
   incomplete catalog entries. We expect to fix it very soon.
BMI: Determine WAL needs with respective macro

The field id_istemp was removed and logically replaced with the the
persistence mode flag of the relation class.  This can be queried with
the nicely named macro RelationNeedsWAL.

This affects function 'bmbuild' in file 'bitmap.c' and
'_bitmap_init_bitmappage' in file 'bitmappages.c'.
BMI: Set new allow_sync flag true for heap scan

This new flag was introduced to speed up the creation of GIN indexes.
BMI: Include "rel.h" in bitmapatutil.c

In bitmapatutil.c the RelationGetRelid macro is used which is declared
there.  There must have been changes in the header dependencies.
BMI: Adapt deleteDependencyRecordsFor calls

Since the first port of BMI, the concept of extensions was introduced
into PG.  The function deleteDependencyRecordsFor received an option to
skip the dependencies of such extensions.

This patch sets the new parameter skipExtensionDeps to false.  This
resembles the original behavior.

Remark: I am not sure whether the bitmap index would be considered an
extension from today's point of view.  Currently it is not treated as
such.
BMI: Perform deletions in LOV index internal

Flag the performDeletion in _bitmap_create_lov_heapandindex with
PERFORM_DELETION_INTERNAL because it is not a user initiated delete but
a delete which will be followed by a re-create.  This distinction was
introduced after the first BMI port.
BMI LOV: Port heap_create_with_catalog call

Call it with reltypeid=reloftypeid=InvalidOid,
relpersistence=RELPERSISTENCE_PERMANENT, and use_user_acl=false.  The
setting of mapped_relation is copied from whatever is in the rel
field (what is the index relation).

This tries to resemble the original behavior respective to the first
port of the BMI patch.
BMI LOV: Port index_create call + related behavior

This requires a combined set of changes to result in a valid
index_create call:

 * Because of new signature of index_create, open and close the LOV
   relation in _bitmap_create_lov_heapandindex explicitely.

 * Create and free a list of the index column names for the LOV index.

 * Copy the collation objects for the LOV index from the main index
   relation.

 * Set relFileNode=InvalidOid to get new storage.

 * Set new attribute fields deferrable=initdeferred=false for the LOV
   index as the main index should treat this.
BMI: Fix whitespace, wrapping, and comment style
BMI LOV: Update heap tuple descriptor creation

Only copy the fixed size part of the tuple descriptor ignoring the
constraints.  Constraints should be treated by the main index.
BMI LOV: Update call to heap_insert

In the new prototype the negation of the former parameters 'use_wal' and
'use_fsm' is implemented as the bit flags HEAP_INSERT_SKIP_WAL and
HEAP_INSERT_SKIP_FSM in the new options parameter.  So options is now 0
to resemble the old behavior.  The last most parameter 'bistate' is new
and set to NULL to resemble the old behavior.
BMI: Print TID as block:offset

This avoids unportable (32bit/64bit) printf codes.

Remark: There are still some places where %llu is used which are covered
by #ifdef DEBUG_BMI.  These need to be changed, too.