Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC4ik-00030R-NA for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Nov 2017 14:19:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eC4ik-0000NM-9q for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Nov 2017 14:19:18 +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 1eC4i1-0006pB-Rg for pgsql-bugs@postgresql.org; Tue, 07 Nov 2017 14:18:33 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC4hx-0004RE-Sk for pgsql-bugs@postgresql.org; Tue, 07 Nov 2017 14:18:33 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 16DF25F795; Tue, 7 Nov 2017 09:18:28 -0500 (EST) Date: Tue, 7 Nov 2017 09:18:28 -0500 From: Stephen Frost To: Alvaro Herrera Cc: Raphael Hertzog , pgsql-bugs@postgresql.org Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there Message-ID: <20171107141827.GW4628@tamriel.snowman.net> References: <20171107135454.lbelbbvfgadljmuj@home.ouaza.com> <20171107141338.getbacqd2vich7yi@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yzJz1K0sF3xsn2Qa" Content-Disposition: inline In-Reply-To: <20171107141338.getbacqd2vich7yi@alvherre.pgsql> User-Agent: Mutt/1.5.21 (2010-09-15) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --yzJz1K0sF3xsn2Qa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alvaro, Raphael, * Alvaro Herrera (alvherre@alvh.no-ip.org) wrote: > Raphael Hertzog wrote: >=20 > > PostgreSQL 10 no longer works on a (Kali) live system where the > > root filesystem is an overlayfs with an underlying squashfs > > filesystem (where postgresql and its initial file structure > > is present) and a writable tmpfs overlay. >=20 > Please create a machine that works this way and get it added to the > buildfarm, so that this sort of thing doesn't surprise us in the future > months after the fact. While I agree with this, I'm not entirely convinced that this isn't an issue with the implementation of the underlying filesystem after all. I haven't had a chance to go read those other bug reports, but my fsync() manpage pretty clearly seems to say that fsync should only be returning EINVAL if it's called on a special file (FIFO, pipe, et al). There's certainly no indication that it's ok for the same file to sometimes support fsync() and other times *not* support fsync(). That's pretty bizarre. Why wouldn't it make sense for the filesystem to realize it's a no-op if there's been no changes? Thanks! Stephen --yzJz1K0sF3xsn2Qa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJaAcCzAAoJEO1sijiDR2RVFisP/3rvQFHU5Uc9cixVLU5MVw68 vFQifJi2balRFlk4CzDywKwXo62aRWLeYHeD0jQWYDw5zvd/z/QWPs/gzsrMNewV kK4y3trYatLzxIrxK4S7ssABeo61EsH4PxaOKamCnGaxRSyV5ophDF8juDAr6jp7 qRZeUN8Re0XXahdnfPF2FYa5heP+PszpB0T+QUQUcXuTA/0QE1KmvCMDZasszU8A 8/l948sLYV1m8eN05TQpigwSqT1pEOGtlhUR5lOethC2OITQ7PB0UPQMc1dXvAQd zBhlOXnNerL+585HpWuziSNmKFqNvL/sA2g/F0I/QIILjrKXUOeNFeAAf3aMUBp9 YBTX2eBuVqHIYJYJHGr9/TaBcNthS2WuwfjxGDinhqq+NEyuL0y6cPZrailWOXuO MxufYA0nKlyvWp+E57WMXrhV6iitdNudUl6mVQ7H9ccf5JQXXaAdUdRhuNYQUhih oVDaWPiMkOqEeA8heWM+TL9gKgRsZes8mXRd8b+1xZXItWpydOJOg+tg46e4KydE wnVhnWrs+2RGWN54yp0sOIVcNJrN93vhklz6NlUDoYC3QUdsObhMT3/YGkQlYBrW hdVABcdV3tsHK49RFMDr4Idg9WnDW0bzNAr+tnrKVb6wT0eKtUCDtxZE+mdbDnKi 9sowyTuMVsZlHuaWmI7g =bqIB -----END PGP SIGNATURE----- --yzJz1K0sF3xsn2Qa--