Re: Make use of assign_checkpoint_completion_target() to calculate CheckPointSegments correctly

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Make use of assign_checkpoint_completion_target() to calculate CheckPointSegments correctly
Date: 2023-01-17 07:01:29
Message-ID: Y8ZHyQWmYMAsDcQ1@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 26, 2022 at 06:12:34PM +0530, Bharath Rupireddy wrote:
> It looks like assign_checkpoint_completion_target() is defined [1],
> but never used, because of which CheckPointSegments may miss to
> account for changed checkpoint_completion_target. I'm attaching a tiny
> patch to fix this.
>
> Thoughts?

Oops. It looks like you are right here. This would impact the
calculation of CheckPointSegments on reload when
checkpoint_completion_target is updated. This is wrong since we've
switched to max_wal_size as of 88e9823, so this had better be
backpatched all the way down.

Thoughts?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-01-17 07:05:19 Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Previous Message Masahiko Sawada 2023-01-17 06:46:14 Re: Perform streaming logical transactions by background workers and parallel apply