Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byeqM-0003Dq-Qp for pgsql-committers@arkaria.postgresql.org; Mon, 24 Oct 2016 12:59:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1byeqL-0005KD-Qh for pgsql-committers@arkaria.postgresql.org; Mon, 24 Oct 2016 12:59:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1byeq8-00055n-GV for pgsql-committers@postgresql.org; Mon, 24 Oct 2016 12:58:56 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byeq1-00011J-Pe for pgsql-committers@postgresql.org; Mon, 24 Oct 2016 12:58:55 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E234521C3187 for ; Mon, 24 Oct 2016 15:58:47 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from mail.postgrespro.ru ([127.0.0.1]) by localhost (mail.postgrespro.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id baCtrmI63zhI for ; Mon, 24 Oct 2016 15:58:47 +0300 (MSK) Received: from mail-yb0-f177.google.com (mail-yb0-f177.google.com [209.85.213.177]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 6CDE721C317D for ; Mon, 24 Oct 2016 15:58:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1477313927; bh=JwmUbI3niVsg/AvABFWOYDs/nStql1soplhxFLdJ6A8=; h=In-Reply-To:References:From:Date:Subject:To:Cc; b=dNtnhDS/oE0Jfe/p6rvCxAQVf+NTS0VFx9qUF6w5Y8ZggV0MG8pwE0A6sykAb0fTh b8lGZ/CklBBWmcpAQUa4iDxIp/wUZuPuaGJkhRkS1gHGy4cwfuC+k2FtJNPA8dTH9F MrjOVmpNNlf+em9zDycmTdNl/Udep9nGqTbIJzYU= Received: by mail-yb0-f177.google.com with SMTP id g68so79364026ybi.0 for ; Mon, 24 Oct 2016 05:58:47 -0700 (PDT) X-Gm-Message-State: ABUngvdsLtXZAfFSoLj5S84xt/gng9kmcX+lcovhxmyMNNBMe9QVZ0RmYvQuI49u5LonZd0WkYW4AenMhenK8Q== X-Received: by 10.36.152.135 with SMTP id n129mr1958759itd.28.1477313925867; Mon, 24 Oct 2016 05:58:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.150.74 with HTTP; Mon, 24 Oct 2016 05:58:25 -0700 (PDT) In-Reply-To: References: From: Alexander Korotkov Date: Mon, 24 Oct 2016 15:58:25 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pgsql: Allow pg_basebackup to stream transaction log in tar mode To: Magnus Hagander Cc: pgsql-committers Content-Type: multipart/alternative; boundary=94eb2c05d2d0c5f508053f9bf3ff X-Pg-Spam-Score: -2.8 (--) 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 --94eb2c05d2d0c5f508053f9bf3ff Content-Type: text/plain; charset=UTF-8 I have following warning while compiling with clang. walmethods.c:437:9: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (r < 0) ~ ^ ~ 1 warning generated. It seems that 'r' should be 'ssize_t' instead of 'size_t'. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company On Sun, Oct 23, 2016 at 4: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/56c7d8d4552180fd66fe48423bb2a9 > bb767c2d87 > > 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 > --94eb2c05d2d0c5f508053f9bf3ff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have following warning while compiling with clang.<= /div>

walmethods.c:4= 37:9: warning: comparison of unsigned expression < 0 is always false [-W= tautological-compare]
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (r < 0)
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ~ ^ ~
1 warning generated.

=
It seems that 'r' should be 'ssize_t' instead of '= size_t'.

<= div class=3D"gmail_signature" data-smartmail=3D"gmail_signature">------
= Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Po= stgres Company

On Sun, Oct 23, 2016 at 4:28 PM, Magnus Haga= nder <magnus@hagander.net> 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.postgresq= l.org/pg/commitdiff/56c7d8d4552180fd66fe48423bb2a9bb767c2d87=

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

--94eb2c05d2d0c5f508053f9bf3ff--