Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goIb9-0004NF-U8 for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jan 2019 01:54:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goIb8-000073-Md for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jan 2019 01:53:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goIb8-00006b-5R for pgsql-bugs@lists.postgresql.org; Tue, 29 Jan 2019 01:53:58 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goIb5-0004BK-J6 for pgsql-bugs@lists.postgresql.org; Tue, 29 Jan 2019 01:53:56 +0000 Received: by mail-pf1-x444.google.com with SMTP id h3so8912762pfg.1 for ; Mon, 28 Jan 2019 17:53:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MY9lO+6ric9loEZucaE9wTFEBROiE6INBMXPIN6WUTo=; b=Kb8OY0PMMvNR2aUroanxAE49Z+kUCuBLfQU9DYOZW4baXzXVQAxAD7LtPK/JgV6Ku5 jsli9NFEDDP07hiLb5KrJ20Ba2k848+zfkq7XtgGzmBkYuBRdAqc9jJthFaFxjJ0ufTF wMlIdN1Jrs9VJ+Lq0LZIhxQLw9gCKu0rFLo6k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MY9lO+6ric9loEZucaE9wTFEBROiE6INBMXPIN6WUTo=; b=dsPXXnBhQZmGqlWBTu+vDCeEuPVOlQtT6ccUd38uXK/K9ITUWV0QpR/vMVlHXliE6q DZIW2y5sOhZdiuFVF+BhGji6P5JoDYPwLqqCuNcC9zggNM3ecvD3LsR6lXGqeooz7VwT RylFuS5BcH++wCA93fTWqyr4KRyve1VfH1r3tj2MUiV8tJ7f42loi1n6lZ9R9X7XCv6g bkjihbxWpcTsOevIfyDBKE5E0vej6U/E/RPTvhs4wS064kgWfdk9f9yWIEhokrzUwKhW W9/d+UjUUDfd1suvhJPcWB0Y2FVIaB7MBaMjd3oQTuvoKWGSzvipNsR1yfVh9rS68PcS EyFg== X-Gm-Message-State: AJcUukcu0Wm3fgZBuEKn50lUB7IioT0Q404hflVjOtZxPeYPMmsHsm3w gwyc2fevAGkrAPGwUt2p7KrUmg== X-Google-Smtp-Source: ALg8bN71Z+bCITWyCtQldIoGYOp2KS3B71+OoBudphUJ4tt4w23JoQFLcWHknAa1RLx+iJ3HR50VAg== X-Received: by 2002:a63:170c:: with SMTP id x12mr21445492pgl.364.1548726833936; Mon, 28 Jan 2019 17:53:53 -0800 (PST) Received: from rfd.leadboat.com (c-73-158-248-138.hsd1.ca.comcast.net. [73.158.248.138]) by smtp.gmail.com with ESMTPSA id y6sm39704945pfl.187.2019.01.28.17.53.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 17:53:52 -0800 (PST) Date: Mon, 28 Jan 2019 17:53:50 -0800 From: Noah Misch To: Peter Eisentraut Cc: Kyotaro HORIGUCHI , michael@paquier.xyz, andres@anarazel.de, petr.jelinek@2ndquadrant.com, pet.slavov@gmail.com, alvherre@alvh.no-ip.org, petr@2ndquadrant.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15114: logical decoding Segmentation fault Message-ID: <20190129015350.GA4128278@rfd.leadboat.com> References: <20181030230736.GA1632@paquier.xyz> <20181030230931.22pms35u3sqx4i7c@alap3.anarazel.de> <20181031072938.GC7862@paquier.xyz> <20181119.184916.179764314.horiguchi.kyotaro@lab.ntt.co.jp> <56d0ccb4-e9c9-1225-256d-c287adf5494e@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56d0ccb4-e9c9-1225-256d-c287adf5494e@2ndquadrant.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Looks good. I found no functional problems. On Mon, Jan 28, 2019 at 10:32:16PM +0100, Peter Eisentraut wrote: > The fix is to avoid the constant expressions simplification in > RelationGetIndexAttrBitmap(), so that it becomes safe to call in these > contexts. The constant expressions simplification comes from the > calls to RelationGetIndexExpressions()/RelationGetIndexPredicate() via > BuildIndexInfo(). But RelationGetIndexAttrBitmap() calling > BuildIndexInfo() is overkill. The latter just takes pg_index catalog > information, packs it into the IndexInfo structure, which former than > just unpacks again and throws away. s/former than/the former then/