Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)

From: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)
Date: 2019-06-14 13:12:29
Message-ID: b07e8a66-b122-8f41-03b3-6d2fc236f3e7@portavita.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

Hi Bruce,

On 6/14/19 5:30 AM, Bruce Momjian wrote:

>> Also, I do not think it best practice (or perhaps not correct at all) to
>> use '--size-only'
>
> --size-only is correct, as far as I know.
>

Maybe I am missing something, but I am of the opinion that --size-only
should not be used when syncing database content (and probably in many
other use cases where content can change over time).

The reason is that db allocates blocks, 8K by default regardless from
the content.

Using --size-only, tells rsync to only check the size of the blocks.
That is: if the block is present on the destination, and is the same
size as the origin, then skip.

I understand that in this thread we are contextualizing in a step by
step procedure to create a new standby, but I have anyway a few remarks
about it (and the documentation where it has been copied from) and I
would be glad if you or somebody else could shed some light on it.

*) It might happen in some corner cases that when syncing the standby,
rsync dies and the DBA does not realize it. It will then start the
master and some data gets modified. At the time the DBA realizes the
issue on the standby, he will stop master and resume the sync.
Changes happened on the master will then not be propagated to the
standby if they happened on files already present on the standby.

*) It might be a long shot because I do not have time now to reproduce
the situation of the standby at that exact point in time, but I think
that --size-only option is there probably to speed up operations. In
that case I do not see a reason for it since the data folder on the
standby is assumed to be empty

regards,

fabio pardi

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2019-06-14 14:39:40 Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)
Previous Message Bruce Momjian 2019-06-14 03:30:01 Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)

Browse pgsql-performance by date

  From Date Subject
Next Message Fabio Pardi 2019-06-14 13:46:30 wal_log_hints benchmarks
Previous Message Bruce Momjian 2019-06-14 03:30:01 Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)