From: Sergey Burladyan <eshkinkot@gmail.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Миша Тюрин <tmihail@bk.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: freeze cannot be finished
Date: Thu, 14 Nov 2013 03:53:17 +0400
Message-ID: <87txffkgeq.fsf@home.progtech.ru> (raw)
In-Reply-To: <CAMkU=1wQ1wWc=MTEm9=Z23NOCAzu6aLOKhQj2oQY5AcFuTeq3g@mail.gmail.com>
References: <1384356585.995240612@f50.i.mail.ru>
<CAMkU=1wQ1wWc=MTEm9=Z23NOCAzu6aLOKhQj2oQY5AcFuTeq3g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Jeff Janes <jeff.janes@gmail.com> writes:
If I not mistaken, looks like lazy_scan_heap() called from lazy_vacuum_rel()
(see [1]) skip pages, even if it run with scan_all == true, lazy_scan_heap()
does not increment scanned_pages if lazy_check_needs_freeze() return false, so
if this occurred at wraparound vacuum it cannot update pg_class, because
pg_class updated via this code:
new_frozen_xid = FreezeLimit;
if (vacrelstats->scanned_pages < vacrelstats->rel_pages)
new_frozen_xid = InvalidTransactionId;
vac_update_relstats(onerel,
new_rel_pages,
new_rel_tuples,
new_rel_allvisible,
vacrelstats->hasindex,
new_frozen_xid);
so i think in our prevent wraparound vacuum vacrelstats->scanned_pages always
less than vacrelstats->rel_pages and pg_class relfrozenxid never updated.
[1] src/backend/commands/vacuumlazy.c
--
Sergey Burladyan
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: eshkinkot@gmail.com, jeff.janes@gmail.com, tmihail@bk.ru, tgl@sss.pgh.pa.us
Subject: Re: freeze cannot be finished
In-Reply-To: <87txffkgeq.fsf@home.progtech.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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