Re: [PATCHES] Fix overflow of bgwriter's request queue

2006-01-12 Thread Qingqing Zhou
"ITAGAKI Takahiro" <[EMAIL PROTECTED]> wrote > > AbsorbFsyncRequests will be called during the fsync loop in my patch, > so new files might be added to pendingOpsTable and they will be removed > from the table *before* writing the pages belonging to them. > So I changed it to copy the contents of

Re: [PATCHES] Fix overflow of bgwriter's request queue

2006-01-12 Thread ITAGAKI Takahiro
"Qingqing Zhou" <[EMAIL PROTECTED]> wrote: >while ((entry = (PendingOperationEntry *) hash_seq_search(&hstat)) != NULL) >{ > + if (i >= count) > +elog(ERROR, "pendingOpsTable corrupted"); > + > + memcpy(&entries[i++], entry, sizeof(PendingOperationEntry)); > + > + if (hash_search

Re: [PATCHES] Fix overflow of bgwriter's request queue

2006-01-12 Thread Qingqing Zhou
"ITAGAKI Takahiro" <[EMAIL PROTECTED]> wrote > > Attached is a patch that fixes overflow of bgwriter's file-fsync request > queue. > while ((entry = (PendingOperationEntry *) hash_seq_search(&hstat)) != NULL) { + if (i >= count) +elog(ERROR, "pendingOpsTable corrupted"); + + memcp

[PATCHES] Fix overflow of bgwriter's request queue

2006-01-12 Thread ITAGAKI Takahiro
Attached is a patch that fixes overflow of bgwriter's file-fsync request queue. It happened on heavy update workloads and the performance decreased. I have sent HACKERS the detail. --- ITAGAKI Takahiro NTT Cyber Space Laboratories bgwriter-requests-queue-overflow-2.patch Description: Binary dat

Re: [PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > With all this system view love going on, is there any point having a > 'pg_savepoints' view to see what savepoints you've made? Probably not, seeing that one of the main situations where you'd want to know that would be after an error, and SEL

[PATCHES] Index padding optimization

2006-01-12 Thread ITAGAKI Takahiro
Attached is a patch that removes undesired paddings from b-tree indexes. The tuples of b-tree index consist of BTItemData and index keys. BTItemData should be placed only 2 byte alignment, so if the alignment of keys are less than MAXIMUM_ALIGNOF, we can place them with their minimum alignment ins

Re: [PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Christopher Kings-Lynne
I think it is worth distinguishing more clearly between portals that should be displayed to the user and those that should not (which might be labelled "internal cursors", perhaps). The tests above seem fairly ad-hoc. With all this system view love going on, is there any point having a 'pg_save

Re: [PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Why list Portals that cannot be directly manipulated by the user? Define "directly manipulated". AFAIR there isn't any particular distinction between portals that got made by DECLARE CURSOR and those that got made by Bind; you can use either EXECUTE or Fe

Re: [PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Neil Conway
On Thu, 2006-01-12 at 19:27 -0500, Tom Lane wrote: > No kidding. But what do you think the correct test is? The comment's > claim that stuff named "" should be suppressed seems > wrong to begin with, as those are perfectly good cursors. Well, I suggested to Joachim offlist that these shouldn't b

Re: [PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > The tests above seem fairly ad-hoc. No kidding. But what do you think the correct test is? The comment's claim that stuff named "" should be suppressed seems wrong to begin with, as those are perfectly good cursors. I'm also unconvinced that a test on p

Re: [PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Neil Conway
On Thu, 2006-01-12 at 10:51 +0100, Joachim Wieland wrote: > Attached is a patch to create a new system view pg_cursors to list all > available cursors to the current session and transaction. + /* loop until we find a named portal or hit the end of the list */ + while ((hentry = hash_seq_search(has

Re: [PATCHES] mbutils.c memory cxt cleanup

2006-01-12 Thread Neil Conway
On Wed, 2006-01-11 at 14:46 -0500, Neil Conway wrote: > Barring any objections I'll apply this (only to HEAD) later today or > tomorrow. Applied. -Neil ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www

Re: [PATCHES] domain constraints and UNKNOWN params

2006-01-12 Thread Neil Conway
On Thu, 2006-01-12 at 00:28 -0500, Neil Conway wrote: > Ah, right. Attached is a corrected patch. Applied to HEAD, REL8_1_STABLE, REL8_0_STABLE, and REL7_4_STABLE. -Neil ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[PATCHES] Example for UPDATE FROM with correllation

2006-01-12 Thread David Fetter
Folks, Please find enclosed a doc patch that adds an example of a correllated UPDATE. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778 Remember to vote! Index: doc/src/sgml/ref/update.sgml === R

Re: [PATCHES] Summary table trigger example race condition

2006-01-12 Thread Alvaro Herrera
Mark Kirkwood wrote: > Yes it would - I usually build the SGML -> HTML, then cut the code out > of a browser session to test - the pain is waiting for the docs to build. FWIW, what I do is to build a cut-down version of postgres.sgml to include only the file you want to check. I think there is

Re: [PATCHES] TupleDesc refcounting

2006-01-12 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Ah, I see what you mean. In implementing this, I wasn't sure the best > way to provide these two sorts of TupleDesc references. My first thought > was to add a "use ResourceOwner?" boolean parameter to the routines that > create and destroy references to Tu

Re: [PATCHES] TupleDesc refcounting

2006-01-12 Thread Neil Conway
On Tue, 2006-01-10 at 18:05 -0500, Tom Lane wrote: > Yeah. I was envisioning two different approaches: for TupleDesc > references from long-lived data structures (ie, typcache or relcache) > just increment or decrement the count when the referencing data > structure changes. ResourceOwner would b

[PATCHES] patch to create system view that lists cursors

2006-01-12 Thread Joachim Wieland
Attached is a patch to create a new system view pg_cursors to list all available cursors to the current session and transaction. The patch itself is quite analogous to the patch for pg_prepared_statements I submitted in December. The attributes is_holdable, is_binary and is_scrollable are exposed