Re: pg_basebackup --wal-method=fetch

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup --wal-method=fetch
Date: 2024-02-08 22:06:57
Message-ID: CANzqJaADTqhZXGZ8gxTj_0SdQ85rowLnuXHA6FKs19ir28x_3w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 8, 2024 at 4:41 PM Stephen Frost <sfrost(at)snowman(dot)net> wrote:

> Greetings,
>
> * Ron Johnson (ronljohnsonjr(at)gmail(dot)com) wrote:
> > On Thu, Feb 8, 2024 at 12:48 PM Magnus Hagander <magnus(at)hagander(dot)net>
> wrote:
> > > On Thu, Feb 8, 2024, 17:05 Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
> wrote:
> > >> (PG 14, if it matters.)
> > >>
> > >> What's the purpose of fetch mode, as opposed to streaming mode? Is
> it a
> > >> legacy of bygone days that just hasn't been deprecated, or is there
> > >> something I don't understand from reading
> > >> https://www.postgresql.org/docs/14/app-pgbasebackup.html?
> > >
> > > Your backup can go to a single file with it, which it can't do in
> > > streaming. Which means it can also be sent through a pipe.
> >
> > But isn't the whole purpose of pg_basebackup (running it on Node B, when
> > the database instance is Node A)?
>
> Something seems missing from this question?
>

The word "streaming".
Should be "But isn't streaming the whole purpose of pg_basebackup"?

> Being able to send through a pipe might allow someone to send directly
> to a tape device or to a Bacula system or similar.
>

Yeah, ok.

I use PgBackRest, though, and can't imagine single-threading any
reasonably-sized database. In fact, one of the tasks on my mental TODO
list is to research how to use PgBackRest to initialize a replica instance
prior to starting Streaming Replication.

> > It also needs one connection instead of two to the server, if that's
> > > limited.
> >
> > It's 2024, not 2011. Who can't spare an extra connection?
>
> Changing max_wal_senders requires a database-wide restart, so..
>

To not have some wiggle room is poor planning

> Not sure where you're going with this though. Are you arguing that
> fetch mode should be removed?

No. Just curious about its use cases.

> If so, why? If that's not the angle,
> then what is? Would you suggest some better documentation of the
> option? I'm sure a proposal to improve the docs would be welcome, if
> there's something confusing about them and this option.
>

A hint as to the use-case for the non-default "streaming" option would be
enlightening.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2024-02-08 22:21:19 Re: DDL - TYPES
Previous Message Stephen Frost 2024-02-08 21:41:19 Re: pg_basebackup --wal-method=fetch