[PATCHES] Refactoring (was: transformExpr() refactor)

2005-01-18 Thread Manfred Koizar
On Tue, 18 Jan 2005 16:15:57 +1100, Neil Conway <[EMAIL PROTECTED]> wrote: >900 line functions are almost >universally bad Amen. So you might be interested in reviewing http://archives.postgresql.org/pgsql-hackers/2004-06/msg00398.php ;-) Servus Manfred ---(end of broa

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] 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

[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] vacuum.c refactoring

2004-06-03 Thread Manfred Koizar
. rename variables . cur_buffer -> dst_buffer . ToPage -> dst_page . cur_page -> dst_vacpage . move variable declarations into block where variable is used . various Asserts instead of elog(ERROR, ...) . extract functionality from repair_frag() into new routines . mo

[PATCHES] Stylistic changes in bufmgr.c

2004-06-03 Thread Manfred Koizar
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/storage/page/bufpage.c *** ../base/src/backend/storage/page/bufpage.c Sat Nov 29 20:51:57 2003 --- src/backend/storage/page/bufpage.c Wed Jun

Re: [PATCHES] Tuple sampling

2004-05-24 Thread Manfred Koizar
On Sun, 23 May 2004 17:32:36 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >I took out the TupleCount typedef and went >back to using doubles for the tuple counts; this is more consistent with >the coding style used elsewhere, and I really doubt that it's any >slower. Performance was not the primary

Re: [PATCHES] Build problems

2004-05-23 Thread Manfred Koizar
On Sun, 23 May 2004 13:16:49 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >> $ gcc --version >> 2.7.2.1 > >Man, that's ancient. Don't say that before you have seen my bike :-) >How do you feel about upgrading? This is on my notebook. I'm a little afraid of changing major parts of the system. Onc

[PATCHES] Tuple sampling

2004-05-23 Thread Manfred Koizar
This patch implements the new tuple sampling method as discussed on -hackers and -performance a few weeks ago. "Large DB" -hackers 2004-04-02 "query slows down with more accurate stats" -perform 2004-04-13 "Tuple sampling" -hackers 2004-04-19 Servus Manfred diff -rcN ../base/src/backend/commands

[PATCHES] Build problems

2004-05-22 Thread Manfred Koizar
Yesterday's snapshot couldn't be compiled from a separate build directory, and after configure --without-docdir ... make install failed, because it tried to mkdir /postgresql/html. The enclosed patch fixes these problems, at least for me. Servus Manfred diff -Ncr ../base/src/Makefile.global.in .

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Manfred Koizar
On Wed, 28 Apr 2004 12:02:44 -0400, Alvaro Herrera <[EMAIL PROTECTED]> wrote: >In fact, I think we should mark ERROR as aborting the whole transaction >tree, and create a new level which would abort the innermost >subtransaction. We would then change whatever is appropiate to the new >elevel. Doi

Re: [PATCHES] O(samplesize) tuple sampling, proof of concept

2004-04-06 Thread Manfred Koizar
On Mon, 05 Apr 2004 18:30:29 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >> noise-contributing factors. > >I think it would have to be visibility-bit updates. Can you try it with >a pre-vacuumed relation, so that there is no slowdown for updates? I'd like to avoid VACUUM to keep the dead tuples.

Re: [PATCHES] O(samplesize) tuple sampling, proof of concept

2004-04-05 Thread Manfred Koizar
On Mon, 05 Apr 2004 15:37:07 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >I wouldn't bother with a GUC variable for the production patch. Among other things the GUC variable will be thrown out for the final version. >> Once a block is selected for inspection, all tuples of this >> block are access

[PATCHES] O(samplesize) tuple sampling, proof of concept

2004-04-05 Thread Manfred Koizar
Here is the first preview of the two-stage tuple sampling as discussed on -hackers last week. It is for review only, please do not apply. As I didn't have a current CVS checkout when I worked on the patch, it is based on 7.4.2 sources. I hope this is ok for the purpose of reviewing. The old sam

Re: [PATCHES] [HACKERS] Index creation takes for ever

2003-12-02 Thread Manfred Koizar
On Mon, 01 Dec 2003 13:32:10 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: >Manfred Koizar <[EMAIL PROTECTED]> writes: >> comparetup_index() compares two IndexTuples. The structure >> IndexTupleData consists basically of not much more than an ItemPointer, >> an

Re: [PATCHES] [HACKERS] Index creation takes for ever

2003-12-01 Thread Manfred Koizar
On Mon, 1 Dec 2003 00:02:54 -0500 (EST), Bruce Momjian <[EMAIL PROTECTED]> wrote: >Tom Lane wrote: >> Bruce Momjian <[EMAIL PROTECTED]> writes: >> >> And if it doesn't help index >> >> creation speed, at least the resulting index has better correlation. ... which has been shown by the example in

Re: [PATCHES] preliminary: logical column order

2003-11-24 Thread Manfred Koizar
On Fri, 21 Nov 2003 03:09:02 -0500, Neil Conway <[EMAIL PROTECTED]> wrote: >attachment; filename=weird_regression.diffs This was caused by a small oversight in ALTER TABLE ... ADD COLUMN: diff -ruN ../base/src/backend/commands/tablecmds.c src/backend/commands/tablecmds.c --- ../base/src/backend/c

Re: [PATCHES] LISTEN/NOTIFY regression tests

2003-11-21 Thread Manfred Koizar
On Thu, 20 Nov 2003 21:31:20 -0500, Neil Conway <[EMAIL PROTECTED]> wrote: >I searched a couple different archives of -hackers, but I didn't find >anything that looked relevant. It's on -patches: http://archives.postgresql.org/pgsql-patches/2002-08/msg00583.php Servus Manfred --

Re: [PATCHES] introduce "default_use_oids"

2003-10-10 Thread Manfred Koizar
On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <[EMAIL PROTECTED]> wrote: >This patch adds a new GUC var, "default_use_oids" Shouldn't it be honoured by CREATE TABLE AS SELECT ... ? This checkin might contain hints to the places that have to be modified: 2003-01-23 tgl * src/backend/executor/

Re: [PATCHES] [HACKERS] Cannot dump/restore text value \N

2003-10-08 Thread Manfred Koizar
On Wed, 8 Oct 2003 11:33:24 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: >Can someone explain what was broken? COPY FROM removed backslashes before comparing the input to the external null representation. (It had a hard-wired special code path that allowed \N to be recognized.) The text

Re: [PATCHES] [HACKERS] Cannot dump/restore text value \N

2003-10-08 Thread Manfred Koizar
On Wed, 08 Oct 2003 11:31:30 +0200, I wrote: >There haven't been too much changes in this area between 7.3 and 7.4. Here is the patch for 7.3.4 ... Bruce, I noticed that the original patch submission didn't contain anything useful as a cvs log message: Make COPY FROM a bit more compatible with C

Re: [PATCHES] [HACKERS] Cannot dump/restore text value \N

2003-10-08 Thread Manfred Koizar
On Sun, 05 Oct 2003 19:12:50 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >it seems we have to compare the null representation string to the >pre-debackslashing input. Here is a patch that does this and adds a few regression tests. >(This is probably fairly easy to make happen >in CVS tip, but it m

Re: [PATCHES] Regression test for stats collector

2003-09-11 Thread Manfred Koizar
On Thu, 11 Sep 2003 23:17:13 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: >> The stats collector is on by default (of course, that doesn't apply to >> "make installcheck"...) By doing "appropriate" changes to your installation I guess you can break almost every test ;-) >Oh I see now, ni

[PATCHES] Regression test for stats collector

2003-09-10 Thread Manfred Koizar
With pg_autovacuum becoming increasingly popular it's important to have a working stats collector. This test is able to discover the problem that was present in 7.4 Beta 2. Servus Manfred diff -ruN ../base/src/test/regress/expected/stats.out src/test/regress/expected/stats.out --- ../base/src/t

Re: [PATCHES] Minor lmgr code cleanup

2003-09-09 Thread Manfred Koizar
On Mon, 8 Sep 2003 13:02:11 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: > >Manfred, can I get a description for this patch? Thanks. Try to reduce confusion about what is a lock method identifier, a lock method control structure, or a table of control structures. . Use type LOCKMASK whe

Re: [PATCHES] [HACKERS] Index creation takes for ever

2003-09-08 Thread Manfred Koizar
On Mon, 8 Sep 2003 11:31:05 +0200, "Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> wrote: >> As Tom mentioned, we might not want to keep the tid's in order after the >> index is created because he wants the most recent tid's first, so the >> expired ones migrate to the end. > >But on average this a

Re: [PATCHES] Minor lmgr code cleanup

2003-09-08 Thread Manfred Koizar
On Mon, 8 Sep 2003 00:51:45 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: > >This has been saved for the 7.5 release: > > http:/momjian.postgresql.org/cgi-bin/pgpatches2 Here is the combined patch. Prior patches in this thread are hereby obsolete. Servus Manfred diff -ruN ../base/

Re: [PATCHES] [HACKERS] Index creation takes for ever

2003-09-07 Thread Manfred Koizar
On Sun, 07 Sep 2003 12:23:28 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >Maybe so, but it would degrade the performance in the unique-index case >if we do it as the TODO is worded. The patch would only hurt with a unique index, if there are lots of duplicate tuples at CREATE INDEX time. >My own o

Re: [PATCHES] [HACKERS] Index creation takes for ever

2003-09-07 Thread Manfred Koizar
On Sun, 7 Sep 2003 11:43:42 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: >I assume this completes this TODO: > > * Order duplicate index entries by tid for faster heap lookups I don't think so, because the patch does nothing to keep the sort order once the index is initially created

Re: [PATCHES] Minor lmgr code cleanup

2003-09-07 Thread Manfred Koizar
On Sun, 07 Sep 2003 10:19:07 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >> +#define BITS_OFF(i) ~(1 << (i)) > >I'd put another pair of parens around that. Also, it might be worth >moving into a header file. There is at least one place in proc.c that >manipulates lock masks using explicit shifts,

[PATCHES] Minor lmgr code cleanup

2003-09-07 Thread Manfred Koizar
Try to reduce confusion about what is a lock method identifier, a lock method control structure, or a table of control structures. . Use type LOCKMASK where an int is not a counter. . Get rid of INVALID_TABLEID, use INVALID_LOCKMETHOD instead. . Use INVALID_LOCKMETHOD instead of (LOCKMETHOD) NUL

Re: [PATCHES] [HACKERS] Index creation takes for ever

2003-09-07 Thread Manfred Koizar
On Mon, 01 Sep 2003 08:46:09 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] writes: >> it took 69 minutes to finish, 75% of this time was devoted to create 2 >> indexes on varchar(2) with value being 'O', 'N' or null; > >I still say it's either strcoll or qsort's fault. If qsort is

Re: [Fwd: Re: [PATCHES] ruleutils with pretty-print option]

2003-07-31 Thread Manfred Koizar
On Thu, 31 Jul 2003 16:30:17 +0200, Andreas Pflug <[EMAIL PROTECTED]> wrote: >Well, to me it's not well-known that floating-point addition is not >associative This is a case of theory vs. practice mismatch: In theory addition is associative, in practice there is only limited storage available fo

Re: [PATCHES] Proof-of-concept for initdb-time shared_buffers selection

2003-07-31 Thread Manfred Koizar
On Fri, 04 Jul 2003 15:29:37 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: >The attached patch shows how initdb can dynamically determine reasonable >shared_buffers and max_connections settings that will work on the >current machine. Can't this be done on postmaster startup? I think of two GUC varia