Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YqlWC-0004vw-31 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2015 16:52:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YqlWB-00015a-3a for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2015 16:52:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YqlW9-00015T-TU for pgsql-hackers@postgresql.org; Fri, 08 May 2015 16:52:54 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YqlW6-0001St-TS for pgsql-hackers@postgresql.org; Fri, 08 May 2015 16:52:52 +0000 Received: from intern.anarazel.de (unknown [184.23.178.130]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 2751F860001; Fri, 8 May 2015 18:52:49 +0200 (CEST) Date: Fri, 8 May 2015 18:52:46 +0200 From: Andres Freund To: Tom Lane Cc: Peter Geoghegan , hlinnaka , Jeff Janes , Stephen Frost , Dean Rasheed , Bruce Momjian , Pg Hackers Subject: Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0 Message-ID: <20150508165246.GO12950@alap3.anarazel.de> References: <20150508150340.GJ12950@alap3.anarazel.de> <9096.1431102730@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9096.1431102730@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) 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 2015-05-08 12:32:10 -0400, Tom Lane wrote: > Andres Freund writes: > > So I've committed the patch yesterday evening. I'm pretty sure there'll > > be some more minor things to change. But overall I feel good about the > > current state. > > Looks like there's a CLOBBER_CACHE_ALWAYS issue ... > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguarundi&dt=2015-05-08%2011%3A52%3A00 Hm. I can't immediately think of anything CCA relevant in the patch. I do wonder if it's possible that this is a consequence of indcheckxmin. The unique index is created just before the failing statement, after the table has had a couple updates. And the following statement succeeds. Currently index inferrence ignores indexes that aren't yet valid according to checkxmin. I'm tempted to think that is a mistake. I think we should throw an error instead; possbily at execution rather than plan time. It'll be rather confusing for users if a INSERT ... ON CONFLICT fails shortly after an index creation, but not later. Not that an error message will make them happy, but it'll be much less confusing. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers