X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9968E4766DE for ; Thu, 15 May 2003 08:38:21 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 94375-08 for ; Thu, 15 May 2003 08:38:19 -0400 (EDT) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by postgresql.org (Postfix) with ESMTP id B5ADB4766E7 for ; Thu, 15 May 2003 08:38:19 -0400 (EDT) Received: from [10.1.2.130] (helo=dba2) by mail.libertyrms.com with esmtp (Exim 3.22 #3 (Debian)) id 19GI07-0000ZD-00 for ; Thu, 15 May 2003 08:38:23 -0400 Received: by dba2 (Postfix, from userid 1019) id F0F18D087; Thu, 15 May 2003 08:38:22 -0400 (EDT) Date: Thu, 15 May 2003 08:38:22 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: FW: [ADMIN] Out of disk space- error code Message-ID: <20030515123822.GC23812@libertyrms.info> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/183 X-Sequence-Number: 1962 On Thu, May 15, 2003 at 04:09:44PM +0530, Anagha Joshi wrote: > The snapshot of the Postgres log is like this: > ERROR: cannot extend trap: No space left on device. > Check free disk space. [. . .] > > That was clear from the logs that disk is full. But is there anyway that > I can check this programatically? i.e. when I call 'PgDatabase::Exec()' > to execute query from C++ API, I get error code reflecting 'low on the > disk'? I know I can get corresponding error message in C++ from Postgres > by > 'errorMessage()' method. I want specific error code for this. Postgres relies on your filesystem and OS. It doesn't know you're low on disk until it gets the error from the OS. Use your OS to warn you if you're going to run out of space. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada M2P 2A8 +1 416 646 3304 x110