Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Boszormenyi Zoltan
Heikki Linnakangas írta: On 26.10.2010 18:34, Boszormenyi Zoltan wrote: thank you very much for pointing me to dynahash, here is the next version that finally seems to work. Two patches are attached, the first is the absolute minimum for making it work, this still has the Tree type for

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Boszormenyi Zoltan
Boszormenyi Zoltan írta: Heikki Linnakangas írta: On 26.10.2010 18:34, Boszormenyi Zoltan wrote: thank you very much for pointing me to dynahash, here is the next version that finally seems to work. Two patches are attached, the first is the absolute minimum for making it work,

[HACKERS] Error message with COMMIT/ROLLBACK within PL/pgSQL

2010-10-28 Thread Heikki Linnakangas
This is not very user-friendly: postgres=# do $$ begin COMMIT; end; $$; ERROR: SPI_execute_plan_with_paramlist failed executing query COMMIT: SPI_ERROR_TRANSACTION CONTEXT: PL/pgSQL function inline_code_block line 2 at SQL statement Clearly we don't support that, but seems like it would

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Boszormenyi Zoltan
Boszormenyi Zoltan írta: Boszormenyi Zoltan írta: Heikki Linnakangas írta: On 26.10.2010 18:34, Boszormenyi Zoltan wrote: thank you very much for pointing me to dynahash, here is the next version that finally seems to work. Two patches are attached, the first is

Re: [HACKERS] add label to enum syntax

2010-10-28 Thread Pavel Golub
Hello, Andrew. You wrote: AD It occurred to me in the dead of the night that instead of: AD ALTER TYPE enumtype ADD 'newlabel' AD it might be better to have: AD ALTER TYPE enumtype ADD LABEL 'newlabel' AD That way if we later wanted to support some other sort of ADD operation AD

Re: [HACKERS] add label to enum syntax

2010-10-28 Thread Pavel Golub
Hello, Andrew. You wrote: AD It occurred to me in the dead of the night that instead of: AD ALTER TYPE enumtype ADD 'newlabel' AD it might be better to have: AD ALTER TYPE enumtype ADD LABEL 'newlabel' AD That way if we later wanted to support some other sort of ADD operation AD

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Boszormenyi Zoltan
Boszormenyi Zoltan írta: Boszormenyi Zoltan írta: Boszormenyi Zoltan írta: Heikki Linnakangas írta: On 26.10.2010 18:34, Boszormenyi Zoltan wrote: thank you very much for pointing me to dynahash, here is the next version that finally

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Heikki Linnakangas
On 28.10.2010 13:54, Boszormenyi Zoltan wrote: A little better version, no need for the heavy hash_any, hash_uint32 on the lower 32 bits on pk_eclass is enough. The profiling runtime is now 0.42 seconds vs the previous 0.41 seconds for the tree version. Actually, I wonder if we could just have

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Kevin Grittner
Joshua D. Drake wrote: On Wed, 2010-10-27 at 19:52 -0400, Robert Haas wrote: Josh Berkus wrote: *you don't know* how many .org users plan to implement replication, whether it's a minority or majority. None of us know. What I do know is that I don't want PostgreSQL to be slower out of

[HACKERS] revision of todo: NULL for ROW variables

2010-10-28 Thread Pavel Stehule
Hello I am checking PLpgSQL ToDo topics, and I am not sure if this topic isn't done. And if not, then I would to get some detail. Now there is possible to test row's variable on NULL, now it is possible to assign NULL to row variable. What we can do more? a) There is small difference between

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Tom Lane
Boszormenyi Zoltan z...@cybertec.at writes: This means add_child_rel_equivalences() is still takes too much time, the previously posted test case calls this function 482 times, it's called for almost every 10th entry added to eq_classes. The elog() I put into this function says that at the

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Actually, I wonder if we could just have a separate canon_pathkeys list for each EquivalenceClass, instead of one big list in PlannerInfo. I'm not too familiar with equivalence classes and all that, Hm. I don't like getting rid

Re: [HACKERS] revision of todo: NULL for ROW variables

2010-10-28 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I am checking PLpgSQL ToDo topics, and I am not sure if this topic isn't done. And if not, then I would to get some detail. I think that thread petered out because we didn't have consensus on what the behavior ought to be. It goes back to whether

[HACKERS] Re: [PERFORM] Re: Postgres insert performance and storage requirement compared to Oracle

2010-10-28 Thread Robert Haas
[moving to -hackers, from -performance] On Wed, Oct 27, 2010 at 11:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Gee, I wonder if it would possible for PG to automatically do an asynchronous commit of any transaction which touches only temp tables. Hmm

Re: [HACKERS] Simplifying replication

2010-10-28 Thread Robert Haas
On Thu, Oct 28, 2010 at 1:13 AM, Josh Berkus j...@agliodbs.com wrote: I sort of agree with you that the current checkpoint_segments parameter is a bit hard to tune, at least if your goal is to control the amount of disk space that will be used by WAL files.  But I'm not sure your proposal is

[HACKERS] 9.1alpha2 release notes and plan

2010-10-28 Thread Peter Eisentraut
I have committed an initial version of release notes for 9.1alpha2. Please look it over. The release can then be prepared over the weekend and announced on Monday. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] add label to enum syntax

2010-10-28 Thread Alvaro Herrera
Excerpts from Pavel Golub's message of jue oct 28 07:50:24 -0300 2010: Forgot link to poll: http://pgolub.wordpress.com/2010/10/28/poll-alter-type-enumtype-add-what-newlabel/ Hah, there are 17 votes as of right now, no option is below 23% and no option is above 29%. -- Álvaro Herrera

[HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we should probably expand it somewhat to all arguments, so that for non-trigger functions,

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we should probably expand it somewhat to all

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Pavel Stehule
2010/10/28 Andrew Dunstan and...@dunslane.net: While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we should probably expand it somewhat to all

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mié oct 27 19:01:38 -0300 2010: I don't know what Simon is thinking, but I think he's nuts. There is is obvious extra overhead in COMMIT: /* * Wake up all walsenders to send WAL up to the COMMIT record * immediately if

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Pavel Stehule
2010/10/28 Tom Lane t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net writes:   While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: BTW I note that there are no elog(ERROR) calls in that code path at all, because syscall errors are ignored, so PANIC is not a concern (as the code stands currently, at least). ISTM it would be good to have a comment on SetLatch stating that

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
On 10/28/2010 11:54 AM, Pavel Stehule wrote: Alternatively, maybe the feature could be exposed in a way where you don't actually calculate the values unless requested, ie provide some sort of inquiry function instead of always precomputing a hash. +1 .. some like get_function_info() Yeah,

Re: [HACKERS] Composite Types and Function Parameters

2010-10-28 Thread Andrew Dunstan
On 10/28/2010 12:23 PM, David E. Wheeler wrote: On Oct 27, 2010, at 9:08 PM, Andrew Dunstan wrote: Well, it turns out that the hashref required exactly one more line to achieve. We already have all the infrastructure on the composite handling code, and all it requires it to enable it for

Re: [HACKERS] Composite Types and Function Parameters

2010-10-28 Thread David E. Wheeler
On Oct 27, 2010, at 9:08 PM, Andrew Dunstan wrote: Well, it turns out that the hashref required exactly one more line to achieve. We already have all the infrastructure on the composite handling code, and all it requires it to enable it for the RECORDOID case. I don't suppose that it would

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 10/28/2010 11:54 AM, Pavel Stehule wrote: Alternatively, maybe the feature could be exposed in a way where you don't actually calculate the values unless requested, ie provide some sort of inquiry function instead of always precomputing a hash. +1

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Pavel Stehule
2010/10/28 Andrew Dunstan and...@dunslane.net: On 10/28/2010 11:54 AM, Pavel Stehule wrote: Alternatively, maybe the feature could be exposed in a way where you don't actually calculate the values unless requested, ie provide some sort of inquiry function instead of always precomputing a

Re: [HACKERS] revision of todo: NULL for ROW variables

2010-10-28 Thread Merlin Moncure
On Thu, Oct 28, 2010 at 10:15 AM, Tom Lane t...@sss.pgh.pa.us wrote: Pavel Stehule pavel.steh...@gmail.com writes: I am checking PLpgSQL ToDo topics, and I am not sure if this topic isn't done. And if not, then I would to get some detail. I think that thread petered out because we didn't have

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Stephen J. Butler
On Thu, Oct 28, 2010 at 11:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.net writes: On 10/28/2010 11:54 AM, Pavel Stehule wrote: Alternatively, maybe the feature could be exposed in a way where you don't actually calculate the values unless requested, ie provide

[HACKERS] contsel and gist

2010-10-28 Thread Ben
hello -- i have a largish table (~8 billion rows) which makes use of the temporal period datatype and gist indexes. i find that query plans are somewhat unstable in that it is often the case that slightly altering a query can result in a change from using the index (usually via a bitmap scan)

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
On 10/28/2010 12:34 PM, Tom Lane wrote: BTW, maybe we could have the best of both worlds? Dunno about Perl, but in some languages it would be possible to instantiate the hash only if it's actually touched. Passing the data as a hash definitely seems to fit with the spirit of things

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Boszormenyi Zoltan
Tom Lane írta: Boszormenyi Zoltan z...@cybertec.at writes: This means add_child_rel_equivalences() is still takes too much time, the previously posted test case calls this function 482 times, it's called for almost every 10th entry added to eq_classes. The elog() I put into this function

Re: [HACKERS] Composite Types and Function Parameters

2010-10-28 Thread David E. Wheeler
On Oct 28, 2010, at 9:31 AM, Andrew Dunstan wrote: Of course it's possible, but it's a different feature. As for just as easy, no, it's much more work. I agree it should be done, though. I bet we could raise some money to fund it's development. How much work are we talking about here? Best,

Re: [HACKERS] contsel and gist

2010-10-28 Thread Tom Lane
Ben midfi...@gmail.com writes: my guess is that it has to do with the selectivity of the @ operator. i've looked and noticed that the selectivity functions for @ and other period operators are basically stubs, with constant selectivity. my questions are : 1 - am i wrong in my assessment?

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Garick Hamlin
On Thu, Oct 28, 2010 at 01:03:24PM -0400, Andrew Dunstan wrote: On 10/28/2010 12:34 PM, Tom Lane wrote: BTW, maybe we could have the best of both worlds? Dunno about Perl, but in some languages it would be possible to instantiate the hash only if it's actually touched. Passing the

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
On 10/28/2010 02:11 PM, Garick Hamlin wrote: On Thu, Oct 28, 2010 at 01:03:24PM -0400, Andrew Dunstan wrote: On 10/28/2010 12:34 PM, Tom Lane wrote: BTW, maybe we could have the best of both worlds? Dunno about Perl, but in some languages it would be possible to instantiate the hash only

Re: [HACKERS] contsel and gist

2010-10-28 Thread Ben
thanks for the prompt reply. On Oct 28, 2010, at 10:50 AM, Tom Lane wrote: 1 - am i wrong in my assessment? is the constant contsel, areasel, etc hurting us? The stub selectivity functions definitely suck. i'm taking this as implying that my intuition here is basically right. 2 - how

Re: [HACKERS] psql autocompletion for \z and \dg

2010-10-28 Thread Peter Eisentraut
On ons, 2010-10-20 at 22:56 -0400, Josh Kupershmidt wrote: It looks like psql's tab completion for the \z and \dg commands in psql are missing. I couldn't see a reason for this, so attached patch fixes. Also, this patch proposes to change psql's \? help text to say that \dg and \du are the

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Joshua D. Drake
On Thu, 2010-10-28 at 07:05 -0500, Kevin Grittner wrote: Joshua D. Drake wrote: On Wed, 2010-10-27 at 19:52 -0400, Robert Haas wrote: Josh Berkus wrote: *you don't know* how many .org users plan to implement replication, whether it's a minority or majority. None of us know. What

Re: [HACKERS] contsel and gist

2010-10-28 Thread Tom Lane
Ben midfi...@gmail.com writes: On Oct 28, 2010, at 10:50 AM, Tom Lane wrote: However, having said that: the constant value of the stub contsel function is intended to be small enough to encourage use of an indexscan. Maybe we just need to decrease it a bit more. Have you investigated what

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-28 Thread Tom Lane
Boszormenyi Zoltan z...@cybertec.at writes: Tom Lane írta: That seems like a ridiculously large number of ECs. What is the test query again? The test case is here: http://archives.postgresql.org/message-id/4cbd9ddc.4040...@cybertec.at After poking through that a bit, I think that the real

Re: [HACKERS] Keywords in pg_hba.conf should be field-specific

2010-10-28 Thread Brendan Jurd
On 18 October 2010 01:19, Tom Lane t...@sss.pgh.pa.us wrote: Brendan Jurd dire...@gmail.com writes: On 17 October 2010 09:59, Tom Lane t...@sss.pgh.pa.us wrote: Good point.  Maybe the correct fix is to remember whether each token was quoted or not, so that keyword detection can be done safely

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Josh Berkus
https://www.postgresqlconference.org/content/replication-poll You don't have to login to take it but of course it helps with validity of results. Oh, I'd already put something up on http://www.postgresql.org/community -- -- Josh Berkus

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Joshua D. Drake
On Thu, 2010-10-28 at 16:25 -0700, Josh Berkus wrote: https://www.postgresqlconference.org/content/replication-poll You don't have to login to take it but of course it helps with validity of results. Oh, I'd already put something up on http://www.postgresql.org/community Sorry, didn't

[HACKERS] Buildfarm server upgrade

2010-10-28 Thread Andrew Dunstan
The buildfarm server is moving. The web site has already moved, and the database will be moving on Tuesday Nov 9th, starting at 9.00 am EST (or, if you prefer, at 14:00 UTC). The server will be unavailable during the outage, which is expected to take no longer then 6 hours. (we're moving

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Josh Berkus
Sorry, didn't know... I have 122 responses so far, which I think will be surprising (some of them certainly surprised me). I will keep it open until next week and then post the results. Well, for any community site poll, I hope you realize that there's a LOT of sampling error. Here's another

Re: [HACKERS] max_wal_senders must die

2010-10-28 Thread Joshua D. Drake
On Thu, 2010-10-28 at 17:12 -0700, Josh Berkus wrote: Sorry, didn't know... I have 122 responses so far, which I think will be surprising (some of them certainly surprised me). I will keep it open until next week and then post the results. Well, for any community site poll, I hope you

[HACKERS] sorted writes for checkpoints

2010-10-28 Thread Jeff Janes
One of the items on the Wiki ToDo list is sorted writes for checkpoints. The consensus seemed to be that this should be done by adding hook(s) into the main code, and then a contrib module to work with those hooks. Is there an existing contrib module that one could best look to for inspiration

Re: [HACKERS] sorted writes for checkpoints

2010-10-28 Thread Alvaro Herrera
Excerpts from Jeff Janes's message of vie oct 29 00:00:24 -0300 2010: One of the items on the Wiki ToDo list is sorted writes for checkpoints. The consensus seemed to be that this should be done by adding hook(s) into the main code, and then a contrib module to work with those hooks. Is

Re: [HACKERS] add label to enum syntax

2010-10-28 Thread Pavel Golub
Hello, Alvaro. You wrote: AH Excerpts from Pavel Golub's message of jue oct 28 07:50:24 -0300 2010: Forgot link to poll: http://pgolub.wordpress.com/2010/10/28/poll-alter-type-enumtype-add-what-newlabel/ AH Hah, there are 17 votes as of right now, no option is below 23% and no AH option is