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 1gcbMV-0003QI-12 for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Dec 2018 19:30:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gcbMT-0007bO-E2 for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Dec 2018 19:30:29 +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 1gcbMS-0007bC-Vp for pgsql-hackers@lists.postgresql.org; Thu, 27 Dec 2018 19:30:29 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcbMP-0004wY-JA for pgsql-hackers@lists.postgresql.org; Thu, 27 Dec 2018 19:30:27 +0000 Received: by mail-qk1-x744.google.com with SMTP id 189so11376826qkj.8 for ; Thu, 27 Dec 2018 11:30:25 -0800 (PST) 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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=XuLV8apaIg1m7vywYI+Byho6jK5mRZFhjao2/z1QBU4=; b=czCy3G1Asw5lUjkaEoThFOYoikS66ODDlG+2FxjF4jGPouDLLp7wXIx3uM5znA7Nr3 t/EptAjWHNDQcAh4igRVUXwUkC8OTOeHmSVQCM+WmPp/9sgycdGQ3NCN8B8r/LDOFyRL PQ0QuBr0XB1snw5PxHyv73eR0E+rl6EPSnGx9hOluspphmrU5hTB5nAtRBINlTrDlZKn Cx86fyt98KRIGxIKLICLc7EXwobOzC+RQYtOWXfWdWUhExIAfDN4njmQt25UrP9S/ZC1 tbT4vdpYNIi75KVkPrfuWIepAmtAeSr9KIx7I+dKI8kCVDRb4oJ7oAu4hc2rjKt1jHMu vIyQ== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=XuLV8apaIg1m7vywYI+Byho6jK5mRZFhjao2/z1QBU4=; b=Ytqi66NQu78j7v0eQjfq9koCDgW32cUdAFld1/kdjum2snkCbN+STTDonsU51BHEDg AMjIa9GZndUhYKhLz79eJre1HH7gj8T04ojn4qkH9DQAO6pwejljfcDeYbXrFEbCd6VZ Hv50VnyWc86hSkH3pgfyBJkq87ha9GCvaQEz06lTH94dj60Y2sPw5DsDWfCPUOsG17i7 hFAu6EiJzEJxeesRUBNNg3tLUpJSotvJjRtCAAXZG+Lp6qkvzoVMwgsXTkF+UqLXT0Xm tgMIe5SQ2BaKQQJIFKTOvjVHyqadGaTYriQHpiavgereWoXOXQPEgMlSZVvtlhEXoStb SQig== X-Gm-Message-State: AJcUukei9yCnYVLdrbMvpw46pnjP2P4s1L5LaEWy7OKy4noOb2N+MN1P RIubKEuQFriLoiPEmqwLPmaSqkYeQGloJA== X-Google-Smtp-Source: ALg8bN6q68krncB235ai+GUjLJfRdfHthkL0+6bJfAlmsSQ0NWF9Cfy/YAup/FnKV9A98hN7jZh7vg== X-Received: by 2002:a37:2950:: with SMTP id p77mr22717000qkh.275.1545939024764; Thu, 27 Dec 2018 11:30:24 -0800 (PST) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id x49sm19467247qta.89.2018.12.27.11.30.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Dec 2018 11:30:23 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 569979A8; Thu, 27 Dec 2018 16:30:21 -0300 (-03) Date: Thu, 27 Dec 2018 16:30:21 -0300 From: Alvaro Herrera To: Michael Paquier Cc: "Tsunakawa, Takayuki" , Tom Lane , Robert Haas , PostgreSQL Hackers Subject: Re: removal of dangling temp tables Message-ID: <201812271930.5d5xmm7pr6f3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181227043257.GJ2106@paquier.xyz> User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Dec-27, Michael Paquier wrote: > On Wed, Dec 26, 2018 at 08:51:56PM -0300, Alvaro Herrera wrote: > > Having been victim of ABI incompatibility myself, I loathe giving too > > much priority to other issues that can be resolved in other ways, so I > > don't necessarily support your view on bugs. > > That said, I think in this case it shouldn't be a problem, so I'm going > > to work on that next. > > And it is even better if bugs can be fixed, even partially without any > ABI breakages. Anyway, not breaking the ABI of PGPROC is why 246a6c8 > has not been back-patched to begin with, because we have no idea how > PGPROC is being used and because its interface is public, so if the > intent is to apply 246a6c8 to v10 and down this gets a -1 from me. We allow structs to receive new members at the end of the struct, since this doesn't affect the offset of existing members; thus code already compiled with the previous struct definition does not break. AFAICS there is no danger in backpatching that, moving that struct member at the end of the struct. > Back-patching what you sent in > https://www.postgresql.org/message-id/20181226190834.wsk2wzott5yzrjiq@alvherre.pgsql > is fine for me. Done. > + snprintf(namespaceName, sizeof(namespaceName), "pg_temp_%d", > + MyBackendId); > + namespaceId = get_namespace_oid(namespaceName, true); > > So this is the reverse engineering of GetTempNamespaceBackendId(). > Perhaps a dedicated API in namespace.c would be interesting to have? Since this code doesn't appear in branches 11 and later, I'm not sure creating such an API has any value. > I would recommend to keep the changes for DISCARD and autovacuum into > separate commits. Yeah, done like that. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services