Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: rjuju123(at)gmail(dot)com
Cc: bharath(dot)rupireddyforpostgres(at)gmail(dot)com, sergey(dot)dudoladov(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, tomas(dot)vondra(at)enterprisedb(dot)com
Subject: Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?
Date: 2022-01-31 02:10:45
Message-ID: 20220131.111045.233166739136974829.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Sat, 29 Jan 2022 00:10:19 +0800, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote in
> On Fri, Jan 28, 2022 at 08:21:52PM +0530, Bharath Rupireddy wrote:
> > > Also, you still didn't fix the possible flag upgrade issue.
>
> Unless I'm missing something that's an issue that you still haven't addressed
> or explained why it's not a problem?

As Bharath said, pg_upgreade reads a part of old cluster's controldata
that is needed to check compatibility so I agree that we don't have
flag upgrade issue I mentioned.

> > > Why are you defining CHECKPOINT_KIND_TEXT_LENGTH twice? You
> > > should just define it in some sensible header used by both files, or better
> > > have a new function to take care of that rather than having the code
> > > duplicated.
> >
> > Yeah, added the macro in pg_control.h. I also wanted to have a common
> > function to get checkpoint kind text and place it in
> > controldata_utils.c, but it doesn't have xlog.h included, so no
> > checkpoint flags there, hence I refrained from the common function
> > idea.
>
> That's a bit annoying, I'm not sure what's best to do here.

I misunderstood that the size is restricted to 8k but it is really 512
bytes as Andres pointed. So we don't add it at least as a text. This
means pg_controldata need to translate the flags into human-readable
text but, to be clear, I still don't think its usefull in the control
data.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2022-01-31 02:12:26 RE: row filtering for logical replication
Previous Message houzj.fnst@fujitsu.com 2022-01-31 01:57:33 RE: row filtering for logical replication