Re: [HACKERS] Thoughts about updateable views

2004-12-21 Thread Jaime Casanova
In a galaxy far, far away Bernd wrote: The context: http://archives.postgresql.org/pgsql-hackers/2004-03/msg00999.php > so joined views are even not updateable, too. I don't find the why of this on the specs and the threads about this issue ignore the comment. Is this right? regards, Jaime Ca

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > The only way I could see it being worse than pre-8.0 is that the > bgwriter is doing fsync of all open files rather than using sync. Other > than that, I think it should behave the same, or slightly better, > right? It's possible that there exist platfo

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > So what are we doing for 8.0? > > Well, it looks like RC2 has already crashed and burned --- I can't > imagine that Marc will let us release without an RC3 given what was > committed today, never mind the btree bug that Mark Wong seem

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Joshua D. Drake
At the moment my inclination is to sit on what we have. I've not seen any indication that 8.0 is really worse than earlier releases; the most you could argue against it is that it's not as much better as we hoped. That's not grounds to muck around at the RC3 stage. If is is any help, CMD is ba

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > So what are we doing for 8.0? Well, it looks like RC2 has already crashed and burned --- I can't imagine that Marc will let us release without an RC3 given what was committed today, never mind the btree bug that Mark Wong seems to have found. So maybe w

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > First, we remove the GUC bgwriter_maxpages because I don't see a good > > way to set a default for that. A default value needs to be based on a > > percentage of the full buffer cache size. > > This is nonsense. The admin knows what

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Matthew T. O'Connor
Mark Wong wrote: The overall throughput is better for a run like this: http://www.osdl.org/projects/dbt2dev/results/dev4-010/207/ A drop from 3865 to 2679 (31%) by just adding pg_autovacuum. That's what I meant by "not good". :) I would agree that is "not good" :-) It sounds like pg_au

Re: [HACKERS] rc2 bundled

2004-12-21 Thread David Fetter
On Tue, Dec 21, 2004 at 01:56:38AM -0400, Marc G. Fournier wrote: > > check her over .. Torrents are ready whenever anyone else is. :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Tom Lane
Mark Wong <[EMAIL PROTECTED]> writes: > I was going to try Matthew's suggestion of turning up the debug on > pg_autovacuum, unless you don't that'll help find the cause. It won't help --- this is a backend-internal bug of some kind. regards, tom lane -

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Mark Wong
On Tue, Dec 21, 2004 at 05:56:47PM -0500, Tom Lane wrote: > Mark Wong <[EMAIL PROTECTED]> writes: > > On Tue, Dec 21, 2004 at 02:23:41PM -0500, Tom Lane wrote: > >> Mark Wong <[EMAIL PROTECTED]> writes: > >>> [2004-12-20 15:48:18 PST] The error is [ERROR: failed to > >>> re-find parent k

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Tom Lane
Mark Wong <[EMAIL PROTECTED]> writes: > On Tue, Dec 21, 2004 at 02:23:41PM -0500, Tom Lane wrote: >> Mark Wong <[EMAIL PROTECTED]> writes: >>> [2004-12-20 15:48:18 PST] The error is [ERROR: failed to re-find >>> parent key in "pk_district" >> >> Yikes. Is this reproducible? > Yes, and

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Mark Wong
The overall throughput is better for a run like this: http://www.osdl.org/projects/dbt2dev/results/dev4-010/207/ A drop from 3865 to 2679 (31%) by just adding pg_autovacuum. That's what I meant by "not good". :) I'll start with the additional debug messages, with 8.0rc2, before I start c

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Mark Wong
On Tue, Dec 21, 2004 at 02:23:41PM -0500, Tom Lane wrote: > Mark Wong <[EMAIL PROTECTED]> writes: > > [2004-12-20 15:48:18 PST] The error is [ERROR: failed to re-find > > parent key in "pk_district" > > ] > > Yikes. Is this reproducible? > > regards, tom lane Ye

Re: [HACKERS] RC2 and open issues

2004-12-21 Thread Jim C. Nasby
On Tue, Dec 21, 2004 at 10:26:48AM -0500, Tom Lane wrote: > Richard Huxton <[EMAIL PROTECTED]> writes: > > However, one thing you can say is that if block B hasn't been written to > > since you last checked, then any blocks older than that haven't been > > written to either. > > [ itch... ] Can

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Jim C. Nasby
A quick $0.02 on how DB2 does this (at least in 7.x). They used a combination of everything that's been discussed. The first priority of their background writer was to keep the LRU end of the cache free so individual backends would never have to wait to get a page. Then, they would look to pages t

Re: [HACKERS] plperl: memory usage stacking

2004-12-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Please submit as a context diff (made with diff -c) and send it to the > -patches list, rather than -hackers. It would also help if you'd identify what version the diff is against. I can't match up any of this with current sources...

Re: [HACKERS] Shared row locking

2004-12-21 Thread Jim C. Nasby
On Mon, Dec 20, 2004 at 03:09:24PM -0300, Alvaro Herrera wrote: > To solve the problem I want to solve, we have three orthogonal > possibilities: > > 1. implement shared row locking using the ideas outlined in the mail > starting this thread (pg_clog-like seems to be the winner, details TBD). > >

Re: [HACKERS] plperl: memory usage stacking

2004-12-21 Thread Andrew Dunstan
Please submit as a context diff (made with diff -c) and send it to the -patches list, rather than -hackers. cheers andrew [EMAIL PROTECTED] wrote: In plperl.c, there are some memory leaks, fixed in the following diff file. Becuase Perl_eval_pv doesnot release stack, repitition of calling 'plperl_

[HACKERS] Interesting performance for function between 7.4.6 and 8.0rc2

2004-12-21 Thread Joshua D. Drake
Hello, First some specifics: OS Linux FC1 1 Gig of Ram IDE RAID 1 array AMD 2200 XP Running both 8.0rc2 and 7.4.6 for testing. The function is a plphp function. The code for the function is below: CREATE OR REPLACE FUNCTION get_users(bigint[]) RETURNS SETOF resolved_users_type AS ' $userData =

[HACKERS] plperl: memory usage stacking

2004-12-21 Thread biz
In plperl.c, there are some memory leaks, fixed in the following diff file. Becuase Perl_eval_pv doesnot release stack, repitition of calling 'plperl_trigger_build_args' makes stack growing up. The next simple example exhaust memory:(using perl v5.8.0) while (1) { AV *av = newAV(); av_undef(av

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7 SUCESS

2004-12-21 Thread Darcy Buskermolen
On December 21, 2004 10:58 am, Tom Lane wrote: > Darcy Buskermolen <[EMAIL PROTECTED]> writes: > > So it looks like icc dosn't like -export-dynamic > > Patch applied, let us know how it goes ... Buildfarm member herring now passes all checks and returns a green light. > > re

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Matthew T. O'Connor
Mark Wong wrote: After all this time I finally got around to vacuuming the database with dbt2 with pg_autovacuum. :) http://www.osdl.org/projects/dbt2dev/results/dev4-010/215/ Thanks! Doesn't look so good though, probably because I'm not using optimal settings with pg_autovacuum. So far I have

Re: [HACKERS] cant execute yyparse() within postgresql

2004-12-21 Thread Sibtay Abbas
Datum mylanguage_handler(PG_FUNCTION_ARGS){ if (CALLED_AS_TRIGGER(fcinfo)) /*do nothing else{ char *proc_source; Datum prosrcdatum; boolisnull; //get the oid of the function

Re: [HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Tom Lane
Mark Wong <[EMAIL PROTECTED]> writes: > [2004-12-20 15:48:18 PST] The error is [ERROR: failed to re-find > parent key in "pk_district" > ] Yikes. Is this reproducible? regards, tom lane ---(end of broadcast)--- T

Re: [HACKERS] cant execute yyparse() within postgresql

2004-12-21 Thread Tom Lane
Sibtay Abbas <[EMAIL PROTECTED]> writes: > Peter's attitude was rude and i complain against it > and i ask the mailing list maintainers to follow up on > this. You would do better to take his advice and provide the needed context. Personally I had ignored your first message as unanswerable...

Re: [HACKERS] cant execute yyparse() within postgresql

2004-12-21 Thread Frank Wiles
On Tue, 21 Dec 2004 10:50:25 -0800 (PST) Sibtay Abbas <[EMAIL PROTECTED]> wrote: > i never happen to read this rule when i signed up to > this mailing list...so if you ve made up a rule by > urself for this mailing list just do us a favor by > officially announcing it > > i think anyone who has k

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7

2004-12-21 Thread Tom Lane
Darcy Buskermolen <[EMAIL PROTECTED]> writes: > So it looks like icc dosn't like -export-dynamic Patch applied, let us know how it goes ... regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once

Re: [HACKERS] cant execute yyparse() within postgresql

2004-12-21 Thread Sibtay Abbas
i am sorry if i hurt your ego, by asking this question. And i mentioned flex mistakenly...actually by flex i meant yacc (i am using lex & yacc). yyparse is generated by yacc..which i want to invoke. " >Second, you can't just ask > random, highly specific > questions out of the blue and expect som

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7

2004-12-21 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >>> So it looks like icc dosn't like -export-dynamic >> >> Looks like it doesn't like -R either. You need to determine the >> correct alternative spelling of those switches for us, and then we >> can put a conditional into Makefile.fr

Re: [HACKERS] RC2 intermittent errors

2004-12-21 Thread Gaetano Mendola
Tom Lane wrote: Bruce Momjian <[EMAIL PROTECTED]> writes: Tom Lane wrote: Argh! I put a GetTransactionSnapshot() call into exec_eval_simple_expr, but I forgot CommandCounterIncrement(). Wish I could say it was a copy- and-paste mistake, but it was pure stupidity... Can we continue with RC2 or do

Re: [HACKERS] cant execute yyparse() within postgresql

2004-12-21 Thread Peter Eisentraut
Sibtay Abbas wrote: > i am not able to execute the yyparse() function > generated by flex from within the pl call handler > function. First of all, flex does not generate a yyparse() function. At most it generates yylex(). Second, you can't just ask random, highly specific questions out of the

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7

2004-12-21 Thread Peter Eisentraut
Tom Lane wrote: > > So it looks like icc dosn't like -export-dynamic > > Looks like it doesn't like -R either. You need to determine the > correct alternative spelling of those switches for us, and then we > can put a conditional into Makefile.freebsd for icc. Considering that these are all reall

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7

2004-12-21 Thread Darcy Buskermolen
On December 21, 2004 09:50 am, Tom Lane wrote: > Darcy Buskermolen <[EMAIL PROTECTED]> writes: > > On December 16, 2004 04:29 pm, Tom Lane wrote: > >> Hmm. I see in Makefile.freebsd: > >> > >> ifdef ELF_SYSTEM > >> export_dynamic = -export-dynamic > >> rpath = -R$(rpathdir) > >> shlib_symbolic = -

[HACKERS] cant execute yyparse() within postgresql

2004-12-21 Thread Sibtay Abbas
hello i am not able to execute the yyparse() function generated by flex from within the pl call handler function. does any one knows the reason for this failure? and how can it be rectified thank you __ Do you Yahoo!? Send a seasonal email gr

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7

2004-12-21 Thread Tom Lane
Darcy Buskermolen <[EMAIL PROTECTED]> writes: > On December 16, 2004 04:29 pm, Tom Lane wrote: >> Hmm. I see in Makefile.freebsd: >> >> ifdef ELF_SYSTEM >> export_dynamic = -export-dynamic >> rpath = -R$(rpathdir) >> shlib_symbolic = -Wl,-Bsymbolic -lc >> endif > Ok we are making further headway

[HACKERS] pg_autovacuum w/ dbt2

2004-12-21 Thread Mark Wong
After all this time I finally got around to vacuuming the database with dbt2 with pg_autovacuum. :) http://www.osdl.org/projects/dbt2dev/results/dev4-010/215/ Doesn't look so good though, probably because I'm not using optimal settings with pg_autovacuum. So far I have only tried the defa

Re: [HACKERS] port report: [FAILURE] FreeBSD 6, Intel icc7

2004-12-21 Thread Darcy Buskermolen
On December 16, 2004 04:29 pm, Tom Lane wrote: > Darcy Buskermolen <[EMAIL PROTECTED]> writes: > > On December 16, 2004 12:37 pm, Tom Lane wrote: > > I think you are in need of the local equivalent to GNU ld's -E or > > --export-dynamic switch, ie, make sure that all global symbols within > > the b

Re: [HACKERS] RC2 intermittent errors

2004-12-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Argh! I put a GetTransactionSnapshot() call into exec_eval_simple_expr, >> but I forgot CommandCounterIncrement(). Wish I could say it was a copy- >> and-paste mistake, but it was pure stupidity... > Can we continue with RC2 or do we

Re: [HACKERS] RC2 intermittent errors

2004-12-21 Thread Bruce Momjian
Tom Lane wrote: > Gaetano Mendola <[EMAIL PROTECTED]> writes: > > I'm testing now RC2 against our application and I'm experiencing > > intermittent errors. I isolated this test: > > Argh! I put a GetTransactionSnapshot() call into exec_eval_simple_expr, > but I forgot CommandCounterIncrement().

Re: [HACKERS] RC2 intermittent errors

2004-12-21 Thread Tom Lane
Gaetano Mendola <[EMAIL PROTECTED]> writes: > I'm testing now RC2 against our application and I'm experiencing > intermittent errors. I isolated this test: Argh! I put a GetTransactionSnapshot() call into exec_eval_simple_expr, but I forgot CommandCounterIncrement(). Wish I could say it was a co

[HACKERS] RC2 intermittent errors

2004-12-21 Thread Gaetano Mendola
Hi all, I'm testing now RC2 against our application and I'm experiencing intermittent errors. I isolated this test: CREATE TABLE users ( id_login SERIAL PRIMARY KEY, login TEXT ); CREATE OR REPLACE FUNCTION sp_id_user ( TEXT ) RETURNS INTEGER AS $$ DECLARE a_login ALIAS FOR $1;

Re: [HACKERS] Bgwriter behavior

2004-12-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > First, we remove the GUC bgwriter_maxpages because I don't see a good > way to set a default for that. A default value needs to be based on a > percentage of the full buffer cache size. This is nonsense. The admin knows what he set shared_buffers to, a

Re: [HACKERS] RC2 and open issues

2004-12-21 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > However, one thing you can say is that if block B hasn't been written to > since you last checked, then any blocks older than that haven't been > written to either. [ itch... ] Can you? I don't recall exactly when a block gets pushed up the ARC list

[HACKERS] Bgwriter behavior

2004-12-21 Thread Bruce Momjian
Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > I was also thinking of benchmarking the effect of changing the algorithm > > in StrategyDirtyBufferList(): currently, for each iteration of the loop we > > read a buffer from each of T1 and T2. I was wondering what effect reading > > T1

Re: [HACKERS] RC2 and open issues

2004-12-21 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Tom Lane <[EMAIL PROTECTED]> wrote on 21.12.2004, 05:05:36: Bruce Momjian writes: I am confused. If we change the percentage to be X% of the entire buffer cache, and we set it to 1%, and we exit when either the dirty pages or % are reached, don't we end up just scanning t

Re: [HACKERS] rc1 packaged ...

2004-12-21 Thread Peter Eisentraut
Marc G. Fournier wrote: > 'k, I'm about to screw up rc2 for this too ... FreeBSD ports is > 'stuck' at 1.78 ... Well, file a bug to get it updated? > just went to > http://sourceforge.net/projects/docbook, and there are two '1.79's > ... do both need to be installed, or just one of them? The se

Re: [HACKERS] RC2 and open issues

2004-12-21 Thread Zeugswetter Andreas DAZ SD
> If we don't start where we left off, I am thinking if you do a lot of > writes then do nothing, the next checkpoint would be huge because a lot > of the LRU will be dirty because the bgwriter never got to it. I think the problem is, that we don't see wether a "read hot" page is also "write hot

Re: [HACKERS] Heads up: RC2 this evening

2004-12-21 Thread Peter Eisentraut
Andrew Dunstan wrote: > I have not been able to build Cygwin with pltcl, and neither has > anyone else to the best of my knowledge. This problem has existed for years. See the pgsql-cygwin(?) archives for details. -- Peter Eisentraut http://developer.postgresql.org/~petere/ --

Re: Re: [HACKERS] RC2 and open issues

2004-12-21 Thread simon
Tom Lane <[EMAIL PROTECTED]> wrote on 21.12.2004, 05:05:36: > Bruce Momjian writes: > > I am confused. If we change the percentage to be X% of the entire > > buffer cache, and we set it to 1%, and we exit when either the dirty > > pages or % are reached, don't we end up just scanning the first 1

Re: Re: [HACKERS] RC2 and open issues

2004-12-21 Thread simon
Tom Lane <[EMAIL PROTECTED]> wrote on 21.12.2004, 07:32:52: > Gavin Sherry writes: > > I was also thinking of benchmarking the effect of changing the algorithm "changing the algorithm" is a phrase that sends shivers up my spine. My own preference is towards some change, but as minimal as possibl

Re: [HACKERS] Shared row locking

2004-12-21 Thread Zeugswetter Andreas DAZ SD
> In general, I agree with Tom: I haven't seen many programs that use > extended SELECT FOR UPDATE logic. However, the ones I have seen have > been batch style programs written using a whole-table cursor - these > latter ones have been designed for the cursor stability approach. I think if we add