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 1htddY-0001xQ-DD for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 19:54:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1htddX-0004eJ-7r for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 19:54:47 +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 1htddW-0004Wq-Ro for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2019 19:54:46 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htddU-0002Ih-3v for pgsql-hackers@postgresql.org; Fri, 02 Aug 2019 19:54:46 +0000 Received: by mail-wm1-x343.google.com with SMTP id l2so67355112wmg.0 for ; Fri, 02 Aug 2019 12:54:43 -0700 (PDT) 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xPjYmSd5fFMAQm3jzVXufUiXjxL1T8f0okAHcMqrTh8=; b=Hy1d09UqgKiq8+QTaMmmsqHzl4zBXDrbhH4Cz7sVO3w7Vih9JsuUDzDFScoWv/TNiK XW0b9DHWkgvzcg1u2Z1XG1QA/hkdC8sJ9CZp8hzYHHT3OKh3RODhkmCudtSedLbeAVTm hESJ+0fDDew6pPsxe/hnO41viiQlc/s6EdFOTgQOfsVq3wLnX0WO9zGgzH0rUwVGez16 4g6GtJUBVRsX4KAGIn6ZZ9+BNXkzZ90GLmnNW6Kfs39pnHsE/EFdLAlt1VUoiWawuT7q PpI1F8dT7TCFH9pHitbJ4WxT8ILTdgH0R8K0j4YOFlptYWAzZUcMvsYfuSd6W6Tc7VX7 3ulA== 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=xPjYmSd5fFMAQm3jzVXufUiXjxL1T8f0okAHcMqrTh8=; b=q5LPHa5vetF1sh4D2jbaXKFwhHXyrnzJDh/uUTTRGcHQcZ8SVneW9dnvfGTr+sO2XC WVzV2cdGrevbwRurI7kVVS9Us0SuEwoqAG+dlBh/VGrmR7e1sh2xADJ57oQ3jZHNkvJk CjdXjJkWVn3N15WGutDOM0Xx6MRlO/5PvGocizPUEsuZjcXSyOz5474orL1U8YKR7CkJ mlk5i4jpuVtnYoqdBY7iS3szJw395bajCQEpKTHxFsPSyko17gfi0RdEaqjydWmT+Urq exVaymzUM9fFV/jn1K5BcPrpXijTMXp8MaDAUoB93G3ngqZmMX75kY0ILQY4bGJLWgAU ARZQ== X-Gm-Message-State: APjAAAUyFdAXUR39LOlIScc4INqTSMn9LJV/k81s7G/5w/exIBoxc7XF 6qZ04grfLf1gxBftg+9C2vFnnA== X-Google-Smtp-Source: APXvYqz64Ux1wAV/e6jvi0yaUtaVEn/GbPI5ptTz91YDfms+1z/WykJWFeHwl0MQXUilqrwscWFxWg== X-Received: by 2002:a1c:5f55:: with SMTP id t82mr5531944wmb.111.1564775681212; Fri, 02 Aug 2019 12:54:41 -0700 (PDT) Received: from localhost (ip-86-49-253-160.net.upcbroadband.cz. [86.49.253.160]) by smtp.gmail.com with ESMTPSA id w24sm58777104wmc.30.2019.08.02.12.54.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 12:54:40 -0700 (PDT) Date: Fri, 2 Aug 2019 21:54:38 +0200 From: Tomas Vondra To: David Rowley Cc: Sergei Kornilov , Tom Lane , Andres Freund , Robert Haas , David Steele , PostgreSQL mailing lists , Alvaro Herrera , Stephen Frost , Ildar Musin Subject: Re: using index or check in ALTER TABLE SET NOT NULL Message-ID: <20190802195438.4vuotpz6pdq6r6jg@development> References: <20190501162021.q7r5cys6uwdb5bsp@alap3.anarazel.de> <25570.1556728681@sss.pgh.pa.us> <20481181556734692@sas2-80c42a3bfdfe.qloud-c.yandex.net> <19795.1556759294@sss.pgh.pa.us> <10303161560180908@sas1-fb8a605c4548.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Jun 12, 2019 at 08:34:57AM +1200, David Rowley wrote: >On Tue, 11 Jun 2019 at 03:35, Sergei Kornilov wrote: >> > Does anyone think we shouldn't change the INFO message in ATTACH >> > PARTITION to a DEBUG1 in PG12? >> >> Seems no one wants to vote against this change. > >I'm concerned about two things: > >1. The patch reduces the test coverage of ATTACH PARTITION. We now >have no way to ensure the constraint was used to validate the rows in >the partition. >2. We're inconsistent with what we do for SET NOT NULL and ATTACH >PARTITION. We raise an INFO message when we use a constraint for >ATTACH PARTITION and only a DEBUG1 for SET NOT NULL. > >Unfortunately, my two concerns conflict with each other. > We're getting close to beta3/rc1, and this thread was idle for ~1 month. I think there's a consensus to change INFO to DEBUG1 in pg12, and then maybe imlpement something like VERBOSE mode in the future. Objections? As for the reduction of test coverage, can't we deduce whether a constraint was used from data in pg_stats or something like that? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services