2013-02-23 03:46:24 +08:00
|
|
|
/*
|
|
|
|
* rmgrdesc.c
|
|
|
|
*
|
|
|
|
* pg_xlogdump resource managers definition
|
|
|
|
*
|
|
|
|
* contrib/pg_xlogdump/rmgrdesc.c
|
|
|
|
*/
|
|
|
|
#define FRONTEND 1
|
|
|
|
#include "postgres.h"
|
|
|
|
|
BRIN: Block Range Indexes
BRIN is a new index access method intended to accelerate scans of very
large tables, without the maintenance overhead of btrees or other
traditional indexes. They work by maintaining "summary" data about
block ranges. Bitmap index scans work by reading each summary tuple and
comparing them with the query quals; all pages in the range are returned
in a lossy TID bitmap if the quals are consistent with the values in the
summary tuple, otherwise not. Normal index scans are not supported
because these indexes do not store TIDs.
As new tuples are added into the index, the summary information is
updated (if the block range in which the tuple is added is already
summarized) or not; in the latter case, a subsequent pass of VACUUM or
the brin_summarize_new_values() function will create the summary
information.
For data types with natural 1-D sort orders, the summary info consists
of the maximum and the minimum values of each indexed column within each
page range. This type of operator class we call "Minmax", and we
supply a bunch of them for most data types with B-tree opclasses.
Since the BRIN code is generalized, other approaches are possible for
things such as arrays, geometric types, ranges, etc; even for things
such as enum types we could do something different than minmax with
better results. In this commit I only include minmax.
Catalog version bumped due to new builtin catalog entries.
There's more that could be done here, but this is a good step forwards.
Loosely based on ideas from Simon Riggs; code mostly by Álvaro Herrera,
with contribution by Heikki Linnakangas.
Patch reviewed by: Amit Kapila, Heikki Linnakangas, Robert Haas.
Testing help from Jeff Janes, Erik Rijkers, Emanuel Calvo.
PS:
The research leading to these results has received funding from the
European Union's Seventh Framework Programme (FP7/2007-2013) under
grant agreement n° 318633.
2014-11-08 03:38:14 +08:00
|
|
|
#include "access/brin_xlog.h"
|
2013-02-23 03:46:24 +08:00
|
|
|
#include "access/clog.h"
|
Keep track of transaction commit timestamps
Transactions can now set their commit timestamp directly as they commit,
or an external transaction commit timestamp can be fed from an outside
system using the new function TransactionTreeSetCommitTsData(). This
data is crash-safe, and truncated at Xid freeze point, same as pg_clog.
This module is disabled by default because it causes a performance hit,
but can be enabled in postgresql.conf requiring only a server restart.
A new test in src/test/modules is included.
Catalog version bumped due to the new subdirectory within PGDATA and a
couple of new SQL functions.
Authors: Álvaro Herrera and Petr Jelínek
Reviewed to varying degrees by Michael Paquier, Andres Freund, Robert
Haas, Amit Kapila, Fujii Masao, Jaime Casanova, Simon Riggs, Steven
Singer, Peter Eisentraut
2014-12-03 22:53:02 +08:00
|
|
|
#include "access/commit_ts.h"
|
2013-02-23 03:46:24 +08:00
|
|
|
#include "access/gin.h"
|
|
|
|
#include "access/gist_private.h"
|
|
|
|
#include "access/hash.h"
|
|
|
|
#include "access/heapam_xlog.h"
|
|
|
|
#include "access/multixact.h"
|
|
|
|
#include "access/nbtree.h"
|
|
|
|
#include "access/rmgr.h"
|
|
|
|
#include "access/spgist.h"
|
|
|
|
#include "access/xact.h"
|
|
|
|
#include "access/xlog_internal.h"
|
|
|
|
#include "catalog/storage_xlog.h"
|
|
|
|
#include "commands/dbcommands.h"
|
|
|
|
#include "commands/sequence.h"
|
|
|
|
#include "commands/tablespace.h"
|
|
|
|
#include "rmgrdesc.h"
|
|
|
|
#include "storage/standby.h"
|
|
|
|
#include "utils/relmapper.h"
|
|
|
|
|
2014-09-19 21:17:12 +08:00
|
|
|
#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
|
|
|
|
{ name, desc, identify},
|
2013-02-23 03:46:24 +08:00
|
|
|
|
|
|
|
const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
|
|
|
|
#include "access/rmgrlist.h"
|
|
|
|
};
|