Обсуждение: async replication code
Greetings,
I am new here. Apologetic question: how can i search the archives of this mailing list? Is there some set of magic words to put in Google? Must I wade through 20 pages of hits? Should I download all the archives and grep? :)
--
Main question: I want to understand very precisely the exact algirithm used in PG to do asynchronous streaming replication. Eg, I want to know how the record is written and flushed to the socket and how that happens in time w.r.t WAL-to-disk and response to client. Will someone please give me a head start as to where to begin my code-spelunking?
--
> On 16 Mar 2016, at 15:52, otheus uibk <otheus.uibk@gmail.com> wrote: > > Greetings, Hi > > I am new here. Apologetic question: how can i search the archives of this mailing list? Is there some set of magic wordsto put in Google? Must I wade through 20 pages of hits? Should I download all the archives and grep? :) > http://www.postgresql.org/list/ https://wiki.postgresql.org/wiki/Mailing_Lists > Main question: I want to understand very precisely the exact algirithm used in PG to do asynchronous streaming replication.Eg, I want to know how the record is written and flushed to the socket and how that happens in time w.r.t WAL-to-diskand response to client. Will someone please give me a head start as to where to begin my code-spelunking? > WAL synced to disc, then everything else is happening. http://www.postgresql.org/docs/9.5/static/warm-standby.html#STREAMING-REPLICATION --- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company
I will ask again: where in the code is the asynchronous replication code? The docs are not detailed/exact enough.
> Main question: I want to understand very precisely the exact algirithm used in PG to do asynchronous streaming replication. Eg, I want to know how the record is written and flushed to the socket and how that happens in time w.r.t WAL-to-disk and response to client. Will someone please give me a head start as to where to begin my code-spelunking?
>
WAL synced to disc, then everything else is happening.
http://www.postgresql.org/docs/9.5/static/warm-standby.html#STREAMING-REPLICATION
---
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
--
On Wed, Mar 16, 2016 at 8:30 PM, otheus uibk <otheus.uibk@gmail.com> wrote:
I will ask again: where in the code is the asynchronous replication code? The docs are not detailed/exact enough.
> Look for WalSndWakeupRequest() in xlog.c, which expands to a call to
> WalSndWakeup in walsender.c which sets latches (= a mechanism for
> waking processes) on all walsenders, and see the WaitLatchOrSocket
> calls in walsender.c which wait for that to happen.
> WalSndWakeup in walsender.c which sets latches (= a mechanism for
> waking processes) on all walsenders, and see the WaitLatchOrSocket
> calls in walsender.c which wait for that to happen.