Re: Improve documentation for pg_upgrade, standbys and rsync

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Improve documentation for pg_upgrade, standbys and rsync
Date: 2021-07-16 05:46:31
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs pgsql-hackers

On Wed, 2021-05-19 at 10:31 -0400, Stephen Frost wrote:
> * Laurenz Albe (laurenz(dot)albe(at)cybertec(dot)at) wrote:
> > I revently tried to upgrade a standby following the documentation,
> > but I found it hard to understand, and it took me several tries to
> > get it right. This is of course owing to my lack of expertise with
> > rsync, but I think the documentation and examples could be clearer.
> >
> > I think it would be a good idea to recommend the --relative option
> > of rsync.
> An additional thing that we should really be mentioning is to tell
> people to go in and TRUNCATE all of their UNLOGGED tables before going
> through this process, otherwise the rsync will end up spending a bunch
> of time copying the files for UNLOGGED relations which you really don't
> want.

I have thought about that some more, and I am not certain that we should
unconditionally recommend that. Perhaps the pain of rebuilding the
unlogged table on the primary would be worse than rsyncing it to the

The documentation already mentions

"Unfortunately, rsync needlessly copies files associated with temporary
and unlogged tables because these files don't normally exist on standby

I'd say that is good enough, and people can draw their conclusions from

Attached is a new patch with an added reminder to create "standby.signal",
as mentioned in [1].

Laurenz Albe


Attachment Content-Type Size
0001-Improve-doc-for-pg_upgrade-and-standby-servers.V2.patch text/x-patch 3.8 KB

In response to


Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2021-07-16 09:44:22 user-defined function in Perl or Tcl ???
Previous Message Laurenz Albe 2021-07-16 05:19:48 Re: No mention of standby.signal in pg_ugprade docs

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-07-16 05:49:53 Re: row filtering for logical replication
Previous Message Vladimir Sitnikov 2021-07-16 05:44:06 Re: speed up verifying UTF-8