Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iz0w0-0007b3-Vg for pgsql-interfaces@arkaria.postgresql.org; Tue, 04 Feb 2020 16:20:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iz0vz-0000RL-LX for pgsql-interfaces@arkaria.postgresql.org; Tue, 04 Feb 2020 16:20:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iz0vz-0000RD-An for pgsql-interfaces@lists.postgresql.org; Tue, 04 Feb 2020 16:20:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iz0vx-0004FJ-4v for pgsql-interfaces@lists.postgresql.org; Tue, 04 Feb 2020 16:20:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 014GKF08007030; Tue, 4 Feb 2020 11:20:15 -0500 From: Tom Lane To: =?UTF-8?B?c3F1aWQgd2FyZA==?= cc: pgsql-interfaces@lists.postgresql.org Subject: Re: =?UTF-8?B?ZGlyZWN0b3J5IG5hbWUgZXF1YWwgZGF0YWJhc2UgbmFtZQ==?= In-reply-to: <1580814072.863026304@f532.i.mail.ru> References: <1580814072.863026304@f532.i.mail.ru> Comments: In-reply-to =?UTF-8?B?c3F1aWQgd2FyZA==?= message dated "Tue, 04 Feb 2020 14:01:12 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7028.1580833215.1@sss.pgh.pa.us> Date: Tue, 04 Feb 2020 11:20:15 -0500 Message-ID: <7029.1580833215@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?B?c3F1aWQgd2FyZA==?= writes: > Question is why directory name not equal as database name? Because (1) it doesn't work for database names that aren't legal as filenames (according to the none-too-well-standardized rules of your particular filesystem); (2) SQL requires us to treat "FOO" and "foo" as distinct names, but the filesystem might not; (3) renaming a database is dangerous, as there's no way to make the directory rename action atomic with commit of the system catalog updates; (4) renaming a database causes problems for concurrent sessions that might be in the middle of opening files in that database. And probably a few other reasons I don't recall off the top of my head. > Can i change it? No. regards, tom lane