Re: set_client_encoding is broken - Mailing list pgsql-hackers

From Zdenek Kotala
Subject Re: set_client_encoding is broken
Date
Msg-id 1251742804.1312.143.camel@localhost
Whole thread Raw
In response to Re: set_client_encoding is broken  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: set_client_encoding is broken
List pgsql-hackers
Tom Lane píše v po 31. 08. 2009 v 11:00 -0400:
> 3. Push the startup-packet GUC processing (approx. lines 3340..3395 of
> postgres.c, as of CVS HEAD) into InitPostgres, so it can be run during
> the startup transaction.  This is not too unclean, though it would
> mean exporting process_postgres_switches() from postgres.c; I guess
> the main thing I don't like about it is that InitPostgres has enough
> weird responsibilities already.
> 
> I'm leaning to the third choice, but I wonder if anyone has any
> comments
> or better ideas.

It seems to me that 3 is OK.

Another possibility is that InitPostgres can only fill up rel cache and
GUC processing can stay on the same place. But in general, this problem
can affect any other GUC variable which has assign hook and needs to
lookup. 

I don't know how it works before, but I'm afraid that user can get error
message in server encoding before it is correctly set.

Zdenek 



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: 8.5 release timetable, again
Next
From: Bruce Momjian
Date:
Subject: Re: 8.5 release timetable, again