[PATCHES] Sun Studio on Linux spinlock patch

2008-03-05 Thread Julius Stroffek
Hi All, I have made PostgreSQL to compile on linux using sun studio with spinlock support. The patch is attached. Here is the explanation of changes I made: I renamed the following files solaris_x86.s solaris_sparch.s to sunstudio_x86.s sunstudio_sparch.s because the code is used on linux

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: Magnus Hagander wrote: On my platform (linux x86) it works fine when I just cast this to (int *), but I'm unsure if that's going to be safe on other platforms. I had some indication that it's probably not? No, I don't think that's

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Magnus Hagander
On Tue, Mar 04, 2008 at 09:35:27PM +, Heikki Linnakangas wrote: We could keep using the assignment hooks. But they could be a lot simpler than they are nowadays, if the string - int conversion was done by the GUC machinery: static const char * assign_client_min_messages(int newval,

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: Tom Lane wrote: What I'd suggest is declaring the actual variable as int. You can still use an enum typedef to declare the values, and just avert your eyes when you have to cast the enum to int or vice versa. (This is legal per C spec, so you

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: Tom Lane wrote: What I'd suggest is declaring the actual variable as int. You can still use an enum typedef to declare the values, and just avert your eyes when you have to cast the enum to int or vice versa. (This is legal per C

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: Oh no, I didn't suggest keeping the variables as strings, that's madness. I suggested keeping the variables as enums, and defining setter functions for them, similar to the assign hooks we have now, but the setter function wouldn't have to do

Re: [PATCHES] Sun Studio on Linux spinlock patch

2008-03-05 Thread Tom Lane
Julius Stroffek [EMAIL PROTECTED] writes: I have made PostgreSQL to compile on linux using sun studio with spinlock support. The patch is attached. Here is the explanation of changes I made: This patch seems broken in a number of ways. Why are you removing -DLINUX_PROFILE, for example? Are

Re: [PATCHES] CopyReadLineText optimization

2008-03-05 Thread Heikki Linnakangas
Heikki Linnakangas wrote: I still need to test the worst-case performance, with input that has a lot of escapes. Ok, I've done some more performance testing with this. I tested COPY FROM with a table with a single text column. There was a million rows in the table, with a 1000 character long

Re: [PATCHES] DTrace probe patch for OS X Leopard

2008-03-05 Thread Jorgen Austvik - Sun Norway
Peter Eisentraut wrote: I fixed that part. Note again that a buildfarm animal testing the dtrace support could be helpful. :) Hi! Our testing on Solaris Nevada (x86 and SPARC) and Solaris 10 (SPARC) in the build farm now runs with --enable-dtrace. Thanks for the tip! -J -- Jørgen

Re: [PATCHES] Bulk Insert tuning

2008-03-05 Thread Gavin Sherry
On Tue, Feb 26, 2008 at 02:43:51PM +, Simon Riggs wrote: Following patch implements a simple mechanism to keep a buffer pinned while we are bulk loading. CK Tan and I worked on something similar but the problem we discovered was self locking. Consider a primary key: we insert a tuple into

Re: [PATCHES] CopyReadLineText optimization

2008-03-05 Thread Heikki Linnakangas
Heikki Linnakangas wrote: Heikki Linnakangas wrote: Attached is a patch that modifies CopyReadLineText so that it uses memchr to speed up the scan. The nice thing about memchr is that we can take advantage of any clever optimizations that might be in libc or compiler. Here's an updated

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Andrew Dunstan
Tom Lane wrote: Having to have two extra hook functions for every variable seems like a lot of notational overhead for not much gain. +1 cheers andrew -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription:

Re: [PATCHES] WIP: guc enums

2008-03-05 Thread Magnus Hagander
On Wed, Mar 05, 2008 at 08:18:19AM -0500, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: Tom Lane wrote: What I'd suggest is declaring the actual variable as int. You can still use an enum typedef to declare the values, and just avert your eyes when you have to cast the

[PATCHES] Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit

2008-03-05 Thread Bruce Momjian
Euler Taveira de Oliveira wrote: Edwin Groothuis wrote: Ouch. But... since very long words are already not indexed (is the length configurable anywhere because I don't mind setting it to 50 characters), I don't think that it should bomb out of this but print a similar warning like

Re: [PATCHES] Endless recovery

2008-03-05 Thread Bruce Momjian
Simon Riggs wrote: On Mon, 2008-02-11 at 09:29 +0100, Hans-Juergen Schoenig wrote: Last week we have seen a problem with some horribly configured machine. The disk filled up (bad FSM ;) ) and once this happened the sysadmi killed the system (-9). After two days PostgreSQL has still not

Re: [PATCHES] CopyReadLineText optimization

2008-03-05 Thread Andrew Dunstan
Heikki Linnakangas wrote: So the overhead of using memchr slows us down if there's a lot of escape or quote characters. The breakeven point seems to be about 1 in 8 characters. I'm not sure if that's a good tradeoff or not... How about we test the first buffer read in from the file

Re: [PATCHES] TransactionIdIsInProgress() cache

2008-03-05 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. ---

[PATCHES] libpq type system 0.9a

2008-03-05 Thread Merlin Moncure
Yesterday, we notified -hackers of the latest version of the libpq type system. Just to be sure the right people are getting notified, we are posting the latest patch here as well. Would love to get some feedback on this. The latest version of libpq type system is available here:

[PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Rémi Zara
Hi, Recent version of NetBSD/MIPS support dlopen. This patch makes the netbsd dynloader tests availability of dlopen on HAVE_DLOPEN rather than on __mips__ Tested on NetBSD 4.99.20 on mips I plan on registering a buildfarm member once this patch is in (and maybe after upgrading to a

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Alvaro Herrera
Rémi Zara wrote: Hi, Recent version of NetBSD/MIPS support dlopen. This patch makes the netbsd dynloader tests availability of dlopen on HAVE_DLOPEN rather than on __mips__ Applied, thanks. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Rémi Zara wrote: Recent version of NetBSD/MIPS support dlopen. This patch makes the netbsd dynloader tests availability of dlopen on HAVE_DLOPEN rather than on __mips__ Applied, thanks. Weird, I haven't seen the commit message come through here.

[PATCHES] Proposed patch - psql wraps at window width

2008-03-05 Thread Bryce Nesbitt
I've attached a patch, against current 8.4 cvs, which optionally sets a maximum width for psql output: # \pset format aligned-wrapped # \pset border 2 # select * from distributors order by did; +--++-+---+ | did |name|

Re: [PATCHES] [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit

2008-03-05 Thread Edwin Groothuis
On Wed, Mar 05, 2008 at 10:53:38AM -0500, Bruce Momjian wrote: Euler Taveira de Oliveira wrote: Edwin Groothuis wrote: Ouch. But... since very long words are already not indexed (is the length configurable anywhere because I don't mind setting it to 50 characters), I don't think

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: R�mi Zara wrote: Recent version of NetBSD/MIPS support dlopen. This patch makes the netbsd dynloader tests availability of dlopen on HAVE_DLOPEN rather than on __mips__ Applied, thanks. Anyway: (1) this should probably be

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Weird, I haven't seen the commit message come through here. Yeah, that's strange -- the (2) commit message got to me, but this one hasn't. Moderation filter got it for some reason? None of the back-patch commits came through either,

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Andrew Dunstan
Alvaro Herrera wrote: Both done -- I backpatched all the way down to 7.4 (and later I noticed that the only 7.3 BF members are NetBSD). Haven't we declared 7.3 at EOL anyway? cheers andrew -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Weird, I haven't seen the commit message come through here. Yeah, that's strange -- the (2) commit message got to me, but this one hasn't. Moderation filter got it for some reason? Hmm, not moderation, because

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Alvaro Herrera
Alvaro Herrera wrote: Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Weird, I haven't seen the commit message come through here. Yeah, that's strange -- the (2) commit message got to me, but this one hasn't. None of the back-patch commits came

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Magnus Hagander
Alvaro Herrera wrote: Alvaro Herrera wrote: Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Weird, I haven't seen the commit message come through here. Yeah, that's strange -- the (2) commit message got to me, but this one hasn't. None of the back-patch commits

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan wrote: Alvaro Herrera wrote: Both done -- I backpatched all the way down to 7.4 (and later I noticed that the only 7.3 BF members are NetBSD). Haven't we declared 7.3 at EOL anyway? That's why I didn't backpatch it there. But if

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Alvaro Herrera
Andrew Dunstan wrote: Alvaro Herrera wrote: Both done -- I backpatched all the way down to 7.4 (and later I noticed that the only 7.3 BF members are NetBSD). Haven't we declared 7.3 at EOL anyway? That's why I didn't backpatch it there. But if that's the case, why are we still reporting

Re: [PATCHES] NetBSD/MIPS supports dlopen

2008-03-05 Thread Alvaro Herrera
Magnus Hagander wrote: Alvaro Herrera wrote: I checked the Majordomo logs and there's nothing about those patches. I do see one message with the Subject: pgsql: Clean up double negative, per Tom Lane. line. A message held for moderation shows up in the logs with a stall status. So these

Re: [PATCHES] libpq type system 0.9a

2008-03-05 Thread Florian G. Pflug
Merlin Moncure wrote: Yesterday, we notified -hackers of the latest version of the libpq type system. Just to be sure the right people are getting notified, we are posting the latest patch here as well. Would love to get some feedback on this. Sorry if this has been discussed before, but why

Re: [PATCHES] libpq type system 0.9a

2008-03-05 Thread Merlin Moncure
On Wed, Mar 5, 2008 at 5:47 PM, Florian G. Pflug [EMAIL PROTECTED] wrote: Merlin Moncure wrote: Yesterday, we notified -hackers of the latest version of the libpq type system. Just to be sure the right people are getting notified, we are posting the latest patch here as well. Would

Re: [PATCHES] libpq type system 0.9a

2008-03-05 Thread Andrew Chernow
Merlin Moncure wrote: On Wed, Mar 5, 2008 at 5:47 PM, Florian G. Pflug [EMAIL PROTECTED] wrote: Merlin Moncure wrote: Yesterday, we notified -hackers of the latest version of the libpq type system. Just to be sure the right people are getting notified, we are posting the latest patch

Re: [PATCHES] DTrace probe patch for OS X Leopard

2008-03-05 Thread Robert Lor
Attached is the updated patch which addressed all the concerns from Peter and Tom. * The header file containing the probe macros is now included only in the .c files that need it. * All probe macro names now start with TRACE_ (eg: TRACE_POSTGRESQL_TRANSACTION_START). Regards, -Robert

Re: [PATCHES] Sun Studio on Linux spinlock patch

2008-03-05 Thread Zdenek Kotala
Tom Lane napsal(a): But I guess the *real* question is why anyone would care ... what benefit is there to using Sun's compiler on Linux? There are severals benefits: 1) Sun Studio is not only compiler. It has a lot of tools like performance analyzer/profiler, memory checker ... There are