Re: [PATCHES] Relocatable locale

2004-06-08 Thread Peter Eisentraut
Bruce Momjian wrote: > With no one coming up with a better idea, this applied patch adds > PGETC (for pg_service.conf) and PGLOCALE (for locale dir) environment > variable processing to libpq. Considering that in other places these locations are referred to as "sysconfdir" and "localdir", it woul

[PATCHES] cost_nonsequential_access()

2004-06-08 Thread Manfred Koizar
The comment describing cost_nonsequential_access() says that the two functions "meet in the middle". They meet at random_page_cost/2, however, not in the middle between 1 and random_page_cost. For random_page_cost < 2 the result can be less than 1 for relpages near effective_cache_size. I don't

[PATCHES] Fix doc for initcap

2004-06-08 Thread Dennis Bjorklund
Here is a small doc patch that says that initcap lowercases the rest of the characters in the string. The current doc suggests that it only touches the first character in each word, which is not what the function does. Maybe we should change the example to be 'hi THOMAS' instead of 'hi thomas'.

Re: [PATCHES] Relocatable locale

2004-06-08 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian wrote: > > With no one coming up with a better idea, this applied patch adds > > PGETC (for pg_service.conf) and PGLOCALE (for locale dir) environment > > variable processing to libpq. > > Considering that in other places these locations are referred to as

Re: [PATCHES] Stylistic changes in bufmgr.c

2004-06-08 Thread Bruce Momjian
Patch applied. Thanks. --- Manfred Koizar wrote: > Basically replaces (*a).b with a->b as it is everywhere else in > Postgres. > > Servus > Manfred > diff -Ncr ../base/src/backend/storage/page/bufpage.c > src/backend/s

Re: [PATCHES] vacuum.c refactoring

2004-06-08 Thread Bruce Momjian
Patch applied. Thanks. --- Manfred Koizar wrote: >. rename variables > . cur_buffer -> dst_buffer > . ToPage -> dst_page > . cur_page -> dst_vacpage >. move variable declarations into block where var

[PATCHES] fix schema ownership for database owner on first connection

2004-06-08 Thread Fabien COELHO
Dear patchers, Please find attached a patch to fix schema ownership on first connection, so that non system schemas reflect the database owner. (1) It adds a new "datisinit" attribute to pg_database, which tells whether the database initialization was performed or not. The documentation i

Re: [PATCHES] fix schema ownership for database owner on first connection

2004-06-08 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: > (2) This boolean is tested in postinit.c:ReverifyMyDatabase, > and InitializeDatabase is called if necessary. And what happens if multiple backends try to connect at the same time? > (4) Some validation is added. This part validates for me > (

Re: [PATCHES] cost_nonsequential_access()

2004-06-08 Thread Tom Lane
Manfred Koizar <[EMAIL PROTECTED]> writes: > The comment describing cost_nonsequential_access() says that the two > functions "meet in the middle". They meet at random_page_cost/2, > however, not in the middle between 1 and random_page_cost. For > random_page_cost < 2 the result can be less than

Re: [PATCHES] fix schema ownership for database owner on first

2004-06-08 Thread Fabien COELHO
Dear Tom, (2) This boolean is tested in postinit.c:ReverifyMyDatabase, and InitializeDatabase is called if necessary. And what happens if multiple backends try to connect at the same time? I took care of that one! There is a lock on the update of pg_database when switching off datisinit. The

Re: [PATCHES] fix schema ownership for database owner on first connection

2004-06-08 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: >> I do not think it's a good idea for the regression tests to do anything >> to any databases other than regression. Especially not databases with >> names that might match people's real databases. > Oh, you mean calvin and hobbes might use postgresql?

Re: [PATCHES] fix schema ownership for database owner on first

2004-06-08 Thread Fabien COELHO
Ok, so I guess I can use regressionuser[123], regression[123] as names in the validation. Writing tests cases is not fun, so I tried to put some fun by using these characters. I don't really think it's necessary for the regression tests to test this functionality. Hummm... an interesting view, ind

Re: [PATCHES] cost_nonsequential_access()

2004-06-08 Thread Manfred Koizar
On Tue, 08 Jun 2004 11:13:43 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >This patch seems to do considerably more violence to the equations than >is needed to cover that oversight, though. The old behavior was >intentionally nonlinear in relsize; this is not. The comment says "entirely ad-hoc" an

Re: [PATCHES] cost_nonsequential_access()

2004-06-08 Thread Tom Lane
Manfred Koizar <[EMAIL PROTECTED]> writes: > On Tue, 08 Jun 2004 11:13:43 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >> This patch seems to do considerably more violence to the equations than >> is needed to cover that oversight, though. The old behavior was >> intentionally nonlinear in relsize;

Re: [PATCHES] [HACKERS] serverlog function (log_destination file)

2004-06-08 Thread Andreas Pflug
Magnus Hagander wrote: Specifically about the logs, I still think there is a lot of value to being able to read the logs remotely even if you can't restart postmaster. Since I believe that retrieving the logs easily without server file access is a feature that's welcomed by many users, here's my p

Re: [PATCHES] pg_autovacuum integration proof of concept patch

2004-06-08 Thread Euler Taveira de Oliveira
Hi Matthew, > What have you done specifically? FYI, I will have the GUC variables > done done today or tomorrow, and I have started on the new system tables > already. > Almost everything. In a couple of days it will be done, then I send it for review. -- Euler Taveira de Oliveira euler (at

Re: [PATCHES] cost_nonsequential_access()

2004-06-08 Thread Manfred Koizar
On Tue, 08 Jun 2004 13:13:01 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >Possibly the relsize axis ought to be measured on a log scale, or >something like that, but that didn't seem to work nicely when relsize >approaches zero. In my experiments I used log(relsize) on the x axis, and I don't think

Re: [PATCHES] fix schema ownership for database owner on first connection

2004-06-08 Thread Christopher Kings-Lynne
Ok, so I guess I can use regressionuser[123], regression[123] as names in the validation. Writing tests cases is not fun, so I tried to put some fun by using these characters. I don't really think it's necessary for the regression tests to test this functionality. Once this machinery is in...can