Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJkEz-0001P9-Jw for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jul 2015 15:22:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZJkEz-0005lG-4w for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Jul 2015 15:22:57 +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) (envelope-from ) id 1ZJkDe-0008HI-E7 for pgsql-hackers@postgresql.org; Mon, 27 Jul 2015 15:21:34 +0000 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZJkDb-0003kt-T2 for pgsql-hackers@postgresql.org; Mon, 27 Jul 2015 15:21:33 +0000 Received: by wibxm9 with SMTP id xm9so117682724wib.0 for ; Mon, 27 Jul 2015 08:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=IrVUxaSivYcnXvWelRWPlR0hRd4ZGMcLivYN57GymuE=; b=gUMQ1hjFhn4Skp7zxEz4nOxttbUoy2S2bWIe8u0g0XBoHSVCKzd3CfPg0By9OmQV5r qYzB0LjBCLS69CioPFJSJVZkymIVjnSlrLpt8zHiHKcaufx8e+7uu6vkyJP/DiOSQK15 bIVoTHRVbDGs+HSTn8xOsP1HN/3Pd7HQKGw/zrQawdJKspP2k/B/suBR+HydbkgXgTa/ XUtnzoJStSgn7csEPitMX9Ob/gmsPeZ2CJIZ3I7RAVODXzntdsmYCEHhmAzwH/JdWT9U 8r0ZPHsX7snIbffhUCnN/SoXm+u6vqsuTRBJzf06EsLdZXmHaCnBGODekMy7GL0skXB6 kRyg== X-Received: by 10.180.10.200 with SMTP id k8mr25208073wib.5.1438010491249; Mon, 27 Jul 2015 08:21:31 -0700 (PDT) Received: from [192.168.1.105] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id d7sm14200199wij.0.2015.07.27.08.21.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 08:21:30 -0700 (PDT) Message-ID: <55B64C78.4030100@iki.fi> Date: Mon, 27 Jul 2015 18:21:28 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Jeff Janes CC: Alvaro Herrera , pgsql-hackers , Amit Langote Subject: Re: All-zero page in GIN index causes assertion failure References: <55ACADCD.6020206@iki.fi> <55AD0266.4050300@iki.fi> <20150720161124.GR2301@postgresql.org> <55AD58CD.2000607@iki.fi> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.4 (--) 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 On 07/23/2015 07:43 PM, Jeff Janes wrote: > On Mon, Jul 20, 2015 at 1:23 PM, Heikki Linnakangas wrote: > >> I came up with the attached, for GIN and SP-GiST. Instead of WAL-logging >> the page initialization in SP-GiST vacuum, I changed it so that it simply >> leaves the page as all-zeroes, and adds it to the FSM. The code that grabs >> a target page from the FSM handles that, and initializes the page anyway, >> so that was simpler. This made the SP-GiST is-deleted flag obsolete, it's >> no longer set, although the code still checks for it for >> backwards-compatibility. (even that may actually be unnecessary, as a page >> that's marked as deleted must also be empty, and wherever we check for the >> deleted-flag, we also check for PageIsEmpty())) > > This patch, in conjunction with the LWLock deadlock patch, fixes all the > issues I was having with GIN indexes in 9.5. Thanks, I've pushed this, as well a fix to similar failure from B-tree vacuum that Amit Langote reported in the other thread. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers