Postgresql.conf, initdb patch

Started by Josh Berkusabout 23 years ago10 messagespatches
Jump to latest
#1Josh Berkus
josh@agliodbs.com

Folks,

Attached are 2 patches:

postgresql.conf.patch re-orders postgresql.conf.sample according to the order
patched into runtime.sgml last week.

initdb.patch, written by Shridhar, patches initdb so that the LC_*
localization variables are inserted into postgresql.conf at the point
commented "#LC VARS GO HERE!"

As I'm not great a patch-making, I've also attached the completed
postgresql.conf.sample for reference.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

Attachments:

initdb.patchtext/x-diff; charset=us-ascii; name=initdb.patchDownload+9-12
postgresql.conf.sampletext/plain; charset=us-ascii; name=postgresql.conf.sampleDownload
postgresql.conf.patchtext/x-diff; charset=us-ascii; name=postgresql.conf.patchDownload+205-179
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#1)
Re: Postgresql.conf, initdb patch

Josh Berkus <josh@agliodbs.com> writes:

postgresql.conf.patch re-orders postgresql.conf.sample according to the ord=
er=20
patched into runtime.sgml last week.

I've probably already broken this patch by modifying .conf.sample :-(.
Will take care of the cleanup.

BTW, now that I look more closely at the new docs, there are some
classifications that seem pretty bizarre. For instance,
CLIENT_MIN_MESSAGES has nothing to do with the server log and doesn't
seem to belong in a section about logging ...

regards, tom lane

#3Josh Berkus
josh@agliodbs.com
In reply to: Tom Lane (#2)
Re: Postgresql.conf, initdb patch

Tom,

BTW, now that I look more closely at the new docs, there are some
classifications that seem pretty bizarre. For instance,
CLIENT_MIN_MESSAGES has nothing to do with the server log and doesn't
seem to belong in a section about logging ...

Would have been nice if someone had mentioned it before. I posted the sample
order previously; I don't necessarily understand all of the options
correctly.

What is CLIENT_MIN_MESSAGES for, then?

--
-Josh Berkus
Aglio Database Solutions
San Francisco

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#3)
Re: Postgresql.conf, initdb patch

Josh Berkus <josh@agliodbs.com> writes:

What is CLIENT_MIN_MESSAGES for, then?

Controls which messages get sent to the client.

regards, tom lane

#5Josh Berkus
josh@agliodbs.com
In reply to: Tom Lane (#4)
Re: Postgresql.conf, initdb patch

Tom,

What is CLIENT_MIN_MESSAGES for, then?

Controls which messages get sent to the client.

So, I should put it under "Client Connection Defaults", then?

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#5)
Re: Postgresql.conf, initdb patch

So, I should put it under "Client Connection Defaults", then?

Probably. But then you have to figure out what to do with the list of
values that it shares with server_min_messages.

Another tack is to change the section title to something more
inclusive. Maybe "Error Reporting and Logging"?

regards, tom lane

#7Josh Berkus
josh@agliodbs.com
In reply to: Tom Lane (#6)
Re: Postgresql.conf, initdb patch

Tom,

Another tack is to change the section title to something more
inclusive. Maybe "Error Reporting and Logging"?

Sounds good to me. Shall we apply the patch I just submitted, and then I'll
submit a patch for both runtime.sgml and postgresql.conf.sample?

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#7)
Re: Postgresql.conf, initdb patch

Josh Berkus <josh@agliodbs.com> writes:

Another tack is to change the section title to something more
inclusive. Maybe "Error Reporting and Logging"?

Sounds good to me. Shall we apply the patch I just submitted, and then I'll
submit a patch for both runtime.sgml and postgresql.conf.sample?

I can fold that in while I'm doing the other stuff...

regards, tom lane

#9Peter Eisentraut
peter_e@gmx.net
In reply to: Josh Berkus (#1)
Re: Postgresql.conf, initdb patch

Josh Berkus writes:

initdb.patch, written by Shridhar, patches initdb so that the LC_*
localization variables are inserted into postgresql.conf at the point
commented "#LC VARS GO HERE!"

It's pretty pointless to use

cat $file | sed 's/.../'

because sed can open files perfectly well:

sed 's/.../' $file

You should clean up the temp files in exit_nicely(), because if someone or
something aborts initdb in the middle, then the trap will at least have a
better chance to remove the files.

Actually, I doubt that it's safe and/or polite to write temporary files in
the current directory. If you want to see a better way to handle
temporary files in shell scripts, look in configure near occurences of
'mktemp'.

As I'm not great a patch-making, I've also attached the completed
postgresql.conf.sample for reference.

Use diff -c instead of plain diff and put the old file first and the new
file second.

--
Peter Eisentraut peter_e@gmx.net

#10Shridhar Daithankar
shridhar_daithankar@persistent.co.in
In reply to: Peter Eisentraut (#9)
Re: Postgresql.conf, initdb patch

On Tuesday 01 July 2003 05:39, Peter Eisentraut wrote:

Josh Berkus writes:

initdb.patch, written by Shridhar, patches initdb so that the LC_*
localization variables are inserted into postgresql.conf at the point
commented "#LC VARS GO HERE!"

It's pretty pointless to use

cat $file | sed 's/.../'

because sed can open files perfectly well:

sed 's/.../' $file

You should clean up the temp files in exit_nicely(), because if someone or
something aborts initdb in the middle, then the trap will at least have a
better chance to remove the files.

Argh. That was me who did that patch and it was not good.

Anyway attached is the patch

* Which uses sed correctly
* and get rid of temp files at all.

Hopefully this will be good enough.

Shridhar

Attachments:

initdb.patchtext/x-diff; charset=iso-8859-1; name=initdb.patchDownload+16-16