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 1l7uL2-0004Yp-JJ for pgsql-admin@arkaria.postgresql.org; Fri, 05 Feb 2021 06:11:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7uL0-000866-Gh for pgsql-admin@arkaria.postgresql.org; Fri, 05 Feb 2021 06:11:26 +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 1l7uL0-00085z-9R for pgsql-admin@lists.postgresql.org; Fri, 05 Feb 2021 06:11:26 +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 1l7uKx-00065J-P9 for pgsql-admin@lists.postgresql.org; Fri, 05 Feb 2021 06:11:25 +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 1156BKvm081342; Fri, 5 Feb 2021 01:11:20 -0500 From: Tom Lane To: RAJAMOHAN cc: pgsql-admin@lists.postgresql.org Subject: Re: SELECT pg_reload_conf(); returning true despite hba file loading was failed In-reply-to: References: Comments: In-reply-to RAJAMOHAN message dated "Fri, 05 Feb 2021 11:29:25 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <81340.1612505480.1@sss.pgh.pa.us> Date: Fri, 05 Feb 2021 01:11:20 -0500 Message-ID: <81341.1612505480@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk RAJAMOHAN writes: > After checking the logs, I found out that the hba file was not loaded > successfully because of the invalid character. My concern is > why pg_reload_conf is returning true if the load was unsuccessful. A true result only indicates that a SIGHUP signal was sent to the postmaster; your backend process has no visibility into whether the signal was even received, never mind whether the postmaster did what you wanted. (I thought this was adequately documented, but it seems not.) > Is there any option to check if the load is successful or not, without > going through the logs? The pg_hba_file_rules view can help you debug a faulty pg_hba file. regards, tom lane