pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Takahiro Kitayama <kitayama@sraoss.co.jp>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16866: pg_basebackup Windows Server 20160
Date: Wed, 20 Apr 2022 11:56:50 +0900
Message-ID: <20220420115650.b1bf304b13842788798a2fc2@sraoss.co.jp> (raw)

Hi,

PostgreSQL 14 has been fixed to handle files larger than 4GB on Windows, 
but is not currently backported to previous versions. 
In pgsql-bugs ML, considering this several months after the PostgreSQL 14 release 2021/9.
I would like to know about current status, and if there is no problem, please backport to past versions.

The excerpt below is an email about this matter.

Re: BUG #16866: pg_basebackup Windows Server 2016
https://www.postgresql.org/message-id/flat/YCsZIX2A2Ilsvfnl%40paquier.xyz#64134affb64b2ec286614648c2...

| From: 	Michael Paquier <michael(at)paquier(dot)xyz>
| To: 	ivan(dot)salvato(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
| Subject: 	Re: BUG #16866: pg_basebackup Windows Server 2016
| Date: 	2021-02-16 01:00:17
| Message-ID: 	YCsZIX2A2Ilsvfnl@paquier.xyz
| Views: 	Raw Message | Whole Thread | Download mbox | Resend email
| Lists: 	pgsql-bugs
| 
| On Mon, Feb 15, 2021 at 03:12:10PM +0000, PG Bug reporting form wrote:
| > Problem:
| > backup fails when the base.tar.gz achieve di 4 GB with pg_basebackup: error:
| > could not stat file
| > "W:\POSTGRES\pg_backup\Base-Backup_2021-02-05_103921/base.tar.gz": Unknown
| > error.
| 
| 
| This comes from the fact that Windows stat() is not able to handle
| files larger than 4GB by design, and the fact that pg_basebackup tries
| to make durable all the contents of a base backup when it is done
| streaming something on the target host.  I bet that the failure you
| are seeing is the fsync() part for base.tar.gz.
| 
| 
| You can bypass that by using --no-sync as option, which would
| basically emulate what Postgres <= 9.6 is doing.  In Postgres 14, the
| emulation of stat() has been fixed to handle the case of files larger
| than 4GB:
| https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=bed90759fcbcd72d4d06969eebab81e47326f...
| 
| 
| This is arguably a bugfix, so we may consider a backpatch in the
| future, but knowing how invasive the fix is we are still in a phase
| where we want to have some dust settle on this change and Windows has
| its own way to do weird things all the time.  IMO, It may be better to
| revisit that a couple of months after 14 is released so as there is
| some feedback from the field with this change.
| --
| Michael

Thanks in advance
-- 
Takahiro Kitayama <kitayama@sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/





view thread (5+ messages)  latest in thread

Message-ID: <20220420115650.b1bf304b13842788798a2fc2@sraoss.co.jp>
Permalink:  ../20220420115650.b1bf304b13842788798a2fc2@sraoss.co.jp/
Also on:    postgresql.org/message-id/20220420115650.b1bf304b13842788798a2fc2@sraoss.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: kitayama@sraoss.co.jp
  Subject: Re: BUG #16866: pg_basebackup Windows Server 20160
  In-Reply-To: <20220420115650.b1bf304b13842788798a2fc2@sraoss.co.jp>
  References: <20220420115650.b1bf304b13842788798a2fc2@sraoss.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox