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 1gV87o-0006Rn-Fw for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Dec 2018 04:52:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gV87l-0008Jk-JZ for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Dec 2018 04:52:25 +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 1gV87l-00085u-3v for pgsql-hackers@lists.postgresql.org; Fri, 07 Dec 2018 04:52:25 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gV87e-0006L7-SD for pgsql-hackers@postgresql.org; Fri, 07 Dec 2018 04:52:23 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E97E521D0820; Fri, 7 Dec 2018 07:52:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.0.103] (unknown [5.79.143.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 9275B21D053C; Fri, 7 Dec 2018 07:52:15 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1544158335; bh=bCTSEg1SzpxVoAwnzwDikc3hmCzBhv7BKW/uVtpHt9k=; h=From:Subject:To:Cc:References:Date:In-Reply-To; b=dwJSVQhWy0ez6/f2IYtfpIoU4KYRvVCjOLtbWnZSTFcKWTZMNjh76/jE/NnJnSBb3 /ufAEMbBRpcWU0W4UWbf/PI0tZ1zTSDHuZySv2qQ6Qe0erSTe4UYBPbu5MR3wMCf2j 5AlrAPpD/oJqU7ap1f9ZvYuvMalFNQS6moacaw4s= From: Andrey Lepikhov Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages) To: Peter Geoghegan Cc: Peter Eisentraut , Alvaro Herrera , PostgreSQL Hackers References: <0a89eb40-ea89-9037-aad0-3b65c67cdcbd@postgrespro.ru> <65ced322-84d2-777a-2fac-5f482c175431@postgrespro.ru> Organization: Postgres Professional Message-ID: <3294d285-d3b3-e159-b3f7-6c2d1b059956@postgrespro.ru> Date: Fri, 7 Dec 2018 09:52:12 +0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 06.12.2018 11:52, Peter Geoghegan wrote: > On Wed, Dec 5, 2018 at 10:35 PM Andrey Lepikhov > wrote: >> This solution changes pg_depend relation for solve a problem, which >> exists only in regression tests. Very rarely it can be in the >> partitioning cases. Or is it not? > > I don't think it's a matter of how rarely this will happen. We're > trying to avoid these diagnostic message changes because they are > wrong. I don't think that there is much ambiguity about that. Still, > it will happen however often the user drops objects belonging to > partition children, which could be quite often. I want to say that we need to localize the rules for the order of the diagnostic messages as much as possible in dependency.c. > >> I think this decision is some excessive. >> May be you consider another approach: >> 1. Order of dependencies in 'DROP ... CASCADE' case is a problem of test >> tools, not DBMS. And here we can use 'verbose terse'. >> 2. Print all dependencies in findDependentObjects() on a drop error (see >> attachment as a prototype). > > You didn't include changes to the regression test output, which seems > like a big oversight... It was done knowingly to show the differences in messages that introduces this approach. > messages that are represented in the regression tests. Anyway, I don't > think it's acceptable to change the messages like this. It makes them > much less useful. May you clarify this? If I understand correctly, your solution is that user receives a report about the last inserted internal dependency on the object. Why the full info about internal dependencies of the object much less useful? > > These stability issue keeps coming up, which makes a comprehensive > approach seem attractive to me. At least 95% of the test instability > comes from pg_depend. > During the retail index tuple deletion project (heap cleaner subsystem) we have non-fixed order of tuples at database relations. This caused to unsteady order of text strings in some check-world test results. Thus, I realized that the order of messages in the test results is mostly a game of chance. For this reason I think it is necessary to find more general solution of the messages ordering problem. -- Andrey Lepikhov Postgres Professional https://postgrespro.com The Russian Postgres Company