Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched) - Mailing list pgsql-performance

From Fabio Pardi
Subject Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)
Date
Msg-id b07e8a66-b122-8f41-03b3-6d2fc236f3e7@portavita.eu
Whole thread Raw
In response to Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)  (Bruce Momjian <bruce@momjian.us>)
Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)  (Stephen Frost <sfrost@snowman.net>)
List 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



pgsql-performance by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched)
Next
From: Fabio Pardi
Date:
Subject: wal_log_hints benchmarks