From 4404c9aedd93740b88620fe72188e2a835ac53c7 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 9 Jul 2001 21:34:31 +0000 Subject: [PATCH] Add to replication. --- doc/TODO.detail/replication | 176 ++++++++++++++++++++++++++++++++++-- 1 file changed, 169 insertions(+), 7 deletions(-) diff --git a/doc/TODO.detail/replication b/doc/TODO.detail/replication index 14505d938f..7c0ac9696c 100644 --- a/doc/TODO.detail/replication +++ b/doc/TODO.detail/replication @@ -43,7 +43,7 @@ From owner-pgsql-hackers@hub.org Fri Dec 24 10:01:18 1999 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id LAA11295 for ; Fri, 24 Dec 1999 11:01:17 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id KAA20310 for ; Fri, 24 Dec 1999 10:39:18 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id KAA20310 for ; Fri, 24 Dec 1999 10:39:18 -0500 (EST) Received: from localhost (majordom@localhost) by hub.org (8.9.3/8.9.3) with SMTP id KAA61760; Fri, 24 Dec 1999 10:31:13 -0500 (EST) @@ -129,7 +129,7 @@ From owner-pgsql-hackers@hub.org Fri Dec 24 18:31:03 1999 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id TAA26244 for ; Fri, 24 Dec 1999 19:31:02 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id TAA12730 for ; Fri, 24 Dec 1999 19:30:05 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id TAA12730 for ; Fri, 24 Dec 1999 19:30:05 -0500 (EST) Received: from localhost (majordom@localhost) by hub.org (8.9.3/8.9.3) with SMTP id TAA57851; Fri, 24 Dec 1999 19:23:31 -0500 (EST) @@ -212,7 +212,7 @@ From owner-pgsql-hackers@hub.org Fri Dec 24 21:31:10 1999 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id WAA02578 for ; Fri, 24 Dec 1999 22:31:09 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id WAA16641 for ; Fri, 24 Dec 1999 22:18:56 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id WAA16641 for ; Fri, 24 Dec 1999 22:18:56 -0500 (EST) Received: from localhost (majordom@localhost) by hub.org (8.9.3/8.9.3) with SMTP id WAA89135; Fri, 24 Dec 1999 22:11:12 -0500 (EST) @@ -486,7 +486,7 @@ From owner-pgsql-hackers@hub.org Sun Dec 26 08:31:09 1999 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id JAA17976 for ; Sun, 26 Dec 1999 09:31:07 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id JAA23337 for ; Sun, 26 Dec 1999 09:28:36 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id JAA23337 for ; Sun, 26 Dec 1999 09:28:36 -0500 (EST) Received: from localhost (majordom@localhost) by hub.org (8.9.3/8.9.3) with SMTP id JAA90738; Sun, 26 Dec 1999 09:21:58 -0500 (EST) @@ -909,7 +909,7 @@ From owner-pgsql-hackers@hub.org Thu Dec 30 08:01:09 1999 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id JAA10317 for ; Thu, 30 Dec 1999 09:01:08 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id IAA02365 for ; Thu, 30 Dec 1999 08:37:10 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id IAA02365 for ; Thu, 30 Dec 1999 08:37:10 -0500 (EST) Received: from localhost (majordom@localhost) by hub.org (8.9.3/8.9.3) with SMTP id IAA87902; Thu, 30 Dec 1999 08:34:22 -0500 (EST) @@ -1006,7 +1006,7 @@ From owner-pgsql-patches@hub.org Sun Jan 2 23:01:38 2000 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id AAA16274 for ; Mon, 3 Jan 2000 00:01:28 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id XAA02655 for ; Sun, 2 Jan 2000 23:45:55 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id XAA02655 for ; Sun, 2 Jan 2000 23:45:55 -0500 (EST) Received: from hub.org (hub.org [216.126.84.1]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA13828; Sun, 2 Jan 2000 23:40:47 -0500 (EST) @@ -1424,7 +1424,7 @@ From owner-pgsql-hackers@hub.org Tue Jan 4 10:31:01 2000 Received: from renoir.op.net (root@renoir.op.net [207.29.195.4]) by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id LAA17522 for ; Tue, 4 Jan 2000 11:31:00 -0500 (EST) -Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.8 $) with ESMTP id LAA01541 for ; Tue, 4 Jan 2000 11:27:30 -0500 (EST) +Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.9 $) with ESMTP id LAA01541 for ; Tue, 4 Jan 2000 11:27:30 -0500 (EST) Received: from localhost (majordom@localhost) by hub.org (8.9.3/8.9.3) with SMTP id LAA09992; Tue, 4 Jan 2000 11:18:07 -0500 (EST) @@ -4887,3 +4887,165 @@ TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl +From pgsql-hackers-owner+M9997@postgresql.org Wed Jun 13 09:05:56 2001 +Return-path: +Received: from postgresql.org (webmail.postgresql.org [216.126.85.28]) + by candle.pha.pa.us (8.10.1/8.10.1) with ESMTP id f5DD5tE28260 + for ; Wed, 13 Jun 2001 09:05:55 -0400 (EDT) +Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) + by postgresql.org (8.11.3/8.11.1) with SMTP id f5DD5xE12437; + Wed, 13 Jun 2001 09:05:59 -0400 (EDT) + (envelope-from pgsql-hackers-owner+M9997@postgresql.org) +Received: from fizbanrsm.server.lan.at (zep4.it-austria.net [213.150.1.74]) + by postgresql.org (8.11.3/8.11.1) with ESMTP id f5DD19E00635 + for ; Wed, 13 Jun 2001 09:01:10 -0400 (EDT) + (envelope-from ZeugswetterA@wien.spardat.at) +Received: from gz0153.gc.spardat.at (gz0153.gc.spardat.at [172.20.10.149]) + by fizbanrsm.server.lan.at (8.11.2/8.11.2) with ESMTP id f5DD13m08153 + for ; Wed, 13 Jun 2001 15:01:03 +0200 +Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service (5.5.2650.21) + id ; Wed, 13 Jun 2001 15:00:02 +0200 +Message-ID: <11C1E6749A55D411A9670001FA687963368322@sdexcsrv1.f000.d0188.sd.spardat.at> +From: Zeugswetter Andreas SB +To: "'reinoud@xs4all.nl'" , pgsql-hackers@postgresql.org +Subject: AW: AW: AW: [HACKERS] Postgres Replication +Date: Wed, 13 Jun 2001 11:55:48 +0200 +MIME-Version: 1.0 +X-Mailer: Internet Mail Service (5.5.2650.21) +Content-Type: text/plain; + charset="iso-8859-1" +Precedence: bulk +Sender: pgsql-hackers-owner@postgresql.org +Status: OR + + +> Well as I read back the thread I see 2 different approaches to +> replication: +> +> 1: tight integrated replication. +> pro: +> - bi-directional (or multidirectional): updates are possible everywhere +> - A cluster of servers allways has the same state. +> - it does not matter to which server you connect +> con: +> - network between servers will be a bottleneck, especially if it is a +> WAN connection +> - only full replication possible + +I do not understand that point, if it is trigger based, you +have all the flexibility you need. (only some tables, only some rows, +different rows to different targets ....), +(or do you mean not all targets, that could also be achieved with triggers) + +> - what happens if one server is down? (or the network between) are +> commits still possible + +No, updates are not possible if one target is not reachable, +that would not be synchronous and would again need business rules +to resolve conflicts. + +Allowing updates when a target is not reachable would require admin +intervention. + +Andreas + +---------------------------(end of broadcast)--------------------------- +TIP 4: Don't 'kill -9' the postmaster + +From pgsql-hackers-owner+M10005@postgresql.org Wed Jun 13 11:15:48 2001 +Return-path: +Received: from postgresql.org (webmail.postgresql.org [216.126.85.28]) + by candle.pha.pa.us (8.10.1/8.10.1) with ESMTP id f5DFFmE08382 + for ; Wed, 13 Jun 2001 11:15:48 -0400 (EDT) +Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) + by postgresql.org (8.11.3/8.11.1) with SMTP id f5DFFoE53621; + Wed, 13 Jun 2001 11:15:50 -0400 (EDT) + (envelope-from pgsql-hackers-owner+M10005@postgresql.org) +Received: from mail.greatbridge.com (mail.greatbridge.com [65.196.68.36]) + by postgresql.org (8.11.3/8.11.1) with ESMTP id f5DEk7E38930 + for ; Wed, 13 Jun 2001 10:46:07 -0400 (EDT) + (envelope-from djohnson@greatbridge.com) +Received: from j2.us.greatbridge.com (djohnsonpc.us.greatbridge.com [65.196.69.70]) + by mail.greatbridge.com (8.11.2/8.11.2) with SMTP id f5DEhfQ22566; + Wed, 13 Jun 2001 10:43:41 -0400 +From: Darren Johnson +Date: Wed, 13 Jun 2001 14:44:11 GMT +Message-ID: <20010613.14441100@j2.us.greatbridge.com> +Subject: Re: AW: AW: AW: [HACKERS] Postgres Replication +To: Zeugswetter Andreas SB +cc: "'reinoud@xs4all.nl'" , pgsql-hackers@postgresql.org +Reply-To: Darren Johnson + <11C1E6749A55D411A9670001FA687963368322@sdexcsrv1.f000.d0188.sd.spardat.at> +References: <11C1E6749A55D411A9670001FA687963368322@sdexcsrv1.f000.d0188.sd.spardat.at> +X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Linux) +X-Priority: 3 (Normal) +MIME-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id f5DEk8E38931 +Precedence: bulk +Sender: pgsql-hackers-owner@postgresql.org +Status: OR + + +> > - only full replication possible + +> I do not understand that point, if it is trigger based, you +> have all the flexibility you need. (only some tables, only some rows, +> different rows to different targets ....), +> (or do you mean not all targets, that could also be achieved with +triggers) + +Currently with Postgres-R, it is one database replicating all tables to +all servers in the group communication system. There are some ways +around +this by invoking the -r option when a SQL statement should be replicated, +and leaving the -r option off for non-replicated scenarios. IMHO this is +not a good solution. + +A better solution will need to be implemented, which involves a +subscription table(s) with relation/server information. There are two +ideas for subscribing and receiving replicated data. + +1) Receiver driven propagation - A simple solution where all +transactions are propagated and the receiving servers will reference +the subscription information before applying updates. + +2) Sender driven propagation - A more optimal and complex solution +where servers do not receive any messages regarding data items for +which they have not subscribed + + +> > - what happens if one server is down? (or the network between) are +> > commits still possible + +> No, updates are not possible if one target is not reachable, + +AFAIK, Postgres-R can still replicate if one target is not reachable, +but only to the remaining servers ;). + +There is a scenario that could arise if a server issues a lock +request then fails or goes off line. There is code that checks +for this condition, which needs to be merged with the branch we have. + +> that would not be synchronous and would again need business rules +> to resolve conflicts. + +Yes the failed server would not be synchronized, and getting this +failed server back in sync needs to be addressed. + +> Allowing updates when a target is not reachable would require admin +> intervention. + +In its current state yes, but our goal would be to eliminate this +requirement as well. + + + +Darren + +---------------------------(end of broadcast)--------------------------- +TIP 3: if posting/reading through Usenet, please send an appropriate +subscribe-nomail command to majordomo@postgresql.org so that your +message can get through to the mailing list cleanly + -- 2.40.0