From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | bharath(dot)rupireddyforpostgres(at)gmail(dot)com |
Cc: | nitinjadhavpostgres(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add CHECKPOINT_REQUESTED flag to the log message in LogCheckpointStart() |
Date: | 2022-03-03 00:39:37 |
Message-ID: | 20220303.093937.2132907787383572158.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Wed, 2 Mar 2022 18:18:10 +0530, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote in
> On Wed, Mar 2, 2022 at 5:41 PM Nitin Jadhav
> <nitinjadhavpostgres(at)gmail(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2022-03-03 00:52:16 | Re: PG DOCS - logical replication filtering |
Previous Message | Justin Pryzby | 2022-03-03 00:29:21 | Re: Column Filtering in Logical Replication |