Re: [HACKERS] async replication code

2016-03-19 Thread otheus uibk
On Wed, Mar 16, 2016 at 8:30 PM, otheus uibk  wrote:

> I will ask again: where in the code is the asynchronous replication code?
> The docs are not detailed/exact enough.
>
>
Nevermind. Thomas Munro answered my question in the General list. Quoting:

> 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.


-- 
Otheus
otheus.u...@gmail.com
otheus.shell...@uibk.ac.at


Re: [HACKERS] async replication code

2016-03-19 Thread otheus uibk
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
>
>
-- 
Otheus
otheus.u...@gmail.com
otheus.shell...@uibk.ac.at


Re: [HACKERS] async replication code

2016-03-19 Thread Stas Kelvich

> On 16 Mar 2016, at 15:52, otheus uibk  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 words to 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-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



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers