ALTER SYSTEM and ParseConfigFile() - Mailing list pgsql-hackers

From Stephen Frost
Subject ALTER SYSTEM and ParseConfigFile()
Date
Msg-id 20150508175627.GX30322@tamriel.snowman.net
Whole thread Raw
Responses Re: ALTER SYSTEM and ParseConfigFile()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Greetings,
 While working through the pg_file_settings patch, I came across this comment above ParseConfigFp() (which is called by
ParseConfigFile()):

src/backend/utils/misc/guc-file.l:603
------------------------------------------------------* Output parameters:*  head_p, tail_p: head and tail of linked
listof name/value pairs** *head_p and *tail_p must be initialized to NULL before calling the outer* recursion level.
Onexit, they contain a list of name-value pairs read* from the input file(s).
 
------------------------------------------------------
 However, in 65d6e4c, ProcessConfigFile(), which isn't part of the recursion, was updated with a second call to
ParseConfigFile(for the PG_AUTOCONF_FILENAME file), passing in the head and tail values which had been set by the first
call.
 I'm a bit nervous that there might be an issue here due to how flex errors are handled and the recursion, though it
mightalso be fine (but then why comment about it?).
 
 In any case, either the comment needs to be changed, or we should be passing clean NULL variables to ParseConfigFile
andthen combining the results in ProcessConfigFile().
 
 This is pretty orthogonal to the changes for pg_file_settings, so I'm going to continue working through that and
hopefullyget it wrapped up soon.
 
     Thanks!
    Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Next
From: Tom Lane
Date:
Subject: Re: ALTER SYSTEM and ParseConfigFile()