- Notifications
You must be signed in to change notification settings - Fork5
Commit3a8cdf3
committed
>> 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 withPGC_INTERNAL variables. The problem is in the fact thatwrite_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 anew copy of the file once it has started the database (before it acceptsany connections), which is when it will know about these parameters.Also updates the reading code to set the context to the one where thevariable 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, becauseset_config_option on lc_collate will speficially *not* call setlocale(),and we need that call. But we no longer call set_config_option fromthere.Magnus Hagander1 parenta28d04e commit3a8cdf3
2 files changed
+11
-3
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
830 | 830 |
| |
831 | 831 |
| |
832 | 832 |
| |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
833 | 837 |
| |
834 | 838 |
| |
835 | 839 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
4454 | 4454 |
| |
4455 | 4455 |
| |
4456 | 4456 |
| |
| 4457 | + | |
| 4458 | + | |
4457 | 4459 |
| |
4458 | 4460 |
| |
4459 | 4461 |
| |
| 4462 | + | |
| 4463 | + | |
4460 | 4464 |
| |
4461 | 4465 |
| |
4462 | 4466 |
| |
4463 | 4467 |
| |
4464 | 4468 |
| |
4465 |
| - | |
| 4469 | + | |
4466 | 4470 |
| |
4467 | 4471 |
| |
4468 | 4472 |
| |
|
0 commit comments
Comments
(0)