Re: Some questions about mammoth replication - Mailing list pgsql-hackers

From Alexey Klyukin
Subject Re: Some questions about mammoth replication
Date
Msg-id 20071011152538.GA14942@commandprompt.com
Whole thread Raw
In response to Some questions about mammoth replication  (Hannu Krosing <hannu@skype.net>)
Responses Re: Some questions about mammoth replication
Re: Some questions about mammoth replication
Re: Some questions about mammoth replication
List pgsql-hackers
Hello,

Hannu Krosing wrote:
> 
> Here come my questions :
> 
> >From looking at http://www.commandprompt.com/images/MR_components.jpg it
> seems that you don't do replication just from WAL logs, but also collect
> some extra info inside postgreSQL server. Is this so ?
>
> If it is, then in what way does it differ from simple trigger-based
> change logging ?

We have hooks in executor calling our own collecting functions, so we
don't need the trigger machinery to launch replication.

> Do you make use of snapshot data, to make sure, what parts of WAL log
> are worth migrating to slaves , or do you just apply everything in WAL
> in separate transactions and abort if you find out that original
> transaction aborted ?

We check if a data transaction is recorded in WAL before sending
it to a slave. For an aborted transaction we just discard all data collected 
from that transaction.

> 
> Are your slaves a) standby b) read-only or c) read-write ?

Replicated relations are read-only on slaves.

> 
> Do you extract / generate full sql DML queries from data in WAL logs, or
> do you apply the changes at some lower level ?

We replicate the binary data along with a command type. Only the data
necessary to replay the command on a slave are replicated.

> 
> For what use cases do you think your WAL-based approach is better than
> Slony/Skytools trigger-based one ?

A pure trigger based approach can only replicate data for the commands
which fire triggers. AFAIK Slony is unable to replicate TRUNCATE
command (I don't know if Skytools can). Replicator doesn't have this
limitation.

Regards,
-- 
Alexey Klyukin                         http://www.commandprompt.com/
The PostgreSQL Company - Command Prompt, Inc.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Plan invalidation vs temp sequences
Next
From: Andreas Pflug
Date:
Subject: Re: Some questions about mammoth replication