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 1kcyRx-0001BU-U7 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Nov 2020 22:18:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcyRQ-00055u-44 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Nov 2020 22:18:12 +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 1kcyRP-00055n-TG for pgsql-hackers@lists.postgresql.org; Wed, 11 Nov 2020 22:18:11 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcyRN-0000dg-M7 for pgsql-hackers@lists.postgresql.org; Wed, 11 Nov 2020 22:18:11 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 06B0BA2E; Wed, 11 Nov 2020 17:18:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 11 Nov 2020 17:18:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=+VZfoyCi61sgxN2YmCZE9v2/qTc 1jOetP/P9gCasFNM=; b=IjcBcb1sr/GPYKbESIduImFLa8THxoKPpA/ErqFTa1d slwm++ZcAJYjeBGCBPsH0Fr//y5aRO4hGPwk9/8qZ7yGN/sVgv9XJuyL+43aYN1B 2aGyl6p3JlaX3qGDgyp1PcoWaXHBTWDhu16B/mfoPAPKpAiIVnowA0UOoWKEH1L0 P9PDU7es+XlUmzeIAv+YQL0Qp55qbkG8HPYnem9gGejmgubH+ES16x8uWu18Qfh7 Ir2zOq/GYgGtTAerve7XY5l9SYixcg91UXMHXmuut5FAk8WFdb81xQ1EYUypleZy yEm39fCI4JANNzPgrgPv55RFuoTc3yFy1F4uWbjP/QA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; bh=+VZfoy Ci61sgxN2YmCZE9v2/qTc1jOetP/P9gCasFNM=; b=MaI+TFiUx/nbdIxB9XQ96u OWenzHL4tzpklaYYgpN3r54hUT5q7wdSA7JoLgrAHKitBJA8Q/cnasOtZ7vLVORS ElKJWXQhdnbdg423xI2bwM4WHXWsZNhhs3p5V8xYKhUW4I9l1Q4o9G2uqYk/Dg3k ocFH7YzPp70F9s8TBDWgkjS9Nn862BH78xN7WUIUoltxmwQTbSDPtit3s7O5G0xh lJZ+K8LuQHZL/o+xePz4hMaebYRZ8EGsO3bZAJ9nK+oD43I+IUsrkckCRLSVbgP7 mLqhwKvJaNv+h5eNapM9ojpTLUBu39Zfo4tw24MLif/joFzZxePo6gu9jUL4591A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvtddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghn rghrrgiivghlrdguvgeqnecuggftrfgrthhtvghrnhepudekhfekleeugeevteehleffff ejgeelueduleeffeeutdelffeujeffhfeuffdunecukfhppeeijedrudeitddrvddujedr vdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id B34F4328005E; Wed, 11 Nov 2020 17:18:05 -0500 (EST) Date: Wed, 11 Nov 2020 14:18:04 -0800 From: Andres Freund To: Kyotaro Horiguchi Cc: sfrost@snowman.net, osumi.takamichi@fujitsu.com, masao.fujii@oss.nttdata.com, ashutosh.bapat.oss@gmail.com, tsunakawa.takay@fujitsu.com, pgsql-hackers@lists.postgresql.org Subject: Re: In-placre persistance change of a relation Message-ID: <20201111221804.cs3kbhypjmui2aiy@alap3.anarazel.de> References: <20201111.173317.460890039962481381.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201111.173317.460890039962481381.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I suggest outlining what you are trying to achieve here. Starting a new thread and expecting people to dig through another thread to infer what you are actually trying to achive isn't great. FWIW, I'm *extremely* doubtful it's worth adding features that depend on a PGC_POSTMASTER wal_level=minimal being used. Which this does, a far as I understand. If somebody added support for dynamically adapting wal_level (e.g. wal_level=auto, that increases wal_level to replica/logical depending on the presence of replication slots), it'd perhaps be different. On 2020-11-11 17:33:17 +0900, Kyotaro Horiguchi wrote: > FWIW this is a revised version of the PoC, which has some known > problems. > > - Flipping of Buffer persistence is not WAL-logged nor even be able to > be safely roll-backed. (It might be better to drop buffers). That's obviously a no-go. I think you might be able to address this if you accept that the command cannot be run in a transaction (like CONCURRENTLY). Then you can first do the catalog changes, change the persistence level, and commit. Greetings, Andres Freund