Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TjgTt-0003qb-KI for pgsql-bugs@arkaria.postgresql.org; Sat, 15 Dec 2012 01:23:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TjgTs-0007JD-2f for pgsql-bugs@arkaria.postgresql.org; Sat, 15 Dec 2012 01:23:56 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TjgTq-0007J5-4m for pgsql-bugs@postgresql.org; Sat, 15 Dec 2012 01:23:54 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TjgTo-0005Wg-B2 for pgsql-bugs@postgresql.org; Sat, 15 Dec 2012 01:23:52 +0000 Received: by mail-pb0-f46.google.com with SMTP id wy7so2766359pbc.19 for ; Fri, 14 Dec 2012 17:23:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding :x-gm-message-state; bh=ZQ34+UCxZJRjoXjfBUt4563c4R7QQwiPlyXcJkpIPRg=; b=jFnEpeOt4bQNO+vF+CJwPWhUcpNZytlqvG701I/hPyfywcCy6S+pWXM0Nb1MyHDA/U rCpLTfgHG+tqduFoNI6KSBWg1hw15grmOSU4kaduavDqsZmKeG+2uN/a3yYgD2FCDIuM x+5pA9dam8spA/tsrI27XrnyBbx6KMkNZiaTT9+FddIIGXJwkKIwlUmgJbchyGHQ+8gc 73alqFDCS8nEaPBy36lGsnHlrDy7aV8IIPx65hDxQMcezOK8jhpYhHeosRcg4GIXrtLo JLk/XDXpnGLi725UyGVSL8C/svQ6YxLkUAd29Dv8gxtftM9QaTgRmzcSJVEV7hfq6qlN HhgQ== Received: by 10.68.143.41 with SMTP id sb9mr20863965pbb.50.1355534630278; Fri, 14 Dec 2012 17:23:50 -0800 (PST) Received: from ?IPv6:::1? ([2600:3c01::f03c:91ff:fe93:2ae4]) by mx.google.com with ESMTPS id gl9sm3797048pbc.51.2012.12.14.17.23.48 (version=SSLv3 cipher=OTHER); Fri, 14 Dec 2012 17:23:49 -0800 (PST) Subject: Re: Bug with temporary child of a permanent table after recovery From: Jeff Davis To: Tom Lane Cc: Robert Haas , Heikki Linnakangas , Pg Bugs In-Reply-To: <8740.1355525814@sss.pgh.pa.us> References: <50CB1455.3080002@vmware.com> <2959.1355507033@sss.pgh.pa.us> <8740.1355525814@sss.pgh.pa.us> Content-Type: text/plain; charset="ISO-8859-1" Date: Fri, 14 Dec 2012 17:23:45 -0800 Message-ID: <1355534626.32384.6.camel@sussancws0025> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmJx4EcIa0X3bQOcUs8Walrw2N0bke/Dr1IjvP/TJzpWV1ub/54eqlf0zI8NFG+vmQyADqH X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, 2012-12-14 at 17:56 -0500, Tom Lane wrote: > Perhaps a better idea is to not overload rd_backend to serve both > the "physical name of file" purpose and the "is it my temp table" > purpose. We could add an additional relcache field with the > three possible states "not temp, my temp, somebody else's temp" > and make sure that the third state gets selected when there's > a chance collision like this. Or resurrect the old rd_istemp and > rd_islocaltemp flags. > > Thoughts? Rather than bring back that flag, can we just use isTempOrToastNamespace within RELATION_IS_OTHER_TEMP? #define RELATION_IS_OTHER_TEMP(relation) \ ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP \ && !isTempOrToastNamespace((relation)->rd_rel->relnamespace)) (I haven't analyzed the above code very carefully; it's just for illustration purposes). Regards, Jeff Davis -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs