Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fANVF-00066n-AJ for pgsql-general@arkaria.postgresql.org; Sun, 22 Apr 2018 22:30:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fANVD-0006OX-FP for pgsql-general@arkaria.postgresql.org; Sun, 22 Apr 2018 22:30:35 +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 1fANVC-0006ON-RM for pgsql-general@lists.postgresql.org; Sun, 22 Apr 2018 22:30:35 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fANV9-0004Ch-P4 for pgsql-general@postgresql.org; Sun, 22 Apr 2018 22:30:33 +0000 Received: by mail-pf0-x230.google.com with SMTP id a26so2551897pfi.7 for ; Sun, 22 Apr 2018 15:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=qq/CgkKrXKi9oe9xymlvnuUDQZM+JfShDjbyT64kYqA=; b=HUQ2p2JIA+LSOFYCfskDuFPTsditbRef3xlFNOGOjxw59bs06gQClcVd1WJTOtcgza PfNbyi8ldfZJ5q0e1H84tinn+FBPEI8y8AlpBfiKVturjdfWNqD3/dIEVM66ILFj11qt Xs9kxAu2YXpvmrEFy97qhNO1jKYy7vInq3TlSzbMACWcPeIJ9ZykXWFgJlj+0P2wNhlA BSQSBirVbEoT+KR77K7ks2+E0hYeqfLMBWM1KwurHOSyaXab21dxUK82nYK9ahwAfKQA PnTq/KnKter/3QzIYYO9CQv29fR/ksMQYrI739I+9l++ZrgSM/F19nmY65mQxEEtjPG2 ZMlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=qq/CgkKrXKi9oe9xymlvnuUDQZM+JfShDjbyT64kYqA=; b=MzSDlh0x3G3TPHxwBuiV1S/P+Sl6oB+Ne3zzmCj9FnSHYrxfjhWM10Xhk4oXS3vU6y 5CeNLEDHD5RbhhfYO25EKyC3lbgbMghK+86na32l1hDaI1xAqx85eFBzWJIPSpJbWNSh kKLIzX5u8XQUPpEkcNEI9cE9XTFnAbGh9fH0LM7hOihiueISFWBMX2043w+XWzmiz/Vj dFnfY+57uQ3Bxl0kaAFeUFwuAjO8dqz+1E82gXLexXacyrviIyVL3uXmA1Zxtrxbyb7o 3rxO5/8uhwPsIvQizxqk00nOS4Znf9//yDAOH1OmiG0Py/cZ04i9H+8wQrthM9qKrNhM DmHg== X-Gm-Message-State: ALQs6tD3qtIqimWFf4OljHVG+zBvPiXRX4Inpx+S4obTransOX+5+lD/ 84gHv5mb7kwXnnjQ3Aff1QeSXPpP X-Google-Smtp-Source: AIpwx4/TFcsc32Q/IEGY6slYUCeSGkogkuJScsBqmQm4GsxnJW+LrE1jCmOCtryQ4jIEjQW4qgWf+g== X-Received: by 10.99.112.29 with SMTP id l29mr14874760pgc.299.1524436229616; Sun, 22 Apr 2018 15:30:29 -0700 (PDT) Received: from tim-desktop (2001-44b8-31f2-bb00-9cc5-7521-4ae5-747c.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:9cc5:7521:4ae5:747c]) by smtp.gmail.com with ESMTPSA id v186sm20006548pfb.182.2018.04.22.15.30.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Apr 2018 15:30:28 -0700 (PDT) User-agent: mu4e 0.9.18; emacs 26.1 From: Tim Cross To: pgsql-general Subject: Postgres and fsync Date: Mon, 23 Apr 2018 08:30:25 +1000 Message-ID: <87tvs2q3ge.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi all, the recent article in LWN regarding issues with fsync and error reporting in the Linux kernel and the potential for lost data has prompted me to ask 2 questions. 1. Is this issue low level enough that it affects all potentially supported sync methods on Linux? For example, if you were concerned about this issue and you had a filesystem which supports open_sync or open_datasync etc, is switching to one of these options something which should be considered or is this issue low level enough that all sync methods are impacted? 2. If running under xfs as the file system, what is the preferred sync method or is this something which really needs to be benchmarked to make a decision? For background, one of our databases is large - approximately 7Tb with some tables which have large numbers of records with large inserts per day i.e. approx 1,600,000,000 new records per day added and a similar number deleted (no updates), maintaining a table size of about 3Tb, though it is expected we will be increasing the number of retained records and will see the table grow to about 6Tb. This represents a fair amount of I/O and we want to ensure we have the fastest I/O we can achieve with highest data reliability we can get. The columns in the table are small i.e. 7 double precision, 2 integer, 1 date and 2 timestamp. Platform is RHEL, Postgres 9.6.8, filesystem xfs backed by HP SAN. Current wal_sync_method is fsync. Tim -- Tim Cross