Skip site navigation (1) Skip section navigation (2)

[WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Pg Hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: [WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf
Date: 2012-07-02 12:08:22
Message-ID: 008801cd584b$60d2ed80$2278c880$@kapila@huawei.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Attached is a Patch to change the parsing of pg_ident.conf to make it
similar to pg_hba.conf. 
This is based on Todo Item: 
http://archives.postgresql.org/pgsql-hackers/2011-06/msg02204.php 

Purpose - This will allow to catch syntax errors in pg_ident at the startup
or reload time.
  
  
Changes are described as follows: 
a.      Make the load_ident() functionality same as load_hba, such that it
cleans the previous context, after successful parsing. 
b.      Change the load_ident(), so that parsing can be done during load
time and the parsed lines are saved. 
c.      Change the functionality of parse_ident_usermap() so that parsing is
not done during authentication. 
d.      If load_ident() fails for parsing, it returns false and error is
issued. 
        This point I am not sure, as for pg_hba failure it issues FATAL at
startup. Currently I have kept error handling for load of pg_ident same as
pg_hba  
  
I have done the basic testing and test is still in progress. 
  
Suggestions? 
  
  
With Regards, 
Amit Kapila. 

 


Attachment: pg_ident_parsing.patch
Description: application/octet-stream (15.2 KB)

Responses

pgsql-hackers by date

Next:From: Nils GorollDate: 2012-07-02 13:02:48
Subject: Re: Update on the spinlock->pthread_mutex patch experimental: replace s_lock spinlock code with pthread_mutex on linux
Previous:From: Marc CousinDate: 2012-07-02 09:32:50
Subject: small bug on 3-digit years in 9.2-dev

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group