| From: | Emre Hasegeli <emre(at)hasegeli(dot)com> |
|---|---|
| To: | Stephen Frost <sfrost(at)snowman(dot)net> |
| Cc: | Sergei Kornilov <sk(at)zsrv(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "berge(at)trivini(dot)no" <berge(at)trivini(dot)no>, Gürkan Gür <ben(at)gurkan(dot)in>, Raimund Schlichtiger <raimund(dot)schlichtiger(at)innogames(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Bernhard Schrader <bernhard(dot)schrader(at)innogames(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Vik Fearing <vik(at)2ndquadrant(dot)fr> |
| Subject: | Re: Standby trying "restore_command" before local WAL |
| Date: | 2018-08-01 11:14:38 |
| Message-ID: | CAE2gYzwny7jzB+xqdY=3o8EJnK16ycF8Jy2x+83EX7d6DYBr=g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> There's still a question here, at least from my perspective, as to which
> is actually going to be faster to perform recovery based off of. A good
> restore command, which pre-fetches the WAL in parallel and gets it local
> and on the same filesystem, meaning that the restore_command only has to
> execute essentially a 'mv' and return back to PG for the next WAL file,
> is really rather fast, compared to streaming that same data over the
> network with a single TCP connection to the primary. Of course, there's
> a lot of variables there and it depends on the network speed between the
> various pieces, but I've certainly had cases where a replica catches up
> much faster using restore command than streaming from the primary.
Trying "restore_command" before streaming replication is totally fine.
It is not likely that the same WAL would be on both places anyway.
My problem is trying "restore_command" before the local WAL. I
understand the historic reason of this design, but I don't think it is
expected behavior to anybody who is using "restore_command" together
with streaming replication.
Of course speeding up "restore_command" is a good thing to do
independently. Thank you for working on this.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fabien COELHO | 2018-08-01 11:36:09 | Re: Doc patch: add RECURSIVE to bookindex |
| Previous Message | Andrey Borodin | 2018-08-01 11:06:44 | Re: [Patch] Checksums for SLRU files |