Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)
От
Julien Rouhaud
Тема
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)
Дата
Msg-id
20220225070352.fhfwnl5ksfsa4eew@jrouhaud
Ответ на
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) (Nitin Jadhav)
Список
Дерево обсуждения
Report checkpoint progress in server logs Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress in server logs Magnus Hagander <magnus@hagander.net>
Re: Report checkpoint progress in server logs Tom Lane <tgl@sss.pgh.pa.us>
Re: Report checkpoint progress in server logs SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Re: Report checkpoint progress in server logs Michael Paquier <michael@paquier.xyz>
Re: Report checkpoint progress in server logs Bruce Momjian <bruce@momjian.us>
Re: Report checkpoint progress in server logs Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Ashutosh Sharma <ashu.coek88@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Justin Pryzby <pryzby@telsasoft.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Ashutosh Sharma <ashu.coek88@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Ashutosh Sharma <ashu.coek88@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Ashutosh Sharma <ashu.coek88@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Size of pg_rewrite (Was: Report checkpoint progress with pg_stat_progress_checkpoint) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Size of pg_rewrite (Was: Report checkpoint progress with pg_stat_progress_checkpoint) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) vignesh C <vignesh21@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Robert Haas <robertmhaas@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Robert Haas <robertmhaas@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Robert Haas <robertmhaas@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Andres Freund <andres@anarazel.de>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Tom Lane <tgl@sss.pgh.pa.us>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Robert Haas <robertmhaas@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Michael Paquier <michael@paquier.xyz>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Ashutosh Sharma <ashu.coek88@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Julien Rouhaud <rjuju123@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Matthias van de Meent <boekewurm+postgres@gmail.com>
Hi,
On Fri, Feb 25, 2022 at 12:23:27AM +0530, Nitin Jadhav wrote:
> > I think the change to ImmediateCheckpointRequested() makes no sense.
> > Before this patch, that function merely inquires whether there's an
> > immediate checkpoint queued. After this patch, it ... changes a
> > progress-reporting flag? I think it would make more sense to make the
> > progress-report flag change in whatever is the place that *requests* an
> > immediate checkpoint rather than here.
> >
> > > diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
> > > +ImmediateCheckpointRequested(int flags)
> > > if (cps->ckpt_flags & CHECKPOINT_IMMEDIATE)
> > > + {
> > > + updated_flags |= CHECKPOINT_IMMEDIATE;
> >
> > I don't think that these changes are expected behaviour. Under in this
> > condition; the currently running checkpoint is still not 'immediate',
> > but it is going to hurry up for a new, actually immediate checkpoint.
> > Those are different kinds of checkpoint handling; and I don't think
> > you should modify the reported flags to show that we're going to do
> > stuff faster than usual. Maybe maintiain a seperate 'upcoming
> > checkpoint flags' field instead?
>
> Thank you Alvaro and Matthias for your views. I understand your point
> of not updating the progress-report flag here as it just checks
> whether the CHECKPOINT_IMMEDIATE is set or not and takes an action
> based on that but it doesn't change the checkpoint flags. I will
> modify the code but I am a bit confused here. As per Alvaro, we need
> to make the progress-report flag change in whatever is the place that
> *requests* an immediate checkpoint. I feel this gives information
> about the upcoming checkpoint not the current one. So updating here
> provides wrong details in the view. The flags available during
> CreateCheckPoint() will remain same for the entire checkpoint
> operation and we should show the same information in the view till it
> completes.
I'm not sure what Matthias meant, but as far as I know there's no fundamental
difference between checkpoint with and without the CHECKPOINT_IMMEDIATE flag,
and there's also no scheduling for multiple checkpoints.
Yes, the flags will remain the same but checkpoint.c will test both the passed
flags and the shmem flags to see whether a delay should be added or not, which
is the only difference in checkpoint processing for this flag. See the call to
ImmediateCheckpointRequested() which will look at the value in shmem:
/*
* Perform the usual duties and take a nap, unless we're behind schedule,
* in which case we just try to catch up as quickly as possible.
*/
if (!(flags & CHECKPOINT_IMMEDIATE) &&
!ShutdownRequestPending &&
!ImmediateCheckpointRequested() &&
IsCheckpointOnSchedule(progress))
[...]
В списке pgsql-hackers по дате отправления
От: Kyotaro Horiguchi
Дата: