Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvlkh-0002l0-Jl for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Feb 2019 16:26:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvlkg-0005mz-CW for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Feb 2019 16:26:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvlkg-0005kW-2F for pgsql-bugs@lists.postgresql.org; Mon, 18 Feb 2019 16:26:42 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvlkd-0002M1-D2 for pgsql-bugs@lists.postgresql.org; Mon, 18 Feb 2019 16:26:40 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id D12765F79E; Mon, 18 Feb 2019 11:26:38 -0500 (EST) Date: Mon, 18 Feb 2019 11:26:38 -0500 From: Stephen Frost To: jk7255@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15636: PostgreSQL 11.1 pg_basebackup backup to a CIFS destination throws fsync error at end of backup Message-ID: <20190218162638.GH6197@tamriel.snowman.net> References: <15636-d380890dafd78fc6@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CZb08McUREi1kVi+" Content-Disposition: inline In-Reply-To: <15636-d380890dafd78fc6@postgresql.org> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --CZb08McUREi1kVi+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, * PG Bug reporting form (noreply@postgresql.org) wrote: > archive_mode = 'on' > archive_command = 'test ! -f /pgxlog1/data1/%f || cp /pgxlog1/data1/%f > /cifs/backups//dmp/archive/%f' I realize you were complaining about pg_basebackup here, but since you shared your config, I wanted to point out that the above is an absolutely *terrible* archive_command, *especially* when you've got a network filesystem involved. There's no guarantee with that archive command that the WAL makes it to the backup server or that it's completely written out on the backup server before the PG server removes the WAL- if something happened (a network hiccup, the CIFS server being rebooted, or the PG server restarting) there's a real possibility that you'd lose some portion of your WAL, which could make a backup invalid, or could make it so you can't do PITR. Please don't roll your own backup solution like this. Thanks! Stephen --CZb08McUREi1kVi+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcaty+AAoJEO1sijiDR2RVdk8QAIr7G1O7TanrjHerrzjlaE8e zVI9PPJCN4dmELgKUmVBGoASTv2k1YwUf5BOnZbm8mQZi9Dn1S4RuhVGbwfN6DxY fZIzUTJ9RHmGIoRQEPJng3Uv74ll3XkOuG+VHtc6CwTZps1ndVp2ioY57AXr0tlw 24k3PlEjcYWwOZ3vEyRRvDAnyYpPmLtFNLX+OtE1vyfF5WkNqx3mgleNoODijnSf A1oF6EX4KweFF+sjZtZP9AgKqEvJUzmxdSNencfs74geLl5N7OIKIhdBp1XAGLNX NN7eaTD/IFD3nfzJ6yYfCyL3P6RUSmnPXCzQjSCJDOAuZ4A+/fzNyjG2HWK87hZe QrZvcOxfzK0EhW0+15NNlkEeu7X0KtpgxA3Hd3MuVLQp+/DDeN/HaY4lkXquR3GF zeGJi/sV3PV6Ms8uNcQGj0kUnIiQzCY8UaaVwmZ5X+PGocTn05fIvtjgpdS/P30G lsouUkYrtwPT6o6JewRLwhGazPrtX01yvU//Q8QJLaeQT/37YxXVSVwohSTdpK+b tRvjFWJgmwVnXZFZyU7l3YAU0voTon3MGOWqtK3I+sOmXeamu2gsZW81zkrM5DuQ FOxkJapAqv0aCeKgftnUTWWFPPQRO7w4uVPSADMPPvvVqTXh+deCx+m621syai2B Q0Ay2StreutkNC5BT2Ke =gkAX -----END PGP SIGNATURE----- --CZb08McUREi1kVi+--