PostgresNode::backup uses spread checkpoint?

Started by Alvaro Herreraalmost 6 years ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t43117
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 27, 2026 at 06:19 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t43117_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t43117_1 && git checkout t43117_1

Patchset v1 (message #1) is on t43117_1

Jump to latest
#1Alvaro Herrera
alvherre@2ndquadrant.com

I noticed a few days ago that method backup() in PostgresNode uses
pg_basebackup without specifying a checkpoint mode -- and the default is
a spread checkpoint, which may cause any tests that use that to take
slightly longer than the bare minimum.

I propose to make it use a fast checkpoint, as per the attached.

--
�lvaro Herrera

Attachments:

t43117_1
tap-fast-chkp.patchtext/x-diff; charset=us-asciiDownload+1-1
#2David Steele
david@pgbackrest.org
In reply to: Alvaro Herrera (#1)
Re: PostgresNode::backup uses spread checkpoint?

On 10/20/20 11:01 AM, Alvaro Herrera wrote:

I noticed a few days ago that method backup() in PostgresNode uses
pg_basebackup without specifying a checkpoint mode -- and the default is
a spread checkpoint, which may cause any tests that use that to take
slightly longer than the bare minimum.

I propose to make it use a fast checkpoint, as per the attached.

+1.

--
-David
david@pgmasters.net

#3Michael Paquier
michael@paquier.xyz
In reply to: David Steele (#2)
Re: PostgresNode::backup uses spread checkpoint?

On Tue, Oct 20, 2020 at 11:13:34AM -0400, David Steele wrote:

On 10/20/20 11:01 AM, Alvaro Herrera wrote:

I noticed a few days ago that method backup() in PostgresNode uses
pg_basebackup without specifying a checkpoint mode -- and the default is
a spread checkpoint, which may cause any tests that use that to take
slightly longer than the bare minimum.

I propose to make it use a fast checkpoint, as per the attached.

+1.

+1.

-   $self->host, '-p', $self->port, '--no-sync');
+   $self->host, '-p', $self->port, '-cfast', '--no-sync');

Some nits: I would recommend to use the long option name, and list
the option name and its value as two separate arguments of the
command.
--
Michael

#4Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#3)
Re: PostgresNode::backup uses spread checkpoint?

On Wed, Oct 21, 2020 at 07:55:18AM +0900, Michael Paquier wrote:

Some nits: I would recommend to use the long option name, and list
the option name and its value as two separate arguments of the
command.

For the archives: this got applied as of 831611b.
--
Michael