Re: [HACKERS] Proposal: Commit timestamp

2007-02-05 Thread Zeugswetter Andreas ADI SD
One concept is to have a univeral clock that ticks forward (like every second) and each node orders all their transactions inside the second-granular tick. Then each commit would be like: {node, clocksecond, txn#} and each time the clock ticks forward, txn# is reset to zero. This

Re: [HACKERS] [PATCHES] Fix database is ready race condition

2007-02-05 Thread Simon Riggs
On Sun, 2007-02-04 at 14:15 -0500, Tom Lane wrote: Markus Schiltknecht [EMAIL PROTECTED] writes: is there a good reason to print the database system is ready message in StartupXLOG() in xact.c? It has a) nothing to do with xlog and b) opens a small race condition: the message gets

Re: [HACKERS] SRF optimization question

2007-02-05 Thread Simon Riggs
On Sat, 2007-02-03 at 15:51 -0800, Jeremy Drake wrote: I am writing a set returning function in C. There are cases where I can know definitively, upfront, that this function will only return one row. I have noticed, through happenstance of partially converted function, that I can mark a

Re: [HACKERS] Compacting a relation

2007-02-05 Thread Simon Riggs
On Sat, 2007-02-03 at 22:11 -0500, Bruce Momjian wrote: Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: vacuumlazy.c contains a hint Consider compacting this relation but AFAICT, there is no indication anywhere how compacting is supposed to be achieved. I guess this

Re: [HACKERS] [PATCHES] Fix database is ready race condition

2007-02-05 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: My suggestions would be 1. Database system has completed recovery and 2. Database system is ready to accept connections The second was in fact the wording I had in mind, sorry for not being clear. As to the first, the question is whether a log message at

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Bruce Momjian
Martijn van Oosterhout wrote: -- Start of PGP signed section. On Sun, Jan 28, 2007 at 02:05:41PM +0100, Magnus Hagander wrote: Anyway. We hard-code thread-safety to on for Win32, because win32 is a threaded platform in general - almost everything can be exposed to threading even if they

Re: [HACKERS] \copy (query) delimiter syntax error

2007-02-05 Thread Andrew Dunstan
Andrew Dunstan wrote: Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: The consequence will be, though, that psql will accept a syntax for \copy (query) ... that the corresponding backend command would reject were we not transforming it. That strikes me as potentially confusing.

[HACKERS] buildfarm fail cardinal

2007-02-05 Thread Gevik Babakhani
Hi, I would like to know why the test stats on pgbuildfarm/cardinal fails? Regards, Gevik xml ... ok test stats... FAILED test tablespace ... ok ---(end of broadcast)--- TIP 7: You can help

Re: [HACKERS] buildfarm fail cardinal

2007-02-05 Thread Andrew Dunstan
Gevik Babakhani wrote: Hi, I would like to know why the test stats on pgbuildfarm/cardinal fails? Regards, Gevik xml ... ok test stats... FAILED test tablespace ... ok If you look in the log it tells you. This looks like pilot error.

Re: [HACKERS] buildfarm fail cardinal

2007-02-05 Thread Tom Lane
Gevik Babakhani [EMAIL PROTECTED] writes: I would like to know why the test stats on pgbuildfarm/cardinal fails? Looks like DNS and/or /etc/hosts misconfiguration to me: == pgsql.10164/src/test/regress/log/postmaster.log === LOG: could not resolve localhost:

Re: [HACKERS] Performance penalty of visibility info in indexes?

2007-02-05 Thread Martijn van Oosterhout
On Thu, Feb 01, 2007 at 11:57:41PM -0600, Jim Nasby wrote: Has anyone actually measured the performance overhead of storing visibility info in indexes? I know the space overhead sounds daunting, but even if it doubled the size of the index in many cases that'd still be a huge win over

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Alvaro Herrera
Bruce Momjian wrote: Added to TODO: o Add \# to list command history like \s, but with line numbers http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php Humm, this is not what we agreed.

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Douglas McNaught
Bruce Momjian [EMAIL PROTECTED] writes: Martijn van Oosterhout wrote: It'd be nice if we could do the same for some Unix platofrms like Linux. The C library uses threads internally, and there's no actual downside to enabling thread safety there, except removing a few failure modes. I was

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Tom Lane
Douglas McNaught [EMAIL PROTECTED] writes: Bruce Momjian [EMAIL PROTECTED] writes: Martijn van Oosterhout wrote: It'd be nice if we could do the same for some Unix platofrms like Linux. The C library uses threads internally, and there's no actual downside to enabling thread safety there,

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Gregory Stark
Douglas McNaught [EMAIL PROTECTED] writes: It uses threads at least for the POSIX AIO calls--I'm not sure what else. On that tangent, is that still true or is it only for older kernels that it's true? I was under the impression newer kernels implemented the aio interface but others seem to

Re: [HACKERS] Recursive query syntax ambiguity

2007-02-05 Thread Martijn van Oosterhout
On Mon, Jan 29, 2007 at 01:38:02PM +, Gregory Stark wrote: Instead I suggest we create one type of reentrant node, which memoizes its output. It would be a kind of on-demand Materialize. It would be paired with a second node type which would be the only type of node which can invoke it.

Re: [HACKERS] Recursive query syntax ambiguity

2007-02-05 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: However, I don't know it matters. You only need to cost the plan if there are alternate paths and given the plan structure is strongly constrained, I'm not sure how much it matters. It does, since the whole thing could be a subquery, in which

Re: [HACKERS] Dead code in _bt_split?

2007-02-05 Thread Bruce Momjian
Heikki Linnakangas wrote: Bruce Momjian wrote: Heikki, did this code cleanup get included in your recent btree split fix? No. OK, would you please send a patch to remove the unused code. Thanks. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com +

Re: [HACKERS] Referential Integrity and SHARE locks

2007-02-05 Thread Kris Jurka
On Sat, 3 Feb 2007, Simon Riggs wrote: There are issues, yes. Dropping PKs is a very irregular occurrence nor is it likely to be part of a complex transaction. It wouldn't bother me to say that if a transaction already holds a RowExclusiveLock or a RowShareLock it cannot upgrade to an

Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)

2007-02-05 Thread Bruce Momjian
Patch already applied by Tom. Removed from queue. --- Simon Riggs wrote: On Tue, 2006-12-05 at 17:26 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Tue, 2006-12-05 at 16:24 -0500, Tom Lane wrote:

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Martijn van Oosterhout
On Mon, Feb 05, 2007 at 11:09:06AM -0500, Tom Lane wrote: I think the real point is that you get the same C library whether you ask for thread safety or not, and it does internal locking to protect itself against multi threads anyway. So arguably there's no point in building a thread-unsafe

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: That's true, but I think it would be worthwhile to invert the switch to be --disable-thread-safety, since the number of people who don't understand the problem far outweigh the cost of the switch. I'd vote against that unless it were done only

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Joshua D. Drake
Alvaro Herrera wrote: Bruce Momjian wrote: Added to TODO: o Add \# to list command history like \s, but with line numbers http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php Humm, this is not what we agreed. Actually to be fair, there was no agreement.

Re: [HACKERS] Proposed adjustments in MaxTupleSize and toastthresholds

2007-02-05 Thread Simon Riggs
On Fri, 2007-02-02 at 15:11 -0500, Tom Lane wrote: 2. Fix TOAST_TUPLE_THRESHOLD and TOAST_TUPLE_TARGET to be correctly calculated (properly allowing for line pointers) and to be MAXALIGN multiples. The threshold value should be exactly the size of the largest tuple that you can put four of

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian wrote: Added to TODO: o Add \# to list command history like \s, but with line numbers http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php Humm, this is not what we agreed. Are you saying the URL is wrong or the

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Bruce Momjian
Joshua D. Drake wrote: Alvaro Herrera wrote: Bruce Momjian wrote: Added to TODO: o Add \# to list command history like \s, but with line numbers http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php Humm, this is not what we agreed. Actually to be

Re: [HACKERS] Proposed adjustments in MaxTupleSize and toastthresholds

2007-02-05 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Sounds like a good time to suggest making these values configurable, within certain reasonable bounds to avoid bad behaviour. Actually, given what we've just learned --- namely that choosing these values at random is a bad idea --- I'd want to see a whole

Re: [HACKERS] Referential Integrity and SHARE locks

2007-02-05 Thread Simon Riggs
On Sun, 2007-02-04 at 09:38 +, Simon Riggs wrote: The TODO I was requesting you consider was this: Develop non-conflicting locking scheme to allow RI checks to co-exist peacefully with non-PK UPDATEs on the referenced table. That is, IMHO, a general statement of an important

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Alvaro Herrera
Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: Added to TODO: o Add \# to list command history like \s, but with line numbers http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php Humm, this is not what we agreed. Are

Re: [HACKERS] Compacting a relation

2007-02-05 Thread Bruce Momjian
Simon Riggs wrote: On Sat, 2007-02-03 at 22:11 -0500, Bruce Momjian wrote: Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: vacuumlazy.c contains a hint Consider compacting this relation but AFAICT, there is no indication anywhere how compacting is supposed to be

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Bruce Momjian
Alvaro Herrera wrote: Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: Added to TODO: o Add \# to list command history like \s, but with line numbers http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php Humm,

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Joshua D. Drake
I am not going to be spending my time on it and I doubt anyone else will. Really, I thought there were a number of people who liked it. New text is: o Add \# to list and execute command history Are you sure you want it removed? Well let me put it this way. I think my idea

Re: [HACKERS] psql possible TODO

2007-02-05 Thread Bruce Momjian
Joshua D. Drake wrote: I am not going to be spending my time on it and I doubt anyone else will. Really, I thought there were a number of people who liked it. New text is: o Add \# to list and execute command history Are you sure you want it removed? Well let me

Re: [HACKERS] Modifying and solidifying contrib

2007-02-05 Thread Andrew Dunstan
Jim Nasby wrote: There was also mention of having a means to tell pg_dump not to dump extensions... What's the use case for that? What will we do if there are db objects that depend on some extensions? Given that there will be some uninstall support, this one seems less necessary. I

Re: [HACKERS] Proposed adjustments in MaxTupleSize andtoastthresholds

2007-02-05 Thread Simon Riggs
On Mon, 2007-02-05 at 11:52 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: Sounds like a good time to suggest making these values configurable, within certain reasonable bounds to avoid bad behaviour. Actually, given what we've just learned --- namely that choosing these

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Martijn van Oosterhout
On Mon, Feb 05, 2007 at 11:34:23AM -0500, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: That's true, but I think it would be worthwhile to invert the switch to be --disable-thread-safety, since the number of people who don't understand the problem far outweigh the cost of

Re: [HACKERS] Modifying and solidifying contrib

2007-02-05 Thread Martijn van Oosterhout
On Mon, Feb 05, 2007 at 12:19:51PM -0500, Andrew Dunstan wrote: Jim Nasby wrote: There was also mention of having a means to tell pg_dump not to dump extensions... What's the use case for that? What will we do if there are db objects that depend on some extensions? Given that there will

Re: [HACKERS] Modifying and solidifying contrib

2007-02-05 Thread Andrew Dunstan
Martijn van Oosterhout wrote: On Mon, Feb 05, 2007 at 12:19:51PM -0500, Andrew Dunstan wrote: Jim Nasby wrote: There was also mention of having a means to tell pg_dump not to dump extensions... What's the use case for that? What will we do if there are db objects that depend on

Re: [HACKERS] VC2005 build and pthreads

2007-02-05 Thread Magnus Hagander
Martijn van Oosterhout wrote: On Mon, Feb 05, 2007 at 11:34:23AM -0500, Tom Lane wrote: Martijn van Oosterhout kleptog@svana.org writes: That's true, but I think it would be worthwhile to invert the switch to be --disable-thread-safety, since the number of people who don't understand the

Re: [HACKERS] Modifying and solidifying contrib

2007-02-05 Thread Nikolay Samokhvalov
On 2/5/07, Andrew Dunstan [EMAIL PROTECTED] wrote: [...] I would suggest we start with what is (I think) simplest and clearest: . catalog support via a simple extension-schema(s) map . initdb installs standard extensions if it finds them, unless told not to . support for adjusting search path.

Re: [HACKERS] 10 weeks to feature freeze (Pending Work)

2007-02-05 Thread Andrew Hammond
On Jan 26, 2:38 pm, [EMAIL PROTECTED] (Tom Lane) wrote: Rick Gigger [EMAIL PROTECTED] writes: I thought that the following todo item just barely missed 8.2: Allow a warm standby system to also allow read-only statements [pitr] No, it's a someday-wishlist item; the work involved is not

Re: [HACKERS] Referential Integrity and SHARE locks

2007-02-05 Thread Bruce Momjian
Simon Riggs wrote: It occurs to me that if we had visibility in unique indexes, this would allow the index rows to be separately lockable to the main row. That's exactly what we need here. I've implemented a work-around using this principle, utilising RULEs and a duplicated PK

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add documentation for Windows on how to set an environment

2007-02-05 Thread Bruce Momjian
Magnus Hagander wrote: Bruce Momjian wrote: Log Message: --- Add documentation for Windows on how to set an environment variable. Backpatch to 8.2.X. Modified Files: -- pgsql/doc/src/sgml: libpq.sgml (r1.224 - r1.225)

Re: [HACKERS] libpq docs about PQfreemem

2007-02-05 Thread Bruce Momjian
Magnus Hagander wrote: have this about PQfreemem(): Frees memory allocated by applicationlibpq/, particularly functionPQescapeByteaConn/function, functionPQescapeBytea/function, functionPQunescapeBytea/function, and functionPQnotifies/function. It is needed by Microsoft

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add documentation for Windows on how to set an environment

2007-02-05 Thread Andrew Dunstan
Bruce Momjian wrote: OK, text trimmed down to a hint: Environment variables on Windows are set as a property of literalMy Computer/. Bottom line: do we really want to document for people how to use Windows? I don't see us documenting how to set an environment variable in Unix... And

Re: [HACKERS] Proposal: Commit timestamp

2007-02-05 Thread Andrew Sullivan
On Sun, Feb 04, 2007 at 01:36:03PM -0500, Jan Wieck wrote: For the fourth time, the clock is in the mix to allow to continue during a network outage. All your arguments seem to assume 100% network uptime. There will be no clusterwide clock or clusterwide increment when you lose connection.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add documentation for Windows on how to set an environment

2007-02-05 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Bruce Momjian wrote: I think environment variables are used rarely enough on Win32 that we should supply a hint. I think every Windows administrator who is not totally clueless knows how to set the environment. Maybe home users don't use it much, but

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add documentation for Windows on how to set an environment

2007-02-05 Thread Bruce Momjian
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Bruce Momjian wrote: I think environment variables are used rarely enough on Win32 that we should supply a hint. I think every Windows administrator who is not totally clueless knows how to set the environment. Maybe home users

Re: [HACKERS] Referential Integrity and SHARE locks

2007-02-05 Thread Stephan Szabo
On Mon, 5 Feb 2007, Simon Riggs wrote: On Sun, 2007-02-04 at 09:38 +, Simon Riggs wrote: The TODO I was requesting you consider was this: Develop non-conflicting locking scheme to allow RI checks to co-exist peacefully with non-PK UPDATEs on the referenced table. That

Re: [HACKERS] Referential Integrity and SHARE locks

2007-02-05 Thread Gregory Stark
Bruce Momjian [EMAIL PROTECTED] writes: OK, please propose some wording so at least we can get agreement on that. How about something open-ended like arrange for updates that do not update columns referenced by foreign keys from other tables to avoid being blocked by locks from concurrent RI

Re: [HACKERS] Referential Integrity and SHARE locks

2007-02-05 Thread Gregory Stark
Gregory Stark [EMAIL PROTECTED] writes: Bruce Momjian [EMAIL PROTECTED] writes: OK, please propose some wording so at least we can get agreement on that. How about something open-ended like arrange for updates that do not update columns referenced by foreign keys from other tables to avoid

[HACKERS] Logging functions executed by queries in 8.2?

2007-02-05 Thread Josh Berkus
Hackers, In recent versions, we've changed the logging of function executions so that only the function call is logged, and not any of the queries which it may execute internally. While most of the time this method is superior for performance analysis, in applications with extensive

Re: [HACKERS] Proposed adjustments in MaxTupleSize and toastthresholds

2007-02-05 Thread Jan Wieck
On 2/5/2007 11:52 AM, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: Sounds like a good time to suggest making these values configurable, within certain reasonable bounds to avoid bad behaviour. Actually, given what we've just learned --- namely that choosing these values at random is

Re: [HACKERS] Logging functions executed by queries in 8.2?

2007-02-05 Thread Josh Berkus
Hackers, In recent versions, we've changed the logging of function executions so that only the function call is logged, and not any of the queries which it may execute internally. While most of the time this method is superior for performance analysis, in applications with extensive

Re: [HACKERS] Logging functions executed by queries in 8.2?

2007-02-05 Thread Tom Lane
Josh Berkus josh@agliodbs.com writes: In recent versions, we've changed the logging of function executions so that only the function call is logged, and not any of the queries which it may execute internally. While most of the time this method is superior for performance analysis, in

Re: [HACKERS] Proposed adjustments in MaxTupleSize andtoastthresholds

2007-02-05 Thread ITAGAKI Takahiro
Simon Riggs [EMAIL PROTECTED] wrote: Actually, given what we've just learned --- namely that choosing these values at random is a bad idea --- I'd want to see a whole lot of positive evidence before adding such a configuration knob. 3. assemble performance evidence Step 3 is always

[HACKERS] period data type

2007-02-05 Thread Warren Turkal
Hello, Is anyone working on a period data type as described in Dr. Richard Snodgrass' book _Developing Time-Oriented Database Applications in SQL_[1]? I did not see a relevant project listed in the TODO. I would like to contribute (possible funding and/or coding) the development of a

Re: [HACKERS] Dirty pages in freelist cause WAL stuck

2007-02-05 Thread Jim Nasby
I think there's improvement to be made in how we track buffer usage in general. Seqscans still hold the same weight as any other operation, the freelist is of questionable value, and there's a lot of work done to find a free buffer out of the pool, for example. On Feb 2, 2007, at 8:08 PM,

Re: [HACKERS] Proposed adjustments in MaxTupleSize and toastthresholds

2007-02-05 Thread Jim Nasby
On Feb 5, 2007, at 10:45 AM, Simon Riggs wrote: Jan suggested to me a while back that having a configurable toast threshold would be a useful thing, when that table is also updated reasonably frequently. While we're in there it probably makes sense to allow a configurable value for when to

Re: [HACKERS] Patch queue

2007-02-05 Thread Jaime Casanova
On 1/30/07, Bruce Momjian [EMAIL PROTECTED] wrote: FYI, I have been working all January to process 8.3 held patches/ideas, plus process the items arriving during the month. While I have been able to make some progress, there are still a significant number of items for me to address. I will

Re: [HACKERS] Patch queue

2007-02-05 Thread Bruce Momjian
Jaime Casanova wrote: On 1/30/07, Bruce Momjian [EMAIL PROTECTED] wrote: FYI, I have been working all January to process 8.3 held patches/ideas, plus process the items arriving during the month. While I have been able to make some progress, there are still a significant number of items

Re: [HACKERS] period data type

2007-02-05 Thread Josh Berkus
Warren, Is anyone working on a period data type as described in Dr. Richard Snodgrass' book _Developing Time-Oriented Database Applications in SQL_[1]? I did not see a relevant project listed in the TODO. I would like to contribute (possible funding and/or coding) the development of a

Re: [HACKERS] Proposal: Commit timestamp

2007-02-05 Thread Markus Schiltknecht
Hi, Theo Schlossnagle wrote: On Feb 4, 2007, at 1:36 PM, Jan Wieck wrote: Obviously the counters will immediately drift apart based on the transaction load of the nodes as soon as the network goes down. And in order to avoid this clock confusion and wrong expectation, you'd rather have a