pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Teach autovacuum about multixact member wraparound.
5+ messages / 3 participants
[nested] [flat]

* pgsql: Teach autovacuum about multixact member wraparound.
@ 2015-05-08 17:00  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Robert Haas @ 2015-05-08 17:00 UTC (permalink / raw)
  To: pgsql-committers

Teach autovacuum about multixact member wraparound.

The logic introduced in commit b69bf30b9bfacafc733a9ba77c9587cf54d06c0c
and repaired in commits 669c7d20e6374850593cb430d332e11a3992bbcf and
7be47c56af3d3013955c91c2877c08f2a0e3e6a2 helps to ensure that we don't
overwrite old multixact member information while it is still needed,
but a user who creates many large multixacts can still exhaust the
member space (and thus start getting errors) while autovacuum stands
idly by.

To fix this, progressively ramp down the effective value (but not the
actual contents) of autovacuum_multixact_freeze_max_age as member space
utilization increases.  This makes autovacuum more aggressive and also
reduces the threshold for a manual VACUUM to perform a full-table scan.

This patch leaves unsolved the problem of ensuring that emergency
autovacuums are triggered even when autovacuum=off.  We'll need to fix
that via a separate patch.

Thomas Munro and Robert Haas

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/596fb5aa73e6073bf870a9093941f937921ad4a4

Modified Files
--------------
doc/src/sgml/maintenance.sgml          |    8 ++-
src/backend/access/transam/multixact.c |   88 ++++++++++++++++++++++++++++++++
src/backend/commands/vacuum.c          |   16 ++++--
src/backend/postmaster/autovacuum.c    |   28 +++++++---
src/include/access/multixact.h         |    1 +
5 files changed, 130 insertions(+), 11 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Teach autovacuum about multixact member wraparound.
@ 2015-05-08 17:00  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Robert Haas @ 2015-05-08 17:00 UTC (permalink / raw)
  To: pgsql-committers

Teach autovacuum about multixact member wraparound.

The logic introduced in commit b69bf30b9bfacafc733a9ba77c9587cf54d06c0c
and repaired in commits 669c7d20e6374850593cb430d332e11a3992bbcf and
7be47c56af3d3013955c91c2877c08f2a0e3e6a2 helps to ensure that we don't
overwrite old multixact member information while it is still needed,
but a user who creates many large multixacts can still exhaust the
member space (and thus start getting errors) while autovacuum stands
idly by.

To fix this, progressively ramp down the effective value (but not the
actual contents) of autovacuum_multixact_freeze_max_age as member space
utilization increases.  This makes autovacuum more aggressive and also
reduces the threshold for a manual VACUUM to perform a full-table scan.

This patch leaves unsolved the problem of ensuring that emergency
autovacuums are triggered even when autovacuum=off.  We'll need to fix
that via a separate patch.

Thomas Munro and Robert Haas

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3ecab37d97ed72bf81fd042dcef10e7111369875

Modified Files
--------------
doc/src/sgml/maintenance.sgml          |    8 ++-
src/backend/access/transam/multixact.c |   88 ++++++++++++++++++++++++++++++++
src/backend/commands/vacuum.c          |   16 ++++--
src/backend/postmaster/autovacuum.c    |   28 +++++++---
src/include/access/multixact.h         |    1 +
5 files changed, 130 insertions(+), 11 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Teach autovacuum about multixact member wraparound.
@ 2015-05-08 17:00  Robert Haas <rhaas@postgresql.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Robert Haas @ 2015-05-08 17:00 UTC (permalink / raw)
  To: pgsql-committers

Teach autovacuum about multixact member wraparound.

The logic introduced in commit b69bf30b9bfacafc733a9ba77c9587cf54d06c0c
and repaired in commits 669c7d20e6374850593cb430d332e11a3992bbcf and
7be47c56af3d3013955c91c2877c08f2a0e3e6a2 helps to ensure that we don't
overwrite old multixact member information while it is still needed,
but a user who creates many large multixacts can still exhaust the
member space (and thus start getting errors) while autovacuum stands
idly by.

To fix this, progressively ramp down the effective value (but not the
actual contents) of autovacuum_multixact_freeze_max_age as member space
utilization increases.  This makes autovacuum more aggressive and also
reduces the threshold for a manual VACUUM to perform a full-table scan.

This patch leaves unsolved the problem of ensuring that emergency
autovacuums are triggered even when autovacuum=off.  We'll need to fix
that via a separate patch.

Thomas Munro and Robert Haas

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/53bb309d2d5a9432d2602c93ed18e58bd2924e15

Modified Files
--------------
doc/src/sgml/maintenance.sgml          |    8 ++-
src/backend/access/transam/multixact.c |   88 ++++++++++++++++++++++++++++++++
src/backend/commands/vacuum.c          |   16 ++++--
src/backend/postmaster/autovacuum.c    |   28 +++++++---
src/include/access/multixact.h         |    1 +
5 files changed, 130 insertions(+), 11 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: Teach autovacuum about multixact member wraparound.
@ 2015-05-08 17:23  Kevin Grittner <kgrittn@ymail.com>
  parent: Robert Haas <rhaas@postgresql.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Kevin Grittner @ 2015-05-08 17:23 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>; pgsql-committers

Robert Haas <rhaas@postgresql.org> wrote:

> This patch leaves unsolved the problem of ensuring that emergency
> autovacuums are triggered even when autovacuum=off.  We'll need
> to fix that via a separate patch.

I think we also need something like your previously-posted

multixact-truncate-race.patch as a follow-on.  I'm not at all
convinced that there is no possibility of truncating new data as
things stand; and even if that is true now, it seems terribly
fragile.  (Only mentioning it because it wasn't noted in the commit
message.)

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: Teach autovacuum about multixact member wraparound.
@ 2015-05-08 17:31  Robert Haas <robertmhaas@gmail.com>
  parent: Kevin Grittner <kgrittn@ymail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Robert Haas @ 2015-05-08 17:31 UTC (permalink / raw)
  To: Kevin Grittner <kgrittn@ymail.com>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>; pgsql-committers

On Fri, May 8, 2015 at 1:23 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
> Robert Haas <rhaas@postgresql.org> wrote:
>
>> This patch leaves unsolved the problem of ensuring that emergency
>> autovacuums are triggered even when autovacuum=off.  We'll need
>> to fix that via a separate patch.
>
> I think we also need something like your previously-posted
>
> multixact-truncate-race.patch as a follow-on.  I'm not at all
> convinced that there is no possibility of truncating new data as
> things stand; and even if that is true now, it seems terribly
> fragile.  (Only mentioning it because it wasn't noted in the commit
> message.)

I agree.  I'm writing up a summary of open issues now.  I didn't
mention it in the commit message because it's not related to the
autovacuum part of the problem.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2015-05-08 17:31 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-05-08 17:00 pgsql: Teach autovacuum about multixact member wraparound. Robert Haas <rhaas@postgresql.org>
2015-05-08 17:23 ` Kevin Grittner <kgrittn@ymail.com>
2015-05-08 17:31   ` Robert Haas <robertmhaas@gmail.com>
2015-05-08 17:00 pgsql: Teach autovacuum about multixact member wraparound. Robert Haas <rhaas@postgresql.org>
2015-05-08 17:00 pgsql: Teach autovacuum about multixact member wraparound. Robert Haas <rhaas@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox