Re: walprotocol.h vs frontends

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: walprotocol.h vs frontends
Date: 2011-08-15 16:15:35
Message-ID: CABUevEx=V304hNQoW+6bX+D-Lwr36pi0AZmaOcdf1MRnfoYssA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 15, 2011 at 18:12, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Perhaps we should change the protocol so that it explicitly says which
>> file the streamed piece of WAL belongs to. That way a client could write
>> it to the correct file without knowing about all those macros.
>
> Yeah, maybe.  Otherwise, all that logic is not only implicitly part of
> the protocol, but essentially impossible to change because it'll be
> hard-coded into clients.  I wasn't too worried about this before because
> I supposed that only walsender and walreceiver really needed to know

Wouldn't doing that cause significant overhead? Every single packet
would have to contain the filename, since the wal stream isn't
depending onthe filenames in where it cuts off. Also, the way it is
now a single packet on the replication stream can span multiple WAL
files... (This is the bug in my previous version that I've been able
to fix now)

> anything about it.  If Magnus is busy coding something else that speaks
> that protocol, we have a problem.  (Assuming we believe his use-case is
> sane, that is.)

I am. And said program has existed for almost a year, IIRC. It has
even been on a commitfest for 9.1, but had a bug and I didn't have
time to fix it (it still worked in a lot of cases, but had
cornercases). And a lot of different people have requested said
functionality, so at least they believe it's a usecase (the usecase
being able to stream your backups at a smaller interval than 16Mb).

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-08-15 16:33:12 Re: walprotocol.h vs frontends
Previous Message Tom Lane 2011-08-15 16:12:36 Re: walprotocol.h vs frontends