Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWeld-00076k-5M for pgsql-docs@postgresql.org; Fri, 09 Nov 2012 02:56:25 +0000 Received: from mail-ob0-f174.google.com ([209.85.214.174]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWelb-0002dS-9o for pgsql-docs@postgresql.org; Fri, 09 Nov 2012 02:56:24 +0000 Received: by mail-ob0-f174.google.com with SMTP id uo13so3596700obb.19 for ; Thu, 08 Nov 2012 18:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=GJPXPFRlJGOqmCOJ/G783dx51j38kCrvMNRRB87cCn8=; b=AaZKMdoARVrtsKsAnNtc3wF3JLZtWDhA7TZJTgyfx111tUnpLyc/Z7w2pnPMYyInFa VXoPJVbwcVnvIiP1L8WbSrvqnyliwMRavzLFCNmdVf02Q9pBPY9VWmT9qgOCVOeQxVCE juegT+yFVypqNL4VDcLMpVavAhjfGAWpsW0qDL2BJiMgrbBZcsWOQVw1ek7GRcUILmxq e/SLfR87iK2ncVEYESSbbbIgjMn6NwfP/P09biuoD4O9pQta87mvGxOvK9Bo/4PI9BR6 8jf6emnAr+eOUxXAWcDGYipLjrcMoCdnmFh2DB9YFgo7lo0iB2UX/wnHLe27FMLZo1nW K2zw== Received: by 10.60.31.241 with SMTP id d17mr6734959oei.107.1352429782290; Thu, 08 Nov 2012 18:56:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.79.130 with HTTP; Thu, 8 Nov 2012 18:56:00 -0800 (PST) From: Josh Kupershmidt Date: Thu, 8 Nov 2012 19:56:00 -0700 Message-ID: Subject: streaming replication confusion To: pgsql-docs Content-Type: multipart/mixed; boundary=e89a8f839cd3c1cfb604ce071807 X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201211/6 X-Sequence-Number: 7498 --e89a8f839cd3c1cfb604ce071807 Content-Type: text/plain; charset=ISO-8859-1 I think there is at least[4] one confusing documentation leftover from the 9.0 days at: http://www.postgresql.org/docs/devel/static/warm-standby.html First, we claim: | Streaming replication is asynchronous, so there is still a small delay | between committing a transaction in the primary and for the changes | to become visible in the standby. This unqualified statement, which has remained the same since 9.0, suggests synchronous replication is not possible using streaming replication. Further down we are closer to the truth: | PostgreSQL streaming replication is asynchronous by default. Proposed fix for this gripe attached. I'd be pleased to see this particular doc patch backpatched to 9.2 and 9.1, given that the replication docs are both important and fairly confusing. The Streaming Replication wiki page[1] contains similar out-of-date claims[2]; I can fix some of the egregious errors myself, though help is welcome. The "Synchronous Replication" wiki page[3] is in even worse shape, containing mostly info about a patch different than what was committed... and it's currently the first Google search result for "postgresql synchronous replication" :-( Josh [1] http://wiki.postgresql.org/wiki/Streaming_Replication [2] such as "Currently SR supports only asynchronous log-shipping", or already-released functionality described under the "Future release section". [3] http://wiki.postgresql.org/wiki/Synchronous_replication [4] I have a larger gripe about the way this entire page is laid out, with streaming rep. info bolted onto a page which is still named and was intended to be about warm standby, but I'll try to make a separate thread about that. --e89a8f839cd3c1cfb604ce071807 Content-Type: application/octet-stream; name="streaming_rep.docfix.diff" Content-Disposition: attachment; filename="streaming_rep.docfix.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h9apoo2a0 ZGlmZiAtLWdpdCBhL2RvYy9zcmMvc2dtbC9oaWdoLWF2YWlsYWJpbGl0eS5zZ21sIGIvZG9jL3Ny Yy9zZ21sL2hpZ2gtYXZhaWxhYmlsaXR5LnNnbWwKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXgg NjJmNzJiNC4uYzI5ZmU4MgoqKiogYS9kb2Mvc3JjL3NnbWwvaGlnaC1hdmFpbGFiaWxpdHkuc2dt bAotLS0gYi9kb2Mvc3JjL3NnbWwvaGlnaC1hdmFpbGFiaWxpdHkuc2dtbAoqKioqKioqKioqKioq KiogYXJjaGl2ZV9jbGVh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