pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: RAJAMOHAN <garajamohan@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: SELECT pg_reload_conf(); returning true despite hba file loading was failed
Date: Fri, 05 Feb 2021 01:11:20 -0500
Message-ID: <81341.1612505480@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFzdntvG95eRKf0NByK4edmG8AWwLvn2-AE5R8UZiwQu=YCRqw@mail.gmail.com>
References: <CAFzdntvG95eRKf0NByK4edmG8AWwLvn2-AE5R8UZiwQu=YCRqw@mail.gmail.com>

RAJAMOHAN <garajamohan@gmail.com> 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





view thread (5+ messages)  latest in thread

Message-ID: <81341.1612505480@sss.pgh.pa.us>
Permalink:  ../81341.1612505480@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/81341.1612505480@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, garajamohan@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: SELECT pg_reload_conf(); returning true despite hba file loading was failed
  In-Reply-To: <81341.1612505480@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox