Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fOgb6-0008FA-U4 for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Jun 2018 09:43:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fOgb5-0002NH-OE for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Jun 2018 09:43:47 +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.89) (envelope-from ) id 1fOgb5-0002N6-Db for pgsql-hackers@lists.postgresql.org; Fri, 01 Jun 2018 09:43:47 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fOgay-0007eD-1D for pgsql-hackers@postgresql.org; Fri, 01 Jun 2018 09:43:46 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 6C66440EA4 for ; Fri, 1 Jun 2018 11:43:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id GnwscwZDl0Ec for ; Fri, 1 Jun 2018 11:43:34 +0200 (CEST) Message-ID: <1527846213.2475.31.camel@cybertec.at> Subject: Loaded footgun open_datasync on Windows From: Laurenz Albe To: pgsql-hackers@postgresql.org Date: Fri, 01 Jun 2018 11:43:33 +0200 Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I recently read our documentation about reliability on Windows: > On Windows, if wal_sync_method is open_datasync (the default), write caching can > be disabled by unchecking > My Computer\Open\disk drive\Properties\Hardware\Properties\Policies\Enable write caching > on the disk. Alternatively, set wal_sync_method to fsync or fsync_writethrough, > which prevent write caching. It seems dangerous to me to initialize "wal_sync_method" to a method that is unsafe by default. Admittedly I am not a Windows man, but the fact that this has eluded me up to now leads me to believe that other people running PostgreSQL on Windows might also have missed that important piece of advice and are consequently running with an unsafe setup. Wouldn't it be smarter to set a different default value on Windows, like we do on Linux (for other reasons)? I am worried that there might be loads of Windows installations out there happily running productive databases with an unsafe setup, so I'd even suggest backpatching such a change. Yours, Laurenz Albe