X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id F27149DCCD7; Thu, 22 Dec 2005 04:08:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38158-01-2; Thu, 22 Dec 2005 04:08:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [203.20.62.76]) by postgresql.org (Postfix) with ESMTP id 31B919DCCC2; Thu, 22 Dec 2005 04:08:09 -0400 (AST) Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian)) id 1EpLUd-00069F-00; Thu, 22 Dec 2005 19:08:07 +1100 Date: Thu, 22 Dec 2005 09:08:07 +0100 From: Martijn van Oosterhout To: Benjamin Arai Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] Running with fsync=off Message-ID: <20051222080759.GB21783@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Benjamin Arai , pgsql-admin@postgresql.org, pgsql-general@postgresql.org References: <43AA5607.20000@cs.ucr.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aM3YZ0Iwxop3KEKx" Content-Disposition: inline In-Reply-To: <43AA5607.20000@cs.ucr.edu> User-Agent: Mutt/1.3.28i X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.066 required=5 tests=[AWL=0.066] X-Spam-Score: 0.066 X-Spam-Level: X-Archive-Number: 200512/270 X-Sequence-Number: 19990 --aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 21, 2005 at 11:30:15PM -0800, Benjamin Arai wrote: > I want to be able to do large updates on an existing backed up database= =20 > with fsync=3Doff but at the end of the updates how do I ensure that the= =20 > data gets synced? Do you know if that actually makes it much faster? Maybe you're better off splitting WAL into a seperate disk. > Somebody said running "sync ; sync; sync" from the console. This seems= =20 > reasonable but why not just "sync" or is there another command I should= =20 > ruyn after the update either in postgres or the console? The reason is partly historical. On some OSes running sync only starts the process but returns immediatly. However, there can only be one sync at a time so the second sync waits for the first the finish. The third is just for show. However, on Linux at least the one sync is enough. Don't you need to restart postgres to change that parameter anyway? Have a nice day, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. --aM3YZ0Iwxop3KEKx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFDql7eIB7bNG8LQkwRAvuqAJ9f21XIH0kbOzx+zBOPLtjeSUdQNgCfaVC8 GhjXGBUJaBUgesnhO5D3w2U= =q8mx -----END PGP SIGNATURE----- --aM3YZ0Iwxop3KEKx--