Jeff Davis pgsql
Wed Dec 13 15:33:42 PST 2006
On Wed, 2006-12-13 at 23:06 +0000, Christopher Browne wrote:
> Jeff Davis wrote:
> > If a config option is terminated with EOF, the loop is terminated before
> > the values are stored. So, I check for parse_start==2 outside the loop,
> > and if true, store the config variables.
> >
> > I also attached slony-test.diff which can be used to see what values are
> > acutally being stored from the configuration file. This can be used for
> > debugging.
> >   
> Here is a sample .conf file (compressed, to ensure its integrity ;-))
> that causes the failure.
> 

Here is a fix for that. The comment-eating regex was broken because it
ended with a "$", matching only EOL. I changed it to "#.*" which should
eat any proper comment. This is the same as postgresql's guc-file.l.

So, there were two problems with ProcessConfigFile(). The first was that
the loop would exit when getting an EOF without saving the config
variable, even if the line was complete but just lacking an EOL. The
second was that the comment regex only matched comments ending in EOL,
not EOF.

Regards,
	Jeff Davis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slony-config2.diff
Type: text/x-patch
Size: 1663 bytes
Desc: not available
Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20061213/baed583b/attachment.bin 



More information about the Slony1-general mailing list