Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached)
От | md@rpzdesign.com |
---|---|
Тема | Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached) |
Дата | |
Msg-id | 505DF745.6080408@rpzdesign.com обсуждение исходный текст |
Ответ на | Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached) (Andres Freund <andres@2ndquadrant.com>) |
Список | pgsql-hackers |
Andres, nice job on the writeup.<br /><br /> I think one aspect you are missing is that there must be some way for the multi-mastersto <br /> re-stabilize their data sets and quantify any data loss. You cannot do this without<br /> some replicationintelligence in each row of each table so that no matter how disastrous<br /> the hardware/internet failure inthe cloud, the system can HEAL itself and keep going, no human beings involved.<br /><br /> I am laying down a standarddesign pattern of columns for each row:<br /><br /> MKEY - Primary key guaranteed unique across ALL nodes in theCLOUD with NODE information IN THE KEY. (A876543 vs B876543 or whatever)(network link UP or DOWN)<br /> CSTP - createtime stamp on unix time stamp<br /> USTP - last update time stamp based on unix time stamp<br /> UNODE - Node thatupdated this record<br /><br /> Many applications already need the above information, might as well standardize it soexternal replication logic processing can self heal.<br /><br /> Postgresql tables have optional 32 bit int OIDs, you maywant consider having a replication version of the ROID, replication object ID and then externalize the primary<br /> keygeneration into a loadable UDF.<br /><br /> Of course, ALL the nodes must be in contact with each other not allowing signficantdrift on their clocks while operating. (NTP is a starter)<br /><br /> I just do not know of any other way to addself healing without the above information, regardless of whether you hold up transactions for synchronous <br /> or letthem pass thru asynch. Regardless if you are getting your replication data from the WAL stream or thru the client libraries.<br/><br /> Also, your replication model does not really discuss busted link replication operations, where is theintelligence for that in the operation diagram?<br /><br /> Everytime you package up replication into the core, someonehas to tear into that pile to add some extra functionality, so definitely think<br /> about providing sensible hooksfor that extra bit of customization to override the base function.<br /><br /> Cheers,<br /><br /> marco<br /><br />On 9/22/2012 11:00 AM, Andres Freund wrote:<br /><blockquote cite="mid:201209221900.53190.andres@2ndquadrant.com" type="cite"><prewrap="">This time I really attached both... </pre><br /><fieldset class="mimeAttachmentHeader"></fieldset><br /><pre wrap=""> </pre></blockquote><br />
В списке pgsql-hackers по дате отправления: