Re: [HACKERS] pg_receivexlog add synchronous mode

2014-06-24 Thread furuyao
I found that this patch breaks --status-interval option of pg_receivexlog when -m option which the patch introduced is supplied. When -m is set, pg_receivexlog tries to send the feedback message as soon as it flushes WAL file even if status interval timeout has not been passed yet. If you

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Soroosh Sardari
On Mon, Jun 23, 2014 at 10:23 AM, Soroosh Sardari soroosh.sard...@gmail.com wrote: Dear Hackers I wanted to add a char array with length of 20 to PageHeaderData in include/storage/bufpage.h. Surprisingly regression test failed on rangetypes test! The diff of resulted and expected file is

[HACKERS] python modul pre-import to avoid importing each time

2014-06-24 Thread Rémi Cura
Hey List, this is a repost from the general list where it get no responses (5 days) I use plpython with postgis and 2 python modules (numpy and shapely). Sadly importing such module in the plpython function is very slow (about half a second). I also don't know if this overhead is applied each

Re: [HACKERS] inherit support for foreign tables

2014-06-24 Thread Etsuro Fujita
Hi Ashutosh, Thank you for the review. (2014/06/23 18:35), Ashutosh Bapat wrote: Hi, Selecting tableoid on parent causes an error, ERROR: cannot extract system attribute from virtual tuple. The foreign table has an OID which can be reported as tableoid for the rows coming from that foreign

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Greg Stark
On Tue, Jun 24, 2014 at 12:02 AM, Soroosh Sardari soroosh.sard...@gmail.com wrote: Is there any rule for adding a field to PageHeaderData? Not really. It's a pretty internal thing, not something we expect people to be doing all the time. The only rule I can think of is that you should bump some

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Andres Freund
On 2014-06-24 01:58:32 -0700, Greg Stark wrote: On Tue, Jun 24, 2014 at 12:02 AM, Soroosh Sardari soroosh.sard...@gmail.com wrote: Is there any rule for adding a field to PageHeaderData? Not really. It's a pretty internal thing, not something we expect people to be doing all the time. I'd

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Pavan Deolasee
On Tue, Jun 24, 2014 at 2:28 PM, Greg Stark st...@mit.edu wrote: On Tue, Jun 24, 2014 at 12:02 AM, Soroosh Sardari soroosh.sard...@gmail.com wrote: Is there any rule for adding a field to PageHeaderData? Not really. It's a pretty internal thing, not something we expect people to be doing

Re: [HACKERS] 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..

2014-06-24 Thread Heikki Linnakangas
On 05/13/2014 10:45 PM, Rukh Meski wrote: On Sun, May 11, 2014 at 4:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: The $64 question is whether we'd accept an implementation that fails if the target table has children (ie, is partitioned). That seems to me to not be up to the project's usual quality

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-24 Thread Christian Ullrich
* From: MauMau [mailto:maumau...@gmail.com] From: Christian Ullrich ch...@chrullrich.net OK, here is the first draft against current master. It builds on Windows with VS 2012 and on FreeBSD 10 with clang 3.3. I ran the regression tests on Windows, they all pass. The changed behavior

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Soroosh Sardari
On Tue, Jun 24, 2014 at 1:34 PM, Pavan Deolasee pavan.deola...@gmail.com wrote: On Tue, Jun 24, 2014 at 2:28 PM, Greg Stark st...@mit.edu wrote: On Tue, Jun 24, 2014 at 12:02 AM, Soroosh Sardari soroosh.sard...@gmail.com wrote: Is there any rule for adding a field to PageHeaderData? Not

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Abhijit Menon-Sen
At 2014-06-24 14:21:24 +0430, soroosh.sard...@gmail.com wrote: By the way, following code has two different output and it is weird. I get the same output from both queries with both 9.3.4 and HEAD: ir --- [90,100) [500,510) (2 rows) If you're reporting a problem, please

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Kevin Grittner
Soroosh Sardari soroosh.sard...@gmail.com wrote: I check this problem with a virgin source code of postgresql-9.3.2. So the bug is not for my codes. By the way, following code has two different output and it is weird. I can confirm that I see the difference in 9.3.2, and that I don't see

Re: [HACKERS] Allowing NOT IN to use ANTI joins

2014-06-24 Thread David Rowley
On Wed, Jun 11, 2014 at 9:32 PM, Marti Raudsepp ma...@juffo.org wrote: On Sun, Jun 8, 2014 at 3:36 PM, David Rowley dgrowle...@gmail.com wrote: Currently pull_up_sublinks_qual_recurse only changes the plan for NOT EXISTS queries and leaves NOT IN alone. The reason for this is because the

Re: [HACKERS] A question about code in DefineRelation()

2014-06-24 Thread Heikki Linnakangas
On 04/25/2014 04:39 PM, Hadi Moshayedi wrote: On second thought I noticed that that makes CREATE FOREIGN TABLE include an OID column in newly-created foreign tables wrongly, when the default_with_oids parameter is set to on. Please find attached a patch. Yeah, that's a bug. The interactions

[HACKERS] Hooks Docu - list of hooks

2014-06-24 Thread geohas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi to all! I am searching for a documentation of hooks in PG, all i found was a presentation in the wiki and some modules from 2ndQuadrant and petere on github. The last three weeks i was reading the source code to get some information. Is there a

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Soroosh Sardari
On Tue, Jun 24, 2014 at 2:40 PM, Kevin Grittner kgri...@ymail.com wrote: Soroosh Sardari soroosh.sard...@gmail.com wrote: I check this problem with a virgin source code of postgresql-9.3.2. So the bug is not for my codes. By the way, following code has two different output and it is

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Andres Freund
On 2014-06-24 15:23:54 +0430, Soroosh Sardari wrote: On Tue, Jun 24, 2014 at 2:40 PM, Kevin Grittner kgri...@ymail.com wrote: Soroosh Sardari soroosh.sard...@gmail.com wrote: I check this problem with a virgin source code of postgresql-9.3.2. So the bug is not for my codes. By

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-24 Thread MauMau
From: Christian Ullrich ch...@chrullrich.net On non-Windows platforms, the --background option is not passed, and the option handling is unmodified except for an additional pair of braces. The postmaster does not pass the option to its children on any platform. pg_ctl does not pass the option

Re: [HACKERS] Hooks Docu - list of hooks

2014-06-24 Thread Abhijit Menon-Sen
At 2014-06-24 12:49:17 +0200, li...@hasibether.at wrote: Is there a list of possible hooks, or maybe a little docu or overview? The best I found was git grep _hook_type and then read the code to understand when and why the hook was called. Especially hooks to catch Insert, Update and Delete

Re: [HACKERS] Hooks Docu - list of hooks

2014-06-24 Thread geohas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/06/14 12:59, Abhijit Menon-Sen wrote: At 2014-06-24 12:49:17 +0200, li...@hasibether.at wrote: Is there a list of possible hooks, or maybe a little docu or overview? The best I found was git grep _hook_type and then read the code to

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Soroosh Sardari
On Tue, Jun 24, 2014 at 3:27 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-24 15:23:54 +0430, Soroosh Sardari wrote: On Tue, Jun 24, 2014 at 2:40 PM, Kevin Grittner kgri...@ymail.com wrote: Soroosh Sardari soroosh.sard...@gmail.com wrote: I check this problem with a

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Robert Haas
On Mon, Jun 23, 2014 at 2:29 PM, Stephen Frost sfr...@snowman.net wrote: What are these policies going to depend on? Will they be allowed to overlap? I don't see multi-policy support as being very easily added. We discussed the point about overlap upthread, and I gave specific examples. If

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Robert Haas
On Tue, Jun 24, 2014 at 7:45 AM, Sebastian Reitenbach sebas...@l00-bugdead-prods.de wrote: I'm building the vax packages for openbsd. What I can tell is that for 5.5 no postgresql packages were built. But that may be that due to the recent upgrade from gcc 2.95 to 3.3. I guess that not all

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-24 Thread Robert Haas
On Mon, Jun 23, 2014 at 6:51 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: There are some unresolved questions with #2 because the extensible reloptions patch seems to have lost favour, but I'm pretty sure we could figure out some alternative. I didn't particularly like the proposed

Re: [HACKERS] [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-24 Thread Merlin Moncure
On Mon, Jun 23, 2014 at 8:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: * Nested json arrays are a bit more problematic. What I'd ideally like is to spit them out in a form that would be successfully parsable as a SQL array of the appropriate element type. Unfortunately, I think that that ship

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Vik Fearing
On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one substantive issue that had been missed in discussion, though. The patch modifies the postgres_fdw extension to make it automatically exempt from an attempt to set a limit like this on the server to which it connects. I'm not sure

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 9:20 AM, Vik Fearing [via PostgreSQL] ml-node+s1045698n5808882...@n5.nabble.com wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one substantive issue that had been missed in discussion, though. The patch modifies the postgres_fdw extension to make it

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-06-24 Thread John Lumby
From: st...@mit.edu Date: Mon, 23 Jun 2014 16:04:50 -0700 Subject: Re: Extended Prefetching using Asynchronous IO - proposal and patch To: johnlu...@hotmail.com CC: klaussfre...@gmail.com; hlinnakan...@vmware.com; pgsql-hackers@postgresql.org On

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Kevin Grittner
David G Johnston david.g.johns...@gmail.com wrote: Vik Fearing [via PostgreSQL] [hidden email]wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one substantive issue that had been missed in discussion, though.  The patch modifies the postgres_fdw extension to make it automatically

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Vik Fearing
On 06/24/2014 03:29 PM, David G Johnston wrote: On Tue, Jun 24, 2014 at 9:20 AM, Vik Fearing [via PostgreSQL] [hidden email] /user/SendEmail.jtp?type=nodenode=5808883i=0wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one substantive issue that had been missed in

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-06-24 Thread Heikki Linnakangas
On 06/24/2014 04:29 PM, John Lumby wrote: On Mon, Jun 23, 2014 at 2:43 PM, John Lumby johnlu...@hotmail.com wrote: It is when some *other* backend gets there first with the ReadBuffer that things are a bit trickier. The current version of the patch did polling for that case but that drew

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Robert Haas
On Tue, Jun 24, 2014 at 9:18 AM, Vik Fearing vik.fear...@dalibo.com wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one substantive issue that had been missed in discussion, though. The patch modifies the postgres_fdw extension to make it automatically exempt from an attempt to

Re: [HACKERS] [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-24 Thread Andrew Dunstan
On 06/23/2014 09:43 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 06/23/2014 07:34 PM, Tom Lane wrote: I'm not following your comment about 9.3. The json[b]_to_record[set] functions are new in 9.4, which is what makes me feel it's not too late to redefine their behavior.

Re: [HACKERS] crash with assertions and WAL_DEBUG

2014-06-24 Thread Rahila Syed
Hello, The patch on compilation gives following error, mcxt.c: In function ‘MemoryContextAllowInCriticalSection’: mcxt.c:322: error: ‘struct MemoryContextData’ has no member named ‘allowInCriticalSection’ The member in MemoryContextData is defined as 'allowInCritSection' while the

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Andres Freund
On 2014-06-24 10:04:03 -0400, Robert Haas wrote: On Tue, Jun 24, 2014 at 9:18 AM, Vik Fearing vik.fear...@dalibo.com wrote: My reasoning for doing it the way I did is that if a transaction touches a foreign table and then goes bumbling along with other things the transaction is active but

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Alvaro Herrera
Robert Haas wrote: Right, if we were to support multiple policies on a given table then we would have to support adding and removing them individually, as well as specify when they are to be applied- and what if that when overlaps? Do we apply both and only a row which passed them all

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 10:05 AM, Robert Haas [via PostgreSQL] ml-node+s1045698n580889...@n5.nabble.com wrote: On Tue, Jun 24, 2014 at 9:18 AM, Vik Fearing [hidden email] http://user/SendEmail.jtp?type=nodenode=5808893i=0 wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one

Re: [HACKERS] crash with assertions and WAL_DEBUG

2014-06-24 Thread Alvaro Herrera
Heikki Linnakangas wrote: On 06/21/2014 01:58 PM, Heikki Linnakangas wrote: It's a bit difficult to attach the mark to the palloc calls, as neither the WAL_DEBUG or LWLOCK_STATS code is calling palloc directly, but marking specific MemoryContexts as sanctioned ought to work. I'll take a stab

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Vik Fearing
On 06/24/2014 04:04 PM, Robert Haas wrote: If the local transaction is actually idle in transaction and the local server doesn't have a timeout, we're no worse off than before this patch. I think we are. First, the correct timeout is a matter of remote-server-policy, not

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Dave McGuire
On 06/23/2014 06:58 PM, Greg Stark wrote: On Mon, Jun 23, 2014 at 3:09 PM, Robert Haas robertmh...@gmail.com wrote: However, we don't know of anyone who has tried to do this in a very long time, and are therefore considering removing the remaining support for the VAX platform. Has anyone

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Sebastian Reitenbach
On Tuesday, June 24, 2014 03:12 CEST, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 23, 2014 at 6:58 PM, Greg Stark st...@mit.edu wrote: On Mon, Jun 23, 2014 at 3:09 PM, Robert Haas robertmh...@gmail.com wrote: However, we don't know of anyone who has tried to do this in a very

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Sebastian Reitenbach
On Tuesday, June 24, 2014 13:37 CEST, Sebastian Reitenbach sebas...@l00-bugdead-prods.de wrote: On Tuesday, June 24, 2014 03:12 CEST, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 23, 2014 at 6:58 PM, Greg Stark st...@mit.edu wrote: On Mon, Jun 23, 2014 at 3:09 PM, Robert Haas

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread David Brownlee
Well the latest NetBSD/vax package build doesn't seem to include any PostgreSQL packages http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/vax/6.0_2014Q1/ but I don't know why. I'll try a quick (hah :) build this end to see what happens David On 24 June 2014 02:12, Robert Haas

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Robert Haas
On Tue, Jun 24, 2014 at 10:30 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: Right, if we were to support multiple policies on a given table then we would have to support adding and removing them individually, as well as specify when they are to be applied- and what

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Robert Haas
On Tue, Jun 24, 2014 at 10:50 AM, Vik Fearing vik.fear...@dalibo.com wrote: On 06/24/2014 04:04 PM, Robert Haas wrote: If the local transaction is actually idle in transaction and the local server doesn't have a timeout, we're no worse off than before this patch. I think we are. First, the

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 11:11 AM, Robert Haas [via PostgreSQL] ml-node+s1045698n5808915...@n5.nabble.com wrote: On Tue, Jun 24, 2014 at 10:50 AM, Vik Fearing [hidden email] http://user/SendEmail.jtp?type=nodenode=5808915i=0 wrote: On 06/24/2014 04:04 PM, Robert Haas wrote: If the local

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Stephen Frost
Robert, I feel like we are getting to the point of simply talking past each other and so I'll try anew, and I'll include my understanding of how the different approaches would address the specific use-case you outlined up-thread. Single policy - The current implementation approach

Re: [HACKERS] Autonomous Transaction (WIP)

2014-06-24 Thread Pavel Stehule
Hello regress tests fails: plancache... ok limit... ok plpgsql ... ok copy2... ok temp ... FAILED domain ... ok rangefuncs ... ok

Re: [HACKERS] Autonomous Transaction (WIP)

2014-06-24 Thread Pavel Stehule
postgres=# select version(); version - PostgreSQL 9.5devel on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7), 64-bit (1 row) 2014-06-24 18:39

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Josh Berkus
On 06/23/2014 03:52 PM, Andres Freund wrote: On 2014-06-23 13:19:47 -0700, Kevin Grittner wrote: which already seems less clear (because the transaction belongs to idle) I have no idea what that means. It's idle_in_transaction_session_timeout. Not idle_in_transaction_session_timeout.

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Tom Lane
Sebastian Reitenbach sebas...@l00-bugdead-prods.de writes: OK, that was easy: $ cd /usr/ports/databases/postgresql $ make install === postgresql-client-9.3.4p0 requires shared libraries . OpenBSD VAX is static only, so no postgresql on OpenBSD VAX

Re: [HACKERS] Autonomous Transaction (WIP)

2014-06-24 Thread Pavel Stehule
Hello There are lot of unnecessary block over one statement in code + if ((inAutoX) (chunk == events-head) ((char *)event afterTriggers-events_stack[my_level].tailfree)) + { + continue; + } + and there a few too long lines

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Vik Fearing
On 06/24/2014 06:43 PM, Josh Berkus wrote: A long idle in transaction state pretty much always indicates a problematic interaction with postgres. True. Which makes me wonder whether we shouldn't default this to something non-zero -- even if it is 5 or 10 days. I'd go for even shorter:

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Pavel Stehule
2014-06-24 18:43 GMT+02:00 Josh Berkus j...@agliodbs.com: On 06/23/2014 03:52 PM, Andres Freund wrote: On 2014-06-23 13:19:47 -0700, Kevin Grittner wrote: which already seems less clear (because the transaction belongs to idle) I have no idea what that means. It's

Re: [HACKERS] [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-24 Thread Merlin Moncure
On Tue, Jun 24, 2014 at 9:08 AM, Andrew Dunstan and...@dunslane.net wrote: w.r.t. json arrays, I think you're chasing a chimera, since they are heterogenous, unlike SQL arrays. But, there are many useful cases where the json is known to be well formed, right? Or do you mean that the

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Josh Berkus
On 06/24/2014 07:50 AM, Vik Fearing wrote: On 06/24/2014 04:04 PM, Robert Haas wrote: If the local transaction is actually idle in transaction and the local server doesn't have a timeout, we're no worse off than before this patch. I think we are. First, the correct timeout is a matter of

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-24 Thread Noah Misch
On Mon, Jun 23, 2014 at 05:16:15PM +0200, Andres Freund wrote: On 2014-06-23 10:29:54 -0400, Robert Haas wrote: Telling people that they can't have even the most minimal platform support code in PostgreSQL unless they're willing to contribute and maintain a BF VM indefinitely is not very

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: On 06/24/2014 07:50 AM, Vik Fearing wrote: Once the remote times out, the local transaction is doomed (and won't even know it until it tries to commit). If we don't allow the fdw to be special, then the local transaction can't run at all. Ever. I'm

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-24 Thread Andres Freund
On 2014-06-24 13:03:37 -0400, Noah Misch wrote: On Mon, Jun 23, 2014 at 05:16:15PM +0200, Andres Freund wrote: On 2014-06-23 10:29:54 -0400, Robert Haas wrote: Telling people that they can't have even the most minimal platform support code in PostgreSQL unless they're willing to

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: On 06/23/2014 03:52 PM, Andres Freund wrote: True. Which makes me wonder whether we shouldn't default this to something non-zero -- even if it is 5 or 10 days. I'd go for even shorter: 48 hours. I'd suggest 24 hours, but that would trip up some users

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-24 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-24 13:03:37 -0400, Noah Misch wrote: If a change has the potential to make some architectures give wrong answers only at odd times, that's a different kind of problem. For that reason, actively breaking Alpha is a good thing. Not sure

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Vik Fearing
On 06/24/2014 07:17 PM, Tom Lane wrote: BTW, has anyone thought about the interaction of this feature with prepared transactions? I wonder whether there shouldn't be a similar but separately-settable maximum time for a transaction to stay in the prepared state. If we could set a nonzero

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-24 Thread Noah Misch
On Tue, Jun 24, 2014 at 07:09:08PM +0200, Andres Freund wrote: On 2014-06-24 13:03:37 -0400, Noah Misch wrote: What I'm hearing is that you see two options, (1) personally authoring e.g. sparcv8 code or (2) purging the source tree of sparcv8 code before submitting the patch that would

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-24 Thread Andres Freund
On 2014-06-24 10:22:08 -0700, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-24 13:03:37 -0400, Noah Misch wrote: If a change has the potential to make some architectures give wrong answers only at odd times, that's a different kind of problem. For that reason,

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Andres Freund
On 2014-06-24 10:17:49 -0700, Tom Lane wrote: BTW, has anyone thought about the interaction of this feature with prepared transactions? I wonder whether there shouldn't be a similar but separately-settable maximum time for a transaction to stay in the prepared state. If we could set a

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-24 Thread Fujii Masao
On Mon, Jun 23, 2014 at 9:50 PM, Stephen Frost sfr...@snowman.net wrote: * Fujii Masao (masao.fu...@gmail.com) wrote: On Mon, Jun 23, 2014 at 7:51 PM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: At 2014-06-23 19:15:39 +0900, masao.fu...@gmail.com wrote: You added this into CF, but its

Re: [HACKERS] PostgreSQL in Windows console and Ctrl-C

2014-06-24 Thread Noah Misch
On Tue, Jun 24, 2014 at 09:24:43AM +, Christian Ullrich wrote: pg_ctl does not pass the option anywhere but on Windows, and postmaster.c does not recognize it anywhere else. If it is encountered on a platform where it does not make sense, it will be treated like any other (unknown) long

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-24 10:17:49 -0700, Tom Lane wrote: BTW, has anyone thought about the interaction of this feature with prepared transactions? I wonder whether there shouldn't be a similar but separately-settable maximum time for a transaction to stay in

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Josh Berkus j...@agliodbs.com writes: Which makes me wonder whether we shouldn't default this to something non-zero -- even if it is 5 or 10 days. I'd go for even shorter: 48 hours.  I'd suggest 24 hours, but that would trip up some users who just need

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-24 Thread Stephen Frost
* Fujii Masao (masao.fu...@gmail.com) wrote: I'm not sure if this is good idea because this basically means that master and every standbys must have the same audit settings and a user cannot set what standby logs in standby side. Of course I guess that the audit settings in standby would be

Re: [HACKERS] wrapping in extended mode doesn't work well with default pager

2014-06-24 Thread Sergey Muraviov
Hi. Is there any problem with the patch? 2014-06-17 0:21 GMT+04:00 Greg Stark st...@mit.edu: On Mon, Jun 16, 2014 at 9:05 PM, Robert Haas robertmh...@gmail.com wrote: So, it seems like we need to do something about this one way or another. Who's working on that? So I'm fine finishing

Re: [HACKERS] Add a filed to PageHeaderData

2014-06-24 Thread Pavan Deolasee
On Tue, Jun 24, 2014 at 3:40 PM, Kevin Grittner kgri...@ymail.com wrote: Soroosh Sardari soroosh.sard...@gmail.com wrote: I check this problem with a virgin source code of postgresql-9.3.2. So the bug is not for my codes. By the way, following code has two different output and it is

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-06-24 Thread John Lumby
Thanks Heikki, Date: Tue, 24 Jun 2014 17:02:38 +0300 From: hlinnakan...@vmware.com To: johnlu...@hotmail.com; st...@mit.edu CC: klaussfre...@gmail.com; pgsql-hackers@postgresql.org Subject: Re: Extended Prefetching using Asynchronous IO - proposal and

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-06-24 Thread Heikki Linnakangas
On 06/24/2014 06:08 PM, John Lumby wrote: The question is, if you receive the notification of the I/O completion using a signal or a thread, is it safe to release the lwlock from the signal handler or a separate thread? In the forthcoming new version of the patch that uses sigevent, the

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-24 10:17:49 -0700, Tom Lane wrote: BTW, has anyone thought about the interaction of this feature with prepared transactions? I wonder whether there shouldn't be a similar but

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-24 Thread Stephen Frost
Abhijit, * Abhijit Menon-Sen (a...@2ndquadrant.com) wrote: At 2014-06-23 16:51:55 -0400, sfr...@snowman.net wrote: Are both the connected user and the current role that the command is running under logged? Yes, they are. -++ Ok, great, I couldn't

Re: [HACKERS] ALTER TABLESPACE MOVE command tag tweak

2014-06-24 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: That it's more-or-less a bulk 'ALTER TABLE' operation is why I had been trying to think of a way to put it under that command. What if we had a more general way to reference 'all objects in a tablespace'?

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Tom Lane
Dave McGuire mcgu...@neurotica.com writes: On 06/24/2014 12:42 PM, Tom Lane wrote: I think this means we can write off VAX on NetBSD/OpenBSD as a viable platform for Postgres :-(. I'm sad to hear it, but certainly have not got the cycles personally to prevent it. Nonono...NetBSD/vax has

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread Josh Berkus
On 06/24/2014 10:17 AM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: On 06/23/2014 03:52 PM, Andres Freund wrote: True. Which makes me wonder whether we shouldn't default this to something non-zero -- even if it is 5 or 10 days. I'd go for even shorter: 48 hours. I'd suggest 24

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-06-24 Thread Fujii Masao
On Tue, Jun 24, 2014 at 3:18 PM, furu...@pm.nttdata.co.jp wrote: I found that this patch breaks --status-interval option of pg_receivexlog when -m option which the patch introduced is supplied. When -m is set, pg_receivexlog tries to send the feedback message as soon as it flushes WAL file

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Anders Magnusson
Tom Lane skrev 2014-06-24 18:42: Sebastian Reitenbach sebas...@l00-bugdead-prods.de writes: OK, that was easy: $ cd /usr/ports/databases/postgresql $ make install === postgresql-client-9.3.4p0 requires shared libraries . OpenBSD VAX is static only, so no postgresql on OpenBSD VAX before

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Matt Thomas
On Jun 24, 2014, at 9:42 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think this means we can write off VAX on NetBSD/OpenBSD as a viable platform for Postgres :-(. I'm sad to hear it, but certainly have not got the cycles personally to prevent it. Why? NetBSD/vax has supported shared

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Paul Koning
On Jun 24, 2014, at 12:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Sebastian Reitenbach sebas...@l00-bugdead-prods.de writes: OK, that was easy: $ cd /usr/ports/databases/postgresql $ make install === postgresql-client-9.3.4p0 requires shared libraries .

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Dave McGuire
On 06/24/2014 12:42 PM, Tom Lane wrote: Sebastian Reitenbach sebas...@l00-bugdead-prods.de writes: OK, that was easy: $ cd /usr/ports/databases/postgresql $ make install === postgresql-client-9.3.4p0 requires shared libraries . OpenBSD VAX is static

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2014-06-24 Thread Alvaro Herrera
Dave McGuire wrote: On 06/24/2014 12:42 PM, Tom Lane wrote: I think this means we can write off VAX on NetBSD/OpenBSD as a viable platform for Postgres :-(. I'm sad to hear it, but certainly have not got the cycles personally to prevent it. Nonono...NetBSD/vax has had shared library

[HACKERS] Keepalive-related socket options under FreeBSD 9, 10

2014-06-24 Thread Piotr Stefaniak
Since upgrading FreeBSD from 8 to 9, I've noticed the following messages showing up in logs when a connection with pgAdmin3 is made: LOG: getsockopt(TCP_KEEPCNT) failed: Protocol not available STATEMENT: SELECT setting FROM pg_settings WHERE name IN ('autovacuum', 'track_counts') LOG:

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-24 Thread Matheus de Oliveira
On Sun, Jun 22, 2014 at 2:35 AM, Craig Ringer cr...@2ndquadrant.com wrote: A way to put UNLOGGED objects in such a space and have them recovered if they vanish would also be valuable, IMO. Not necessarily in the same patch, I'd just rather keep it in mind so any chosen design doesn't

Bug in spg_range_quad_inner_consistent for adjacent operator (was Re: [HACKERS] Add a filed to PageHeaderData)

2014-06-24 Thread Heikki Linnakangas
On 06/24/2014 08:48 PM, Pavan Deolasee wrote: FWIW I can reproduce this on HEAD with the attached patch. I could reproduce this on a 64-bit Ubuntu as well as 64-bit Mac OSX. Very confusing it is because I tried with various values for N in char[N] array and it fails for N=20. Other values I

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Dean Rasheed
On 24 June 2014 17:27, Stephen Frost sfr...@snowman.net wrote: Single policy vs Multiple, Overlapping policies vs Multiple, Non-overlapping policies What I was describing upthread was multiple non-overlapping policies. I disagree that this will be more complicated to use. It's a strict

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Dean Rasheed
Thinking about the examples upthread, a separate issue occurs to me --- when defining a RLS qual, I think that there has to be a syntax to specify an alias for the main table, so that correlated subqueries can refer to it. I'm not sure if that's been mentioned in any of the discussions so far, but

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-24 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: Thinking about the examples upthread, a separate issue occurs to me --- when defining a RLS qual, I think that there has to be a syntax to specify an alias for the main table, so that correlated subqueries can refer to it. I'm not sure if

Re: [HACKERS] Allowing join removals for more join types

2014-06-24 Thread Simon Riggs
On 23 June 2014 12:06, David Rowley dgrow...@gmail.com wrote: It's not clear to me where you get the term sortclause from. This is either the groupclause or distinctclause, but in the test cases you provide this shows this has nothing at all to do with sorting since there is neither an order

Re: [HACKERS] Allowing NOT IN to use ANTI joins

2014-06-24 Thread Simon Riggs
On 24 June 2014 11:32, David Rowley dgrowle...@gmail.com wrote: So if anyone can point me in the right direction then that would be really useful. Many things can be added simply, but most things can't. It seems we just don't have that information. If we did, Tom would have done this already.

Re: [HACKERS] Allowing NOT IN to use ANTI joins

2014-06-24 Thread Simon Riggs
On 11 June 2014 17:52, Greg Stark st...@mit.edu wrote: On Wed, Jun 11, 2014 at 3:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: If we didn't have mechanisms like this, we'd have far worse hazards from ALTER TABLE than whether the planner made an incorrect join optimization. Consider ALTER COLUMN

Re: [HACKERS] Allowing NOT IN to use ANTI joins

2014-06-24 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Having said that, any join plan that relies upon a constraint will still be valid even if we drop a constraint while the plan executes because any new writes will not be visible to the executing join plan. mumble ... EvalPlanQual ?

Re: [HACKERS] Allowing NOT IN to use ANTI joins

2014-06-24 Thread Simon Riggs
On 24 June 2014 23:44, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: Having said that, any join plan that relies upon a constraint will still be valid even if we drop a constraint while the plan executes because any new writes will not be visible to the executing

Re: [HACKERS] Allowing join removals for more join types

2014-06-24 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Other than that it looks pretty good to commit, so I'll wait a week for other objections then commit. I'd like to review this before it goes in. I've been waiting for it to get marked ready for committer though. regards, tom

Re: [HACKERS] Allowing NOT IN to use ANTI joins

2014-06-24 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 24 June 2014 23:44, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: Having said that, any join plan that relies upon a constraint will still be valid even if we drop a constraint while the plan executes because any new

Re: [HACKERS] [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-24 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: On Mon, Jun 23, 2014 at 8:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: * Nested json arrays are a bit more problematic. What I'd ideally like is to spit them out in a form that would be successfully parsable as a SQL array of the appropriate element

[HACKERS] RLS Design

2014-06-24 Thread Stephen Frost
Dean, all, Changing the subject of this thread (though keeping it threaded) as we've really moved on to a much broader discussion. * Dean Rasheed (dean.a.rash...@gmail.com) wrote: On 24 June 2014 17:27, Stephen Frost sfr...@snowman.net wrote: Single policy vs Multiple, Overlapping policies vs

  1   2   >