Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZxWG-0003Yk-5I for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Aug 2016 09:52:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bZxWE-0005Nv-PB for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Aug 2016 09:52:18 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bZxWE-0005No-4o for pgsql-hackers@postgresql.org; Wed, 17 Aug 2016 09:52:18 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZxWA-0003JY-II for pgsql-hackers@postgresql.org; Wed, 17 Aug 2016 09:52:17 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 123A921C02DC; Wed, 17 Aug 2016 12:52:13 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from mail.postgrespro.ru ([127.0.0.1]) by localhost (mail.postgrespro.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XLEW1xNg8ioq; Wed, 17 Aug 2016 12:52:13 +0300 (MSK) Received: from e733 (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id DFD8621C028E; Wed, 17 Aug 2016 12:52:12 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1471427532; bh=JFYLr7dOjgPwb77W01ihkdn031ccemsfaGrxLalz2/4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Jzx/eucKNdV39Pv1lu10HUqauYJcH8PhfAFCxYGvlrHpQraqrEWwcWTbpu2+zcOgr NFx00+q7y/93iI7dimnePlUEkjXNsQ8aqjgdZI0dcuRqIWE/NyO9wJJo0pBQBZrCss A1Wrs7NtCB3M7I2biiANJxR9LiDrhSnqXkj08oEo= Date: Wed, 17 Aug 2016 12:50:59 +0300 From: Aleksander Alekseev To: Robert Haas Cc: PostgreSQL Hackers Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables) Message-ID: <20160817125059.0fb42420@e733> In-Reply-To: References: <20160801124531.66cde374@fujitsu> <26c3bc60-6613-e7ab-517a-53136f01fb6c@2ndquadrant.com> <13191.1470072250@sss.pgh.pa.us> <20160804151451.6fb87507@fujitsu> <14212.1470595566@sss.pgh.pa.us> <20160815005755.gswdyjfob7dzw4yp@alap3.anarazel.de> <20319.1471223097@sss.pgh.pa.us> <20160815010852.5ijua2wm2edzimd4@alap3.anarazel.de> <20160815121216.46bd758d@e733> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.5 (--) 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 > That doesn't really solve the problem, because OTHER backends won't be > able to see them. So, if I create a fast temporary table in one > session that depends on a permanent object, some other session can > drop the permanent object. If there were REAL catalog entries, that > wouldn't work, because the other session would see the dependency. > This is a good point. However current implementation doesn't allow to do that. There is a related bug though, a minor one. In session 1: ``` CREATE TABLE cities2 (name text, population float, altitude int); CREATE FAST TEMPORARY TABLE capitals2 (state char(2)) INHERITS (cities2); ``` In session 2: ``` DROP TABLE cities2; ERROR: cache lookup failed for relation 16401 ``` Instead of "cache lookup failed" probably a better error message should be displayed. Something like "cannot drop table cities2 because other objects depend on it". I will send a corrected patch shortly. Everything else seems to work as expected. If you discover any other bugs please let me know! -- Best regards, Aleksander Alekseev -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers