Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpvvV-0006t2-96 for pgsql-general@arkaria.postgresql.org; Sun, 06 Jun 2021 16:47:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lpvvT-0003Fr-62 for pgsql-general@arkaria.postgresql.org; Sun, 06 Jun 2021 16:47:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpvvS-0003Fi-TP for pgsql-general@lists.postgresql.org; Sun, 06 Jun 2021 16:47:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpvvP-0007Jv-KA for pgsql-general@lists.postgresql.org; Sun, 06 Jun 2021 16:47:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 156Gkvs3651678; Sun, 6 Jun 2021 12:46:57 -0400 From: Tom Lane To: RAJAMOHAN cc: pgsql-general@lists.postgresql.org Subject: Re: Symbolic link breaks for postgresql.auto.conf In-reply-to: References: Comments: In-reply-to RAJAMOHAN message dated "Sun, 06 Jun 2021 21:30:50 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <651676.1622998017.1@sss.pgh.pa.us> Date: Sun, 06 Jun 2021 12:46:57 -0400 Message-ID: <651677.1622998017@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk RAJAMOHAN writes: > I am trying to keep a symbolic link for the *postgresql.auto.conf* outside > the data directory. The link gets created but whenever I issue an alter > system statement it gets broken. This is not supported. Don't do it. The right way to keep the hand-maintained config files outside the data directory is not the way you've done it here, either. It might accidentally work, but the preferred way is to put "data_directory = whatever" in postgresql.conf and then start the postmaster with -D pointing at where the config files are. But in any case, postgresql.auto.conf is not hand-maintained; it is part of the cluster data, so it belongs in the data directory. regards, tom lane