Re: Streaming replication, loose ends

Lists: pgsql-hackers
From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Streaming replication, loose ends
Date: 2010-01-15 09:19:18
Message-ID: 4B503316.8010102@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I've now committed streaming replication. I moved the files around a
bit, and put the walreceiver/walsender stuff in a new
src/backend/replication subdirectory. There's enough stuff there already
to deserve a new subdirectory, and if we add the capability for
streaming base backups etc. that has been discussed, we will have more
code in there.

But it's not time to party yet. There's still a few loose ends we need
to address:

Documentation. The patch originally moved around some sections, but I
didn't include that in the committed version, to make it clear in the
diff what exactly was added/changed. But I do agree with the original
thought of adding a new "Replication" chapter, and moving all the
replication and standby related stuff there from the "Backup and
Restore" chapter, so let's start working on that.

And of course the documentation needs to be improved and expanded in
general.

We talked about changing the retry-logic yesterday, so that the standby
could fall back to restoring WAL files from archive even after it has
already connected to the primary, if it e.g falls behind too much. It
looks like that involves some heavy refactoring around
ReadRecord/FetchRecord, which makes me a bit nervous given how critical
ReadRecord() is and how old and well-tested the current code is. So
let's tackle that as a follow-on patch.

Then there's the issue of what privileges to require for a replication
connection. I kept the superuser() check for now, so you currently need
to be superuser, but as I opined earlier I don't think that's good for
overall security. Perhaps we should add a new "replication" privilege
besides the login privilege. To connect for replication, replication
privilege would be checked instead of login privilege. That would make
it quite simple to create a user or users for replication purposes, with
no other access to the system.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 10:36:57
Message-ID: 201001151036.o0FAavv23756@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> I've now committed streaming replication. I moved the files around a
> bit, and put the walreceiver/walsender stuff in a new
> src/backend/replication subdirectory. There's enough stuff there already
> to deserve a new subdirectory, and if we add the capability for
> streaming base backups etc. that has been discussed, we will have more
> code in there.
>
> But it's not time to party yet. There's still a few loose ends we need
> to address:
>
> Documentation. The patch originally moved around some sections, but I
> didn't include that in the committed version, to make it clear in the
> diff what exactly was added/changed. But I do agree with the original
> thought of adding a new "Replication" chapter, and moving all the
> replication and standby related stuff there from the "Backup and
> Restore" chapter, so let's start working on that.

Uh, do we really want to call this "replication" rather than archive log
streaming or something. It seems "replication" is a generic term and
will confuse people who are using other replication solutions like
Slony.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 10:44:22
Message-ID: 162867791001150244y5921f2bn4d125972e5ece407@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

2010/1/15 Bruce Momjian <bruce(at)momjian(dot)us>:
> Heikki Linnakangas wrote:
>> I've now committed streaming replication. I moved the files around a
>> bit, and put the walreceiver/walsender stuff in a new
>> src/backend/replication subdirectory. There's enough stuff there already
>> to deserve a new subdirectory, and if we add the capability for
>> streaming base backups etc. that has been discussed, we will have more
>> code in there.
>>
>> But it's not time to party yet. There's still a few loose ends we need
>> to address:
>>
>> Documentation. The patch originally moved around some sections, but I
>> didn't include that in the committed version, to make it clear in the
>> diff what exactly was added/changed. But I do agree with the original
>> thought of adding a new "Replication" chapter, and moving all the
>> replication and standby related stuff there from the "Backup and
>> Restore" chapter, so let's start working on that.
>
> Uh, do we really want to call this "replication" rather than archive log
> streaming or something.  It seems "replication" is a generic term and
> will confuse people who are using other replication solutions like
> Slony.

+1

Pavel
>
> --
>  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
>  EnterpriseDB                             http://enterprisedb.com
>
>  + If your life is a hard drive, Christ can be your backup. +
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 11:09:45
Message-ID: 4B504CF9.6020804@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

Heikki Linnakangas írta:
> I've now committed streaming replication. I moved the files around a
> bit, and put the walreceiver/walsender stuff in a new
> src/backend/replication subdirectory. [snip]

there's one loose end indeed.
"make maintainer-clean" doesn't delete these:

src/backend/replication/walreceiver/walreceiver.o
src/backend/replication/walreceiver/walreceiver.so
src/backend/replication/walreceiver/.deps/

Best regards,
Zoltán Böszörményi

--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 12:27:38
Message-ID: 4B505F3A.7060106@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Boszormenyi Zoltan wrote:
> Heikki Linnakangas írta:
>> I've now committed streaming replication. I moved the files around a
>> bit, and put the walreceiver/walsender stuff in a new
>> src/backend/replication subdirectory. [snip]
>
> there's one loose end indeed.
> "make maintainer-clean" doesn't delete these:
>
> src/backend/replication/walreceiver/walreceiver.o
> src/backend/replication/walreceiver/walreceiver.so
> src/backend/replication/walreceiver/.deps/

Hmm, I think I'm going to need some help with the Makefiles. Clearly the
way I hooked that directory to the build system was wrong. I think the
attached patch will fix that, but I wonder if there's a trick I'm missing.

Do the MSVC scripts need adjusting? 'red_bat' compiled fine, so I guess not.

Also, I'm seeing a failure in buildfarm member 'colugos':

/opt/local/bin/ccache /Developer/usr/bin/llvm-gcc-4.2 -no-cpp-precomp
-I/opt/local/include -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -g -bundle -multiply_defined suppress walreceiver.o
-bundle_loader ../../../../src/backend/postgres
-L../../../../src/interfaces/libpq -L../../../../src/port
-L/opt/local/lib -lpq -o walreceiver.so
ld: library not found for -lpq
collect2: ld returned 1 exit status
make[2]: *** [walreceiver.so] Error 1
make[2]: *** Waiting for unfinished jobs....

I suspect that's because libpq isn't built yet. I have this:

> all: submake-libpq all-shared-lib

in src/backend/replication/walreceiver/Makefile, but is that not enough?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
walreceiver-makefile-fix.patch text/x-diff 9.4 KB

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 13:59:54
Message-ID: 4B5074DA.30800@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> Also, I'm seeing a failure in buildfarm member 'colugos':
>
> /opt/local/bin/ccache /Developer/usr/bin/llvm-gcc-4.2 -no-cpp-precomp
> -I/opt/local/include -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -fwrapv -g -bundle -multiply_defined suppress walreceiver.o
> -bundle_loader ../../../../src/backend/postgres
> -L../../../../src/interfaces/libpq -L../../../../src/port
> -L/opt/local/lib -lpq -o walreceiver.so
> ld: library not found for -lpq
> collect2: ld returned 1 exit status
> make[2]: *** [walreceiver.so] Error 1
> make[2]: *** Waiting for unfinished jobs....
>
> I suspect that's because libpq isn't built yet. I have this:
>
>> all: submake-libpq all-shared-lib
>
> in src/backend/replication/walreceiver/Makefile, but is that not enough?

Yep. What's happening is that "make -j" starts building libpq and
walreceiver.so simultaneously, because of the above line in the
Makefile. We actually have the same problem in src/bin/*/Makefile, but
we don't notice it there because src/interfaces is listed before src/bin
in src/Makefile, so when you do "make -j" at the top-level, libpq is
built first. You get the same error if you do "make clean" at the
top-level, and then e.g "cd src/bin/scripts/; make -j"

So the simple fix would be to reorder the lines in src/Makefile, so that
src/interfaces is built before src/backend. Alternatively we could do this:

*** src/backend/replication/walreceiver/Makefile 15 Jan 2010 09:19:03
-0000 1.1
--- src/backend/replication/walreceiver/Makefile 15 Jan 2010 13:57:24 -0000
***************
*** 18,24 ****
SHLIB_LINK = $(libpq)
NAME = walreceiver

! all: submake-libpq all-shared-lib

include $(top_srcdir)/src/Makefile.shlib

--- 18,28 ----
SHLIB_LINK = $(libpq)
NAME = walreceiver

! all: all-shared-lib
!
! # Compiling walreceiver.o doesn't really need libpq library,
! # only linking it does. But there's no easy way to specify that.
! walreceiver.o: submake-libpq

include $(top_srcdir)/src/Makefile.shlib

And I guess all the other uses of submake-libpq should be changed similarly.

Am I missing a trick?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 16:03:36
Message-ID: 29164.1263571416@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Yep. What's happening is that "make -j" starts building libpq and
> walreceiver.so simultaneously, because of the above line in the
> Makefile. We actually have the same problem in src/bin/*/Makefile, but
> we don't notice it there because src/interfaces is listed before src/bin
> in src/Makefile, so when you do "make -j" at the top-level, libpq is
> built first.

I'm actually fairly uncomfortable with the notion that something buried
deep within the src/backend tree is going to reach over and cause libpq
to get built. Maybe the real answer is that you put walreceiver in the
wrong place, and it ought to be under src/bin/.

regards, tom lane


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 16:47:44
Message-ID: 4B509C30.2070300@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Yep. What's happening is that "make -j" starts building libpq and
>> walreceiver.so simultaneously, because of the above line in the
>> Makefile. We actually have the same problem in src/bin/*/Makefile, but
>> we don't notice it there because src/interfaces is listed before src/bin
>> in src/Makefile, so when you do "make -j" at the top-level, libpq is
>> built first.
>
> I'm actually fairly uncomfortable with the notion that something buried
> deep within the src/backend tree is going to reach over and cause libpq
> to get built. Maybe the real answer is that you put walreceiver in the
> wrong place, and it ought to be under src/bin/.

That feels even more wrong to me. Walreceiver is a postmaster
subprocess, tightly integrated with the rest of the backend.

One can argue that it shouldn't be, and walreceiver process should call
libpq through some new API, and the builtin implementation of that API
which uses libpq would be a loadable module that could be in src/bin/ or
contrib. Greg Stark requested that earlier. But I don't want to start
designing such an API at this point.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:00:32
Message-ID: 603c8f071001150900j5e35a444m96fcbdb8dbea99e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 15, 2010 at 11:47 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Tom Lane wrote:
>> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>>> Yep. What's happening is that "make -j" starts building libpq and
>>> walreceiver.so simultaneously, because of the above line in the
>>> Makefile. We actually have the same problem in src/bin/*/Makefile, but
>>> we don't notice it there because src/interfaces is listed before src/bin
>>> in src/Makefile, so when you do "make -j" at the top-level, libpq is
>>> built first.
>>
>> I'm actually fairly uncomfortable with the notion that something buried
>> deep within the src/backend tree is going to reach over and cause libpq
>> to get built.  Maybe the real answer is that you put walreceiver in the
>> wrong place, and it ought to be under src/bin/.
>
> That feels even more wrong to me. Walreceiver is a postmaster
> subprocess, tightly integrated with the rest of the backend.

The major problem with having one part of the tree depend on a
completely different part of the tree is that it's easy for the
dependencies to be wrong. If the backend depends on libpq, then it
depends implicitly on all the things on which libpq depends. If
something that libpq depends on, but that the backend does not depend
on directly, gets updated, does the backend get rebuilt? It's easy to
get this wrong. On the other hand, it's also possible to get it
right. If we can decide what we want to happen, I'm willing to take a
crack at it, though if you or Tom or Peter prefer to do it that is
certainly OK with me too.

...Robert


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:03:18
Message-ID: 410.1263574998@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> I'm actually fairly uncomfortable with the notion that something buried
>> deep within the src/backend tree is going to reach over and cause libpq
>> to get built. Maybe the real answer is that you put walreceiver in the
>> wrong place, and it ought to be under src/bin/.

> That feels even more wrong to me. Walreceiver is a postmaster
> subprocess, tightly integrated with the rest of the backend.

[ shrug... ] pg_dump, to take one example, is considerably more
"tightly integrated" with the backend than walreceiver is.

regards, tom lane


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:07:52
Message-ID: 4B50A0E8.7030809@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:
> On Fri, Jan 15, 2010 at 11:47 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> Tom Lane wrote:
>>> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>>>> Yep. What's happening is that "make -j" starts building libpq and
>>>> walreceiver.so simultaneously, because of the above line in the
>>>> Makefile. We actually have the same problem in src/bin/*/Makefile, but
>>>> we don't notice it there because src/interfaces is listed before src/bin
>>>> in src/Makefile, so when you do "make -j" at the top-level, libpq is
>>>> built first.
>>> I'm actually fairly uncomfortable with the notion that something buried
>>> deep within the src/backend tree is going to reach over and cause libpq
>>> to get built. Maybe the real answer is that you put walreceiver in the
>>> wrong place, and it ought to be under src/bin/.
>> That feels even more wrong to me. Walreceiver is a postmaster
>> subprocess, tightly integrated with the rest of the backend.
>
> The major problem with having one part of the tree depend on a
> completely different part of the tree is that it's easy for the
> dependencies to be wrong. If the backend depends on libpq, then it
> depends implicitly on all the things on which libpq depends. If
> something that libpq depends on, but that the backend does not depend
> on directly, gets updated, does the backend get rebuilt?

The backend doesn't get rebuilt, and it doesn't need to be. The fact
that walreceiver is a dynamically loaded module should isolate changes
in libpq or its dependencies from affecting the rest of the backend.

I moved the line for src/backend/replication/walreceiver in src/Makefile
further down, after src/interfaces. That should fix the build failures
for now, but I'm all ears if there's better suggestions.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:11:01
Message-ID: 1270.1263575461@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> I moved the line for src/backend/replication/walreceiver in src/Makefile
> further down, after src/interfaces. That should fix the build failures
> for now, but I'm all ears if there's better suggestions.

Yeah, I saw. Seems like a reasonable solution for now.

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:17:38
Message-ID: 1263575858.20966.1908.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2010-01-15 at 05:36 -0500, Bruce Momjian wrote:
> Heikki Linnakangas wrote:
> > I've now committed streaming replication. I moved the files around a
> > bit, and put the walreceiver/walsender stuff in a new
> > src/backend/replication subdirectory. There's enough stuff there already
> > to deserve a new subdirectory, and if we add the capability for
> > streaming base backups etc. that has been discussed, we will have more
> > code in there.
> >
> > But it's not time to party yet. There's still a few loose ends we need
> > to address:
> >
> > Documentation. The patch originally moved around some sections, but I
> > didn't include that in the committed version, to make it clear in the
> > diff what exactly was added/changed. But I do agree with the original
> > thought of adding a new "Replication" chapter, and moving all the
> > replication and standby related stuff there from the "Backup and
> > Restore" chapter, so let's start working on that.
>
> Uh, do we really want to call this "replication" rather than archive log
> streaming or something. It seems "replication" is a generic term and
> will confuse people who are using other replication solutions like
> Slony.

+1, it is not replication. I would call it something like continuous
archiving or streaming pitr

Joshua D. Drake

>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir.


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: jd(at)commandprompt(dot)com
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:24:11
Message-ID: 603c8f071001150924l25838d71yf8fc5015c245b729@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 15, 2010 at 12:17 PM, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
>> Uh, do we really want to call this "replication" rather than archive log
>> streaming or something.  It seems "replication" is a generic term and
>> will confuse people who are using other replication solutions like
>> Slony.
>
> +1, it is not replication. I would call it something like continuous
> archiving or streaming pitr

Of course "PITR" does stand for "point-in-time replication"...

...Robert


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:29:36
Message-ID: 4B50A600.3090309@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian wrote:
> Heikki Linnakangas wrote:
>> I've now committed streaming replication. I moved the files around a
>> bit, and put the walreceiver/walsender stuff in a new
>> src/backend/replication subdirectory. There's enough stuff there already
>> to deserve a new subdirectory, and if we add the capability for
>> streaming base backups etc. that has been discussed, we will have more
>> code in there.
>>
>> But it's not time to party yet. There's still a few loose ends we need
>> to address:
>>
>> Documentation. The patch originally moved around some sections, but I
>> didn't include that in the committed version, to make it clear in the
>> diff what exactly was added/changed. But I do agree with the original
>> thought of adding a new "Replication" chapter, and moving all the
>> replication and standby related stuff there from the "Backup and
>> Restore" chapter, so let's start working on that.
>
> Uh, do we really want to call this "replication" rather than archive log
> streaming or something. It seems "replication" is a generic term and
> will confuse people who are using other replication solutions like
> Slony.

Good question. OTOH, if we move the sections about setting up a
file-shipping based standby with pg_standby, that's not streaming.

What we have now is:

Server Administration
...
Backup and Restore
SQL Dump
File System Level Backup
Continuous Archiving and Point-In-Time Recovery (PITR)
Warm Standby Servers for High Availability
Planning
Implementation
Failover
Record-based Log Shipping
Streaming Replication
Incrementally Updated Backups
Hot Standby
User's Overview
Handling query conflicts
Administrator's Overview
Hot Standby Parameter Reference
Caveats
High Availability, Load Balancing, and Replication

I propose:

Server Administration
Backup and Restore
SQL Dump
File System Level Backup
Continuous Archiving and Point-In-Time Recovery (PITR)
High Availability, Load Balancing, and Replication
Introduction
Comparison of different solutions (*)
File-based Log Shipping
Planning
Implementation
Streaming Replication
Setting up
Failover
Hot Standby
User's Overview
Handling query conflicts
Administrator's Overview
Hot Standby Parameter Reference
Caveats
Incrementally Updated Backups

(*) Current content of "High Availability, Load Balancing, and
Replication" chapter goes here

Note that I propose to remove "Record-based Log Shipping" section
altogether. We can briefly mention that method under Streaming
Replication, but I consider that obsolete with streaming replication.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: jd(at)commandprompt(dot)com, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:30:41
Message-ID: 4B50A641.7010200@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:
> On Fri, Jan 15, 2010 at 12:17 PM, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
>>> Uh, do we really want to call this "replication" rather than archive log
>>> streaming or something. It seems "replication" is a generic term and
>>> will confuse people who are using other replication solutions like
>>> Slony.
>> +1, it is not replication. I would call it something like continuous
>> archiving or streaming pitr
>
> Of course "PITR" does stand for "point-in-time replication"...

I'm not sure if you're joking, but PITR actually stands for
Point-In-Time *Recovery*.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:34:26
Message-ID: 1263576866.20966.1928.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2010-01-15 at 19:30 +0200, Heikki Linnakangas wrote:
> Robert Haas wrote:
> > On Fri, Jan 15, 2010 at 12:17 PM, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> >>> Uh, do we really want to call this "replication" rather than archive log
> >>> streaming or something. It seems "replication" is a generic term and
> >>> will confuse people who are using other replication solutions like
> >>> Slony.
> >> +1, it is not replication. I would call it something like continuous
> >> archiving or streaming pitr
> >
> > Of course "PITR" does stand for "point-in-time replication"...
>
> I'm not sure if you're joking, but PITR actually stands for
> Point-In-Time *Recovery*.

Right.

Joshua D. Drake

>

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir.


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: jd(at)commandprompt(dot)com, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:37:57
Message-ID: 603c8f071001150937k4dd629co6e21e5bc26afce6f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 15, 2010 at 12:30 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Robert Haas wrote:
>> On Fri, Jan 15, 2010 at 12:17 PM, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
>>>> Uh, do we really want to call this "replication" rather than archive log
>>>> streaming or something.  It seems "replication" is a generic term and
>>>> will confuse people who are using other replication solutions like
>>>> Slony.
>>> +1, it is not replication. I would call it something like continuous
>>> archiving or streaming pitr
>>
>> Of course "PITR" does stand for "point-in-time replication"...
>
> I'm not sure if you're joking, but PITR actually stands for
> Point-In-Time *Recovery*.

Oops. No, not joking, just wrong.

But I'm still wondering why this isn't replication.

...Robert


From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, jd(at)commandprompt(dot)com, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:43:22
Message-ID: EBFC3716-83CF-40B9-9109-A330D407176E@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Jan 15, 2010, at 9:37 AM, Robert Haas wrote:

> But I'm still wondering why this isn't replication.

I was wondering the same thing. ISTM that the docs could reference third-party replication solutions, too (or a wiki page listing them, since they'll change often).

Anyway, I think Heikki's proposed chapter name covers it:

> High Availability, Load Balancing, and Replication

Works for me.

Best,

David


From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:51:58
Message-ID: 20100115175158.GA26982@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 15, 2010 at 12:11:01PM -0500, Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> > I moved the line for src/backend/replication/walreceiver in
> > src/Makefile further down, after src/interfaces. That should fix
> > the build failures for now, but I'm all ears if there's better
> > suggestions.
>
> Yeah, I saw. Seems like a reasonable solution for now.

We can always cvs mv...oh, wait! ;)

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 17:59:05
Message-ID: c24c7ec603a375862182eeecc9123e27@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

>>>> +1, it is not replication. I would call it something like continuous
>>>> archiving or streaming pitr

I agree we should consider a different name.

> But I'm still wondering why this isn't replication.

Because replication is an ambiguous and overloaded term.

On the other hand, it's a great buzzword, so we should use
the phrase as much as possible in the press releases. :)

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201001151257
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAktQrNYACgkQvJuQZxSWSsj8NACgwIQVq/GGQoY/4U6pAYyR5IeS
EsoAoLjoYlLErv4g3Vy65rbA9u9W0vww
=u2Hk
-----END PGP SIGNATURE-----


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 18:39:20
Message-ID: 1263580760.26654.37395.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2010-01-15 at 19:29 +0200, Heikki Linnakangas wrote:

> File-based Log Shipping
> Planning
> Implementation
> Streaming Replication
> Setting up

How about "Log Streaming Replication"?

So its a particular kind of replication, which seems correct to me.

--
Simon Riggs www.2ndQuadrant.com


From: Greg Stark <gsstark(at)mit(dot)edu>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 22:38:42
Message-ID: 407d949e1001151438t796a948eu3ef054b3d33bda99@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jan 15, 2010 at 6:39 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Fri, 2010-01-15 at 19:29 +0200, Heikki Linnakangas wrote:
> How about "Log Streaming Replication"?
>
> So its a particular kind of replication, which seems correct to me.

I thought the whole point of this effort was to be able to bill it as
a built-in easy replication which was perceived as a major hole in
Postgres's feature set.

--
greg


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-15 23:12:59
Message-ID: 1263597179.26654.40947.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2010-01-15 at 22:38 +0000, Greg Stark wrote:
> On Fri, Jan 15, 2010 at 6:39 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On Fri, 2010-01-15 at 19:29 +0200, Heikki Linnakangas wrote:
> > How about "Log Streaming Replication"?
> >
> > So its a particular kind of replication, which seems correct to me.
>
> I thought the whole point of this effort was to be able to bill it as
> a built-in easy replication which was perceived as a major hole in
> Postgres's feature set.

How does that affect my proposal?

Heikki called it Streaming Replication; I have just added "Log" to it,
to make clear that it is similar in many ways to File-based Log
Shipping, which was a section heading earlier in docs.

--
Simon Riggs www.2ndQuadrant.com


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-16 03:22:02
Message-ID: 201001160322.o0G3M2j10929@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> > Uh, do we really want to call this "replication" rather than archive log
> > streaming or something. It seems "replication" is a generic term and
> > will confuse people who are using other replication solutions like
> > Slony.
>
> Good question. OTOH, if we move the sections about setting up a
> file-shipping based standby with pg_standby, that's not streaming.
>
> What we have now is:

Frankly, I am concerned we now have a "replication" CVS subdirectory;
it looks more like a 'wal_streaming' directory to me.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication, loose ends
Date: 2010-01-16 03:22:23
Message-ID: 201001160322.o0G3MNP10971@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Simon Riggs wrote:
> On Fri, 2010-01-15 at 19:29 +0200, Heikki Linnakangas wrote:
>
> > File-based Log Shipping
> > Planning
> > Implementation
> > Streaming Replication
> > Setting up
>
> How about "Log Streaming Replication"?
>
> So its a particular kind of replication, which seems correct to me.

Yea, I like that.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +