Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byJOV-0003c1-Oc for pgsql-committers@arkaria.postgresql.org; Sun, 23 Oct 2016 14:04:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1byJOV-0007O4-BL for pgsql-committers@arkaria.postgresql.org; Sun, 23 Oct 2016 14:04:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1byJOI-00079t-2S for pgsql-committers@postgresql.org; Sun, 23 Oct 2016 14:04:46 +0000 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1byJOA-00083K-PX for pgsql-committers@postgresql.org; Sun, 23 Oct 2016 14:04:44 +0000 Received: by mail-qk0-x236.google.com with SMTP id f128so199928545qkb.1 for ; Sun, 23 Oct 2016 07:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=f9bu9ePGaq+DWmupIlLUgCByoDCA2M+8MDX+2jd4wJU=; b=2LshT1LxT/hPXK/rIGpJ5rOnWjmM6+35WPu0M1JogL0QptrRYx8snpou6Lu1EIjugE tPeqpXDDNUqYG6LMN/q+1OoMx5pK0QwVCqCdvA90+6qqy7CWyJQLoMamDoh7+oOK7fBR 3kWi9FMpIXembDDxCBBOwDLQ4CKN1XytQ/KuFWV+Hv+t5Qp2YtwdzwYfH2JWiBAoF1OZ EwIGbJw2FF/KsZTtcL5cOQHrDyz7CWYDV9ig3xpOa8GoLTEr2yBH4tQCOKKraZ+QCcas vmAfJ+ppJkWlYFDDz0GD6xrVHxYq6E+frcDHzDUfmf8TFAPF2MxV2BL2ncMLncuzj55g PodA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=f9bu9ePGaq+DWmupIlLUgCByoDCA2M+8MDX+2jd4wJU=; b=J5Z++Q663rFZy6/jhjpBMUGtBk0yRjjrD+FzS+ct90YWaMJd3XfUt9Q/RM8RZ/6pXn j9jMGVFXDl9RYnF9a74cnZL3bpzUDX4PI4qaUGpNhikOgiDIkipAAe+01X+RLPzDVINI w1THgiBx9Z7Oesz9zxlF1I+SNajwDijK4loEATnu0b88mZW/oYU2Z8+SCRemcmzKWd43 CRiauxBvq6SpF37wJ68+WeFurcW7jSh/H7M/RJ+YuW2//GfJfN4f1WjqvzkHpnVgjEIo V8LgL6U7KY8NzwbCuFcTCN6bBF/C3X9ikIn696Ma9MynDHNF5O+qY0GfoZRLYzcZl4Wy jAZg== X-Gm-Message-State: ABUngvcEZ7Jrs+xg+9BSMSAHjfqeGEhF5F0h1Fvk1kjzNeOenKrdEnAnlT9OvWOuo4q2Tiqv++/6heTtDXFHKg== X-Received: by 10.55.103.69 with SMTP id b66mr10103750qkc.108.1477231477689; Sun, 23 Oct 2016 07:04:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.33.174 with HTTP; Sun, 23 Oct 2016 07:04:37 -0700 (PDT) In-Reply-To: References: From: Magnus Hagander Date: Sun, 23 Oct 2016 16:04:37 +0200 Message-ID: Subject: Re: pgsql: Allow pg_basebackup to stream transaction log in tar mode To: pgsql-committers Content-Type: multipart/alternative; boundary=001a1148454a7aa606053f88c1fd X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org --001a1148454a7aa606053f88c1fd Content-Type: text/plain; charset=UTF-8 The remaining windows buildfarm build issue looks like this: src/bin/pg_basebackup/receivelog.c(135): error C2039: '_commit' : is not a member of 'WalWriteMethod' [C:\buildfarm\buildenv\HEAD\pgsql.build\pg_basebackup.vcxproj] AFAICT this comes from using walmethod->fsync(), and we have a #define changing fsync() to _commit (port/win32.h, line 70). The easiest might just be to rename walmethod->fsync() to walmethod->do_fsync(), so we don't have to mess with any other code. Thoughts? //Magnus On Sun, Oct 23, 2016 at 3:55 PM, Magnus Hagander wrote: > That broke some buildfarm. Looking into it. > > //Magnus > > On Sun, Oct 23, 2016 at 3:28 PM, Magnus Hagander > wrote: > >> Allow pg_basebackup to stream transaction log in tar mode >> >> This will write the received transaction log into a file called >> pg_wal.tar(.gz) next to the other tarfiles instead of writing it to >> base.tar. When using fetch mode, the transaction log is still written to >> base.tar like before, and when used against a pre-10 server, the file >> is named pg_xlog.tar. >> >> To do this, implement a new concept of a "walmethod", which is >> responsible for writing the WAL. Two implementations exist, one that >> writes to a plain directory (which is also used by pg_receivexlog) and >> one that writes to a tar file with optional compression. >> >> Reviewed by Michael Paquier >> >> Branch >> ------ >> master >> >> Details >> ------- >> http://git.postgresql.org/pg/commitdiff/56c7d8d4552180fd66fe >> 48423bb2a9bb767c2d87 >> >> Modified Files >> -------------- >> doc/src/sgml/ref/pg_basebackup.sgml | 18 +- >> src/bin/pg_basebackup/Makefile | 2 +- >> src/bin/pg_basebackup/pg_basebackup.c | 62 +- >> src/bin/pg_basebackup/pg_receivexlog.c | 10 +- >> src/bin/pg_basebackup/receivelog.c | 316 ++++------ >> src/bin/pg_basebackup/receivelog.h | 3 +- >> src/bin/pg_basebackup/t/010_pg_basebackup.pl | 6 +- >> src/bin/pg_basebackup/walmethods.c | 886 >> +++++++++++++++++++++++++++ >> src/bin/pg_basebackup/walmethods.h | 45 ++ >> src/include/pgtar.h | 1 + >> src/port/tar.c | 2 +- >> 11 files changed, 1107 insertions(+), 244 deletions(-) >> >> >> -- >> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-committers >> > > > > --001a1148454a7aa606053f88c1fd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The remaining windows buildfarm build issue looks like thi= s:
  src/bin/pg_basebackup/receivelog.c(=
135): error C2039: '_commit' : is not a member of 'WalWriteMeth=
od' [C:\buildfarm\buildenv\HEAD\pgsql.build\pg_basebackup.vcxproj]

AFAICT this comes from using walmethod->fsync(= ), and we have a #define changing fsync() to _commit (port/win32.h, line 70= ).

The easiest might just be to rename walmethod-&= gt;fsync() to walmethod->do_fsync(), so we don't have to mess with a= ny other code.

Thoughts?

= //Magnus


On Sun, Oct 23, 2016 at 3:55 PM, Magnus Hagander <magnus@hag= ander.net> wrote:
That broke some buildfarm. Looking into it.
//Magnus

On Sun, Oct 23, 2016 at 3:28 P= M, Magnus Hagander <magnus@hagander.net> wrote:
Allow pg_basebackup to stream tr= ansaction log in tar mode

This will write the received transaction log into a file called
pg_wal.tar(.gz) next to the other tarfiles instead of writing it to
base.tar. When using fetch mode, the transaction log is still written to base.tar like before, and when used against a pre-10 server, the file
is named pg_xlog.tar.

To do this, implement a new concept of a "walmethod", which is responsible for writing the WAL. Two implementations exist, one that
writes to a plain directory (which is also used by pg_receivexlog) and
one that writes to a tar file with optional compression.

Reviewed by Michael Paquier

Branch
------
master

Details
-------
http://git.postgresq= l.org/pg/commitdiff/56c7d8d4552180fd66fe48423bb2a9bb767c2d87<= br>
Modified Files
--------------
doc/src/sgml/ref/pg_basebackup.sgml=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = |=C2=A0 18 +-
src/bin/pg_basebackup/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 =C2=A02 +-
src/bin/pg_basebackup/pg_basebackup.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2= =A0 62 +-
src/bin/pg_basebackup/pg_receivexlog.c=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 10 +-
src/bin/pg_basebackup/receivelog.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0| 316 ++++------
src/bin/pg_basebackup/receivelog.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 =C2=A03 +-
src/bin/pg_basebackup/t/010_pg_basebackup.pl |=C2=A0 =C2=A06 +-<= br> src/bin/pg_basebackup/walmethods.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0| 886 +++++++++++++++++++++++++++
src/bin/pg_basebackup/walmethods.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 45 ++
src/include/pgtar.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A01 +
src/port/tar.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A02 +-
11 files changed, 1107 insertions(+), 244 deletions(-)
=

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)=
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-com= mitters



--001a1148454a7aa606053f88c1fd--