Re: [HACKERS] JSON for PG 9.2

2012-01-22 Thread Andrew Dunstan
On 01/21/2012 11:40 PM, Jeff Janes wrote: On Sun, Jan 15, 2012 at 8:08 AM, Andrew Dunstanand...@dunslane.net wrote: On 01/14/2012 03:06 PM, Andrew Dunstan wrote: OK, here's a patch that does both query_to_json and array_to_json, along with docs and regression tests. It include Robert's

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2012-01-22 Thread Jeff Janes
On Tue, Jan 17, 2012 at 7:08 PM, Robert Haas robertmh...@gmail.com wrote: On Sun, Jan 8, 2012 at 10:32 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I guess you concerned about that expected/select_views_1.out is patched, not expected/select_views.out. I'm not sure the reason why regression test

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2012-01-22 Thread Kohei KaiGai
2012/1/21 Jeff Janes jeff.ja...@gmail.com: On Tue, Jan 17, 2012 at 7:08 PM, Robert Haas robertmh...@gmail.com wrote: On Sun, Jan 8, 2012 at 10:32 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I guess you concerned about that expected/select_views_1.out is patched, not expected/select_views.out.

[HACKERS] PG-Strom - A GPU optimized asynchronous executor module

2012-01-22 Thread Kohei KaiGai
Hi, I tried to implement a fdw module that is designed to utilize GPU devices to execute qualifiers of sequential-scan on foreign tables managed by this module. It was named PG-Strom, and the following wikipage gives a brief overview of this module. http://wiki.postgresql.org/wiki/PGStrom

Re: [HACKERS] JSON for PG 9.2

2012-01-22 Thread Andrew Dunstan
On 01/22/2012 04:28 AM, Andrew Dunstan wrote: On 01/21/2012 11:40 PM, Jeff Janes wrote: On Sun, Jan 15, 2012 at 8:08 AM, Andrew Dunstanand...@dunslane.net wrote: On 01/14/2012 03:06 PM, Andrew Dunstan wrote: OK, here's a patch that does both query_to_json and array_to_json, along

Re: [HACKERS] pg_stat_database deadlock counter

2012-01-22 Thread Jaime Casanova
On Mon, Jan 16, 2012 at 3:19 PM, Magnus Hagander mag...@hagander.net wrote: Attached patch adds a counter for number of deadlocks in a database to pg_stat_database. A little review: - it applies with a few hunks - the oid you have chosen for the function pg_stat_get_db_deadlocks() is already

Re: [HACKERS] automating CF submissions (was xlog location arithmetic)

2012-01-22 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: The problem is that this one doesn't have the Content-Disposition: attachment line in the MIME header. I don't know what we can do about it. It's sent with an inline attachment AFAICT, some MA will make it easy to process the attachment and

Re: [HACKERS] automating CF submissions (was xlog location arithmetic)

2012-01-22 Thread Dimitri Fontaine
Alex Shulgin a...@commandprompt.com writes: Another idea: introduce some simple tag system in mails sent to -hackers to be treated specially, e.g: [...] How does that sound? Very much like what debbugs does already. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL :

Re: [HACKERS] Inline Extension

2012-01-22 Thread Daniel Farina
On Fri, Jan 20, 2012 at 3:33 PM, Daniel Farina dan...@heroku.com wrote: On Fri, Jan 20, 2012 at 2:48 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Even if you give the version number in the CREATE EXTENSION command, it's by convention that people actually maintain a sane

Re: [HACKERS] Remembering bug #6123

2012-01-22 Thread Tom Lane
OK, here's an updated version of the patch. I changed the error message texts as per discussion (except I decided to use one message string for all the cases rather than saddle translators with several variants). Also, I put in an error in GetTupleForTrigger, which fixes the self-reference case I

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2012-01-22 Thread Simon Riggs
On Sat, Jan 21, 2012 at 8:42 PM, Noah Misch n...@leadboat.com wrote: You currently forbid multi-column EACH FKs.  I agree that we should allow only one array column per FK; with more, the set of required PK rows would be something like the Cartesian product of the elements of array columns.

Re: [HACKERS] Collect frequency statistics for arrays

2012-01-22 Thread Alexander Korotkov
Hi! Updated patch is attached. I've updated comment of mcelem_array_contained_selec with more detailed description of probability distribution assumption. Also, I found that rest behavious should be better described by Poisson distribution, relevant changes were made. On Tue, Jan 17, 2012 at

Re: [HACKERS] Optimize binary serialization format of arrays with fixed size elements

2012-01-22 Thread Mikko Tiihonen
Previous title was: Add minor version to v3 protocol to allow changes without breaking backwards compatibility On 01/20/2012 04:45 AM, Noah Misch wrote: On Thu, Jan 19, 2012 at 02:00:20PM -0500, Robert Haas wrote: On Thu, Jan 19, 2012 at 10:37 AM, Noah Mischn...@leadboat.com wrote: I agree

Re: [HACKERS] CLOG contention, part 2

2012-01-22 Thread Jeff Janes
On Fri, Jan 20, 2012 at 6:44 AM, Simon Riggs si...@2ndquadrant.com wrote: OT: It would save lots of time if we had 2 things for the CF app: .. 2. Something that automatically tests patches. If you submit a patch we run up a blank VM and run patch applies on all patches. As soon as we get a

Re: [HACKERS] Next steps on pg_stat_statements normalisation

2012-01-22 Thread Simon Riggs
On Sun, Jan 22, 2012 at 5:30 AM, Peter Geoghegan pe...@2ndquadrant.com wrote: So, having received feedback from Tom and others in relation to this patch, I would like to state how I think I should go about addressing various concerns to ensure that a revision of the patch gets into the 9.2

Re: [HACKERS] Publish checkpoint timing and sync files summary data to pg_stat_bgwriter

2012-01-22 Thread Greg Smith
Jeff Janes wrote: I'm finding the backend_writes column pretty unfortunate. The only use I know of for it is to determine if the bgwriter is lagging behind. Yet it doesn't serve even this purpose because it lumps together the backend writes due to lagging background writes, and the backend

Re: Removing freelist (was Re: [HACKERS] Should I implement DROP INDEX CONCURRENTLY?)

2012-01-22 Thread Jim Nasby
On Jan 20, 2012, at 11:54 AM, Heikki Linnakangas wrote: On 04.01.2012 13:14, Simon Riggs wrote: On Tue, Jan 3, 2012 at 11:28 PM, Tom Lanet...@sss.pgh.pa.us wrote: Jim Nasbyj...@nasby.net writes: On Jan 3, 2012, at 12:11 PM, Simon Riggs wrote: This could well be related to the fact that

Re: [HACKERS] Vacuum rate limit in KBps

2012-01-22 Thread Jim Nasby
On Jan 19, 2012, at 4:23 PM, Greg Smith wrote: On 1/18/12 4:18 PM, Jim Nasby wrote: What about doing away with all the arbitrary numbers completely, and just state data rate limits for hit/miss/dirty? Since many workloads will have a mix of all three, it still seems like there's some need

Re: [HACKERS] Autonomous subtransactions

2012-01-22 Thread Jim Nasby
On Jan 4, 2012, at 5:59 PM, Gianni Ciolli wrote: On Wed, Jan 04, 2012 at 04:58:08PM -0600, Jim Nasby wrote: Except AFAIR Oracle uses the term to indicate something that is happening *outside* of your current transaction, which is definitely not what the proposal is talking about. That

Re: [HACKERS] Page Checksums

2012-01-22 Thread Jim Nasby
On Jan 10, 2012, at 3:07 AM, Simon Riggs wrote: I think we could add an option to check the checksum immediately after we pin a block for the first time but it would be very expensive and sounds like we're re-inventing hardware or OS features again. Work on 50% performance drain, as an

Re: [HACKERS] Vacuum rate limit in KBps

2012-01-22 Thread Greg Smith
Jim Nasby wrote: Your two comments together made me realize something... at the end of the day people don't care about MB/s. They care about impact to other read and write activity in the database. What would be interesting is if we could monitor how long all *foreground* IO requests took.

Re: Removing freelist (was Re: [HACKERS] Should I implement DROP INDEX CONCURRENTLY?)

2012-01-22 Thread Robert Haas
On Sat, Jan 21, 2012 at 5:29 PM, Jim Nasby j...@nasby.net wrote: We should also look at having the freelist do something useful, instead of just dropping it completely. Unfortunately that's probably more work... That's kinda my feeling as well. The free list in its current form is pretty much

Re: [HACKERS] Publish checkpoint timing and sync files summary data to pg_stat_bgwriter

2012-01-22 Thread Robert Haas
On Sat, Jan 21, 2012 at 6:32 PM, Jeff Janes jeff.ja...@gmail.com wrote: I'm finding the backend_writes column pretty unfortunate.  The only use I know of for it is to determine if the bgwriter is lagging behind.  Yet it doesn't serve even this purpose because it lumps together the backend

Re: [HACKERS] Next steps on pg_stat_statements normalisation

2012-01-22 Thread Robert Haas
On Sun, Jan 22, 2012 at 5:58 PM, Simon Riggs si...@2ndquadrant.com wrote: On Sun, Jan 22, 2012 at 5:30 AM, Peter Geoghegan pe...@2ndquadrant.com wrote: So, having received feedback from Tom and others in relation to this patch, I would like to state how I think I should go about addressing

Re: [HACKERS] PG-Strom - A GPU optimized asynchronous executor module

2012-01-22 Thread Robert Haas
On Sun, Jan 22, 2012 at 10:48 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I tried to implement a fdw module that is designed to utilize GPU devices to execute qualifiers of sequential-scan on foreign tables managed by this module. It was named PG-Strom, and the following wikipage gives a

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2012-01-22 Thread Noah Misch
On Sun, Jan 22, 2012 at 09:06:49PM +, Simon Riggs wrote: On Sat, Jan 21, 2012 at 8:42 PM, Noah Misch n...@leadboat.com wrote: You currently forbid multi-column EACH FKs. ?I agree that we should allow only one array column per FK; with more, the set of required PK rows would be

Re: [HACKERS] Optimize binary serialization format of arrays with fixed size elements

2012-01-22 Thread Noah Misch
On Sun, Jan 22, 2012 at 11:47:06PM +0200, Mikko Tiihonen wrote: On 01/20/2012 04:45 AM, Noah Misch wrote: On Thu, Jan 19, 2012 at 02:00:20PM -0500, Robert Haas wrote: Having said that, if we're to follow the precedent set by bytea_format, maybe we ought to just add

Re: [HACKERS] Inline Extension

2012-01-22 Thread Robert Haas
On Sun, Jan 22, 2012 at 3:20 PM, Daniel Farina dan...@heroku.com wrote: A few anecdotes does not constitute evidence, but it does look like some people pay attention to any additional versioning foothold they can get. Sure, but just because some people do it doesn't make it a good idea. I can

Re: Removing freelist (was Re: [HACKERS] Should I implement DROP INDEX CONCURRENTLY?)

2012-01-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sat, Jan 21, 2012 at 5:29 PM, Jim Nasby j...@nasby.net wrote: We should also look at having the freelist do something useful, instead of just dropping it completely. Unfortunately that's probably more work... That's kinda my feeling as well. The

Re: [HACKERS] Vacuum rate limit in KBps

2012-01-22 Thread Christopher Browne
On Sat, Jan 21, 2012 at 5:54 PM, Jim Nasby j...@nasby.net wrote: What would be interesting is if we could monitor how long all *foreground* IO requests took. If they start exceeding some number, that means the system is at or near full capacity, and we'd like background stuff to slow down.

Re: [HACKERS] Inline Extension

2012-01-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: ... If people are doing management via pure FEBE, good for them: but that doesn't explain why it shoudn't be done all in userspace, with all of the flexibility that gives. On reflection it seems like this patch is simply offering the wrong solution

Re: [HACKERS] PG-Strom - A GPU optimized asynchronous executor module

2012-01-22 Thread Kohei KaiGai
2012/1/23 Robert Haas robertmh...@gmail.com: On Sun, Jan 22, 2012 at 10:48 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I tried to implement a fdw module that is designed to utilize GPU devices to execute qualifiers of sequential-scan on foreign tables managed by this module. It was named

Re: [HACKERS] New replication mode: write

2012-01-22 Thread Simon Riggs
On Mon, Jan 16, 2012 at 12:45 PM, Fujii Masao masao.fu...@gmail.com wrote: Please add the Apply mode. OK, will do. Done. Attached is the updated version of the patch. I notice that the Apply mode isn't fully implemented. I had in mind that you would add the latch required to respond more