Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TT1qj-000750-Gd for pgsql-bugs@postgresql.org; Tue, 30 Oct 2012 02:46:41 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TT1qd-00064o-OR for pgsql-bugs@postgresql.org; Tue, 30 Oct 2012 02:46:40 +0000 Received: by mail-pa0-f46.google.com with SMTP id hz1so3883240pad.19 for ; Mon, 29 Oct 2012 19:46:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=BihSkC04956htQ6G+0621deWtV2MLCqXQjgGhIwe9aM=; b=agr4est2O64E4K1zQjlmlmrZTgRAzASkhm5YmesmBBQHY5MhYPnE09yTVWsFYm2gGQ kJGxqFvOR6BjifacTDrjF9MnbAq4jRdJAMgseTIgaWDqNQHBQy4xBg3VTdjX22Bi1o+h ESKCdM3SuYndNbW/ZgER5oZUJQdEXcv1+6Y6b+YsDEIbBS64GD5IrMHVqkpFp2zfwW5f 0p7vHrrsY59WlnDlPk0PLQlSqh+m09UaUFZyVWZI5RrZ6wJOeirHA44q+ld4N33KLbxi gHQajMn0F+QZRU8oh/b1WGNPbLw5v69nBz6TqPgZSztTPSOcKU10aQZ0vPMFNadA5dnP OKdw== Received: by 10.68.253.4 with SMTP id zw4mr13098250pbc.143.1351565194100; Mon, 29 Oct 2012 19:46:34 -0700 (PDT) Received: from ayaki.localdomain (124-148-90-153.dyn.iinet.net.au. [124.148.90.153]) by mx.google.com with ESMTPS id a10sm6915209paw.17.2012.10.29.19.46.31 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 19:46:33 -0700 (PDT) Message-ID: <508F3F85.2030201@ringerc.id.au> Date: Tue, 30 Oct 2012 10:46:29 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: tixu@cs.ucsd.edu CC: pgsql-bugs@postgresql.org Subject: Re: BUG #7624: Misleading Log Message & Inconsistent Configuration Design References: In-Reply-To: X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmcw0LZNsIG8dQuG73nyV21c7Xi0+nAW2zPNfn/km5nOEqZB/WKR+04DsyL1drhKJt/4kly X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/237 X-Sequence-Number: 34537 On 10/28/2012 03:35 PM, tixu@cs.ucsd.edu wrote: > I really suggest to make the configuration file consistent in this case. But > I understand it might not be easy. But at least I think we should print a > better log message which pinpoints to the absolute path like > > FATAL: 58P01: could not create lock file > "/home/tianyin/postgresql-9.2.1/local/pgsql/data/local/pgsql/data/.s.PGSQL.5432.lock": > No such file or directory Essentially, you want PostgreSQL to print absolute paths in error messages, instead of paths relative to the server datadir? I'd prefer to do it slightly differently, but I like the general idea. I'd instead want to write: FATAL: 58P01: could not create lock file "local/pgsql/data/.s.PGSQL.5432.lock" (cwd="/home/tianyin/postgresql-9.2.1/local/pgsql/data/"): No such file or directory By spelling out the CWD explicitly there's no impression given that the user ever actually specified the whole path in the configuration anywhere, so it's clearer how the path came to be. It also shows which part of the path is known-good (since it's the CWD) and which could be at issue. -- Craig Ringer