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 1qA16U-00011k-TC for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2023 04:30:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qA16T-0003ev-Kq for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2023 04:30:29 +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 1qA16T-0003dA-B9 for pgsql-hackers@lists.postgresql.org; Fri, 16 Jun 2023 04:30:29 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qA16Q-002hCT-S4 for pgsql-hackers@lists.postgresql.org; Fri, 16 Jun 2023 04:30:28 +0000 Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6b2d356530eso264484a34.0 for ; Thu, 15 Jun 2023 21:30:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686889825; x=1689481825; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=ysz1Gr9/VWy4+mBI8yU0Ygf18g9hcWauEVDdND86d94=; b=OMARpDuvnynDremVri/786JB7CQb2F+UoHkoc+dg7PO2RIUI4wh8GuDBdztXBjpgFV cOncy9dsvKfOfqz1wLsvAVUYcm7/UduZQvq/NzXQCqKdJVLVzBecgCj1sP0CV8qNCCTg GeFlr1tT7cTC5uwQVkxINUZ1IkenNMhHoP6M7Dk38x+Cm9t7Itb/1xC7yWAZ7R5wDwrT USJ78PSKE3rC2LnCx2lSURYmkTtsXm9MuGFQ5icRYFV8q/mVOZ6+d0anZZGpAOO8SzQU Rx4eM11PHVeygq2gCfe3IVXY2CdKzqmUIlOWLqlHY79WWLCt6fqWpFL9bC5n1JvzeMhb 1rgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686889825; x=1689481825; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ysz1Gr9/VWy4+mBI8yU0Ygf18g9hcWauEVDdND86d94=; b=lzuycPu5GYqGK1x4eptTADa+OrK1hSN9KLkXhJVxkAlrOqllrEdKqtY7PQJRYgiCds 19mU5yVZBxZmmEb/OKsKWLMauSR+UfCQRPIgTllgT1NMJMdcyV9gz8dCApTkcWWY1bcX e5ZhYZydoPTRNccvbMB4rAyiv/5p5tsBqe0XxoAbAekyLwIPxNhlZ82Gwa72RUTd7N96 Jovr8bW5Wn9jhSe2o8kl2oNBLY4tfS+FTXm25EZmmtx9EYFTYiaaOV9JNxuFd4ux7Kk1 q77G3EJN8C+ekMqjhYsAjOM10RQ9Tr1DEqob0Z62zReSh9Ll1W86m8zmUpIXFxNSFR9j mdig== X-Gm-Message-State: AC+VfDygXK5XGUex5UmEahhOLiIM3vZIvWXZJcRbK54cUIu7ItqMyP9R tFbWTGBjuYt0Viwt+P/VChM= X-Google-Smtp-Source: ACHHUZ5bkJlldmuifOYMP51x2SaeUZCwqHbon0muov4yA7kTLsAHUySKYe8k4MZsjlSr4q/QYxp00w== X-Received: by 2002:a05:6808:1288:b0:39c:4588:3c0 with SMTP id a8-20020a056808128800b0039c458803c0mr1210361oiw.22.1686889824903; Thu, 15 Jun 2023 21:30:24 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id d2-20020a631d02000000b0054fd46531a1sm3777351pgd.5.2023.06.15.21.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 21:30:24 -0700 (PDT) Date: Fri, 16 Jun 2023 13:30:21 +0900 (JST) Message-Id: <20230616.133021.167594806623150998.horikyota.ntt@gmail.com> To: michael@paquier.xyz Cc: bharath.rupireddyforpostgres@gmail.com, alvherre@alvh.no-ip.org, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org Subject: Re: Add a perl function in Cluster.pm to generate WAL From: Kyotaro Horiguchi In-Reply-To: References: <20230615.134015.1421242753635015365.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for the comments. At Fri, 16 Jun 2023 11:30:15 +0900, Michael Paquier wrote in > > -$node_primary->safe_psql( > > - 'postgres', "create table retain_test(a int); > > - select pg_switch_wal(); > > - insert into retain_test values(1); > > - checkpoint;"); > > +$node_primary->advance_wal(1); > > +$node_primary->safe_psql('postgres', "checkpoint;"); > > > > The original test generated some WAL after the segment switch, which > > appears to be a significant characteristics of the test. > > Still it does not matter for this specific case? The logical slot has > been already invalidated, so we don't care much about logical changes > in WAL, do we? The change itself doesn't seem to matter, but it seems intended to let checkpoint trigger the removal of the last segment. However, I'm unsure how the insert would influence this that way. If my understanding is correct, then I'd support its removal. regards. -- Kyotaro Horiguchi NTT Open Source Software Center