Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKPVs-0000bJ-HG for pgsql-general@arkaria.postgresql.org; Sun, 29 Aug 2021 18:26:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mKPVr-00043R-GO for pgsql-general@arkaria.postgresql.org; Sun, 29 Aug 2021 18:26:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKPVq-00043I-BE for pgsql-general@lists.postgresql.org; Sun, 29 Aug 2021 18:26:35 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKPVl-0005Kk-D2 for pgsql-general@lists.postgresql.org; Sun, 29 Aug 2021 18:26:33 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 861845C0055; Sun, 29 Aug 2021 14:26:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 29 Aug 2021 14:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=P YUu/UErmgQKpk3QMon0DC0hNkZNSjdgIpQtOagAxCU=; b=a98swuBf1dtnSlz1+ rZnW9mLGRWPoWptCA239EjAs/svfp8ObIQA1ab8cYk5Qz7ZqJHcDH4Iqsu14z3G7 kBoYLo7aX2FX8k9heqm9N3oySXOlsZ3q4op9RqzeeC/Nix3vvz+/Mdl7MeiEHlRs oHVu9WfTlMWUyJEzTZU4yZNGLbu5KiS0KbPsMfDvmt6ILvYWcVgRu9d7JnchNYpe 6H1bIgfu1/NdAlptPmoeRwQXwibPeXPNe3v+9o3Okbc2Tpnp6aW8jRA1y+FtlXyf J0A4qxwvFQAoK/TScKcXZtUeOakNrRlJ8cjB08T/Og7WiiFSzv102vIORUqLGOTV XNk8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=PYUu/UErmgQKpk3QMon0DC0hNkZNSjdgIpQtOagAx CU=; b=pkYHnLykMX1VszCQgGMUU42AHqG1fJ7z4V8kcw8zPUiUZKA0SrRBZjXF7 4iBBPM4TvmzTX9kNYAsL4GK2h1v3944HjEk26NcPLroV/n3TTo8ytoUon6M90UoO FtHj4LlZ6g1DpxLvr3T52utaB2HfAcPpXhsa2pWXJSdj2PIyWX2QN+4fVHnr+ALS UfxW5uVmy5bmz9E70DR1MvLssbSF5rHsB5SMxd9nYPpElPhMr3DNeX4uap/hq5Mt gYmweJhTxMwTTjnhDi92+6HI3gPPlufAouYF3DOVb0WGTFgVIZS4ZIPPdbpQm5LQ kwGxAhlbMJr8q7VLkBmkFfQ9mdSCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddujedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffh hfekvdduveegvdejudefgfevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Aug 2021 14:26:26 -0400 (EDT) Subject: Re: database design with temporary tables To: Mladen Gogala , pgsql-general@lists.postgresql.org References: <0e9373c9-565c-5edb-5c71-b3ea40be9473@aklaver.com> From: Adrian Klaver Message-ID: Date: Sun, 29 Aug 2021 11:26:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 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: Archived-At: Precedence: bulk On 8/29/21 10:41 AM, Mladen Gogala wrote: > > On 8/29/21 12:24 PM, Adrian Klaver wrote: >> Presumably not. Temporary tables only live at most for the length of a >> session. It would be a really bad idea to hold sessions open for 24 >> hours. That is assuming nothing else causes the session to drop and >> the data to be lost. > > Well, that's precisely how application servers work. The allocate > connection pool and keep them open for a very long time. The pool is maintained, the individual connections(sessions) come and go. Otherwise there would be no point to having a pool. Every time the connection(session) is closed the temporary table disappears. -- Adrian Klaver adrian.klaver@aklaver.com