[HACKERS] yet another contrib module

2004-05-28 Thread Oleg Bartunov
Hello, June 1 is pretty close now, so I'm asking about yet another contrib module, pg_trgm which is rather mature and quite useful. Is't worth to put it into 7.5 contrib ? trgm - Trigram matching for PostgreSQL -- The pg_trgm contrib module provides

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Bob . Henkel
I think before this can be tested fully by a wide audience there needs to be some basic documentation. Or is there? What is the new syntax? Can we see some basic examples that you have used in your testing? Regards Bob |-+-- | |

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Bob . Henkel
This reply was meant to be directed to Alvaro. |-+-- | | [EMAIL PROTECTED]| | | .com | | | Sent by: | | | [EMAIL PROTECTED]| | |

[HACKERS] contrib/ compile warnings

2004-05-28 Thread Neil Conway
I see the following on this machine: (OSX 10.3.4, gcc 3.3) [neilc:/Users/neilc/build-pgsql/contrib]% make -s all ld: warning multiple definitions of symbol _nextval pending.o definition of _nextval in section (__TEXT,__text) ../../src/backend/postgres definition of _nextval ld: warning multiple

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Marc G. Fournier
On Fri, 28 May 2004, Tatsuo Ishii wrote: Hi Bruce, Is that core's decision that: o below all four major features will be incorporated into 7.5 We don't know. If they can be added to CVS without major changes, they will be in 7.5. As far as I can tell: Win32 has 98% of its code in CVS, so

[HACKERS] temp tables broken in CVS HEAD?

2004-05-28 Thread Oliver Jowett
Against current CVS HEAD: $ ./createuser test Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) n CREATE USER $ ./createdb -O test test CREATE DATABASE $ ./psql -U test test Welcome to psql 7.5devel, the PostgreSQL interactive

Re: [HACKERS] pg_dump --comment?

2004-05-28 Thread Jon Jensen
On Fri, 28 May 2004, Christopher Kings-Lynne wrote: I've encountered a situation where I'd like to store some information about the database when I do a pg_dump. For instance, the timestamp of the dump. And some other information that I pull from the database. I think every dump should

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Mike Mascari
Marc G. Fournier wrote: Right now, I'd say feature freeze is looking more like next Friday (June 4th), and we're evaluate it then ... that should hopefully give the above time to flesh out and get into CVS ... Speaking of CVS, a CERT advisory was issued yesterday documenting a vulnerability:

Re: [HACKERS] On query rewrite

2004-05-28 Thread Tom Lane
Sailesh Krishnamurthy [EMAIL PROTECTED] writes: What about things like: 1. DISTINCT PULLUP (Where you realize that you don't have to have an explicit duplicate elimination operation because of what's done in the subquery) 2. DISTINCT pushdown (when a dup elim. can be pushed down if the upper

Re: [HACKERS] pg_dump --comment?

2004-05-28 Thread Andrew Dunstan
Jon Jensen wrote: On Fri, 28 May 2004, Christopher Kings-Lynne wrote: I've encountered a situation where I'd like to store some information about the database when I do a pg_dump. For instance, the timestamp of the dump. And some other information that I pull from the database. I think

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Andrew Dunstan
Marc G. Fournier wrote: On Fri, 28 May 2004, Tatsuo Ishii wrote: Hi Bruce, Is that core's decision that: o below all four major features will be incorporated into 7.5 We don't know. If they can be added to CVS without major changes, they will be in 7.5. As far as I can tell: Win32 has 98%

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 04:51:07PM +0900, Tatsuo Ishii wrote: 2) certain behavior was different from what I expected (please correct me if my expectation is wrong). Yes, the expected behavior is different: if an aborted subtransaction is closed with a COMMIT or END command, the parent

Re: [HACKERS] pg_dump --comment?

2004-05-28 Thread James Robinson
On May 28, 2004, at 10:48 AM, Andrew Dunstan wrote: A better answer to this particular problem might be incremental dumps, though :-) Oh would incremental dumps be ever so hungrily accepted by ever so many shops. I had imagined that PITR transaction log archiving would allow one to perform an

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Tatsuo Ishii
On Fri, May 28, 2004 at 04:51:07PM +0900, Tatsuo Ishii wrote: 2) certain behavior was different from what I expected (please correct me if my expectation is wrong). Yes, the expected behavior is different: if an aborted subtransaction is closed with a COMMIT or END command, the

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Marc G. Fournier
On Fri, 28 May 2004, Andrew Dunstan wrote: The Installer is a pgFoundry project, and unaffected by feature freeze. See http://pginstaller.projects.postgresql.org (Note: Magnus hasn't put anything there yet, though.) 'k, wasn't sure about that one ... but the SVC and fsync stuff is still

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Tatsuo Ishii
Can I ask you one more question? Is there any limit for nesting leveles of subtransactions? -- Tatsuo Ishii On Fri, May 28, 2004 at 04:51:07PM +0900, Tatsuo Ishii wrote: 2) certain behavior was different from what I expected (please correct me if my expectation is wrong). Yes, the

Re: [HACKERS] On query rewrite

2004-05-28 Thread Sailesh Krishnamurthy
Tom == Tom Lane [EMAIL PROTECTED] writes: Tom This particular issue is handled as part of our Path Tom enumeration mechanism, but the more hard-wired sorts of Tom transformations that you are asking about live mostly in Thanks again. To confirm the actual cost comparison with plan

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Alvaro Herrera
On Sat, May 29, 2004 at 12:27:39AM +0900, Tatsuo Ishii wrote: Can I ask you one more question? Is there any limit for nesting leveles of subtransactions? In theory 2^16 I think, but I haven't tested it. It tried to 30 or so only. Not sure if it's practical. -- Alvaro Herrera

Re: [HACKERS] On query rewrite

2004-05-28 Thread Bruno Wolff III
On Thu, May 27, 2004 at 19:35:56 -0700, Sailesh Krishnamurthy [EMAIL PROTECTED] wrote: Another question about regular RULE processing .. suppose after applying a rule the resultant query tree is eligible for another rule, does pgsql's rule system keep iterating over and over until it

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Matthew T. O'Connor
I certainly get the feeling that things are being rushed just a bit too much, and think having a extra few days of breathing space makes sense. cheers andrew I have that feeling too, and I'm working still working on pg_autovacuum integration which I was hoping to get in, so I would welcome

[HACKERS] Extended customizing, SQL functions, internal variables, API

2004-05-28 Thread pgsql
I'm not really sure what to call this feature, but I have been talking to a potential customer and they need a particular feature and they need to to be very FAST. Take this query: select sum(num) from table; Now, if that table is very large, this can take a lot of time. Using a trigger, one

Re: [HACKERS] yet another contrib module

2004-05-28 Thread Bruce Momjian
Sounds fine. --- Oleg Bartunov wrote: Hello, June 1 is pretty close now, so I'm asking about yet another contrib module, pg_trgm which is rather mature and quite useful. Is't worth to put it into 7.5 contrib ? trgm

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Tom Lane
Manfred Koizar [EMAIL PROTECTED] writes: On Thu, 27 May 2004 16:50:24 -0400, Alvaro Herrera At first I thought I'd have to add back Xmax as a field on its own Veto! This would increase heap tuple header size == less tuples per page == more pages per table == more I/O == performance loss. If

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 04:05:40PM -0400, Bruce Momjian wrote: Hm, you are right that there needs to be a more automatic way of doing this. One interesting idea would be for COMMIT to affect the outer transaction, and END not affect the outer transaction. Of course that kills the logic that

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Fri, May 28, 2004 at 03:48:11PM -0400, Tom Lane wrote: Nope. Think about sub-subtransactions. They are all aborted if the parent is, so BEGIN; BEGIN; -- cid = 1 BEGIN; -- cid = 2

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 01:43:16PM -0400, Bruce Momjian wrote: In this case, I want to try all of the inserts, but any of them can fail, then I want the bottom part done. I wonder where everyone eas when I asked this question a lot of time ago. I said I thought the behavior should be like I

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Bruce Momjian
Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: Off the top of my head ... the Installer and Service Manager come to mind ... and Tom's fsync changes ... Right now, I'd say feature freeze is looking more like next Friday (June 4th), and we're evaluate it then ... that

[HACKERS] pg_autovacuum Integration

2004-05-28 Thread Matthew T. O'Connor
Since the Feature Freeze is coming on quickly and I have yet to submit a patch that integrated pg_autovacuum into the backend (though I have been working on it), I wanted to see what people thing about a few things. Since we are nearing feature freeze, I know won't complete all the improvements

Re: [HACKERS] contrib/ compile warnings

2004-05-28 Thread Bruce Momjian
Strange, compiled here fine. --- Neil Conway wrote: I see the following on this machine: (OSX 10.3.4, gcc 3.3) [neilc:/Users/neilc/build-pgsql/contrib]% make -s all ld: warning multiple definitions of symbol _nextval

Re: [HACKERS] list rewrite committed

2004-05-28 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: For instance, here http://archives.postgresql.org/pgsql-hackers/2004-03/msg00696.php are some profiles documenting a case where nearly 40% of the runtime goes into lappend's in 7.4. I haven't had time to repeat the test

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Manfred Koizar
On Thu, 27 May 2004 16:50:24 -0400, Alvaro Herrera [EMAIL PROTECTED] wrote: Now you are on the subject, can I ask you to take a peek at what I did regarding tuple headers? I did read your patch, but I didn't understand it. :-( At first I thought I'd have to add back Xmax as a field on its own

Re: [HACKERS] On query rewrite

2004-05-28 Thread Tom Lane
Sailesh Krishnamurthy [EMAIL PROTECTED] writes: Thanks again. To confirm the actual cost comparison with plan enumeration is a dynamic programming algorithm, is it not ? Selinger-style with 2-way join paths enumerated, then 3-way using the best 2-way etc. ? Correct. For details see

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 02:47:01PM -0400, Tom Lane wrote: We could possibly avoid this particular issue with sufficiently complex visibility rules. (I am thinking that we might be able to say that the inner xact can't see the tuple in question unless the creating command was done in the

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Magnus Hagander
Today is May 28. So if nobody will not commit above within 3 days, non of them will be in 7.5(8.0). Am I correct? Not necessarily ... there are several Win32 related features that still haven't been committed (that I've seen) that will push back the release, and hopefully give some time

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 03:48:11PM -0400, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: On Fri, May 28, 2004 at 03:19:29PM -0400, Tom Lane wrote: We'd still need a plain CommandCounterIncrement facility, which means that actually a subtransaction would have to be a group of CIDs

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Bruce Momjian
Alvaro Herrera wrote: On Fri, May 28, 2004 at 04:51:07PM +0900, Tatsuo Ishii wrote: 2) certain behavior was different from what I expected (please correct me if my expectation is wrong). Yes, the expected behavior is different: if an aborted subtransaction is closed with a COMMIT or

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 03:19:29PM -0400, Tom Lane wrote: We'd still need a plain CommandCounterIncrement facility, which means that actually a subtransaction would have to be a group of CIDs not just one. Right, this is why I suggested runlength (the group is contiguous). So there'd also

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Marc G. Fournier
On Fri, 28 May 2004, Magnus Hagander wrote: Today is May 28. So if nobody will not commit above within 3 days, non of them will be in 7.5(8.0). Am I correct? Not necessarily ... there are several Win32 related features that still haven't been committed (that I've seen) that will push back the

[HACKERS] select like...not using index

2004-05-28 Thread Merlin Moncure
Sometime between yesterday and today queries in the form of select * from t where t.f like 'k%' have been broken so that they never use the index (on win32, not sure about others). On win32, at least, they have been broken for a while but this was due to a known issue based on the locales.

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes: Off the top of my head ... the Installer and Service Manager come to mind ... and Tom's fsync changes ... Right now, I'd say feature freeze is looking more like next Friday (June 4th), and we're evaluate it then ... that should hopefully give the

Re: [HACKERS] Extended customizing, SQL functions, internal variables, API

2004-05-28 Thread Bruno Wolff III
On Fri, May 28, 2004 at 12:46:29 -0400, [EMAIL PROTECTED] wrote: It occurs to me that there is a need for internal state variables that can be accessed either by functions or something similar. But there still needs to be multiple copies to take into account that different transactions may

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Bruce Momjian
Alvaro Herrera wrote: On Fri, May 28, 2004 at 01:43:16PM -0400, Bruce Momjian wrote: In this case, I want to try all of the inserts, but any of them can fail, then I want the bottom part done. I wonder where everyone eas when I asked this question a lot of time ago. I said I thought

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Marc G. Fournier
On Fri, 28 May 2004, Bruce Momjian wrote: Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: Off the top of my head ... the Installer and Service Manager come to mind ... and Tom's fsync changes ... Right now, I'd say feature freeze is looking more like next Friday (June 4th), and we're

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Bruce Momjian
Marc G. Fournier wrote: On Fri, 28 May 2004, Bruce Momjian wrote: Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: Off the top of my head ... the Installer and Service Manager come to mind ... and Tom's fsync changes ... Right now, I'd say feature freeze is looking more

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Marc G. Fournier
On Fri, 28 May 2004, Bruce Momjian wrote: Marc G. Fournier wrote: On Fri, 28 May 2004, Bruce Momjian wrote: Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: Off the top of my head ... the Installer and Service Manager come to mind ... and Tom's fsync changes ... Right now, I'd say

[HACKERS] cancel c98ej0$350$2@floppy.pyrenet.fr

2004-05-28 Thread mendola
This message was cancelled from within Mozilla. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [HACKERS] On query rewrite

2004-05-28 Thread Josh Berkus
Sailesh, BTW, do lots of people use the GEQO ? I do. I've several clients with data mining databases that literally require 45-way joins on some queries. Even a state-of-the-art CPU balks at that. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end

[HACKERS] -Wall and Wmissing-prototype

2004-05-28 Thread Gaetano Mendola
Hi all, I compiled postgres7.5devel and I see that during compilation are used togheter: -Wall -Wmissing-proptotype -Wmissing-declaration there is any reason to specify after -Wall others warning ? Regards Gaetano Mendola ---(end of broadcast)---

Re: [HACKERS] Extended customizing, SQL functions,

2004-05-28 Thread pgsql
On Fri, May 28, 2004 at 12:46:29 -0400, [EMAIL PROTECTED] wrote: It occurs to me that there is a need for internal state variables that can be accessed either by functions or something similar. But there still needs to be multiple copies to take into account that different transactions

Re: [HACKERS] select like...not using index

2004-05-28 Thread pgsql
Sometime between yesterday and today queries in the form of select * from t where t.f like 'k%' have been broken so that they never use the index (on win32, not sure about others). On win32, at least, they have been broken for a while but this was due to a known issue based on the locales.

Re: [HACKERS] -Wall and Wmissing-prototype

2004-05-28 Thread Dann Corbit
There are many warnings that do not show up with -Wall I usually use at least: -Wall -ansi -pedantic These are also a good idea: -Wimplicit-function-declaration -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror You will also get additional warnings when optimization is

[HACKERS] passing a whole record variable into a SQL command is not implemented

2004-05-28 Thread Gaetano Mendola
Hi all, I'm running our regression test on top of postgresql 7.5 devel. I found this function not working anymore ( is a distillated ): create table test ( quota integer ); CREATE OR REPLACE FUNCTION sp_test ( ) RETURNS TEXT AS' DECLARE quota RECORD; my_ret TEXT := ; BEGIN FOR

[HACKERS] false infinite recursion detected

2004-05-28 Thread Gaetano Mendola
Hi all, I distilled another our regression test failing: create table test ( id integer, quota integer ); create or replace view v_test AS select id, quota from test; create or replace view v_v_test AS select t1.id, t1.quota from v_test t1 join v_test t2 using ( id ) ; kalman=#

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Stephan Szabo
On Wed, 26 May 2004, Alvaro Herrera wrote: I have tested it and it passes all regression tests (including ones I added), plus some more tests I threw at it mainly for concurrency. Everything behaves as expected. At this time I'd like to have it reviewed by the critic eye of the committers,

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 05:43:41PM -0700, Stephan Szabo wrote: On Wed, 26 May 2004, Alvaro Herrera wrote: I have tested it and it passes all regression tests (including ones I added), plus some more tests I threw at it mainly for concurrency. Everything behaves as expected. At this time

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 04:45:28PM -0400, Tom Lane wrote: However, I just remembered why we rejected this idea to start with :-(. If we do it this way then when the overall xact commits, we no longer have state that tells which particular tuples are good or not. We would have to trawl for

Re: [HACKERS] temp tables broken in CVS HEAD?

2004-05-28 Thread Sean Chittenden
test= create temp table t2 (i integer); ERROR: permission denied for schema pg_temp_1 The immediate problem is a simple thinko (lack of attention to a function's return convention), but I'm gonna go back and review that whole patch. It obviously wasn't tested well at all. I know what's going on

Re: [HACKERS] SELECT * FROM table LIMIT 1; is really slow

2004-05-28 Thread Alvaro Herrera
I wrote a while ago So pg_subtrans remains the same, and we assign a new Xid to each subtransaction. Each tuple gets Xmin/Xmax according to the Xid of the current subtransaction. Within the transaction tree we don't use the Xid to check for visibility, but Cmin/Cmax and the abort bitmap.

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Bruce Momjian
Alvaro Herrera wrote: On Fri, May 28, 2004 at 05:43:41PM -0700, Stephan Szabo wrote: On Wed, 26 May 2004, Alvaro Herrera wrote: I have tested it and it passes all regression tests (including ones I added), plus some more tests I threw at it mainly for concurrency. Everything

Re: [HACKERS] temp tables broken in CVS HEAD?

2004-05-28 Thread Bruce Momjian
\Sean Chittenden wrote: test= create temp table t2 (i integer); ERROR: permission denied for schema pg_temp_1 The immediate problem is a simple thinko (lack of attention to a function's return convention), but I'm gonna go back and review that whole patch. It obviously wasn't tested

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Alvaro Herrera
On Fri, May 28, 2004 at 11:11:27PM -0400, Bruce Momjian wrote: Alvaro Herrera wrote: I think this applies to all GUC variables, but I wonder if we want to save the value of each one at subtransaction start and recover it at abort? Things could easily get huge. Maybe only saving the ones

Re: [HACKERS] Nested xacts: looking for testers and review

2004-05-28 Thread Bruce Momjian
Alvaro Herrera wrote: On Fri, May 28, 2004 at 11:11:27PM -0400, Bruce Momjian wrote: Alvaro Herrera wrote: I think this applies to all GUC variables, but I wonder if we want to save the value of each one at subtransaction start and recover it at abort? Things could easily get huge.

Re: [HACKERS] temp tables broken in CVS HEAD?

2004-05-28 Thread Matthew T. O'Connor
On Fri, 2004-05-28 at 23:19, Bruce Momjian wrote: Also, what is a thinko? A mental typeo... brain fart... of if you are old enough to qualify, a senior moment. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an

Re: [HACKERS] temp tables broken in CVS HEAD?

2004-05-28 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Also, what is a thinko? When in doubt, consult the Hacker's Dictionary ... http://www.catb.org/~esr/jargon/html/T/thinko.html regards, tom lane ---(end of broadcast)--- TIP 7: don't

Re: [HACKERS] [pgsql-hackers-win32] select like...not using index

2004-05-28 Thread Tom Lane
Merlin Moncure [EMAIL PROTECTED] writes: Sometime between yesterday and today queries in the form of select * from t where t.f like 'k%' have been broken so that they never use the index (on win32, not sure about others). Not here ... and I've seen no commits that I'd have thought would

Re: [HACKERS] Extended customizing, SQL functions,

2004-05-28 Thread Greg Stark
[EMAIL PROTECTED] writes: On Fri, May 28, 2004 at 12:46:29 -0400, [EMAIL PROTECTED] wrote: It occurs to me that there is a need for internal state variables that can be accessed either by functions or something similar. What you're describing is called materialized views and indeed a

Re: [HACKERS] Win32, PITR, nested transactions, tablespaces

2004-05-28 Thread Greg Stark
Bruce Momjian [EMAIL PROTECTED] writes: Reality check --- why should they keep going if the stuff if appication is going to be months away, and these big features are going to change CVS significantly anyway? Let's be honest --- if they aren't going to make it, they will stop working