Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8769A635514 for ; Fri, 26 Jun 2009 13:11:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 80498-04 for ; Fri, 26 Jun 2009 13:11:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 33F0D635507 for ; Fri, 26 Jun 2009 13:11:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n5QGBsLh007964; Fri, 26 Jun 2009 12:11:54 -0400 (EDT) To: marchesini@unipg.it cc: pgsql-sql@postgresql.org Subject: Re: .psql_history": No such file In-reply-to: <1246031595.4836.27.camel@ivangeo> References: <1246031595.4836.27.camel@ivangeo> Comments: In-reply-to ivan marchesini message dated "Fri, 26 Jun 2009 17:53:15 +0200" Date: Fri, 26 Jun 2009 12:11:54 -0400 Message-ID: <7963.1246032714@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.088 tagged_above=0 required=5 tests=AWL=0.088 X-Spam-Level: X-Archive-Number: 200906/108 X-Sequence-Number: 32713 ivan marchesini writes: > I have installed a postgres db using a datadir different > from /var/lib/pgsql/.psql_history. > then: > su postgres > psql postgres > All went fine but when I exit from psql from a db I obtain: > _______ > could not save history to file "/var/lib/pgsql/.psql_history": No such > file or directory > _______ Apparently the postgres account still has HOME set to /var/lib/pgsql. You'll want to make that point to some directory that actually exists. regards, tom lane