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 1nPZVS-00080c-VI for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2022 00:39:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nPZVR-0008K8-7s for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Mar 2022 00:39:45 +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 1nPZVQ-0008J8-TD for pgsql-hackers@lists.postgresql.org; Thu, 03 Mar 2022 00:39:44 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nPZVO-0007vX-Oy for pgsql-hackers@lists.postgresql.org; Thu, 03 Mar 2022 00:39:44 +0000 Received: by mail-pl1-x62e.google.com with SMTP id s1so3044454plg.12 for ; Wed, 02 Mar 2022 16:39:42 -0800 (PST) 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=cz5It2dzSmXKa2W2e7O81IyzS9cS7VKnXqfGe7NyQNU=; b=Z5jFD17rl8WG17aHRxz531zn5OBnZ7vupJXvJmigLFCX/5Apy2O1Hxo61geY6bvfDb nVbl3hDx+e1PXCm3Vqw1KVk8UenvogOHultkgHLJ2svZXn1d8LwmQ7RbTZF9jkIafpAZ yz5V3CS+wEd+pMGwHdxI5xyj0LIECh/N1dFmthZuOMl67vEBMBYHNzMRfuMeUwa8dqJy EqRSkcHssaaGbf1jXasbavzf9bRxJyFuOfosmsGE/p4RRGlAnQhtJ3hdgbV5+1JEafuB Zlr+ySUkYbz1CBySMuxTPsQSbhTtBkMvwtNeio9rEpgsvdrr928rduvz2Z8jIEkQFmmh nEpA== 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=cz5It2dzSmXKa2W2e7O81IyzS9cS7VKnXqfGe7NyQNU=; b=dvLBiRzBKbSYIGR9TuNttPGQKd/M0+vEJhojZ4TH6KG460RkgE3wumVW5cQPo4IqrC xWKFethgeyPfqE2YKqjuozJu4XqZD4GcKO84kXLrVKhLANyMwWkLpe4/9uXEXNi5PKcz vujjWHUQi4i1PYN9u1ZGbFmvFY4f4xihRZte9vOkp0eEsjIdwnmtrdHbT8cfXpnq/u/8 kPbfWE/FTqD5t5jBWjqAF+7jXT1Dca95GKfqwJm/YUG9hJZ/HDoTh+UyCJTtwj05yN67 D4mbEVAurGt4BFS2fwLgVKSrm1z0q9rsh+qFBzdACyYbym683VrpyCmjh1X8eF3zDKTp j3Nw== X-Gm-Message-State: AOAM531eGpMtwGc2hnHY+4ZUfuRMLtYKKyxYBTngNnZs2RFeP0IMSC3E CFGJ6aEr9mGRyuuO2GE6GJY= X-Google-Smtp-Source: ABdhPJz+JKk4nQ3nS1kLld90zgxTq9b4IALOFbTLcz3cbOg0IsEdHRM49VCR+pU74AUGfPsVcawTNA== X-Received: by 2002:a17:903:187:b0:14f:d741:a390 with SMTP id z7-20020a170903018700b0014fd741a390mr33939136plg.45.1646267980557; Wed, 02 Mar 2022 16:39:40 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id nk11-20020a17090b194b00b001beed2f1046sm4051432pjb.28.2022.03.02.16.39.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Mar 2022 16:39:39 -0800 (PST) Date: Thu, 03 Mar 2022 09:39:37 +0900 (JST) Message-Id: <20220303.093937.2132907787383572158.horikyota.ntt@gmail.com> To: bharath.rupireddyforpostgres@gmail.com Cc: nitinjadhavpostgres@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Add CHECKPOINT_REQUESTED flag to the log message in LogCheckpointStart() From: Kyotaro Horiguchi In-Reply-To: References: User-Agent: Mew version 6.8 on Emacs 26.1 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 At Wed, 2 Mar 2022 18:18:10 +0530, Bharath Rupireddy wrote in > On Wed, Mar 2, 2022 at 5:41 PM Nitin Jadhav > wrote: > > > > Hi, > > > > I have noticed that the CHECKPOINT_REQUESTED flag information is not > > present in the log message of LogCheckpointStart() function. I would > > like to understand if it was missed or left intentionally. The log > > message describes all the possible checkpoint flags except > > CHECKPOINT_REQUESTED flag. I feel we should support this. Thoughts? > > I don't think that's useful. Being in LogCheckpointStart > (CreateCheckPoint or CreateRestartPoint) itself means that somebody > has requested a checkpoint. Having CHECKPOINT_REQUESTED doesn't add > any value. Agreed. > I would suggest removing the CHECKPOINT_REQUESTED flag as it's not > being used anywhere instead CheckpointerShmem->ckpt_flags is used as > an indication of the checkpoint requested in CheckpointerMain [1]. If Actually no one does but RequestCheckpoint() accepts 0 as flags. Checkpointer would be a bit more complex without CHECKPOINT_REQUESTED. I don't think it does us any good to get rid of the flag value. > others don't agree to remove as it doesn't cause any harm, then, I > would add something like this for more readability: if (((volatile CheckpointerShmemStruct *) - CheckpointerShmem)->ckpt_flags) + CheckpointerShmem)->ckpt_flags) & CHECKPOINT_REQUESTED)) I don't particularly object to this, but I don't think that change makes the code significantly easier to read either. regards. -- Kyotaro Horiguchi NTT Open Source Software Center