mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the
free space information is stored in a dedicated FSM relation fork, with each relation (except for hash indexes; they don't use FSM). This eliminates the max_fsm_relations and max_fsm_pages GUC options; remove any trace of them from the backend, initdb, and documentation. Rewrite contrib/pg_freespacemap to match the new FSM implementation. Also introduce a new variant of the get_raw_page(regclass, int4, int4) function in contrib/pageinspect that let's you to return pages from any relation fork, and a new fsm_page_contents() function to inspect the new FSM pages.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.473 2008/09/23 21:12:03 mha Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.474 2008/09/30 10:52:13 heikki Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -57,7 +57,6 @@
|
||||
#include "regex/regex.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/fd.h"
|
||||
#include "storage/freespace.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
#include "tsearch/ts_cache.h"
|
||||
#include "utils/builtins.h"
|
||||
@ -446,8 +445,6 @@ const char *const config_group_names[] =
|
||||
gettext_noop("Resource Usage"),
|
||||
/* RESOURCES_MEM */
|
||||
gettext_noop("Resource Usage / Memory"),
|
||||
/* RESOURCES_FSM */
|
||||
gettext_noop("Resource Usage / Free Space Map"),
|
||||
/* RESOURCES_KERNEL */
|
||||
gettext_noop("Resource Usage / Kernel Resources"),
|
||||
/* WAL */
|
||||
@ -1528,23 +1525,6 @@ static struct config_int ConfigureNamesInt[] =
|
||||
100000000, 0, 1000000000, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"max_fsm_relations", PGC_POSTMASTER, RESOURCES_FSM,
|
||||
gettext_noop("Sets the maximum number of tables and indexes for which free space is tracked."),
|
||||
NULL
|
||||
},
|
||||
&MaxFSMRelations,
|
||||
1000, 100, INT_MAX, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"max_fsm_pages", PGC_POSTMASTER, RESOURCES_FSM,
|
||||
gettext_noop("Sets the maximum number of disk pages for which free space is tracked."),
|
||||
NULL
|
||||
},
|
||||
&MaxFSMPages,
|
||||
20000, 1000, INT_MAX, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"max_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
|
||||
gettext_noop("Sets the maximum number of locks per transaction."),
|
||||
|
Reference in New Issue
Block a user