Re: [HACKERS] CIC and deadlocks

2007-04-09 Thread Pavan Deolasee
Tom Lane wrote: Pavan Deolasee [EMAIL PROTECTED] writes: Good point. I'm envisioning a procarray.c function along the lines of bool TransactionHasSnapshot(xid) which returns true if the xid is currently listed in PGPROC and has a nonzero xmin. CIC's cleanup wait loop would check

[HACKERS] Query

2007-04-09 Thread Shaunak Godbole
Hi, As a part of my university project, I am trying to modify the postgres code to support parallel system. As the first step I have partitioned the data on different processors. And have kept a master node to process all the query requests. Whenever my master node is queried I need to push my

Re: [PATCHES] [HACKERS] Arrays of Complex Types

2007-04-09 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: How would we do that? Not create the array types in bootstrap mode? Or just special-case pg_statistic? Not generate them in bootstrap mode works for me. IIRC, there's code somewhere in there that allows anyarray to pass as a

Re: [PATCHES] [HACKERS] Arrays of Complex Types

2007-04-09 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Regarding catalog objects, we might have to try a little harder than just not generating in bootstrap mode - IIRC we generate system views (including pg_stats) in non-bootstrap mode. Maybe we just need to exempt anything in the pg_catalog namespace.

Re: [HACKERS] CIC and deadlocks

2007-04-09 Thread Tom Lane
Pavan Deolasee [EMAIL PROTECTED] writes: If you haven't finished this yet, would you like me to work on this ? If I do it, I would mostly follow the path you suggested above, unless I run into something else. I'm not intending to work on it. regards, tom lane

Re: [HACKERS] Query

2007-04-09 Thread Tom Lane
Shaunak Godbole [EMAIL PROTECTED] writes: I there a way of accessing other backends through the master backend. It seems you're trying to reinvent contrib/dblink. regards, tom lane ---(end of broadcast)--- TIP 7: You can

[HACKERS] select ('{}'::text[])[1] returns NULL -- is it correct?

2007-04-09 Thread Nikolay Samokhvalov
Thinking about XPath's output in cases such as 'SELECT xpath('/a', 'b /');' I've realized that in such cases an empty array should be returned (now we have NULL for such cases). Why? Because database _knows_ that there is no element -- this is not NULL's case (unknown). Then I've examined how

Re: [HACKERS] select ('{}'::text[])[1] returns NULL -- is it correct?

2007-04-09 Thread Tom Lane
Nikolay Samokhvalov [EMAIL PROTECTED] writes: As I can see here, when I ask for element that doesn't exist, the database returns NULL for me. Maybe it's well-known issue (and actually I understood this behaviour before), but strictly speaking it seems wrong for me: the database _knows_ that

[HACKERS] Adjusting index special storage for pg_filedump's convenience

2007-04-09 Thread Tom Lane
Historically, pg_filedump http://sources.redhat.com/rhdb/utilities.html has relied on the size of a page's special space to determine which kind of index it is looking at (btree, hash, etc) so that it can dump the contents of the special space nicely. This is pretty ugly of course, but there

Re: [HACKERS] Query

2007-04-09 Thread Hannu Krosing
Ühel kenal päeval, E, 2007-04-09 kell 10:56, kirjutas Tom Lane: Shaunak Godbole [EMAIL PROTECTED] writes: I there a way of accessing other backends through the master backend. It seems you're trying to reinvent contrib/dblink. Or you may want to use pl/proxy (

Re: [HACKERS] What X86/X64 OS's do we need coverage for?

2007-04-09 Thread Adrian Maier
The other platform I've whined about missing for some time is HP-UX, especially on PA-RISC. But that's a whole different story. there are more obscure and rare platforms(both in terms that might be a win for the buildfarm but HP-UX is really missing. Hello, I have access to a PA-RISC

Re: [HACKERS] select ('{}'::text[])[1] returns NULL -- is it correct?

2007-04-09 Thread Peter Eisentraut
Nikolay Samokhvalov wrote:  2. what should I do with XPath function? There is strong analogy between its case and array's case in my mind... Should I leave NULLs, or empty arrays are better? Empty array appears to be correct. The fact that arrays don't appear to work as you might like is a

Re: [HACKERS] What X86/X64 OS's do we need coverage for?

2007-04-09 Thread Larry Rosenman
On Mon, 9 Apr 2007, Adrian Maier wrote: The other platform I've whined about missing for some time is HP-UX, especially on PA-RISC. But that's a whole different story. there are more obscure and rare platforms(both in terms that might be a win for the buildfarm but HP-UX is really missing.

Re: [PATCHES] [HACKERS] Arrays of Complex Types

2007-04-09 Thread David Fetter
On Mon, Apr 09, 2007 at 10:40:49AM -0400, Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Regarding catalog objects, we might have to try a little harder than just not generating in bootstrap mode - IIRC we generate system views (including pg_stats) in non-bootstrap mode. Maybe

Re: [HACKERS] What X86/X64 OS's do we need coverage for?

2007-04-09 Thread Andrew Dunstan
Adrian Maier wrote: I have access to a PA-RISC machine running HP-UX 11.11. Unfortunately the machine is on a dedicated network and has no Internet access. It should be possible to create a mirror of the CVS repository on my machine (which has access to both the Internet and the dedicated

[HACKERS] PGPROCs of autovac workers (was Re: [PATCHES] autovacuum multiworkers, patch 5)

2007-04-09 Thread Alvaro Herrera
Alvaro Herrera wrote: Thanks! I had already incorporated the foreach_worker changes into my code, and later realized that there's an important bug regarding the PGPROC of the workers, so I've reworked the patch, which meant that the foreach_worker() macro went away completely. FWIW, the

Re: [HACKERS] What X86/X64 OS's do we need coverage for?

2007-04-09 Thread Tom Lane
Larry Rosenman ler@lerctr.org writes: I think I'll be able to set up my HP-UX 11.11 box here, as soon as it gets fixed, and assuming either the bundled compiler will work or I can get GCC on it. If the bundled compiler is still the same non-ANSI-C weakling that was bundled in HPUX 10, there's

Re: [HACKERS] elog(FATAL) vs shared memory

2007-04-09 Thread Stuart Bishop
Tom Lane wrote: Stuart Bishop [EMAIL PROTECTED] writes: After a test is run, the test harness kills any outstanding connections so we can drop the test database. Without this, a failing test could leave open connections dangling causing the drop database to block. Just to make it perfectly

Re: [HACKERS] elog(FATAL) vs shared memory

2007-04-09 Thread Mark Shuttleworth
Tom Lane wrote: Stuart Bishop [EMAIL PROTECTED] writes: After a test is run, the test harness kills any outstanding connections so we can drop the test database. Without this, a failing test could leave open connections dangling causing the drop database to block. Just to make it

Re: [HACKERS] What X86/X64 OS's do we need coverage for?

2007-04-09 Thread Larry Rosenman
On Mon, 9 Apr 2007, Tom Lane wrote: Larry Rosenman ler@lerctr.org writes: I think I'll be able to set up my HP-UX 11.11 box here, as soon as it gets fixed, and assuming either the bundled compiler will work or I can get GCC on it. If the bundled compiler is still the same non-ANSI-C weakling

Re: [PATCHES] [HACKERS] Arrays of Complex Types

2007-04-09 Thread Martijn van Oosterhout
On Mon, Apr 09, 2007 at 10:14:41AM -0400, Andrew Dunstan wrote: . defer for the present any consideration of a CREATE TYPE foo AS ARRAY ... command. What is the rationale for allowing people to name the array type. When I originally proposed the syntax I presumed that the array name would be

Re: [PATCHES] [HACKERS] Arrays of Complex Types

2007-04-09 Thread Andrew Dunstan
Martijn van Oosterhout wrote: On Mon, Apr 09, 2007 at 10:14:41AM -0400, Andrew Dunstan wrote: . defer for the present any consideration of a CREATE TYPE foo AS ARRAY ... command. What is the rationale for allowing people to name the array type. When I originally proposed the syntax I

Re: [HACKERS] Effects of GUC settings on automatic replans

2007-04-09 Thread Jim Nasby
On Mar 25, 2007, at 12:31 PM, Tom Lane wrote: Jim Nasby [EMAIL PROTECTED] writes: On Mar 21, 2007, at 5:11 AM, Tom Lane wrote: constraint_exclusion Hrm... wasn't that option added in case there was a bug in the exclusion code? Well, the bug was a lack of ways to get rid of plans that were

Re: [HACKERS] Changing semantics of autovacuum_cost_limit

2007-04-09 Thread Jim Nasby
On Mar 26, 2007, at 2:01 AM, Galy Lee wrote: As AUTOVACUUM is having multiple workers now, the semantics of autovacuum_cost_limit also need to be redefined. Currently, autovacuum_cost_limit is the accumulated cost that will cause one single worker vacuuming process to sleep. It is used to

Re: [HACKERS] Partitioned tables constraint_exclusion

2007-04-09 Thread Jim Nasby
See Simon's reply... timestamptz math is *not* IMMUTABLE, because sessions are free to change their timezone at any time. I bet you can get some invalid results using that function with a clever test case. On Mar 26, 2007, at 3:48 PM, Weslee Bilodeau wrote: Weslee Bilodeau wrote: Mainly

Re: [HACKERS] Effects of GUC settings on automatic replans

2007-04-09 Thread Tom Lane
Jim Nasby [EMAIL PROTECTED] writes: On Mar 25, 2007, at 12:31 PM, Tom Lane wrote: The other argument was that you might not want the costs of searching for contradictory constraints if your workload was such that the search never or hardly ever succeeds. That still justifies the existence

Re: [PATCHES] [HACKERS] Arrays of Complex Types

2007-04-09 Thread Martijn van Oosterhout
On Mon, Apr 09, 2007 at 04:07:16PM -0400, Andrew Dunstan wrote: Some type systems have named array types, some don't. I can live happily with either. Are array types anonymous in the standard? Yes, they're anonymous in the standard. That doesn't mean we can't give them names if we wanted...

Re: [HACKERS] Partitioned tables constraint_exclusion

2007-04-09 Thread Weslee Bilodeau
Jim Nasby wrote: See Simon's reply... timestamptz math is *not* IMMUTABLE, because sessions are free to change their timezone at any time. I bet you can get some invalid results using that function with a clever test case. I'm pretty sure it could easily be broken. But to make it easier for

Re: [HACKERS] Group Commit

2007-04-09 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: I've been working on the patch to enhance our group commit behavior. The patch is a dirty hack at the moment, but I'm settled on the algorithm I'm going to use and I know the issues involved. One question that just came to mind is whether Simon's

Re: [HACKERS] Adjusting index special storage for pg_filedump's convenience

2007-04-09 Thread Gavin Sherry
On Mon, 9 Apr 2007, Tom Lane wrote: We put in a workaround a long time ago to make it possible to tell the difference between btree and hash special space, which are also the same size: there's an unused 16 bits in hash special space that we fill with a specific value. As of 8.2 this doesn't

Re: [HACKERS] Group Commit

2007-04-09 Thread Bruce Momjian
Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: I've been working on the patch to enhance our group commit behavior. The patch is a dirty hack at the moment, but I'm settled on the algorithm I'm going to use and I know the issues involved. One question that just came to

Re: [HACKERS] Adjusting index special storage for pg_filedump's convenience

2007-04-09 Thread Tom Lane
Gavin Sherry [EMAIL PROTECTED] writes: On Mon, 9 Apr 2007, Tom Lane wrote: ... I don't see any way to make it completely bulletproof without enlarging the special space, which seems an unreasonable price to pay. But even one chance in 16K is way better than the current situation. Sounds

Re: [HACKERS] Group Commit

2007-04-09 Thread Greg Smith
On Mon, 9 Apr 2007, Bruce Momjian wrote: The big question is who is going to care about the milliseconds delay and is using a configuration that is going to benefit from commit_delay. I care. WAL writes are a major bottleneck when many clients are committing near the same time. Both times

Re: [HACKERS] Group Commit

2007-04-09 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: An alternate mechanism that tells the client the commit is done when it hasn't hit disk is of no use for the applications I work with, so I haven't even been paying attention to no-commit-wait. Agreed, if you need committed to mean committed then no-wait

Re: [HACKERS] Group Commit

2007-04-09 Thread Tatsuo Ishii
On Mon, 9 Apr 2007, Bruce Momjian wrote: The big question is who is going to care about the milliseconds delay and is using a configuration that is going to benefit from commit_delay. I care. WAL writes are a major bottleneck when many clients are committing near the same time. Both