Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgkFS-0007Z0-HH for pgsql-general@arkaria.postgresql.org; Wed, 13 Nov 2013 23:53:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VgkFS-0007dN-0r for pgsql-general@arkaria.postgresql.org; Wed, 13 Nov 2013 23:53:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgkFR-0007dF-1v for pgsql-general@postgresql.org; Wed, 13 Nov 2013 23:53:25 +0000 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgkFO-0006Yb-Iy for pgsql-general@postgresql.org; Wed, 13 Nov 2013 23:53:24 +0000 Received: by mail-la0-f42.google.com with SMTP id ec20so986388lab.29 for ; Wed, 13 Nov 2013 15:53:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Adl/HMCNRrd6OcVy6dlj41WZYhbkEW31iROZa7Q0Zus=; b=hgvqq5oge20CzrZ73nO8Bim+6nYM0O5CSDRrBWqRe91A5YXlUyjpWgb+U0jsU9ZGkz rGxsSxAwbgOspqeM1zcAVry4LdNdxU/C7LNcVJhx2RBF74agfm+P5c6bAoksxpLrb9mx L1ynHuJxm2B6LeuSgT1N9M6PSoQwZNrJj4wjsbUSd7jd0jqaIbWrEs1QJZ8sIKLKOK40 FMIQgOYnB3lZ63PNgN3zX3W++7lusQyeGizvCH9hX4ryzAzF9jFG2ESr+CKhsI1uKROc Yt0MXdf8Fbj8hvBK7MOhbd+0a8+nKXTACHG1uMbMHOka9tLQyXoDEayQG8n5PxTYy59b H0iQ== X-Received: by 10.112.51.101 with SMTP id j5mr31704651lbo.17.1384386800982; Wed, 13 Nov 2013 15:53:20 -0800 (PST) Received: from home.progtech.ru (os.progtech.ru. [80.252.153.41]) by mx.google.com with ESMTPSA id pg3sm24670042lbb.7.2013.11.13.15.53.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 13 Nov 2013 15:53:19 -0800 (PST) From: Sergey Burladyan To: Jeff Janes Cc: =?utf-8?B?0JzQuNGI0LAg0KLRjtGA0LjQvQ==?= , Tom Lane , pgsql-general Subject: Re: freeze cannot be finished References: <1384356585.995240612@f50.i.mail.ru> Date: Thu, 14 Nov 2013 03:53:17 +0400 In-Reply-To: (Jeff Janes's message of "Wed, 13 Nov 2013 12:37:01 -0800") Message-ID: <87txffkgeq.fsf@home.progtech.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Jeff Janes 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