Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJEIi-0000eq-DK for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2017 07:25:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJEIh-0004fW-Eo for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2017 07:25:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJEIg-0004fM-Rg for pgsql-hackers@postgresql.org; Fri, 09 Jun 2017 07:25:42 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dJEId-0002yY-3e for pgsql-hackers@postgresql.org; Fri, 09 Jun 2017 07:25:42 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 7481E4541A for ; Fri, 9 Jun 2017 09:25:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id RbFBCqDmbsjr for ; Fri, 9 Jun 2017 09:25:35 +0200 (CEST) From: Antonin Houska To: pgsql-hackers@postgresql.org Subject: Re: snapbuild woes In-reply-to: <20170424225957.3i2qpsyblgcisbsg@alap3.anarazel.de> References: <194608bf-d403-b566-3578-4439e70a8119@2ndquadrant.com> <20161212223338.bmhswrdaipttvcve@alap3.anarazel.de> <7023017e-8b08-eaba-396c-80baf0a793c0@2ndquadrant.com> <7286ebe9-cb1b-cf1a-f85b-fbe3402ea0bf@2ndquadrant.com> <9a897b86-46e1-9915-ee4c-da02e4ff6a95@2ndquadrant.com> <51f65289-54f8-2256-d107-937d662d69f1@2ndquadrant.com> <20170413002959.apytyi5lkknauauj@alap3.anarazel.de> <0d06dfc1-0bc5-c3ab-3555-24e2f275d7fa@2ndquadrant.com> <30242bc6-eca4-b7bb-670e-8d0458753a8c@2ndquadrant.com> <20170424225957.3i2qpsyblgcisbsg@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 24 Apr 2017 15:59:57 -0700." MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 09 Jun 2017 09:25:34 +0200 Message-ID: <32704.1496993134@localhost> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund wrote: > Looking at 0001: > - GetOldestSafeDecodingTransactionId() only guarantees to return an xid > safe for decoding (note how procArray->replication_slot_catalog_xmin > is checked), not one for the initial snapshot - so afaics this whole > exercise doesn't guarantee much so far. I happen to use CreateInitDecodingContext() in an extension, so I had to th= ink what the new argumen exactly means (as for the incompatibility between PG 9.6.2 and 9.6.3, I suppose preprocessor directives can handle it). One thing I'm failing to understand is: if TRUE is passed for need_full_snapshot, then slot->effective_xmin receives the result of GetOldestSafeDecodingTransactionId(need_full_snapshot) but this does include "catalog xmin". If the value returned is determined by an existing slot which has valid effective_catalog_xmin and invalid effective_xmin (i.e. that slot only protects catalog tables from VACUUM but not the regular ones), then the new slot will think it (i.e. the new slot) protects even non-catalog tables, but that's no true. Shouldn't the xmin_horizon be computed by this call instead? GetOldestSafeDecodingTransactionId(!need_full_snapshot); (If so, I think "considerCatalog" argument name would be clearer than "catalogOnly".) --=20 Antonin Houska Cybertec Sch=C3=B6nig & Sch=C3=B6nig GmbH Gr=C3=B6hrm=C3=BChlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de, http://www.cybertec.at --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers