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

Re: [HACKERS] select like...not using index

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>,"PgSql-Win32" <pgsql-hackers-win32(at)postgresql(dot)org>,<pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] select like...not using index
Date: 2004-06-07 21:04:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32pgsql-patches
>> It certainly doesn't. There still was a bug with the locale stuff,
>> though - the GUC variable was not set in the child 
>processes. So "show
>> lc_collate" would *always* return "C", for example. attached 
>patch fixes
>> this.
>Hm.  Why were these vars not propagated by the regular 
>mechanism for GUC
>variables (write_nondefault_variables or whatever it's called)?  If the
>problem is that it's not accepting PGC_INTERNAL values, then we need to
>fix it there not here, because otherwise we'll have to pass all the
>PGC_INTERNAL variables through the backend_variables file, which seems
>like a recipe for more of the same sort of bug.

Good point :-(

I think the problem is not only that it specifically does not deal with
PGC_INTERNAL variables. The problem is in the fact that
write_nondefault_variables is called *before* the locale is read
(because the locale is read from pg_control and not from any of the
"usual" ways to read it).

Attached patch is another stab at fixing it. It makes postmaster dump a
new copy of the file once it has started the database (before it accepts
any connections), which is when it will know about these parameters.
Also updates the reading code to set the context to the one where the
variable was originally set (PGC_POSTMASTER won't work for PGC_INTERNAL,
and the other way around).

We still pass lc_collate through the special file, because
set_config_option on lc_collate will speficially *not* call setlocale(),
and we need that call. But we no longer call set_config_option from


Attachment: locale_guc.patch
Description: application/octet-stream (2.0 KB)


pgsql-patches by date

Next:From: Thomas HallgrenDate: 2004-06-07 22:08:30
Subject: Re: [HACKERS] dynamic_library_path on Win32
Previous:From: Bruce MomjianDate: 2004-06-07 20:36:03
Subject: pg_dump/pg_dumpall start/stop times

pgsql-hackers-win32 by date

Next:From: DruDate: 2004-06-08 06:21:25
Subject: Speed issues
Previous:From: Tom LaneDate: 2004-06-07 20:16:26
Subject: Re: [HACKERS] select like...not using index

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