Re: [HACKERS] lateral function as a subquery - WIP patch

2012-03-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 8:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um ... how do you get the subquery result rows to join to only the correct rows of the other tables?  This looks like an unconstrained join to me, which is not what I believe the SQL

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-10 Thread Yeb Havinga
On 2012-03-09 21:49, Robert Haas wrote: On Tue, Mar 6, 2012 at 9:14 AM, Kohei KaiGaikai...@kaigai.gr.jp wrote: [ new patch ] Are we absolutely certain that we want the semantics of sepgsql_setcon() to be transactional? Because if we made them non-transactional, this would be a whole lot

Re: [HACKERS] Future of our regular expression code

2012-03-10 Thread Vik Reykja
On Sat, Feb 18, 2012 at 21:16, Vik Reykja vikrey...@gmail.com wrote: I would be willing to have a go at translating test cases. I do not (yet) have the C knowledge to maintain the regex code, though. I got suddenly swamped and forgot I had signed up for this. I'm still pretty swamped and I

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-10 Thread Simon Riggs
On Fri, Mar 9, 2012 at 6:51 PM, Andrew Dunstan and...@dunslane.net wrote: On 03/09/2012 01:40 PM, Robert Haas wrote: On Fri, Mar 9, 2012 at 12:02 PM, David E. Wheelerda...@justatheory.com  wrote: On Mar 9, 2012, at 7:55 AM, Merlin Moncure wrote: 100% agree  (having re-read the thread and

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-10 Thread Pavel Stehule
Hello 2012/3/10 Tom Lane t...@sss.pgh.pa.us: Peter Eisentraut pete...@gmx.net writes: But then I would have to map all language-specific error reports to some SQL error scheme, which is not only cumbersome but pretty useless.  For example, a Python programmer will be familiar with the typical

Re: [HACKERS] lateral function as a subquery - WIP patch

2012-03-10 Thread Robert Haas
On Sat, Mar 10, 2012 at 4:16 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Mar 9, 2012 at 8:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um ... how do you get the subquery result rows to join to only the correct rows of the other tables?  This looks like

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-10 Thread Robert Haas
On Sat, Mar 10, 2012 at 4:39 AM, Yeb Havinga yebhavi...@gmail.com wrote: As a separate but related note, the label management here seems to be excessively complicated.  In particular, it seems to me that the semantics of sepgsql_get_client_label() become quite muddled under this patch.  An

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-10 Thread Simon Riggs
On Fri, Mar 9, 2012 at 7:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think a reasonable way to proceed might be to get some consensus on a short list of patches we're willing to try to push to completion, then set a schedule accordingly, and then anything that doesn't get done by the deadline

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-10 Thread Artur Litwinowicz
W dniu 2012-03-09 16:55, Merlin Moncure pisze: On Fri, Mar 9, 2012 at 9:36 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: 2012/3/6 Alvaro Herrera alvhe...@commandprompt.com: It seems to me that the only thing that needs core support is the ability to start up the daemon when postmaster is ready

Re: [HACKERS] patch for parallel pg_dump

2012-03-10 Thread Robert Haas
On Thu, Feb 23, 2012 at 11:37 PM, Joachim Wieland j...@mcknight.de wrote: On Thu, Feb 16, 2012 at 1:29 PM, Robert Haas robertmh...@gmail.com wrote: Can you provide an updated patch? Robert, updated patch is attached. Well, I was hoping someone else would do some work on this, but here we are.

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-10 Thread Robert Haas
On Sat, Mar 10, 2012 at 9:04 AM, Simon Riggs si...@2ndquadrant.com wrote: * FOR KEY SHARE locks looks in very good shape and so I'm spending time on that with a view to committing it next week if all goes well Álvaro is a committer and is perfectly capable of committing that patch for himself,

Re: [HACKERS] elegant and effective way for running jobs inside a database

2012-03-10 Thread Andrew Dunstan
On 03/10/2012 07:11 AM, Simon Riggs wrote: On Fri, Mar 9, 2012 at 6:51 PM, Andrew Dunstanand...@dunslane.net wrote: On 03/09/2012 01:40 PM, Robert Haas wrote: On Fri, Mar 9, 2012 at 12:02 PM, David E. Wheelerda...@justatheory.com wrote: On Mar 9, 2012, at 7:55 AM, Merlin Moncure wrote:

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-10 Thread Pavel Stehule
here is draft and there some cleaned version Regards Pavel Stehule                        regards, tom lane plpgsql_check_function.diff.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-10 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: * pg_stat_statements looks good also, I hope someone is looking at that I will take that one, if it ever gets marked RFC, but in the meantime I plan to spend my time elsewhere. At this stage the CF app isn't helping us much. We need some way to

Re: [HACKERS] Future of our regular expression code

2012-03-10 Thread Tom Lane
Vik Reykja vikrey...@gmail.com writes: On Sat, Feb 18, 2012 at 21:16, Vik Reykja vikrey...@gmail.com wrote: I would be willing to have a go at translating test cases. I do not (yet) have the C knowledge to maintain the regex code, though. I got suddenly swamped and forgot I had signed up for

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-10 Thread Tom Lane
Shigeru Hanada shigeru.han...@gmail.com writes: I've not read whole of the patch yet, but I have basic questions. 1) IIUC, GetForeignRelSize should set baserel-rows to the number of rows the ForeignScan node returns to upper node, but not the number of rows FDW returns to core executor,

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-10 Thread Tom Lane
Shigeru Hanada shigeru.han...@gmail.com writes: Thanks for the review. Agreed to write own depraser for pgsql_fdw which handles nodes which can be pushed down. Every SQL-based FDW which constructs SQL statement for each local query would need such module inside. Yeah. That's kind of

Re: [HACKERS] lateral function as a subquery - WIP patch

2012-03-10 Thread Antonin Houska
On 03/10/2012 02:15 AM, Tom Lane wrote: Um ... how do you get the subquery result rows to join to only the correct rows of the other tables? The subquery just restricts the set of rows that the function has to evaluate. The main query is supposed to perform the join. I understand, such a join

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-03-10 Thread Marti Raudsepp
On Sat, Mar 10, 2012 at 02:05, Tom Lane t...@sss.pgh.pa.us wrote: Marti Raudsepp ma...@juffo.org writes: [ cacheexpr-v8.patch ] A few comments Whoa, that's quite a few. Thanks for the review. * There's a lot of stuff that seems wrong in detail in eval_const_expressions_mutator, eg it'll

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-10 Thread Martijn van Oosterhout
On Sat, Mar 10, 2012 at 11:38:51AM -0500, Tom Lane wrote: Shigeru Hanada shigeru.han...@gmail.com writes: Thanks for the review. Agreed to write own depraser for pgsql_fdw which handles nodes which can be pushed down. Every SQL-based FDW which constructs SQL statement for each local query

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-03-10 Thread Tom Lane
Marti Raudsepp ma...@juffo.org writes: On Sat, Mar 10, 2012 at 02:05, Tom Lane t...@sss.pgh.pa.us wrote: * There's a lot of stuff that seems wrong in detail in eval_const_expressions_mutator, eg it'll try to wrap a plain vanilla Const with a CacheExpr. I see you've hacked that case inside

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-10 Thread Simon Riggs
On Sat, Mar 10, 2012 at 2:55 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Mar 10, 2012 at 9:04 AM, Simon Riggs si...@2ndquadrant.com wrote: * FOR KEY SHARE locks looks in very good shape and so I'm spending time on that with a view to committing it next week if all goes well Álvaro is

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-10 Thread Simon Riggs
On Sat, Mar 10, 2012 at 3:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: * pg_stat_statements looks good also, I hope someone is looking at that I will take that one, if it ever gets marked RFC, but in the meantime I plan to spend my time elsewhere. At

Re: [HACKERS] Review of pg_archivecleanup -x option patch

2012-03-10 Thread Jaime Casanova
On Fri, Mar 9, 2012 at 9:07 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 12:47 AM, Jaime Casanova ja...@2ndquadrant.com wrote: Sorry, here's the patch rebased and with the suggestion from Alex. Which reminds me, I never thank him for the review (shame on me) :D with the

Re: [HACKERS] Review of pg_archivecleanup -x option patch

2012-03-10 Thread Jaime Casanova
On Sat, Mar 10, 2012 at 2:38 PM, Jaime Casanova ja...@2ndquadrant.com wrote: On Fri, Mar 9, 2012 at 9:07 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 12:47 AM, Jaime Casanova ja...@2ndquadrant.com wrote: Sorry, here's the patch rebased and with the suggestion from Alex.

[HACKERS] Refactoring simplify_function (was: Caching constant stable expressions)

2012-03-10 Thread Marti Raudsepp
Hi list, Per Tom's request, I split out this refactoring from my CacheExpr patch. Basically I'm just centralizing the eval_const_expressions_mutator() call on function arguments, from multiple different places to a single location. Without this, it would be a lot harder to implement argument

Re: [HACKERS] pg_prewarm

2012-03-10 Thread Hans-Jürgen Schönig
On Mar 9, 2012, at 2:34 PM, Robert Haas wrote: On Fri, Mar 9, 2012 at 5:42 AM, Hans-Jürgen Schönig postg...@cybertec.at wrote: we had some different idea here in the past: what if we had a procedure / method to allow people to save the list of current buffers / cached blocks to be written

Re: [HACKERS] pg_prewarm

2012-03-10 Thread Stefan Keller
Hi Robert, Just recently I asked on postgres-performance PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory? Somehow open was, what's the best practice of configuration and relationship between disk/OS cache vs. Portgres cache The main conclusion

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-10 Thread Yeb Havinga
On 2012-03-10 14:06, Robert Haas wrote: On Sat, Mar 10, 2012 at 4:39 AM, Yeb Havingayebhavi...@gmail.com wrote: As a separate but related note, the label management here seems to be excessively complicated. In particular, it seems to me that the semantics of sepgsql_get_client_label() become

[HACKERS] about EncodeDateTime() arguments

2012-03-10 Thread Peter Eisentraut
We currently have void EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style, char *str) but tzn isn't used anywhere, only *tzn is used everywhere. Wouldn't it be clearer to remove that one level of indirection and instead have the signature be void

Re: [HACKERS] Is it time for triage on the open patches?

2012-03-10 Thread Peter Geoghegan
On 10 March 2012 15:47, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: * pg_stat_statements looks good also, I hope someone is looking at that I will take that one, if it ever gets marked RFC, but in the meantime I plan to spend my time elsewhere. It has been

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Andrew Dunstan
On 03/09/2012 07:50 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: Buildfarm member mussel (OS X 10.7.3, llvm-gcc 4.2.1, x86_64)seems to be getting consistent warnings when running the pgcrypto regression tests, that look like this: WARNING: detected write past chunk end

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Robert Creager
On Mar 10, 2012, at 4:19 PM, Andrew Dunstan and...@dunslane.net wrote: On 03/09/2012 07:50 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: Buildfarm member mussel (OS X 10.7.3, llvm-gcc 4.2.1, x86_64)seems to be getting consistent warnings when running the pgcrypto regression

Re: [HACKERS] about EncodeDateTime() arguments

2012-03-10 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: We currently have void EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style, char *str) but tzn isn't used anywhere, only *tzn is used everywhere. Wouldn't it be clearer to remove that one level of indirection and instead

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Tom Lane
Robert Creager rob...@logicalchaos.org writes: On Mar 10, 2012, at 4:19 PM, Andrew Dunstan and...@dunslane.net wrote: On 03/09/2012 07:50 PM, Tom Lane wrote: I suspect that mussel has an ABI-incompatible openssl library hanging around someplace. On my machine otool -L pgcrypto.so shows

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Robert Creager
On Mar 10, 2012, at 5:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: What's really odd though is that there is nothing in the configuration script that injects any of those switches. I think you've got some screwy global configuration on that machine, which you'd be well advised to try to get

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Tom Lane
Robert Creager rob...@logicalchaos.org writes: On Mar 10, 2012, at 5:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: What's really odd though is that there is nothing in the configuration script that injects any of those switches. I think you've got some screwy global configuration on that machine,

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Robert Creager
On Mar 10, 2012, at 7:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Creager rob...@logicalchaos.org writes: On Mar 10, 2012, at 5:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: What's really odd though is that there is nothing in the configuration script that injects any of those switches. I

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Andrew Dunstan
On 03/10/2012 09:15 PM, Tom Lane wrote: (I wonder whether it'd be a good idea for the buildfarm script to explicitly clear anything that autoconf pays attention to from its startup environment, so that you have to set these variables in the buildfarm config to make them have effect. If not

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Robert Creager
On Mar 10, 2012, at 7:54 PM, Andrew Dunstan and...@dunslane.net wrote: On 03/10/2012 09:15 PM, Tom Lane wrote: (I wonder whether it'd be a good idea for the buildfarm script to explicitly clear anything that autoconf pays attention to from its startup environment, so that you have to

Re: [HACKERS] pg_prewarm

2012-03-10 Thread Robert Haas
On Sat, Mar 10, 2012 at 4:35 PM, Stefan Keller sfkel...@gmail.com wrote: The main conclusion was: * Do a tar cf /dev/zero $PG_DATA/base either shortly before or shortly after the database is created * Do a seq scan SELECT * FROM osm_point. Is your tool a replacement of those above? It can

[HACKERS] wal_buffers, redux

2012-03-10 Thread Robert Haas
I've finally been able to run some more tests of the effect of adjusting wal_buffers to values higher than 16MB. I ran the test on the 16 core (x 4 hw threads/core) IBM POWER7 machine, with my usual configuration settings: shared_buffers = 8GB maintenance_work_mem = 1GB synchronous_commit = off

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Tom Lane
Robert Creager rob...@logicalchaos.org writes: On Mar 10, 2012, at 7:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't believe autoconf would insert such stuff on its own authority. I'm wondering about CPPFLAGS, CFLAGS, LDFLAGS or similar variables being set in the environment that the

Re: [HACKERS] pg_crypto failures with llvm on OSX

2012-03-10 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 03/10/2012 09:15 PM, Tom Lane wrote: (I wonder whether it'd be a good idea for the buildfarm script to explicitly clear anything that autoconf pays attention to from its startup environment, so that you have to set these variables in the buildfarm