Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Ashutosh Bapat
If we are going to change that portion of the code, we may as well go a bit forward and allow any expressions to be fetched from a foreign server (obviously, if that server is capable of doing so). It will help, when we come to aggregate push-down or whole query push-down (whenever that happens).

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Ashutosh Bapat
On Tue, Jul 1, 2014 at 7:39 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: (2014/06/30 20:17), Ashutosh Bapat wrote: On Mon, Jun 30, 2014 at 4:17 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp mailto:fujita.ets...@lab.ntt.co.jp wrote: (2014/06/30 17:47), Ashutosh Bapat wrote:

Re: [HACKERS] Autonomous Transaction (WIP)

2014-07-01 Thread Rajeev rastogi
On 30 June 2014 22:50, Pavel Stehule Wrote: 2014-06-30 12:38 GMT+02:00 Abhijit Menon-Sen a...@2ndquadrant.commailto:a...@2ndquadrant.com: If I understand correctly, the design of this patch has already been considered earlier and rejected. So I guess the patch should also be marked rejected? I

Re: [HACKERS] Autonomous Transaction (WIP)

2014-07-01 Thread Pavel Stehule
2014-07-01 8:16 GMT+02:00 Rajeev rastogi rajeev.rast...@huawei.com: On 30 June 2014 22:50, Pavel Stehule Wrote: 2014-06-30 12:38 GMT+02:00 Abhijit Menon-Sen a...@2ndquadrant.com: If I understand correctly, the design of this patch has already been considered earlier and rejected. So I

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Kyotaro HORIGUCHI
Hello, Sorry, this was no relation with this patch. ForeignNext materializes the slot, which would be any of physical and virtual tuple, when system column was requested. If it was a virtual one, file_fdw makes this, heap_form_tuple generates the tuple as DatumTuple. The result is a jumble of

Re: [HACKERS] Autonomous Transaction (WIP)

2014-07-01 Thread Amit Kapila
On Tue, Jul 1, 2014 at 11:46 AM, Rajeev rastogi rajeev.rast...@huawei.com wrote: On 30 June 2014 22:50, Pavel Stehule Wrote: I didn't find a related message. ? I think there have been some confusion, the design idea were never rejected but yes there were few feedback/ concern, which I had

Re: [HACKERS] Long paths for tablespace leads to uninterruptible hang in Windows

2014-07-01 Thread Amit Kapila
On Sat, Feb 15, 2014 at 1:26 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Feb 14, 2014 at 8:27 AM, Bruce Momjian br...@momjian.us wrote: On Tue, Jan 7, 2014 at 12:33:33PM +0530, Amit Kapila wrote: Still they have not told anything about other API's (rmdir, RemoveDirectory) which

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Etsuro Fujita
(2014/07/01 15:13), Ashutosh Bapat wrote: On Tue, Jul 1, 2014 at 7:39 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp mailto:fujita.ets...@lab.ntt.co.jp wrote: We may want to modify use_physical_tlist(), to return false, in case of foreign tables. BTW, it does return false for inheritance

Re: [HACKERS] Autonomous Transaction (WIP)

2014-07-01 Thread Pavel Stehule
2014-07-01 8:29 GMT+02:00 Amit Kapila amit.kapil...@gmail.com: On Tue, Jul 1, 2014 at 11:46 AM, Rajeev rastogi rajeev.rast...@huawei.com wrote: On 30 June 2014 22:50, Pavel Stehule Wrote: I didn't find a related message. ? I think there have been some confusion, the design idea were

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-07-01 Thread Albe Laurenz
Michael Paquier wrote: After sleeping on it, I have put my hands on the postgres_fdw portion and came up with a largely simplified flow, resulting in the patch attached. [...] Ronan, what do you think of those patches? I have nothing more to add, and I think that they should be looked by

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Ashutosh Bapat
On Tue, Jul 1, 2014 at 12:25 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: (2014/07/01 15:13), Ashutosh Bapat wrote: On Tue, Jul 1, 2014 at 7:39 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp mailto:fujita.ets...@lab.ntt.co.jp wrote: We may want to modify use_physical_tlist(), to

[HACKERS] debugging with child process

2014-07-01 Thread Ravi Kiran
hi, can any one help me with the 4th and 5th steps of the following link which is to debug with a child process in postgres. *https://wiki.postgresql.org/wiki/Working_with_Eclipse#Debugging_with_child_processes https://wiki.postgresql.org/wiki/Working_with_Eclipse#Debugging_with_child_processes*

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-07-01 Thread Ronan Dunklau
Le mardi 1 juillet 2014 06:59:49 Albe Laurenz a écrit : Michael Paquier wrote: After sleeping on it, I have put my hands on the postgres_fdw portion and came up with a largely simplified flow, resulting in the patch attached. [...] Ronan, what do you think of those patches? I

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Etsuro Fujita
(2014/07/01 16:04), Ashutosh Bapat wrote: On Tue, Jul 1, 2014 at 12:25 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp mailto:fujita.ets...@lab.ntt.co.jp wrote: Maybe I'm missing something, but what's the point of using the tlist, not reltargetlist? Compliance with other

Re: [HACKERS] RLS Design

2014-07-01 Thread Dean Rasheed
On 29 June 2014 20:42, Stephen Frost sfr...@snowman.net wrote: To try and clarify what this distinction is- Dean's approach with GRANT allows specifying the policy to be used when a given role queries a given table. Through this mechanism, one role might have access to many different tables,

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Kyotaro HORIGUCHI
Hi, At Tue, 01 Jul 2014 16:30:41 +0900, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote in 53b263a1.3060...@lab.ntt.co.jp I've got the point. As I said upthread, I'll work on calculating attr_needed for child rels, and I hope that that will eliminate your concern. Inheritance tree is

Re: [HACKERS] Autonomous Transaction (WIP)

2014-07-01 Thread Rajeev rastogi
On 01 July 2014 12:26, Pavel Stehule Wrote: Have you checked the discussion in Developer meeting notes. Please check the same at below link: http://wiki.postgresql.org/wiki/PgCon_2012_Developer_Meeting#Autonomous_Transactions Are these notes still valid? * Why autonomous transaction should be

Re: [HACKERS] Autonomous Transaction (WIP)

2014-07-01 Thread Pavel Stehule
2014-07-01 10:38 GMT+02:00 Rajeev rastogi rajeev.rast...@huawei.com: On 01 July 2014 12:26, Pavel Stehule Wrote: Have you checked the discussion in Developer meeting notes. Please check the same at below link:

Re: [HACKERS] NUMA packaging and patch

2014-07-01 Thread Christoph Berg
Re: Kevin Grittner 2014-06-09 1402267501.4.yahoomail...@web122304.mail.ne1.yahoo.com @@ -536,6 +539,24 @@ PGSharedMemoryCreate(Size size, bool makePrivate, int port, */ } +#ifdef USE_LIBNUMA + /* + * If this is not a private segment and we are using

Re: [HACKERS] Array of composite types returned from python

2014-07-01 Thread Ronan Dunklau
Le dimanche 29 juin 2014 16:54:03 Tom Lane a écrit : Abhijit Menon-Sen a...@2ndquadrant.com writes: 3) This is such a simple change with no new infrastructure code (PLyObject_ToComposite already exists). Can you think of a reason why this wasn't done until now? Was it a simple miss or

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Andres Freund
On 2014-06-30 22:44:58 -0400, Robert Haas wrote: On Mon, Jun 30, 2014 at 6:28 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-30 19:22:59 +0200, Andres Freund wrote: On 2014-06-30 12:46:29 -0400, Robert Haas wrote: , which if I understand you correctly are ARM without GCC

Re: [HACKERS] Wait free LW_SHARED acquisition

2014-07-01 Thread Andres Freund
Hi, Over at -performance Mark Kirkwood tested a recent version of this (http://archives.postgresql.org/message-id/53B283F3.7020005%40catalyst.net.nz) . I thought it's interesting to add the numbers to this thread: Test: pgbench Options: scale 500 read only Os: Ubuntu 14.04 Pg:

Re: [HACKERS] WAL replay bugs

2014-07-01 Thread Kyotaro HORIGUCHI
Hello, I had a look on this patch. Let me show you some comments about the README, Makefile and buffer_capture_cmp of the second part for the present. A continuation of this comment would be seen later.. - contrib/buffer_capture_cmp/README - 'contains' seems duplicate in the first paragraph.

Re: [HACKERS] better atomics - v0.5

2014-07-01 Thread Andres Freund
On 2014-07-01 10:44:19 +0530, Amit Kapila wrote: I think for such usage, we need to rely on barriers wherever there is a need for synchronisation, recent example I have noticed is in your patch where we have to use pg_write_barrier() during wakeup. However if we go by atomic ops definition,

Re: [HACKERS] NUMA packaging and patch

2014-07-01 Thread Andres Freund
On 2014-07-01 11:01:04 +0200, Christoph Berg wrote: Re: Kevin Grittner 2014-06-09 1402267501.4.yahoomail...@web122304.mail.ne1.yahoo.com @@ -536,6 +539,24 @@ PGSharedMemoryCreate(Size size, bool makePrivate, int port, */ } +#ifdef USE_LIBNUMA + /* +

Re: [HACKERS] NUMA packaging and patch

2014-07-01 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: On 2014-07-01 11:01:04 +0200, Christoph Berg wrote: How much difference would it make if numactl --interleave=all was used instead of using numa_interleave_memory() on the shared memory segments? I guess that would make backend-local memory also

Re: [HACKERS] Wait free LW_SHARED acquisition

2014-07-01 Thread Heikki Linnakangas
On 07/01/2014 01:08 PM, Andres Freund wrote: Hi, Over at -performance Mark Kirkwood tested a recent version of this (http://archives.postgresql.org/message-id/53B283F3.7020005%40catalyst.net.nz) . I thought it's interesting to add the numbers to this thread: Test: pgbench Options: scale 500

Re: [HACKERS] RETURNING PRIMARY KEY syntax extension

2014-07-01 Thread Rushabh Lathia
I spent some more time on the patch and here are my review comments. .) Patch gets applied through patch -p1 (git apply fails) .) trailing whitespace in the patch at various places .) Unnecessary new line + and - in the patch. (src/backend/rewrite/rewriteManip.c::getInsertSelectQuery())

Re: [HACKERS] NUMA packaging and patch

2014-07-01 Thread Christoph Berg
Re: Kevin Grittner 2014-07-01 1404213492.98740.yahoomail...@web122306.mail.ne1.yahoo.com Andres Freund and...@2ndquadrant.com wrote: On 2014-07-01 11:01:04 +0200, Christoph Berg wrote: How much difference would it make if numactl --interleave=all was used instead of using

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-07-01 Thread Michael Paquier
On Tue, Jul 1, 2014 at 4:23 PM, Ronan Dunklau ronan.dunk...@dalibo.com wrote: The remote_schema parameter can be used for SQL injection. Either we should go back to using parameters, or be extra careful. Since the remote schema is parsed as a name, it is limited to 64 characters which is not

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-07-01 Thread Christoph Berg
Re: Tom Lane 2014-06-23 17054.1403542...@sss.pgh.pa.us While I'd love to reduce the number of future installations without this fix in place, I respect the decision to honor project policy. At the same time, this change does not break anything. It introduces new environment variables which

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

2014-07-01 Thread Peter Eisentraut
On 6/29/14, 12:20 PM, Tom Lane wrote: I'm tempted to just rip out all the useless code rather than fix the logic bug as such. OTOH, that might complicate updating to more recent versions of the original Autoconf macro. On the third hand, we've not bothered to do that in ten years either.

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

2014-07-01 Thread MauMau
I'm sorry to interrupt you, but I feel strong sympathy with Stephen-san. From: Robert Haas robertmh...@gmail.com I don't think that's a valid objection. If we someday have auditing in core, and if it subsumes what pgaudit does, then whatever interfaces pgaudit implements can be replaced with

Re: [HACKERS] Fresh initdb contains a few deleted B-Tree pages

2014-07-01 Thread Greg Stark
Why is this even a small concern? Initdb runs the bootstrap SQL which does various SQL operations so it's not surprising there are some updates creating garbage. Iirc we don't even rely on template0 being frozen any more. -- greg

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-07-01 Thread Fujii Masao
On Mon, Jun 30, 2014 at 7:09 PM, furu...@pm.nttdata.co.jp wrote: Thanks for the review! +if (secs = 0) +secs = 1;/* Always sleep at least 1 sec */ + +sleeptime = secs * 1000 + usecs / 1000; The above is the code which caused that problem.

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

2014-07-01 Thread Simon Riggs
On 30 June 2014 16:20, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jun 30, 2014 at 9:39 AM, Stephen Frost sfr...@snowman.net wrote: I think the fact that pgaudit does X and you think it should do Y is a perfect example of why we're nowhere

Re: [HACKERS] pg_xlogdump --stats

2014-07-01 Thread Marti Raudsepp
On Wed, Jun 4, 2014 at 1:47 PM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: Here's a patch to make pg_xlogdump print summary statistics instead of individual records. Thanks! I had a use for this feature so I backported the (first) patch to PostgreSQL 9.3. It's a rush job so it's ugly and may

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-07-01 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: If we're going to do it like this, then I think the force flag should be considered to do nothing except override the clock check, which probably means it shouldn't be tested in the initial if() at all. That makes sense, and is easily done.  The only

Re: [HACKERS] RETURNING PRIMARY KEY syntax extension

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 8:00 AM, Rushabh Lathia rushabh.lat...@gmail.com wrote: .) In map_primary_key_to_list() patch using INDEX_ATTR_BITMAP_IDENTITY_KEY bitmap to get the keycols. In IndexAttrBitmapKind there is also INDEX_ATTR_BITMAP_KEY, so was confuse between INDEX_ATTR_BITMAP_KEY and

Re: [HACKERS] avoiding tuple copying in btree index builds

2014-07-01 Thread Robert Haas
On Tue, Jun 17, 2014 at 10:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Jun 16, 2014 at 8:10 PM, Tom Lane t...@sss.pgh.pa.us wrote: On a micro-optimization level, it might be worth passing the TID as ItemPointer not ItemPointerData (ie, pass a

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

2014-07-01 Thread Robert Haas
On Mon, Jun 30, 2014 at 4:51 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Another big change in the attached patch version is that XLogRegisterData() now *copies* the data to a working area, instead of merely adding a XLogRecData entry to the chain. This simplifies things in xlog.c,

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-07-01 Thread Robert Haas
On Mon, Jun 30, 2014 at 12:46 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I think it's pretty much a given that pg_resetxlog is a tool that can have disastrous effects if used lightly. If people changes their sysid wrongly, they're not any worse than if they change their multixact

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-07-01 Thread Andres Freund
On 2014-07-01 11:11:12 -0400, Robert Haas wrote: On Mon, Jun 30, 2014 at 12:46 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I think it's pretty much a given that pg_resetxlog is a tool that can have disastrous effects if used lightly. If people changes their sysid wrongly, they're

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-07-01 Thread Alvaro Herrera
Robert Haas wrote: On Mon, Jun 30, 2014 at 12:46 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I think it's pretty much a given that pg_resetxlog is a tool that can have disastrous effects if used lightly. If people changes their sysid wrongly, they're not any worse than if they

Re: [HACKERS] Escaping from blocked send() reprised.

2014-07-01 Thread Robert Haas
On Mon, Jun 30, 2014 at 11:26 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: 2. I think it would be reasonable to try to kill off the connection without notifying the client if we're unable to send the data to the client in a reasonable period of time. But I'm unsure what a

[HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread gotoschool6g
The simplified scene: select slowfunction(s) from a order by b limit 1; is slow than select slowfunction(s) from (select s from a order by b limit 1) as z; if there are many records in table 'a'. The real scene. Function ST_Distance_Sphere is slow, the query: SELECT ST_Distance_Sphere(s,

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 11:19 AM, Andres Freund and...@2ndquadrant.com wrote: I am, however, kind of frustrated, still, that the pg_computemaxlsn patch, which I thought was rather a good idea, was scuttled by the essentially that same objection: let's not extend pg_resetxlog friends because

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

2014-07-01 Thread Dave McGuire
On 06/29/2014 02:58 PM, Patrick Finnegan wrote: Last I checked, NetBSD doesn't support any sort of multiprocessor VAX. Multiprocessor VAXes exist, but you're stuck with either Ultrix or VMS on them. Hi Pat, it's good to see your name in my inbox. NetBSD ran on multiprocessor BI-bus VAXen

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

2014-07-01 Thread Dave McGuire
On 06/29/2014 10:54 AM, Andres Freund wrote: Is there anyone in the NetBSD/VAX community who would be willing to host a PG buildfarm member? I could put together a simh-based machine (i.e., fast) on a vm, if nobody else has stepped up for this. No other volunteers have emerged, so if

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

2014-07-01 Thread Martin Husemann
On Sun, Jun 29, 2014 at 10:24:22AM -0400, Tom Lane wrote: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=coypudt=2014-06-29%2012%3A33%3A12 so I'm a bit confused as to what we need to change for VAX. Dave did use NetBSD 6.1 (IIRC), which uses an ancient gcc version. I would suggest to go

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

2014-07-01 Thread Dave McGuire
On 06/29/2014 03:35 PM, Tom Lane wrote: Hey, right up the river from here! Come on up and hack! There's always something neat going on around here. Ever run a PDP-11? B-) There were so many PDP-11s around CMU when I was an undergrad that I remember seeing spare ones being used as

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

2014-07-01 Thread Johnny Billquist
On 2014-06-29 12:12, Dave McGuire wrote: On 06/29/2014 03:10 PM, Patrick Finnegan wrote: And it also runs on the 11/780 which can have multiple CPUs... but I've never seen support for using more than one CPU (and the NetBSD page still says NetBSD/vax can only make use of one CPU on multi-CPU

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

2014-07-01 Thread Dave McGuire
On 06/25/2014 01:57 PM, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Jun 25, 2014 at 1:05 PM, John Klos j...@ziaspace.com wrote: While I wouldn't be surprised if you remove the VAX code because not many people are going to be running PostgreSQL, I'd disagree with the

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

2014-07-01 Thread Dave McGuire
On 06/29/2014 02:06 PM, Tom Lane wrote: Well, the issue from our point of view is that a lot of what we care about testing is extremely low-level hardware behavior, like whether spinlocks work as expected across processors. It's not clear that a simulator would provide a sufficiently accurate

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 6:04 AM, Andres Freund and...@2ndquadrant.com wrote: You know, looking at this, I wonder if we shouldn't just remove support for ARMv5 instead of making a blind stab at a fix. Well, I argued that way for a while ;). We don't even need to really desupport it, but just

Re: [HACKERS] RLS Design

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 3:33 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: An annoying complication, however, is how this interacts with column privileges. Right now GRANT SELECT(col1) ON t1 TO role1 gives role1 access to every row in col1, and I think that has to remain the case, since

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Merlin Moncure
On Tue, Jul 1, 2014 at 11:22 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 1, 2014 at 6:04 AM, Andres Freund and...@2ndquadrant.com wrote: You know, looking at this, I wonder if we shouldn't just remove support for ARMv5 instead of making a blind stab at a fix. Well, I argued that

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2014-07-01 Thread Sawada Masahiko
On Tue, Jul 1, 2014 at 1:25 PM, Dilip kumar dilip.ku...@huawei.com wrote: On 01 July 2014 03:48, Alvaro Wrote, In particular, pgpipe is almost an exact duplicate between them, except the copy in vac_parallel.c has fallen behind changes made to parallel.c. (Those changes would have fixed

[HACKERS] buildfarm and rolling release distros

2014-07-01 Thread Andrew Dunstan
I've always been a bit reluctant to accept buildfarm members that are constantly being updated, because it seemed to me that it created something with too many variables. However, we occasionally get requests from people who want to run on such platforms, and I'm also a bit reluctant to turn

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Andres Freund
On 2014-07-01 11:46:19 -0500, Merlin Moncure wrote: On Tue, Jul 1, 2014 at 11:22 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 1, 2014 at 6:04 AM, Andres Freund and...@2ndquadrant.com wrote: You know, looking at this, I wonder if we shouldn't just remove support for ARMv5

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

2014-07-01 Thread Stephen Frost
Simon, * Simon Riggs (si...@2ndquadrant.com) wrote: On 30 June 2014 16:20, Stephen Frost sfr...@snowman.net wrote: eh? The focus of this patch is to add auditing to PG and having very clearly drawn auditing requirements of a very large customer isn't relevant? I don't follow that logic

Re: [HACKERS] PATCH: Allow empty targets in unaccent dictionary

2014-07-01 Thread Abhijit Menon-Sen
At 2014-06-30 22:06:30 -0400, t...@sss.pgh.pa.us wrote: I went ahead and committed this patch, and also some further work to fix the multicharacter-source problem. I took it on myself to make the code issue warnings about misformatted lines, too. Thanks, looks good. I found the

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 12:46 PM, Merlin Moncure mmonc...@gmail.com wrote: A few years back I ported the postresql client libraries and a few other pieces of software (in particular subversion) to a lot of obscure platforms (old sparc, hpux, irix, older aix, etc etc). Getting a modern gcc

Re: [HACKERS] Fresh initdb contains a few deleted B-Tree pages

2014-07-01 Thread Peter Geoghegan
On Tue, Jul 1, 2014 at 6:02 AM, Greg Stark st...@mit.edu wrote: Why is this even a small concern? Initdb runs the bootstrap SQL which does various SQL operations so it's not surprising there are some updates creating garbage. Iirc we don't even rely on template0 being frozen any more. It's

Re: [HACKERS] buildfarm and rolling release distros

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 12:49 PM, Andrew Dunstan and...@dunslane.net wrote: I've always been a bit reluctant to accept buildfarm members that are constantly being updated, because it seemed to me that it created something with too many variables. However, we occasionally get requests from people

Re: [HACKERS] Cluster name in ps output

2014-07-01 Thread Vik Fearing
On 06/29/2014 02:25 PM, Andres Freund wrote: On 2014-06-29 11:11:14 +0100, Thomas Munro wrote: On 29 June 2014 10:55, Andres Freund and...@2ndquadrant.com wrote: So, I'd looked at it with an eye towards committing it and found some more things. I've now * added the restriction that the

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: The bottom line is that I love supporting obscure platforms as much as anyone here, and several other committers are already telling me that I love it too much. We've got to draw the line somewhere, and I think refusing to ship newly-written code that

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread Martijn van Oosterhout
On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: The simplified scene: select slowfunction(s) from a order by b limit 1; is slow than select slowfunction(s) from (select s from a order by b limit 1) as z; if there are many records in table 'a'. The real scene. Function

Re: [HACKERS] RLS Design

2014-07-01 Thread Dean Rasheed
On 1 July 2014 17:42, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 1, 2014 at 3:33 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: An annoying complication, however, is how this interacts with column privileges. Right now GRANT SELECT(col1) ON t1 TO role1 gives role1 access to every

Re: [HACKERS] Escaping from blocked send() reprised.

2014-07-01 Thread Martijn van Oosterhout
On Tue, Jul 01, 2014 at 12:26:43PM +0900, Kyotaro HORIGUCHI wrote: 1. I think it's the case that there are platforms around where a signal won't cause send() to return EINTR and I'd be entirely unsurprised if SSL_write() doesn't necessarily return EINTR in that case. I'm not sure

Re: [HACKERS] replication commands and log_statements

2014-07-01 Thread Abhijit Menon-Sen
Hi. Do we have any consensus about what to do with these two patches? 1. Introduce a log_replication_command setting. 2. Change log_statement to be a list of tokens. If I understand correctly, there weren't any strong objections to the former, but the situation is less clear when it comes to

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread Merlin Moncure
On Tue, Jul 1, 2014 at 2:16 PM, Martijn van Oosterhout klep...@svana.org wrote: On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: The simplified scene: select slowfunction(s) from a order by b limit 1; is slow than select slowfunction(s) from (select s from a order by b limit 1)

Re: [HACKERS] pg_dump reporing version of server pg_dump as comments in the output

2014-07-01 Thread Abhijit Menon-Sen
At 2014-06-17 13:21:34 +0530, jeevan.cha...@enterprisedb.com wrote: Anyone has any other views ? I guess nobody has strong feelings either way. I've marked this (i.e. your slightly-revised patch) ready for committer. -- Abhijit -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 2:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: The bottom line is that I love supporting obscure platforms as much as anyone here, and several other committers are already telling me that I love it too much. We've got to draw the

Re: [HACKERS] Array of composite types returned from python

2014-07-01 Thread Abhijit Menon-Sen
Hi Ronan. Based on your review, I'm marking this as ready for committer. The attached patch implements this. Your patch looks sensible enough (thanks for adding tests), but I guess we'll let the reviewer sort out whether to commit the original or your extended version. Thanks. -- Abhijit

Re: [HACKERS] RLS Design

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 3:20 PM, Dean Rasheed dean.a.rash...@gmail.com wrote: On 1 July 2014 17:42, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 1, 2014 at 3:33 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: An annoying complication, however, is how this interacts with column

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 8:22 AM, Christoph Berg c...@df7cb.de wrote: Re: Tom Lane 2014-06-23 17054.1403542...@sss.pgh.pa.us While I'd love to reduce the number of future installations without this fix in place, I respect the decision to honor project policy. At the same time, this change

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread David G Johnston
Merlin Moncure-2 wrote On Tue, Jul 1, 2014 at 2:16 PM, Martijn van Oosterhout lt; kleptog@ gt; wrote: On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: The simplified scene: select slowfunction(s) from a order by b limit 1; is slow than select slowfunction(s) from (select s

Re: [HACKERS] pg_xlogdump --stats

2014-07-01 Thread Abhijit Menon-Sen
At 2014-07-01 16:39:57 +0300, ma...@juffo.org wrote: Here's a patch to make pg_xlogdump print summary statistics instead of individual records. Thanks! I had a use for this feature so I backported the (first) patch to PostgreSQL 9.3. It's a rush job so it's ugly and may have bugs, but it

Re: [HACKERS] change alter user to be a true alias for alter role

2014-07-01 Thread Abhijit Menon-Sen
At 2014-06-27 16:11:21 +0200, vik.fear...@dalibo.com wrote: After a week of silence from Jov, I decided to do this myself since it didn't seem very hard. Many frustrating hours of trying to understand why I'm getting shift/reduce conflicts by the hundreds later, I've decided to give up for

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-07-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jul 1, 2014 at 8:22 AM, Christoph Berg c...@df7cb.de wrote: I have two comments on the patch: The choice to make the behavior depend first on PG_OOM_ADJUST_FILE and only secondly on PG_OOM_ADJUST_VALUE seems the wrong way round to me. Of

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Despite my concerns about keeping the list of supported atomics short, and I do have concerns in that area, I'm not really sure that we have much choice but to go in that direction. We can't accept a 5x performance hit in the name of portability, and

Re: [HACKERS] buildfarm and rolling release distros

2014-07-01 Thread Gavin Flower
On 02/07/14 06:02, Robert Haas wrote: On Tue, Jul 1, 2014 at 12:49 PM, Andrew Dunstan and...@dunslane.net wrote: I've always been a bit reluctant to accept buildfarm members that are constantly being updated, because it seemed to me that it created something with too many variables. However, we

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread Merlin Moncure
On Tue, Jul 1, 2014 at 3:06 PM, David G Johnston david.g.johns...@gmail.com wrote: Merlin Moncure-2 wrote On Tue, Jul 1, 2014 at 2:16 PM, Martijn van Oosterhout lt; kleptog@ gt; wrote: On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: The simplified scene: select

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Robert Haas
On Tue, Jul 1, 2014 at 4:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Despite my concerns about keeping the list of supported atomics short, and I do have concerns in that area, I'm not really sure that we have much choice but to go in that direction. We

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Mark Cave-Ayland
On 01/07/14 11:04, Andres Freund wrote: Since we have a Sun Studio machine in the buildfarm, we shouldn't give up on SPARC completely, but maybe we should only add the cases for sparcv8+ and above? That at least has some chance of getting tested. That we have code for sparcv7 is ridiculous

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Andres Freund
On 2014-07-01 23:21:07 +0100, Mark Cave-Ayland wrote: On 01/07/14 11:04, Andres Freund wrote: Since we have a Sun Studio machine in the buildfarm, we shouldn't give up on SPARC completely, but maybe we should only add the cases for sparcv8+ and above? That at least has some chance of

[HACKERS] Re: Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-07-01 Thread Gurjeet Singh
On Sun, Jun 29, 2014 at 11:58 AM, Kevin Grittner kgri...@ymail.com wrote: I have reviewed this patch, and think we should do what the patch is trying to do, but I don't think the submitted patch would actually work. Just curious, why do you think it won't work. Although the discussion is a bit

Re: [HACKERS] Wait free LW_SHARED acquisition

2014-07-01 Thread Mark Kirkwood
On 01/07/14 23:25, Heikki Linnakangas wrote: On 07/01/2014 01:08 PM, Andres Freund wrote: Hi, Over at -performance Mark Kirkwood tested a recent version of this (http://archives.postgresql.org/message-id/53B283F3.7020005%40catalyst.net.nz) . I thought it's interesting to add the numbers to

[HACKERS] Re: Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-07-01 Thread Gurjeet Singh
On Tue, Jul 1, 2014 at 10:05 AM, Kevin Grittner kgri...@ymail.com wrote: Tom Lane t...@sss.pgh.pa.us wrote: If we're going to do it like this, then I think the force flag should be considered to do nothing except override the clock check, which probably means it shouldn't be tested in the

Re: [HACKERS] SQL access to database attributes

2014-07-01 Thread Tom Lane
Vik Fearing vik.fear...@dalibo.com writes: Okay, here is version two of the refactoring patch that documents that the with-space version is deprecated but still accepted. The feature patch is not affected by this and so I am not attaching a new version of that. I've committed this without

Re: [HACKERS] Proposing pg_hibernate

2014-07-01 Thread Gurjeet Singh
On Sun, Jun 15, 2014 at 2:51 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jun 12, 2014 at 9:31 AM, Gurjeet Singh gurj...@singh.im wrote: I don't have intimate knowledge of recovery but I think the above assessment of recovery's operations holds true. If you still think this is a

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-07-01 23:21:07 +0100, Mark Cave-Ayland wrote: Also if you're struggling for Sun buildfarm animals, recent versions of QEMU will quite happily install and run later versions of 32-bit Solaris over serial, and 2.0 even manages to give you a

Re: [HACKERS] buildfarm and rolling release distros

2014-07-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jul 1, 2014 at 12:49 PM, Andrew Dunstan and...@dunslane.net wrote: I've always been a bit reluctant to accept buildfarm members that are constantly being updated, because it seemed to me that it created something with too many variables.

Re: [HACKERS] pg_xlogdump --stats

2014-07-01 Thread Marti Raudsepp
On Tue, Jul 1, 2014 at 11:13 PM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: In CF terms, did you form any opinion while porting the patch I posted about whether it's sensible/ready for inclusion in 9.5? I didn't look at the code more than necessary to make the build work. As far as

Re: [HACKERS] inherit support for foreign tables

2014-07-01 Thread Noah Misch
On Fri, Jun 20, 2014 at 05:04:06PM +0900, Kyotaro HORIGUCHI wrote: Attached is the rebased patch of v11 up to the current master. I've been studying this patch. SELECT FOR UPDATE on the inheritance parent fails with a can't-happen error condition, even when SELECT FOR UPDATE on the child

Re: [HACKERS] Proposing pg_hibernate

2014-07-01 Thread Gurjeet Singh
On Sat, Jun 7, 2014 at 6:48 AM, Cédric Villemain ced...@2ndquadrant.com wrote: Le lundi 3 février 2014 19:18:54 Gurjeet Singh a écrit : Possible enhancements: - Ability to save/restore only specific databases. - Control how many BlockReaders are active at a time; to avoid I/O storms. FWIW,

Re: [HACKERS] Audit of logout

2014-07-01 Thread Fujii Masao
On Mon, Jun 23, 2014 at 5:42 PM, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Jun 21, 2014 at 12:59 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/13/2014 07:29 AM, Tom Lane wrote: Fujii Masao masao.fu...@gmail.com writes: On Thu, Jun 12,

Re: [HACKERS] buildfarm and rolling release distros

2014-07-01 Thread Noah Misch
On Tue, Jul 01, 2014 at 08:35:16PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Jul 1, 2014 at 12:49 PM, Andrew Dunstan and...@dunslane.net wrote: I'm also not sure how to designate these machines. The buildfarm server metadata isn't designed for auto-updating

Re: [HACKERS] pg_xlogdump --stats

2014-07-01 Thread Abhijit Menon-Sen
At 2014-07-02 04:20:31 +0300, ma...@juffo.org wrote: As far as functionality goes, it does exactly what I needed it to do; the output is very clear. Good to hear. You might also add units (kB/MB) to the table like pg_size_pretty, although that would make the magnitudes harder to gauge. I

  1   2   >