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 1gjTQX-0008M8-BI for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Jan 2019 18:27:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjTQW-0005mg-0l for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Jan 2019 18:27:04 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjTQ3-0002h2-3y for pgsql-bugs@lists.postgresql.org; Tue, 15 Jan 2019 18:26:35 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjTQ0-00031c-FR for pgsql-bugs@lists.postgresql.org; Tue, 15 Jan 2019 18:26:34 +0000 Received: by mail-qk1-x742.google.com with SMTP id 68so2132182qke.9 for ; Tue, 15 Jan 2019 10:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=hjhRyoYY2R6IxpP+oUWrzRTIUvGidlvqOg8vBx0oSL0=; b=epdm92ZHJdMAxy+03V3X3aEOAjljp2WWeO2t6ooYNEorJm/f1UcpzgZV2VHwseRjgb 2hjpLqw9B1+QS1QXLKg/+LgeltPk/Myv0rR8+iVFsoxGCeujUfu/9luRVJ1W/UWpT50o +yjimYKt8YOAoOObgUfstx3wn1QtEorF58c5cID/m3xE3NBWqNxbbVYFIzKKpCorQ+ID LyGaVJCm6r3sK92PJrskosSG/5P4fsVx3zNk4uu4Fu2M9dc11pXxyIdOT3hj3heY91Py ZhU5IBS9Xm2v9VGo2A2UurZIh0mR1vy5luNlHq8qoTa5eWOd3S48+2MGSEDRTZTIPS1E aL2Q== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hjhRyoYY2R6IxpP+oUWrzRTIUvGidlvqOg8vBx0oSL0=; b=K86fRFTAsGIAYYr/dL/cg2nmiMabGrwMq+zaXYcTX+IaKPxsfF1SZAsdrQmK5jS/B3 7+2sHR4SzDB8DKM+9RbEe+q65uZ9I1JYdmTkdgH8cW2PWX42bhy95YDoPYHyD1EFZjI+ i+U0szsv7wFXDhrYUus0CI4FMW5xnFHSSFa++9wnDof09sDMu3HdUDs6o7COby2bKBOc I7zs9gMNFCqi/lPnABiltCHbNadaevK5yKO23xIaGz6N1rRId0Bh4fqgbQGOWE0XUJ8x UpCkm5tQJV8HpfAvCc26eq595VE1FcPp2ZSRh84Kg3LSOACZ3x4gUv72ZFRhTgrmityI lfdg== X-Gm-Message-State: AJcUukdnKvqDJk0Gv4Qvs7B1/GmuRjPjyPa90RXjKOT2sVuBSHl1U0t3 VsqaNlQI2xgjenimYGn7xxrj/f3FtITpA8xNjmhJcE21FCiqS81oxJ6zKH8CFXkrh/TslIaTlHT OWEvmN5OcrnDppVrxYCiX3m9DjP/UgvMIP0Y0WpOgyGyG9loZcFq6X+3AlkFWhvH+L8LssmXAjx Gm3VL8JVX8jA== X-Google-Smtp-Source: ALg8bN7DfP4/Z269fzigVfkGi/r8XAzdnTTpJdWdAaE1MuD2+66zSGQHJICjP0yNZNWi9UbhLfel1g== X-Received: by 2002:a37:9841:: with SMTP id a62mr3753404qke.348.1547576790729; Tue, 15 Jan 2019 10:26:30 -0800 (PST) Received: from alvin.alvh.no-ip.org ([201.186.80.67]) by smtp.gmail.com with ESMTPSA id d58sm54146178qtb.84.2019.01.15.10.26.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jan 2019 10:26:30 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 6683AC41; Tue, 15 Jan 2019 15:26:28 -0300 (-03) Date: Tue, 15 Jan 2019 15:26:28 -0300 From: Alvaro Herrera To: Tom Lane Cc: jesper.pedersen@redhat.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT Message-ID: <201901151826.bdqajmm7p3jk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3055.1547142109@sss.pgh.pa.us> User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jan-10, Tom Lane wrote: > > On 2019-Jan-10, PG Bug reporting form wrote: > >> ALTER TABLE ONLY t1 ADD CONSTRAINT uniq_t1_i1_i2 UNIQUE (i1, i2); > >> [ leads to ] > >> Indexes: > >> "uniq_t1_i1_i2" UNIQUE CONSTRAINT, btree (i1, i2) INVALID > I concur that the code is operating as designed. I think however that > there's a user-experience problem here, which is that INVALID suggests > that something's broken. I wonder if we could improve matters by > making psql and the docs describe this state of a partitioned index > as INCOMPLETE. Hmm, yeah, I can see how that can be confusing. Not sure of the difficulty of a fix ... I'll have a think about it. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services