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 1o9Mp0-0006Rc-1y for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jul 2022 08:25:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o9Moy-0001jg-Tp for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jul 2022 08:25:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9Mox-0001jW-M3 for pgsql-hackers@lists.postgresql.org; Thu, 07 Jul 2022 08:25:12 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o9Mor-0002Pn-Ly for pgsql-hackers@lists.postgresql.org; Thu, 07 Jul 2022 08:25:10 +0000 Received: by mail-pg1-x52b.google.com with SMTP id g4so17195196pgc.1 for ; Thu, 07 Jul 2022 01:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=84P/vTZi0SzhZ3091EG88WFrDsMn+0AEFmWG0+L8CBA=; b=Y5zc40H0E9gM+0wjsm628g9kKiPxz7sSYixZG67rdal+KXYRsQTGshDwtk1cP/Ndzs 0qr5JSAH4q/qi6UcZss9gRK2Ucp3SidYwjLGwcYQRABIp75tdKGpifgw8zjrEKTwYyhY Hx9gOJHRDZ9KPytWmc2w2iE4jAZRepEmthAchgwabdKc1sEeSGxVRQy144bHH5qcR1/j LkU3/RZz1jTGxR0lC/SvPMJi4r/Y6XS9rR1phpoBTPGwOd+Uwthadma9t4hAttg3tXbZ oOWzeuXBb30rsRJOV9yJHCBIPjDI5dQhfqP1zKRziAu5t94ZBlcgefflzQcpgvpSVnpA IKqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=84P/vTZi0SzhZ3091EG88WFrDsMn+0AEFmWG0+L8CBA=; b=REkrQ+YWCljr8e27/SrdmNMmMwRsdjJoditrA5B2+JKmgfO6xGwGnTe2jDSl148nCO Zmq9y24kXGmy0tTfwaWfWMe5bSVk5eLTBLf9LN5NxLB/s4oKgwr+Ownl0W4vMVnbF2/n FQc9B/eDF4FJFFetuKA8zqoPO3268dd0BdxYv7YdlnVpvyBFE2hFXse5ebyn7j2+4BZc mbwabFyL5OhVXiDnh3jjWuBd5uqZMqX0KFCsuk4Jm2niUz63FbdGjIzvI0LlXjd9EfQc 2wIZkog24hN3paEe4pop/ML2qS/zSy8FivMYcbiiOOZVLsc/K4NQk0ughHcm+AMYWBWq e0Ug== X-Gm-Message-State: AJIora/CSkjnIvpS1kN8RQJq0damxWtGC9Mt8jZZOVyeoH0oCGaf0TVM cxJcMiP4l9kf+nCRVFgH37E= X-Google-Smtp-Source: AGRyM1uwJodni/QvWYWCx56wqR3uYDktXp07fZxYP8Kq4BCGJUdDvc66ygY2sZnL33RNxrmsMrpPLw== X-Received: by 2002:a17:902:c40a:b0:16c:408:57d6 with SMTP id k10-20020a170902c40a00b0016c040857d6mr7086066plk.157.1657182304471; Thu, 07 Jul 2022 01:25:04 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id k4-20020a170902c40400b0016be9d498d0sm3453422plk.211.2022.07.07.01.25.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Jul 2022 01:25:02 -0700 (PDT) Date: Thu, 07 Jul 2022 17:24:59 +0900 (JST) Message-Id: <20220707.172459.952222721156028881.horikyota.ntt@gmail.com> To: jchampion@timescale.com Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, rjuju123@gmail.com, jakub.wartak@tomtom.com, pgsql-hackers@lists.postgresql.org Subject: Re: In-placre persistance change of a relation From: Kyotaro Horiguchi In-Reply-To: References: <20220331.183318.1550548268473692904.horikyota.ntt@gmail.com> <20220331.183634.1085010436469743640.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Jul__7_17_24_59_2022_451)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Thu_Jul__7_17_24_59_2022_451)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit At Wed, 6 Jul 2022 08:44:18 -0700, Jacob Champion wrote in > On Thu, Mar 31, 2022 at 2:36 AM Kyotaro Horiguchi > wrote: > > > > At Thu, 31 Mar 2022 18:33:18 +0900 (JST), Kyotaro Horiguchi wrote in > > > I don't think this can be commited to 15. So I post the fixed version > > > then move this to the next CF. > > > > Then done. Thanks! > > Hello! This patchset will need to be rebased over latest -- looks like > b74e94dc27f (Rethink PROCSIGNAL_BARRIER_SMGRRELEASE) and 5c279a6d350 > (Custom WAL Resource Managers) are interfering. Thank you for checking that! It got a wider attack by b0a55e4329 (RelFileNumber). The commit message suggests "relfilenode" as files should be replaced with "relation storage/file" so I did that in ResetUnloggedRelationsInDbspaceDir. This patch said that: > * INIT forks are never loaded to shared buffer so no point in > * dropping buffers for such files. But actually some *buildempty() functions use ReadBufferExtended() for INIT_FORK. So that's wrong. So, I did that but... I don't like that. Or I don't like that some AMs leave buffers for INIT fork after. But I feel I'm misunderstanding here since I don't understand how the INIT fork can work as expected after a crash that happens before the next checkpoint flushes the buffers. regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Thu_Jul__7_17_24_59_2022_451)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="v22-0001-In-place-table-persistence-change.patch"