[PATCHES] Fast CLUSTER

2007-02-07 Thread Simon Riggs
I've used the heap_sync() API call to improve performance of CLUSTER by avoiding WAL when archive_command is not set. I've refactored the heap_sync() call very slightly, to hide some of the complexity that was previously exposed to COPY. It now syncs a TOAST relation automatically if one exists

[PATCHES] LIMIT/SORT optimization

2007-02-07 Thread Gregory Stark
Earlier I mentioned I had implemented the limited sort optimization. This kicks in quite frequently on web applications that implement paging. Currently Postgres has to sort the entire data set, often in a disk sort. If the page is early in the result set it's a lot more efficient to just keep

[PATCHES] vcbuild needs strlcat

2007-02-07 Thread Magnus Hagander
See attached patch. //Magnus Index: src/tools/msvc/mkvcbuild.pl === RCS file: /projects/cvsroot/pgsql/src/tools/msvc/mkvcbuild.pl,v retrieving revision 1.12 diff -c -r1.12 mkvcbuild.pl *** src/tools/msvc/mkvcbuild.pl 26 Jan 2007

Re: [PATCHES] Feature: POSIX Shared memory support

2007-02-07 Thread Magnus Hagander
On Tue, Feb 06, 2007 at 11:08:51PM -0500, Tom Lane wrote: Takayuki Tsunakawa [EMAIL PROTECTED] writes: From: Tom Lane [EMAIL PROTECTED] the POSIX API provides no way to detect whether anyone else is attached to the segment. Not being able to tell that is a tremendous robustness hit for

Re: [PATCHES] vcbuild needs strlcat

2007-02-07 Thread Alvaro Herrera
Magnus Hagander wrote: See attached patch. Applied, thanks. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support ---(end of broadcast)--- TIP 9: In

Re: [PATCHES] LIMIT/SORT optimization

2007-02-07 Thread Simon Riggs
On Wed, 2007-02-07 at 10:49 +, Gregory Stark wrote: The two open issues (which are arguably the same issue) is how to get the information down to the sort node and how to cost the plan. Currently it's a bit of a hack: the Limit node peeks at its child and if it's a sort it calls a special

Re: [PATCHES] Feature: POSIX Shared memory support

2007-02-07 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: On Tue, Feb 06, 2007 at 11:08:51PM -0500, Tom Lane wrote: AFAIK the Windows port is simply wrong/insecure on this point --- it's one of the reasons you'll never see me recommending Windows as the OS for a production Postgres server. What exactly is

Re: [PATCHES] Feature: POSIX Shared memory support

2007-02-07 Thread Alvaro Herrera
Andrew Dunstan wrote: Maybe we should look some more at that. Use of file locking was one thought I had today after I saw Tom's earlier comments. Perl provides a moderately portable flock(), which we use in fact in buildfarm to stop it from running more than one at a time on a given repo

Re: [PATCHES] Feature: POSIX Shared memory support

2007-02-07 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan wrote: Maybe we should look some more at that. Use of file locking was one thought I had today after I saw Tom's earlier comments. Perl provides a moderately portable flock(), which we use in fact in buildfarm to stop it from running more than one at a

Re: [PATCHES] Feature: POSIX Shared memory support

2007-02-07 Thread Alvaro Herrera
Andrew Dunstan wrote: Perl provides a moderately portable flock(), which we use in fact in buildfarm to stop it from running more than one at a time on a given repo copy. [...] Maybe we can borrow some code. Probably not, because it's GPL/Artistic; but we could borrow some ideas instead.

Re: [PATCHES] Fix database is ready race condition

2007-02-07 Thread Tom Lane
Markus Schiltknecht [EMAIL PROTECTED] writes: is there a good reason to print the database system is ready message in StartupXLOG() in xact.c? It has a) nothing to do with xlog and b) opens a small race condition: the message gets printed, while it still take some CPU cycles until the

Re: [PATCHES] Fix database is ready race condition

2007-02-07 Thread Markus Schiltknecht
Tom Lane wrote: I've applied a modified form of this patch. The postmaster now says database system is ready to accept connections after it's finished reacting to the completion of the startup process. Thank you, that's just perfect for me. Markus ---(end of

[PATCHES] Re: [COMMITTERS] pgsql: Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.

2007-02-07 Thread Bruce Momjian
Andrew Dunstan wrote: Bruce Momjian wrote: Andrew Dunstan wrote: Bruce Momjian wrote: Log Message: --- Stamp releases notes for 8.2.3, 8.1.8, 8.0.12. Tags: REL8_2_STABLE This missed the fix for psql \copy (query) which I committed the

[PATCHES] Configure template change to use SysV Semaphors on darwin

2007-02-07 Thread Chris Marcellino
Tom mentioned, AFAIK the only platform where the POSIX sema code is really used is Darwin (OS X), and it is not something I'd use there if I had a choice. The problem with it is that *every* semaphore corresponds to an open file handle in the postmaster that has to be inherited by *every*

Re: [PATCHES] Re: [COMMITTERS] pgsql: Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.

2007-02-07 Thread Neil Conway
On Wed, 2007-02-07 at 13:21 -0500, Bruce Momjian wrote: If there is some value to capturing every change, but still keeping the release notes a readable length, please let me know. If it fixes a real, non-theoretical bug and has been backpatched to a stable release branch, I would say in most

Re: [PATCHES] Re: [COMMITTERS] pgsql: Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.

2007-02-07 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: If it fixes a real, non-theoretical bug and has been backpatched to a stable release branch, I would say in most cases it is worth documenting in the release notes. Describing every change made in a new feature release (i.e. 8.3.0) would be far too much

Re: [PATCHES] Re: [COMMITTERS] pgsql: Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.

2007-02-07 Thread Bruce Momjian
Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: If it fixes a real, non-theoretical bug and has been backpatched to a stable release branch, I would say in most cases it is worth documenting in the release notes. Describing every change made in a new feature release (i.e. 8.3.0)

Re: [PATCHES] WIP patch adding new regexp functions

2007-02-07 Thread Jeremy Drake
On Wed, 7 Feb 2007, David Fetter wrote: On Wed, Feb 07, 2007 at 09:23:58AM -0500, Tom Lane wrote: Jeremy Drake [EMAIL PROTECTED] writes: * Put together a patch to add these functions to core. I could put them directly in regexp.c, so the support functions could stay static. My

Re: [PATCHES] Configure template change to use SysV Semaphors on darwin

2007-02-07 Thread Tom Lane
Chris Marcellino [EMAIL PROTECTED] writes: I searched through the archives and I can't find a mention of why the posix_sema code was written for Darwin. Because Darwin didn't have anything else at the time. If this is in fact the case, I have a trivial patch to conditionally enable SysV

Re: [PATCHES] TM formating patch

2007-02-07 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. ---

Re: [PATCHES] [GENERAL] date comparisons

2007-02-07 Thread Bruce Momjian
OK, I researched this and have developed the attached patch, which I have applied to CVS HEAD. The problem with our code is that when using to_timestamp() or to_date() without TM, we assume a fixed maximum length, even if the input string is variable length, like month or day names. Oracle

[PATCHES] Fwd: Re: [DOCS] [HACKERS] Broken link in PG docs

2007-02-07 Thread Robert Treat
Can someone apply Jim's patch at least to HEAD and REL8_2_STABLE? We recently got a report of a broken link on the website due to this; seems it is still broken... -- Forwarded Message -- Subject: Re: [DOCS] [HACKERS] Broken link in PG docs Date: Monday 25 September 2006

Re: [PATCHES] Fwd: Re: [DOCS] [HACKERS] Broken link in PG docs

2007-02-07 Thread Bruce Momjian
Robert Treat wrote: Can someone apply Jim's patch at least to HEAD and REL8_2_STABLE? We recently got a report of a broken link on the website due to this; seems it is still broken... OK, we were aware that the URL was bad, but were trying to avoid pointing to the cached version. You

Re: [PATCHES] Configure template change to use SysV Semaphors on darwin

2007-02-07 Thread Chris Marcellino
Using pgbench, on 1 million records at each of 1, 10 and 100 concurrent users, I get the same results before and after the patch. I'm not sure if pgbench is the most appropriate benchmark for this though. The upside to using the SysV sema code on Darwin, to my understanding, is that the

Re: [PATCHES] [HACKERS] elog(FATAL)ing non-existent roles during client

2007-02-07 Thread Bruce Momjian
Patch applied. Thanks. --- Gavin Sherry wrote: On Tue, 5 Dec 2006, Gavin Sherry wrote: On Thu, 30 Nov 2006, Tom Lane wrote: Gavin Sherry [EMAIL PROTECTED] writes: I wonder if we should check if the role

Re: [PATCHES] Index split WAL reduction

2007-02-07 Thread Bruce Momjian
Patch applied. Thanks. --- Heikki Linnakangas wrote: Here's an updated patch that fixes a bug with full_page_writes, and an alignment issue in replay code. Also added a new test case to crashtest.sh that exercises

Re: [PATCHES] Configure template change to use SysV Semaphors on darwin

2007-02-07 Thread Tom Lane
Chris Marcellino [EMAIL PROTECTED] writes: On Feb 7, 2007, at 4:54 PM, Tom Lane wrote: Outta curiosity, can you measure any performance difference? Using pgbench, on 1 million records at each of 1, 10 and 100 concurrent users, I get the same results before and after the patch. I'm not

Re: [PATCHES] Fwd: Re: [DOCS] [HACKERS] Broken link in PG docs

2007-02-07 Thread Robert Treat
On Wednesday 07 February 2007 23:35, Bruce Momjian wrote: Robert Treat wrote: Can someone apply Jim's patch at least to HEAD and REL8_2_STABLE? We recently got a report of a broken link on the website due to this; seems it is still broken... OK, we were aware that the URL was bad, but

Re: [PATCHES] Configure template change to use SysV Semaphors on darwin

2007-02-07 Thread Takayuki Tsunakawa
From: Tom Lane [EMAIL PROTECTED] Probably not. The issues about Darwin's POSIX-sema implementation are (a) eating backend open-file slots, which won't matter when a backend only touches a few different tables as pgbench does; and (b) extra process-launch overhead, which won't matter to