Re: [BUGS] BUG #3865: ERROR: failed to build any 8-way joins

2008-01-10 Thread Tom Lane
I wrote: > The most expedient way to fix it seems to be to make > has_legal_joinclause consider, not the set of all relations anywhere > in the query, but just members of the current initial_rels list. 8.2 patch is here, if you need it now: http://archives.postgresql.org/pgsql-committers/2008-01/m

Re: [BUGS] BUG #3860: xpath crashes backend when is querying xmlagg result

2008-01-10 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane escribió: >> One thing I was wondering about earlier today is whether libxml isn't >> expecting NULL-return-on-failure from the malloc-substitute routine. >> If we take control away from it unexpectedly, I wouldn't be a bit >> surprised if its d

Re: [BUGS] BUG #3860: xpath crashes backend when is querying xmlagg result

2008-01-10 Thread Alvaro Herrera
Tom Lane escribió: > One thing I was wondering about earlier today is whether libxml isn't > expecting NULL-return-on-failure from the malloc-substitute routine. > If we take control away from it unexpectedly, I wouldn't be a bit > surprised if its data structures are left corrupt. This might lea

Re: [BUGS] BUG #3860: xpath crashes backend when is querying xmlagg result

2008-01-10 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > + void > + AtEOXact_xml(void) > + { > + if (LibxmlContext == NULL) > + return; > + > + MemoryContextDelete(LibxmlContext); > + LibxmlContext = NULL; > + > + xmlCleanupParser(); > + } [ blink... ] Shouldn't that be the othe

Re: [BUGS] BUG #3865: ERROR: failed to build any 8-way joins

2008-01-10 Thread Tom Lane
Stefan Kaltenbrunner <[EMAIL PROTECTED]> writes: > I can confirm that this works on 8.2.5 but fails: > * on -HEAD > * on 8.2.6 (so we have a rather bad regression) > with a join_collaps_limit > 3 and < 10 - you could increase that on your > box but it is likely that other queries are affected in a

Re: [BUGS] BUG #3860: xpath crashes backend when is querying xmlagg result

2008-01-10 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Perhaps a better idea is to create a separate LibxmlContext memcxt, > > child of QueryContext, and have xml_palloc etc always use that. That > > way it won't be reset between calls. It probably also means we could > > wire xml r

Re: [BUGS] BUG #3860: xpath crashes backend when is querying xmlagg result

2008-01-10 Thread Alvaro Herrera
Alvaro Herrera escribió: > Tom Lane escribió: > > > We might be able to compromise by only resetting the context after > > an error, but this is still only possible if we have a way to make > > libxml let go of *all* pointers to alloc'd objects. I don't understand > > your comment that xmlCleanup

Re: [BUGS] BUG #3867: PQconnectdb(NULL) cores instead of errors.

2008-01-10 Thread Tom Lane
"Ken Lorber" <[EMAIL PROTECTED]> writes: > PQconnectdb(NULL) cores in strdup() in interfaces/libpq/fe-connect.c:3091 > (conninfo_parse). Throwing an error would be more useful. 99% of library routines will core if you pass them a null for an argument that that's not specifically documented to be

[BUGS] BUG #3867: PQconnectdb(NULL) cores instead of errors.

2008-01-10 Thread Ken Lorber
The following bug has been logged online: Bug reference: 3867 Logged by: Ken Lorber Email address: [EMAIL PROTECTED] PostgreSQL version: 8.3beta4 Operating system: Mac OSX Description:PQconnectdb(NULL) cores instead of errors. Details: PQconnectdb(NULL) cores in str