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 1iXp5Q-0006ue-H7 for pgsql-general@arkaria.postgresql.org; Thu, 21 Nov 2019 16:13:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXp5P-0003ue-0c for pgsql-general@arkaria.postgresql.org; Thu, 21 Nov 2019 16:13:39 +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 1iXp5O-0003tv-Fg for pgsql-general@lists.postgresql.org; Thu, 21 Nov 2019 16:13:38 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iXp5L-00052h-8E for pgsql-general@lists.postgresql.org; Thu, 21 Nov 2019 16:13:37 +0000 Received: by mail-wm1-x342.google.com with SMTP id y5so4353337wmi.5 for ; Thu, 21 Nov 2019 08:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=E7elKt3dafMNDpGfmvPcXzD+meKi3w66LYBDS9es0Rc=; b=2IhMIomQ7g0Tthx51EexIVpDw/Ob+qBIiISKCV2ZDWVnQKKNmIkL59t1pcolxRFkj7 uOBt2AmGb6VIXS0JBhUrX5We9Nlob9TQlVzlYM18j7AU+wNLpNKNsoacnEGZXhyup9Fk yo7eyNZK+XwCeeV03F8F6fgeI0FzaxevWvcsMo4hedshKJulyeU22fQanUqUCiaqQgfJ lBSJScCuLjfFWTtAOgmpXNylTiOqz9gGNFBlmqZyW4MlCQpfBqyB1O9KI3TfaOKYASIz F2xzVtU0l19inhIzff0wTF9UcWJU/dGQnjF35USX53bLeRx2LFad3GwuSHOrF0b14rle jbYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=E7elKt3dafMNDpGfmvPcXzD+meKi3w66LYBDS9es0Rc=; b=dNdLsOao2Q6hCE3eWFIXRJnBpuFSZzPfUuxznaVMlLQ8UUTxr5v+2OIHrsZWBq201Z +X64WgXCj8I0rBW7EFw69dvQQQEkKe7ToXNrY6tfYkr+h3f7K/euo7PKs8JmuOb99Xyj iGLRiR4zaTNBdDG5AmEQJxMiM4Y/WzqzLQw5KQegvD9wYHPNMfq6damH8qpm0SMvjgaG y4R2w3RSEj2Z+tjGoWembbsju0dByecPHvlG3GLBva7S/s7oYiogyqjkgMrJRykKqxBW NMp1ZOfGP4nFBcRtnyXFnVmt4ybMZYWzLbXbQ/h95JLmXypmrca1+JDGrphqPEbovWwD 6p8A== X-Gm-Message-State: APjAAAUX5jR35SiyOGAGijLaEDedeiIekCIzoZ1Ca1esIh3ldQcqTg3t ANgxfF0yqj70jZ56yD22iVddEQ== X-Google-Smtp-Source: APXvYqymlepVSr/3QefaQDe9WqMqz7DYUtfaR+fBTsP8otLKjgI0ubad064fwAkIzDpd5ySQ1/ASWw== X-Received: by 2002:a05:600c:1088:: with SMTP id e8mr11319886wmd.7.1574352812814; Thu, 21 Nov 2019 08:13:32 -0800 (PST) Received: from localhost.localdomain (217-149-171-82.nat.highway.telekom.at. [217.149.171.82]) by smtp.gmail.com with ESMTPSA id l4sm138424wme.4.2019.11.21.08.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 08:13:32 -0800 (PST) Message-ID: Subject: Re: ON COMMIT options for non temporary tables From: Laurenz Albe To: P V Tekawade , pgsql-general@lists.postgresql.org Date: Thu, 21 Nov 2019 17:13:31 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 2019-11-21 at 21:23 +0530, P V Tekawade wrote: > For my work with Postgres 11.5, I needed functionality that unlogged tables > are automatically dropped at the commit time, but I found that ON COMMIT > option is only supported with temporary table. > I would like to understand reasons why this option is limited to temporary tables? > Is there any problem by making this option available for other type of tables > such as unlogged tables? How should that work for tables other than temporary tables? Should COMMIT lock if somebody else accesses the table? What keeps you from explicitly dropping the table right before you commit? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com