Re: [HACKERS] WAL format and API changes (9.5)

2014-06-27 Thread Michael Paquier
On Sun, Jun 15, 2014 at 6:11 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 06/14/2014 09:43 PM, Alvaro Herrera wrote: Heikki Linnakangas wrote: Here's a new version, rebased against master. No other changes. This is missing xlogrecord.h ... Oops, here you are. Looking at

Re: [HACKERS] review: Built-in binning functions

2014-06-27 Thread Pavel Stehule
Hello I recheck this patch 1. applied cleanly and compilation was without warnings and errors 2. all tests was passed ok 3. documentation was rebuild without issues 4. I don't see any issue in code quality - it is well commented, well formatted, with regress tests It is ready for commit

Re: [HACKERS] ALTER SYSTEM RESET?

2014-06-27 Thread Vik Fearing
On 06/27/2014 06:22 AM, Amit Kapila wrote: On Thu, Jun 26, 2014 at 8:17 PM, Vik Fearing vik.fear...@dalibo.com mailto:vik.fear...@dalibo.com wrote: On 06/26/2014 05:07 AM, Amit Kapila wrote: I think it will make sense if we support RESET ALL as well similar to Alter Database .. RESET ALL

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-27 Thread Pavel Stehule
Hello thank you Peter, so now only setting for MS Windows is missing? Regards Pavel 2014-06-26 21:57 GMT+02:00 Petr Jelinek p...@2ndquadrant.com: Hello, I went through the patch, seems mostly fine, I adjusted some wording, removed the default .pgpass file info since it's not accurate,

Re: [HACKERS] ALTER SYSTEM RESET?

2014-06-27 Thread Vik Fearing
On 06/27/2014 08:49 AM, Vik Fearing wrote: This third patch reformats the documentation in the way I expected it to be committed. Amit, I added this to the next commitfest with your name as reviewer. https://commitfest.postgresql.org/action/patch_view?id=1495 Please update the status as you

Re: [HACKERS] RLS Design

2014-06-27 Thread Dean Rasheed
On 26 June 2014 18:04, Robert Haas robertmh...@gmail.com wrote: ALTER TABLE t1 SET POLICY p1 ON SELECT TO t1_p1_sel_quals; GRANT SELECT ON TABLE t1 TO role1 USING p1; As I see it, the downside of this is that it gets a lot more complex. We have to revise the ACL representation, which is

Re: [HACKERS] Index-only scans and non-MVCC snapshots

2014-06-27 Thread Andres Freund
On 2014-06-26 22:47:47 -0600, Ryan Johnson wrote: Hi, As part of a research project, I'm trying to change Read Committed isolation to use HeapTupleSatisfiesNow rather than acquiring a new snapshot at every command [1]. Things appear to have gone reasonably well so far, except certain

Re: [HACKERS] pg_resetxlog to clear backup start/end locations.

2014-06-27 Thread Fujii Masao
On Fri, Jun 27, 2014 at 12:29 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hello, I have finished the patches for all of 9.x. I dont' touch what '-n' option shows and rewrite documents for the option a bit. And '-n' won't show the changes of backup location. -8.4: does not

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-06-27 Thread Fujii Masao
On Thu, Jun 26, 2014 at 7:01 PM, furu...@pm.nttdata.co.jp wrote: The patch looks somewhat complicated and bugs can be easily introduced because it tries to not only add new feature but also reorganize the main loop in HandleCopyStream at the same time. To keep the patch simple, I'm thinking

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-06-27 Thread Andres Freund
On 2014-06-05 19:13:34 +0900, furu...@pm.nttdata.co.jp wrote: -Original Message- Hi, On 2014-06-05 17:09:44 +0900, furu...@pm.nttdata.co.jp wrote: Synchronous(synchronous_commit = on) mode offers the ability to confirm WAL have been streamed in the same way as synchronous

Re: [HACKERS] idle_in_transaction_timeout

2014-06-27 Thread Robert Haas
On Wed, Jun 25, 2014 at 11:40 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: Why is IIT timeout turned on only when send_ready_for_query is true? I was thinking it should be turned on every time a message is received. Imagine the case where the session is in

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-27 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] change alter user to be a true alias for alter role

2014-06-27 Thread Vik Fearing
On 06/19/2014 07:18 PM, Tom Lane wrote: Jov am...@amutu.com writes: the doc say: ALTER USER is now an alias for ALTER ROLEhttp://www.postgresql.org/docs/devel/static/sql-alterrole.html but alter user lack the following format: ... If we're going to have a policy that these commands be

Re: [HACKERS] Index-only scans and non-MVCC snapshots

2014-06-27 Thread Alvaro Herrera
Ryan Johnson wrote: On 26/06/2014 11:04 PM, Alvaro Herrera wrote: Ryan Johnson wrote: As part of a research project, I'm trying to change Read Committed isolation to use HeapTupleSatisfiesNow rather than acquiring a new snapshot at every command [1]. Are you aware of this? commit

Re: [HACKERS] WAL replay bugs

2014-06-27 Thread Michael Paquier
On Fri, Jun 27, 2014 at 2:57 PM, Michael Paquier michael.paqu...@gmail.com wrote: Here are rebased patches, their was a conflict with a recent commit in contrib/pg_upgrade. I am resending patch 2 as it contained a rebase conflict not correctly resolved (Thanks Alvaro). Regards, -- Michael

Re: [HACKERS] Index-only scans and non-MVCC snapshots

2014-06-27 Thread Ryan Johnson
On 27/06/2014 3:14 AM, Andres Freund wrote: On 2014-06-26 22:47:47 -0600, Ryan Johnson wrote: Hi, As part of a research project, I'm trying to change Read Committed isolation to use HeapTupleSatisfiesNow rather than acquiring a new snapshot at every command [1]. Things appear to have gone

Re: [HACKERS] Index-only scans and non-MVCC snapshots

2014-06-27 Thread Andres Freund
On 2014-06-27 08:39:13 -0600, Ryan Johnson wrote: On 27/06/2014 3:14 AM, Andres Freund wrote: On 2014-06-26 22:47:47 -0600, Ryan Johnson wrote: Hi, As part of a research project, I'm trying to change Read Committed isolation to use HeapTupleSatisfiesNow rather than acquiring a new snapshot

[HACKERS] pgstat_heap() consults freed memory

2014-06-27 Thread Noah Misch
pgstat_heap() creates a BufferAccessStrategy and attaches it to a HeapScanDesc. It continues to use that strategy after calling heap_endscan(), which frees the strategy. This is only a risk when the table contains empty pages at the end. I get a crash in an assert-enabled build with this test

Re: [HACKERS] Index-only scans and non-MVCC snapshots

2014-06-27 Thread Ryan Johnson
On 27/06/2014 8:20 AM, Alvaro Herrera wrote: Ryan Johnson wrote: On 26/06/2014 11:04 PM, Alvaro Herrera wrote: Ryan Johnson wrote: As part of a research project, I'm trying to change Read Committed isolation to use HeapTupleSatisfiesNow rather than acquiring a new snapshot at every command

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-27 Thread Robert Haas
On Thu, Jun 26, 2014 at 5:01 PM, Andres Freund and...@2ndquadrant.com wrote: But a) isn't really avoidable because it'll otherwise generate compiler warnings and b) is done that way all over the tree. E.g. lwlock.c has several copies of (note the nonvolatility of proc): volatile LWLock

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-27 Thread Robert Haas
On Thu, Jun 26, 2014 at 6:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-26 14:13:07 -0700, Tom Lane wrote: Surely it had better be a read barrier as well? I don't immediately see why it has to be read barrier? Hoisting a load from after the

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-27 Thread Robert Haas
On Fri, Jun 27, 2014 at 9:59 AM, Andres Freund and...@2ndquadrant.com wrote: 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

Re: [HACKERS] better atomics - v0.5

2014-06-27 Thread Robert Haas
On Thu, Jun 26, 2014 at 3:04 PM, Andres Freund and...@2ndquadrant.com wrote: I don't really see usecases where it's not related data that's being touched, but: The point is that the fastpath (not using a spinlock) might touch the atomic variable, even while the slowpath has acquired the

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

2014-06-27 Thread Robert Haas
On Thu, Jun 26, 2014 at 3:50 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: At 2014-06-25 10:36:07 -0400, sfr...@snowman.net wrote: To me, that's ridiculous on the face of it. Other databases have had this kind of capability as a matter of course for decades- we are far behind in this

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-27 Thread Andres Freund
On 2014-06-27 13:00:34 -0400, Robert Haas wrote: There are two separate issues here: 1. SpinLockAcquire and SpinLockRelease are not guaranteed to be compiler barriers, so all relevant memory accesses in the critical section need to be done using volatile pointers. Failing to do this is an

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-27 Thread Andres Freund
On 2014-06-27 13:12:31 -0400, Robert Haas wrote: I have noticed that most PostgreSQL committers seem for format their commit messages so that paragraphs are separated by a blank line, but you seem not to do that. I find that less readable. I'll change that. Since there seems to be

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-27 Thread Andres Freund
On 2014-06-27 13:04:02 -0400, Robert Haas wrote: On Thu, Jun 26, 2014 at 6:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-26 14:13:07 -0700, Tom Lane wrote: Surely it had better be a read barrier as well? I don't immediately see why it

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

2014-06-27 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: I agree with Stephen's statement that the audit configuration shouldn't be managed in flat files. If somebody wants to do that in an extension, fine, but I don't think we should commit anything into our source tree that works that way.

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-27 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-27 13:12:31 -0400, Robert Haas wrote: I don't personally object to dropping Alpha, but when this was discussed back in October, Stefan did: http://www.postgresql.org/message-id/52616373.10...@kaltenbrunner.cc As an ex-packager I do not

Re: [HACKERS] better atomics - v0.5

2014-06-27 Thread Andres Freund
On 2014-06-27 13:15:25 -0400, Robert Haas wrote: On Thu, Jun 26, 2014 at 3:04 PM, Andres Freund and...@2ndquadrant.com wrote: I don't really see usecases where it's not related data that's being touched, but: The point is that the fastpath (not using a spinlock) might touch the atomic

[HACKERS] Re: [BUGS] BUG #8673: Could not open file pg_multixact/members/xxxx on slave during hot_standby

2014-06-27 Thread Alvaro Herrera
Jeff Janes wrote: This problem was initially fairly easy to reproduce, but since I started adding instrumentation specifically to catch it, it has become devilishly hard to reproduce. I think my next step will be to also log each of the values which goes into the complex if (...)

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-27 Thread Stefan Kaltenbrunner
On 06/27/2014 08:26 PM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-27 13:12:31 -0400, Robert Haas wrote: I don't personally object to dropping Alpha, but when this was discussed back in October, Stefan did:

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-27 Thread Noah Misch
On Fri, Jun 27, 2014 at 07:51:32PM +0200, Andres Freund wrote: On 2014-06-27 13:12:31 -0400, Robert Haas wrote: I don't personally object to dropping Alpha, but when this was discussed back in October, Stefan did: http://www.postgresql.org/message-id/52616373.10...@kaltenbrunner.cc

Re: [HACKERS] delta relations in AFTER triggers

2014-06-27 Thread David Fetter
On Sat, Jun 21, 2014 at 11:06:26AM -0700, Kevin Grittner wrote: Kevin Grittner kgri...@ymail.com wrote: Kevin Grittner kgri...@ymail.com wrote: I've already said that I now think we should use the standard CREATE TRIGGER syntax to specify the transition tables, and that if we do that we

[HACKERS] [PATCH 0/3] Tau support

2014-06-27 Thread Asbjørn Sloth Tønnesen
Hi, Please see the following patches for implementing support for and migrating to Tau in PostgreSQL. Happy Tau Day Hacking http://tauday.com/ Make sure to check out this shory story: http://tauday.com/a-parable Asbjørn Sloth Tønnesen (3): Implement tau() function backend: use M_TAU

[HACKERS] [PATCH 3/3] earthdistance: TWO_PI = M_TAU

2014-06-27 Thread Asbjørn Sloth Tønnesen
Signed-off-by: Asbjørn Sloth Tønnesen asbj...@asbjorn.it --- contrib/earthdistance/earthdistance.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/earthdistance/earthdistance.c b/contrib/earthdistance/earthdistance.c index 6bbebdf..432309c 100644 ---

[HACKERS] [PATCH 2/3] backend: use M_TAU instead of M_PI

2014-06-27 Thread Asbjørn Sloth Tønnesen
Signed-off-by: Asbjørn Sloth Tønnesen asbj...@asbjorn.it --- src/backend/utils/adt/float.c | 4 ++-- src/backend/utils/adt/geo_ops.c | 8 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 1278053..b0211f8

[HACKERS] [PATCH 1/3] Implement tau() function

2014-06-27 Thread Asbjørn Sloth Tønnesen
Signed-off-by: Asbjørn Sloth Tønnesen asbj...@asbjorn.it --- doc/src/sgml/func.sgml| 13 + src/backend/utils/adt/float.c | 17 +++-- src/include/catalog/pg_proc.h | 2 ++ src/include/utils/builtins.h | 1 + 4 files changed, 31 insertions(+), 2 deletions(-) diff

Re: [HACKERS] [PATCH 0/3] Tau support

2014-06-27 Thread Tom Lane
=?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= asbj...@asbjorn.it writes: Please see the following patches for implementing support for and migrating to Tau in PostgreSQL. While I don't particularly object to adding a tau() function, the rest of this seems like change for the sake of change.

Re: [HACKERS] [PATCH 0/3] Tau support

2014-06-27 Thread David Fetter
On Fri, Jun 27, 2014 at 06:03:33PM -0700, Tom Lane wrote: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= asbj...@asbjorn.it writes: Please see the following patches for implementing support for and migrating to Tau in PostgreSQL. While I don't particularly object to adding a tau()

Re: [HACKERS] [PATCH 0/3] Tau support

2014-06-27 Thread Robert Haas
On Fri, Jun 27, 2014 at 9:03 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= asbj...@asbjorn.it writes: Please see the following patches for implementing support for and migrating to Tau in PostgreSQL. While I don't particularly object to adding a tau()

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-06-27 Thread Robert Haas
On Fri, Jun 27, 2014 at 2:04 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-27 13:04:02 -0400, Robert Haas wrote: On Thu, Jun 26, 2014 at 6:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-26 14:13:07 -0700, Tom Lane wrote:

Re: [HACKERS] better atomics - v0.5

2014-06-27 Thread Robert Haas
On Fri, Jun 27, 2014 at 2:00 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-27 13:15:25 -0400, Robert Haas wrote: On Thu, Jun 26, 2014 at 3:04 PM, Andres Freund and...@2ndquadrant.com wrote: I don't really see usecases where it's not related data that's being touched, but: The

Re: [HACKERS] ALTER SYSTEM RESET?

2014-06-27 Thread Amit Kapila
On Fri, Jun 27, 2014 at 12:27 PM, Vik Fearing vik.fear...@dalibo.com wrote: On 06/27/2014 08:49 AM, Vik Fearing wrote: This third patch reformats the documentation in the way I expected it to be committed. Amit, I added this to the next commitfest with your name as reviewer. No issues, I