cleanup in open_auth_file

Ted Yu <yuzhihong@gmail.com>

From: Ted Yu <yuzhihong@gmail.com>
To: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-24T00:54:58Z
Lists: pgsql-hackers

Attachments

Hi,
I was looking at the following commit:

commit efc981627a723d91e86865fb363d793282e473d1
Author: Michael Paquier <michael@paquier.xyz>
Date:   Thu Nov 24 08:21:55 2022 +0900

    Rework memory contexts in charge of HBA/ident tokenization

I think when the file cannot be opened, the context should be deleted.

Please see attached patch.

I also modified one comment where `deleted` would be more appropriate verb
for the context.

Cheers

Commits

  1. Create memory context for tokenization after opening top-level file in hba.c

  2. Rework memory contexts in charge of HBA/ident tokenization