Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etHNv-0003Bu-Vs for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Mar 2018 18:32:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etHNu-00077Q-2R for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Mar 2018 18:32:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etHNt-00077F-KH for pgsql-hackers@lists.postgresql.org; Tue, 06 Mar 2018 18:32:21 +0000 Received: from forward106o.mail.yandex.net ([37.140.190.187]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etHNp-0006Dd-WF for pgsql-hackers@postgresql.org; Tue, 06 Mar 2018 18:32:20 +0000 Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:169]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 2D28C782599; Tue, 6 Mar 2018 21:32:12 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback8g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id X3rav4a9O0-W8mi1oWp; Tue, 06 Mar 2018 21:32:10 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1520361130; bh=+eaeVyv09G7GLUwD+U/ONSm+QgxZIWK9QQhTwLG4VxQ=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date; b=vLBgDYncXuA1GRmqDRSlmk+GjSuc+aX3ppUYNwXbYd6OyU6cWgbbdEXCT8WO4DZdD wfNfINBpaWS4+Pwvm9iWyomvYEpKBpztKqgV1JGaWI41wlVO5JQy58GjfJNmixiG6q cFq4iQvrpTHHqsmcVQr6gTJu8WgYR0szTWCkUMS8= Authentication-Results: mxback8g.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web26o.yandex.ru with HTTP; Tue, 06 Mar 2018 21:32:08 +0300 From: Sergei Kornilov To: Alvaro Herrera Cc: Ildar Musin , Stephen Frost , Robert Haas , Tom Lane , "pgsql-hackers@postgresql.org" In-Reply-To: <20180306172528.xnelm3xcq2qeyd2g@alvherre.pgsql> References: <880511520351578@web5j.yandex.ru> <20180306172528.xnelm3xcq2qeyd2g@alvherre.pgsql> Subject: Re: using index or check in ALTER TABLE SET NOT NULL MIME-Version: 1.0 Message-Id: <1715451520361128@web26o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 06 Mar 2018 21:32:08 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello > You should be able to use an event trigger that raises a message when > table_rewrite is hit, to notify the test driver that a rewrite happens. Here is no table rewrite, only verify. So here EventTriggerTableRewrite is not called. Or i missed something? > ISTM that depending on DEBUG messages is bad because debugging lines > added elsewhere will make your tests fail; I agree and this is reason why i not used DEBUG message in tests as was proposed. I found INFO messages in tests and decided that this was an acceptable option year ago. > and INFO is generally frowned upon (I, for one, would frown upon an INFO message raised by ALTER > TABLE, for sure.) so let's not do that either. In this case we need remove INFO from ALTER TABLE ATTACH PARTITION code and tests. I think is a bad idea of using different rules for same stuff, right? Probably i can do this work too. But it is necessary to decide how the test should look. regards, Sergei