Re: [HACKERS] Shared row locking

2004-12-16 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Using a B-tree > > > At transaction end, nothing special happens (tuples are not unlocked > > explicitly). > > I don't think that works, because there is no guarantee that an entry > will get cleaned out before the XID counter wraps

Re: [HACKERS] Shared row locking

2004-12-16 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > You mean all empty/zero rows can be removed? Can we guarantee that on > commit we can clean up the bitmap? If not the idea doesn't work. For whatever data structure we use, we may reset the structure to empty during backend-crash recovery. So your obj

Re: [HACKERS] Shared row locking

2004-12-16 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Using a B-tree > At transaction end, nothing special happens (tuples are not unlocked > explicitly). I don't think that works, because there is no guarantee that an entry will get cleaned out before the XID counter wraps around. Worst case, you might

Re: [HACKERS] [INTERFACES] PL/Python: How do I use result methods?

2004-12-16 Thread Tom Lane
I wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: >> Any comments on this? The 8.0.0rc1 PL/Python documentation, >> Section 39.3 "Database Access", still mentions the nrows and >> status methods, but they don't work. Here's Oliver's original >> message and my followup: >> http://archives.postg

Re: [HACKERS] Shared row locking

2004-12-16 Thread Christopher Kings-Lynne
The SQL spec does not say anything on this respect (that I can find). It only talks of "FOR UPDATE" and "FOR READ ONLY". However, because the FK code uses SPI to do the locking, we definitely have to expose the funcionality through SQL. So I think we need a new clause, which I propose to be "FOR

Re: [HACKERS] Shared row locking

2004-12-16 Thread Bruce Momjian
Alvaro Herrera wrote: > The btree idea: > - does not need crash recovery. Maybe we could use a stripped down > version of nbtree. This could cause a maintanibility nightmare. Are you saying the btree is an index with no heap? If so, what about the xid's? Are they just in the btree? How does

[HACKERS] Shared row locking

2004-12-16 Thread Alvaro Herrera
Hi, I've been thinking on how to do shared row locking. There are some very preliminar ideas on this issue. Please comment; particularly if any part of it sounds unworkable or too incomplete. There are several problems to be solved here: the grammar, the internal SelectStmt representation, how

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

2004-12-16 Thread Tom Lane
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 backend will be available to dynamically loaded libraries.

Re: [HACKERS] Port report: NetBSD 2.0 mac68k

2004-12-16 Thread Bruce Momjian
I will apply the ASM changes that affect only NetBSD mac68k ELF. 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: [HACKERS] LISTEN/NOTIFY improvements?

2004-12-16 Thread Alvaro Herrera
On Fri, Dec 17, 2004 at 09:56:05AM +1100, Gavin Sherry wrote: > I've got a patch floating around that does this and also moves > LISTEN/NOTIFY into the shared inval code Uh, what will happen with idle backends? -- Alvaro Herrera (<[EMAIL PROTECTED]>) Maybe there's lots of data loss but the rec

Re: [HACKERS] LISTEN/NOTIFY improvements?

2004-12-16 Thread Gavin Sherry
On Thu, 16 Dec 2004, Aaron Hillegass wrote: > I am a programmer who works on a couple of products that use PostgreSQL > as their backend (http://www.nopali.com, http://www.iwanttops.com). > Both my clients need to receive notifications when rows in the database > change. Thus far, we've been roll

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

2004-12-16 Thread Darcy Buskermolen
On December 16, 2004 02:28 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 > >> th

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

2004-12-16 Thread Tom Lane
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 backend will be available to dynamically loaded librari

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

2004-12-16 Thread Darcy Buskermolen
On December 16, 2004 01:49 pm, Bruce Momjian wrote: > Andrew Dunstan wrote: > > Bruce Momjian wrote: > > >Darcy Buskermolen wrote: > > >>As per > > >>http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16 > > >>%2018:46:18 > > >> > > >>This combination of OS/compiler does not resul

[HACKERS] LISTEN/NOTIFY improvements?

2004-12-16 Thread Aaron Hillegass
I am a programmer who works on a couple of products that use PostgreSQL as their backend (http://www.nopali.com, http://www.iwanttops.com). Both my clients need to receive notifications when rows in the database change. Thus far, we've been rolling our own because LISTEN/NOTIFY doesn't do wha

Re: [HACKERS] [PERFORM] UNION ALL vs INHERITANCE

2004-12-16 Thread Tom Lane
Adi Alurkar <[EMAIL PROTECTED]> writes: > Why does the append resulting from a inheritance take longer than one > resulting from UNION ALL? The index scan is where the time difference is: > -> Index Scan using fftiallbgrgfid_1102715649 on > f_f_all_base (cost=0.00..3.

[HACKERS] Updates for beta/rc stamping

2004-12-16 Thread Bruce Momjian
FYI, Magnus just pointed out that src/include/pg_config.h.win32 had the version string of 8.0devel rather than the correct 8.0.0rc1. I have added a mention in tools/RELEASE_CHANGES that this file should be updated during beta and rc as well as final release. This file is used by VC and BCC for no

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

2004-12-16 Thread Darcy Buskermolen
On December 16, 2004 12:37 pm, Tom Lane wrote: > Darcy Buskermolen <[EMAIL PROTECTED]> writes: > > As per > > http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2 > >018:46:18 This combination of OS/compiler does not result in a working > > copy. > > The failure is > asci

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

2004-12-16 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Andrew Dunstan wrote: >> What would it do? This is failing at the "make check" stage, before it's >> even installed (and buildfarm doesn't install to a standard location >> anyway). > Sometimes pre-existing libraries that are already installed override

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

2004-12-16 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: To answer your question about how to choose it, you do it through the buildfarm member's config file - example (showing use of ccache) can be seen here: http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgbuildfarm/client-code/build-farm.conf

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

2004-12-16 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > To answer your question about how to choose it, you do it through the > buildfarm member's config file - example (showing use of ccache) can be seen > here: > http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgbuildfarm/client-code/build-farm.conf?rev=1.3&c

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

2004-12-16 Thread Bruce Momjian
Andrew Dunstan wrote: > > > Bruce Momjian wrote: > > >Darcy Buskermolen wrote: > > > > > >>As per > >>http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2018:46:18 > >> > >>This combination of OS/compiler does not result in a working copy. > >> > >>Andrew and i have been

Re: [HACKERS] Port report: NetBSD 2.0 mac68k

2004-12-16 Thread Bruce Momjian
I am confused by the threading failure. I don't see any free() call in thread_test.c. Would you go to the tools/thread directory and run the program manually and use a debugger to see the failure line? Is there some threading flag NetBSD requires for compiles or linking? -

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

2004-12-16 Thread Andrew Dunstan
Bruce Momjian wrote: Darcy Buskermolen wrote: As per http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2018:46:18 This combination of OS/compiler does not result in a working copy. Andrew and i have been digging into this for better than a week now, and something just d

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

2004-12-16 Thread Andrew Dunstan
Tom Lane wrote: Darcy Buskermolen <[EMAIL PROTECTED]> writes: As per http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2018:46:18 This combination of OS/compiler does not result in a working copy. The failure is ascii_and_mic.so: Undefined symbol "pg_mic2asci

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

2004-12-16 Thread Tom Lane
Darcy Buskermolen <[EMAIL PROTECTED]> writes: > As per > http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2018:46:18 > This combination of OS/compiler does not result in a working copy. The failure is ascii_and_mic.so: Undefined symbol "pg_mic2ascii" I think you ar

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

2004-12-16 Thread Bruce Momjian
Darcy Buskermolen wrote: > As per > http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2018:46:18 > > This combination of OS/compiler does not result in a working copy. > > Andrew and i have been digging into this for better than a week now, and > something just dosent look

Re: [HACKERS] Port report: Fedora Core 3 x86_64

2004-12-16 Thread Tom Lane
Bernd Helmle <[EMAIL PROTECTED]> writes: > Peter Eisentraut <[EMAIL PROTECTED]> wrote: >> Tom Lane wrote: >>> "Andrew Dunstan" <[EMAIL PROTECTED]> writes: Instead of doing that, do: --with-includes=/usr/include/et >>> This same workaround is in the RPMs. I wonder if it would be >>> wort

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

2004-12-16 Thread Darcy Buskermolen
As per http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=herring&dt=2004-12-16%2018:46:18 This combination of OS/compiler does not result in a working copy. Andrew and i have been digging into this for better than a week now, and something just dosent look right. -- Darcy Buskermolen Wavefir

Re: [HACKERS] join selectivity

2004-12-16 Thread Greg Stark
"Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > Well at the moment PostGIS has a RESTRICT function that takes an expression > of the formwhere column is a column consisting of > geometries and constant is a bounding box. This is based upon histogram > statistics and works well. Are these fu

Re: [HACKERS] join selectivity

2004-12-16 Thread Tom Lane
"Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > ... But in the case of > , if we're estimating the number of rows to return then > that becomes harder I didn't say it was easy ;-). The existing selectivity functions can't do better than a rough guess in such cases, and I don't expect you can e

Re: [HACKERS] join selectivity

2004-12-16 Thread Mark Cave-Ayland
Hi Tom, > -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 16 December 2004 17:56 > To: Mark Cave-Ayland > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [HACKERS] join selectivity > > > "Mark Cave-Ayland" <[EMAIL PROTECTED]> writes:

Re: [HACKERS] integer datetimes

2004-12-16 Thread Andrew Dunstan
Tom Lane wrote: I'm probably going to add the flag enabling it to the default buildfarm setup. This should be selected for some buildfarm members but not all, just like other configuration options. We're very democratic - every member gets to choose their own config ;-) cheers andrew --

Re: [HACKERS] integer datetimes

2004-12-16 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Has any thought been given to making integer datetimes the default on > platforms that support it? Are there any performance implications? I don't know that anyone's done any serious performance comparisons. My guess is there wouldn't be a noticeable d

Re: [HACKERS] [Testperf-general] BufferSync and bgwriter

2004-12-16 Thread Richard Huxton
Josh Berkus wrote: Simon, Clearly, OSDL-DBT2 is not a real world test! That is its benefit, since it is heavily instrumented and we are able to re-run it many times without different parameter settings. The application is well known and doesn't suffer that badly from factors that would allow certa

Re: [HACKERS] join selectivity

2004-12-16 Thread Tom Lane
"Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > OK I think I've misunderstood something more fundamental than that; I > understood from what you said that the RESTRICT clause is used to evaluate > the cost of table1.geom && table2.geom against table2.geom && table1.geom > (i.e. it is used to help

[HACKERS] integer datetimes

2004-12-16 Thread Andrew Dunstan
Has any thought been given to making integer datetimes the default on platforms that support it? Are there any performance implications? I saw the Tom Lane raised this when it was added, and it looks like the decision was deferred. I know that, ceteris paribus, I would rather have fixed microse

Re: [HACKERS] join selectivity

2004-12-16 Thread Mark Cave-Ayland
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 16 December 2004 15:55 > To: Mark Cave-Ayland > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [HACKERS] join selectivity > > > "Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > > ...and

Re: [HACKERS] [Testperf-general] BufferSync and bgwriter

2004-12-16 Thread Zeugswetter Andreas DAZ SD
> Hmmm, I've not seen this. For example, with people who are having trouble > with checkpoint spikes on Linux, I've taken to recommending that they call > sync() (via cron) every 5-10 seconds (thanks, Bruce, for suggestion!). > Believe it or not, this does help smooth out the spikes and give

Re: [HACKERS] join selectivity

2004-12-16 Thread Tom Lane
"Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: > ...and with two indices RESTRICT is called four times. The part I find > confusing is why with one index that RESTRICT is called twice. [ shrug... ] clause_selectivity doesn't try to cache the result. > I was also thinking whether calling RESTRICT

Re: [HACKERS] join selectivity

2004-12-16 Thread Mark Cave-Ayland
Hi Tom, > -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 13 December 2004 17:16 > To: Mark Cave-Ayland > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [HACKERS] join selectivity > > > "Mark Cave-Ayland" <[EMAIL PROTECTED]> writes: >

Re: [Fwd: Re: [HACKERS] race condition for drop schema cascade?]

2004-12-16 Thread Jim Buttafuoco
I have rebuild the filesystem on my indy (MIPS) that Andrew reported on. The first run completed 100%, I would give it a couple more runs before we can say its the filesystem not Postgresql that was causing the drop to fail. -- Original Message --- From: Andrew Dunstan <[EM

Re: [HACKERS] bgwriter changes

2004-12-16 Thread Neil Conway
Zeugswetter Andreas DAZ SD wrote: This has the disadvantage of converging against 0 dirty pages. A system that has less than maxpages dirty will write every page with every bgwriter run. Yeah, I'm concerned about the bgwriter being overly aggressive if we disable bgwriter_percent. If we leave the

Re: [HACKERS] bgwriter changes

2004-12-16 Thread Zeugswetter Andreas DAZ SD
> > Only if you redefine the meaning of bgwriter_percent. At present it's > > defined by reference to the total number of dirty pages, and that can't > > be known without collecting them all. > > > > If it were, say, a percentage of the total length of the T1/T2 lists, > > then we'd have some ch

Re: [HACKERS] getting 'order by' working with unicode locale? ICU?

2004-12-16 Thread Peter Eisentraut
Palle Girgensohn wrote: > Not on FreeBSD, since collation is not implemented in unicode > locales. One way would be to implement it in the OS, of course... Try taking the locale definition files from another system and use localedef to build locale files for your local system. The localedef sou