Re: [HACKERS] Nested transactions and tuple header info

2004-06-13 Thread Alvaro Herrera
I said One such possible caller is EvalPlanQual. It could go to sleep using XactLockTableWait() on the SnapshotDirty's xmax. But the tuple has something strange in its xmax -- it's the tuple's cmin actually. Leaving this would be probably a bug. However, if the tuple is new, then

Re: [HACKERS] [COMMITTERS] pgsql-server: Clean up generation of

2004-06-13 Thread Christopher Kings-Lynne
The right way to do this at the C level would be to use the same infrastructure as nextval() does to accept arguments like 'foo' and 'Foo.Bar'. There's no reason to restrict the two-argument form to the current search_path. Is it possible to do that in SQL? eg. is there anything you can do

Re: [HACKERS] I just got it: PostgreSQL Application Server -- a new project.

2004-06-13 Thread Thomas Hallgren
Carl E. McMillin [EMAIL PROTECTED] wrote: ...That's one of the reasons I wrote Pl/Java. More power too you! I'd really like to hear more about this project. Is http://gborg.postgresql.org/project/pljava/projdisplay.php your URL? Yes, it is. I'm now in complete agreement: app-server

[HACKERS] Coding question

2004-06-13 Thread Christopher Kings-Lynne
If typTup is of type Form_pg_type, is this use of ObjectIdGetDatum legal? tuple = SearchSysCache(RELOID, ObjectIdGetDatum(typTup-typrelid), 0, 0, 0); If not, how do I turn -typrelid into an Oid type for safe passage through ObjectIdGetDatum?

Re: [HACKERS] Nested transactions and tuple header info

2004-06-13 Thread Bruce Momjian
Alvaro Herrera wrote: On Tue, Jun 01, 2004 at 06:40:07PM -0400, Bruce Momjian wrote: When DELETE a happens, we remove the xmin=1 from the tuple header and replace it with xmin=3. xid=3 will be marked as committed if xid2 aborts, and will be marked as aborted if xid3 commits. So, if

[HACKERS] logfile rotation

2004-06-13 Thread Andreas Pflug
Tom doesn't like returning the server's logfile using a pgsql function unless logfile rotation is implemented, so here it is. This proposal doesn't include a daemon that triggers pg_logfile_rotate when appropriate (timestamp and/or length dependent), pg_autovacuum might be a good place to do

Re: [HACKERS] logfile rotation

2004-06-13 Thread Tom Lane
Andreas Pflug [EMAIL PROTECTED] writes: Tom doesn't like returning the server's logfile using a pgsql function unless logfile rotation is implemented, so here it is. I'll repeat what I said in response to your other posting: This uses a shared memory area with no lock, which seems a bad

Re: [HACKERS] Release 7.4.3 branded

2004-06-13 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: I just built from a fresh cvs checkout (7.4 stable) and get these warnings: OK, this looks to be the same issue Oliver Elphick reported a couple weeks ago against CVS tip. I've backpatched his fix into 7.4 branch (there was a warning in ecpg too, according

Re: [HACKERS] logfile rotation

2004-06-13 Thread Andreas Pflug
Tom Lane wrote: I'll repeat what I said in response to your other posting: Hm? I never posted something with shared mem usage before, what do you mean? This uses a shared memory area with no lock, which seems a bad design; AFAICS there should be no lock necessary. We agreed long ago that

Re: [HACKERS] Nested transactions and tuple header info

2004-06-13 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Not sure how to fix this -- I'm not even sure what the exact problem is, because it's trying to insert the oid of a toast table in pg_class_oid_index during the first ALTER TABLE ... CREATE TOAST TABLE. Why would it see an old tuple with the same value,

Re: [HACKERS] [COMMITTERS] pgsql-server: Clean up generation of

2004-06-13 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: I'm trying to avoid doing it in C as it seems like it would be a pita. I think it would be simpler in C than this mess in SQL is ;-). You would not of course implement it in any way that would look like the SQL query ... but there are existing

Re: [HACKERS] logfile rotation

2004-06-13 Thread Andreas Pflug
Andreas Pflug wrote: We agreed long ago that the postmaster should never depend on the correctness of any shared memory data structure; but this patch would make it do so. I understand that, so what's the suggested way to store data common for all backends? Answering my own question, the

Re: [HACKERS] File leak?

2004-06-13 Thread Heikki Linnakangas
On Sat, 12 Jun 2004, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low priority to me. Are you sure? I read through the TODO list but couldn't

Re: [HACKERS] File leak?

2004-06-13 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: On Sat, 12 Jun 2004, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low priority to me. Are you

[HACKERS] Can get GiST RECHECK clause to work

2004-06-13 Thread Mark Cave-Ayland
Hi everyone, I'm trying to mark a GiST index as lossy using the RECHECK operator as part of some work on PostGIS, but what happens is that the original operator function is never reapplied to the results of the index scan. The operator class and operator definitions looks like this: CREATE

Re: [HACKERS] Releasing 7.4.3 ...

2004-06-13 Thread Peter Eisentraut
Bruce Momjian wrote: Removing README.CVS from the tarball is something Marc handles, as far as I know. I just added it to CVS and never worked on having it removed from the tarballs. I've added a rule to remove README.CVS when making a distribution. But I seem to be missing any rules to

Re: [HACKERS] Releasing 7.4.3 ...

2004-06-13 Thread Peter Eisentraut
Marc G. Fournier wrote: Anyone else, please test the tar ball for any bug/nits ... specifically, Peter, can you check that I've built/included the right documentation? Try reading the list of supported platforms at the bottom of the INSTALL file... ---(end of

Re: [HACKERS] Releasing 7.4.3 ...

2004-06-13 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Bruce Momjian wrote: Removing README.CVS from the tarball is something Marc handles, as far as I know. I just added it to CVS and never worked on having it removed from the tarballs. I've added a rule to remove README.CVS when making a distribution.

Re: [HACKERS] Nested transactions and tuple header info

2004-06-13 Thread Alvaro Herrera
On Sun, Jun 13, 2004 at 01:22:05PM -0400, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Not sure how to fix this -- I'm not even sure what the exact problem is, because it's trying to insert the oid of a toast table in pg_class_oid_index during the first ALTER TABLE ... CREATE

Re: [HACKERS] Can get GiST RECHECK clause to work

2004-06-13 Thread Tom Lane
Mark Cave-Ayland [EMAIL PROTECTED] writes: I'm trying to mark a GiST index as lossy using the RECHECK operator as part of some work on PostGIS, but what happens is that the original operator function is never reapplied to the results of the index scan. You sure? I'm pretty sure that a number

Re: [PATCHES] [HACKERS] Configuration patch

2004-06-13 Thread pgsql
Where are we on this? That's a good question. Tom doesn't like the syntax of include and there are a couple bugs he is concered it. I'm pretty agnostic about the syntax, but I wouldn't get overly worried about the metaphor presented either. include='...' doesn't bother me at all, but some

Re: [pgsql-hackers-win32] [HACKERS] Tablespaces

2004-06-13 Thread pgsql
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] I surely hope not. Especially not multi-gig databases. The folks running those should know better than to use Windows, and if they do not, I'll be happy to tell them so. You know, it makes you wonder.

Re: [HACKERS] Can get GiST RECHECK clause to work

2004-06-13 Thread Mark Cave-Ayland
Hi Tom, As far as I can tell this is the case. What I've done to test this is to put an elog(NOTICE, .) in geometry_overlap() so I can tell when it's being called and this is the result I get: shapefile=# select * from tgr1 where the_geom GeometryFromText('BOX3D(1000 10 0, 2000

Re: [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-13 Thread pgsql
[ Thread moved to hackers and win32.] Andreas Pflug wrote: Bruce Momjian wrote: Agreed. My pthread book says pthread_mutex_init() should be called only once, and we have to guarantee that. If the Windows implentation allows it to be called multiple times, just create a function to

Re: [HACKERS] Can get GiST RECHECK clause to work

2004-06-13 Thread Tom Lane
Mark Cave-Ayland [EMAIL PROTECTED] writes: As far as I can tell this is the case. What I've done to test this is to put an elog(NOTICE, .) in geometry_overlap() Well, I can easily prove that CVS tip does call the operator function and honor its result. regression=# create table foo (f1

Re: [HACKERS] simple_heap_update: tuple concurrently updated -- during INSERT

2004-06-13 Thread SZCS Gbor
Dear Tom, I'll try my best. Also, I'll try to describe the situation more precisely, in case it may give you another idea. INSERT INTO p_items; - p_items before: INSERT, UPDATE and/or DELETE other tuples in p_items - p_items after: UPDATE p SET touch_time, toucher; p after: INSERT INTO p_ny

Re: [HACKERS] simple_heap_update: tuple concurrently updated -- during INSERT

2004-06-13 Thread SZCS Gbor
Dear Tom, You did it again! The all-amazing-Tom-Lane-clearsight ;) I could reproduce this. I can imagine this practically as: (session 1) someone shutting down one of our Windows clients, while (session 2) another one did the INSERT at the very same moment. This thing caused session 2 to abort.

Re: [HACKERS] File leak?

2004-06-13 Thread Bruce Momjian
Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: On Sat, 12 Jun 2004, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I wonder if we could clean up those lost files on database recovery or vacuum. There is a TODO for this, but it seems exceedingly low

Re: [PATCHES] [HACKERS] Configuration patch

2004-06-13 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: Where are we on this? That's a good question. Tom doesn't like the syntax of include and there are a couple bugs he is concered it. I'm pretty agnostic about the syntax, but I wouldn't get overly worried about the metaphor presented either. include='...'

Re: [HACKERS] File leak?

2004-06-13 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: (viz, log at the instant of file creation, and the replayer would have to keep track of whether it sees the creating transaction commit and delete the file if not). I don't see how we could WAL log it because we don't fsync the WAL until our

Re: [pgsql-hackers-win32] [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-13 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: [ Thread moved to hackers and win32.] Andreas Pflug wrote: Bruce Momjian wrote: Agreed. My pthread book says pthread_mutex_init() should be called only once, and we have to guarantee that. If the Windows implentation allows it to be called

Re: [PATCHES] [HACKERS] Configuration patch

2004-06-13 Thread Tom Lane
Tom doesn't like the syntax of include I said more than once that I didn't care about the syntax; it's the implementation I was objecting to. However, given that we are going to push it into guc-file.l, it'll be easier all around if we choose a syntax that doesn't look exactly like a variable

Re: [HACKERS] Delaying the planning of unnamed statements until Bind

2004-06-13 Thread Oliver Jowett
Tom Lane wrote: I've applied the patch you sent in for this, with some editorializations --- you were being too aggressive about substituting constants, with the net effect that the plan was not still parameterized as it was supposed to be. Thanks. This should make my JDBC driver changes easier to

Re: [HACKERS] Delaying the planning of unnamed statements until Bind

2004-06-13 Thread Tom Lane
Oliver Jowett [EMAIL PROTECTED] writes: At execution time the executor can cache the results of expressions flagged as constant at execution, assuming there's somewhere safe to cache the result for just that execution (ExprState?). That would be the problem; there isn't anyplace appropriate.

[HACKERS] New stable snapshot built ...

2004-06-13 Thread Marc G. Fournier
Just for the few changes that went in today docs related ... will build the release on in the morning, but this gives a few hours for ppl to see if anything appears to b emissing .. Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED]

Re: [HACKERS] Releasing 7.4.3 ...

2004-06-13 Thread Marc G. Fournier
On Sun, 13 Jun 2004, Peter Eisentraut wrote: Marc G. Fournier wrote: Anyone else, please test the tar ball for any bug/nits ... specifically, Peter, can you check that I've built/included the right documentation? Try reading the list of supported platforms at the bottom of the INSTALL file... k,

Re: [HACKERS] I just got it: PostgreSQL Application Server -- a

2004-06-13 Thread pgsql
OK, perhaps application server is not an appropriate name, but what should we call it? Two issues: (1) We should get this off hackers, but to where? (2)My vision for this thing is that it is more than just PostgreSQL, it is PG plus a lot of the popular add-ons and some new ones, sample code, all

Re: [HACKERS] Delaying the planning of unnamed statements until Bind

2004-06-13 Thread Oliver Jowett
Tom Lane wrote: Oliver Jowett [EMAIL PROTECTED] writes: At execution time the executor can cache the results of expressions flagged as constant at execution, assuming there's somewhere safe to cache the result for just that execution (ExprState?). That would be the problem; there isn't anyplace

[HACKERS] Weird 'bit' type behaviour

2004-06-13 Thread Christopher Kings-Lynne
Is there any reason for this behaviour: test=# select 1::bit; bit - 0 (1 row) test=# select '1'::bit; bit - 1 (1 row) Chris ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

[HACKERS] Other bit oddities

2004-06-13 Thread Christopher Kings-Lynne
What about these? test=# select B'1' 4; ?column? -- 0 (1 row) test=# select B'1'::bit varying 4; ?column? -- 0 (1 row) test=# select '1'::bit varying 4; ?column? -- 0 (1 row) ---(end of broadcast)--- TIP 4: Don't

Re: [HACKERS] I just got it: PostgreSQL Application Server -- a

2004-06-13 Thread Joshua D. Drake
The "PostgreSQL Enhanced Server" (How's that name? Maybe we call it Zerver and use PEZ?) idea is how to take the excellent core of PostgreSQL and productize it in much the same way distributions take the Linux kernel and may a GNU/Linux system. It would seem to me that this is more

Re: [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-13 Thread Manfred Spraul
[EMAIL PROTECTED] wrote: What is the recommended way to create mutex objects (CreateMutex) from Win32 libraries? There must be a clean way like there is in pthreads. A mutex is inherently a global object. CreateMutex(NULL, FALSE, NULL) will return a handle to an unowned mutex. That's not