Re: [HACKERS] BRIN index and aborted transaction

2015-07-19 Thread Alvaro Herrera
Alvaro Herrera wrote: Tatsuo Ishii wrote: When a transaction aborts, it seems a BRIN index leaves summary data which is not valid any more. Is this an expected behavior? I guess the answer is yes, because it does not affect correctness of a query result, but I would like to make sure.

Re: [HACKERS] Relation extension scalability

2015-07-19 Thread Andres Freund
Hi, I, every now and then, spent a bit of time making this more efficient over the last few weeks. I had a bit of a problem to reproduce the problems I'd seen in production on physical hardware (found EC2 to be to variable to benchmark this), but luckily 2ndQuadrant today allowed me access to

Re: [HACKERS] Relation extension scalability

2015-07-19 Thread Andres Freund
Hi, Eeek, the attached patch included a trivial last minute screwup (dereferencing bistate unconditionally...). Fixed version attached. Andres From fc095897a6f4207d384559a095f80a36cf49648c Mon Sep 17 00:00:00 2001 From: Andres Freund and...@anarazel.de Date: Sun, 29 Mar 2015 20:55:32 +0200

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-19 Thread Pavel Stehule
2015-07-19 20:54 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: Hi I am sending updated version. It implements new long option --strict-names. If this option is used, then for any entered name (without any wildcard char) must be found least one object. This option has not impact on

Re: [HACKERS] Implementation of global temporary tables?

2015-07-19 Thread Josh Berkus
Pavel, All: Just to be clear, the idea of a global temp table is that the table def is available to all users, but the data is private to each session? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-07-19 Thread Josh Berkus
On 07/17/2015 04:36 PM, Jim Nasby wrote: On 7/16/15 12:40 PM, Robert Haas wrote: They may well be 2-3 times as long. Why is that a negative? In my opinion, brevity makes things easier to read and understand. We also don't support multi-line GUCs, so if your configuration takes 140

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-07-19 Thread Simon Riggs
On 19 July 2015 at 21:16, Tom Lane t...@sss.pgh.pa.us wrote: Josh Berkus j...@agliodbs.com writes: On 07/17/2015 04:36 PM, Jim Nasby wrote: I'm guessing it'd be really ugly/hard to support at least this GUC being multi-line? Mind you, multi-line GUCs would be useful otherwise, but we

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-19 Thread Simon Riggs
On 19 July 2015 at 21:56, Tom Lane t...@sss.pgh.pa.us wrote: Since I'm not observing any movement Apologies if nothing visible was occurring. Petr and I had arranged to meet and discuss Mon/Tues. -- Simon Riggshttp://www.2ndQuadrant.com/ http://www.2ndquadrant.com/

Re: [HACKERS] Arguable RLS security bug, EvalPlanQual() paranoia

2015-07-19 Thread Peter Geoghegan
On Mon, Jun 1, 2015 at 12:29 AM, Peter Geoghegan p...@heroku.com wrote: If you're using another well known MVCC database system that has RLS, I imagine when this happens the attacker similarly waits on the conflicting (privileged) xact to finish (in my example in the patch, Bob's xact).

Re: [HACKERS] Memory prefetching while sequentially fetching from SortTuple array, tuplestore

2015-07-19 Thread Peter Geoghegan
On Thu, Jul 16, 2015 at 8:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: Meh. I don't like the assumption that non-GCC compilers will be smart enough to optimize away the useless-to-them if() tests this adds. Please refactor that so that there is exactly 0 new code when the intrinsic doesn't

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2015-07-19 Thread Peter Geoghegan
On Thu, Jul 2, 2015 at 2:58 PM, Peter Geoghegan p...@heroku.com wrote: As with row locking, with insertion, if there is a conflict, any outcome (UPDATE or INSERT) is then possible. Where are we on this? It would be nice to get this out of the way before a 9.5 beta is put out. Thanks -- Peter

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-19 Thread Pavel Stehule
2015-07-19 21:08 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: 2015-07-19 20:54 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: Hi I am sending updated version. It implements new long option --strict-names. If this option is used, then for any entered name (without any wildcard char)

Re: [HACKERS] Implementation of global temporary tables?

2015-07-19 Thread Pavel Stehule
2015-07-19 21:39 GMT+02:00 Josh Berkus j...@agliodbs.com: Pavel, All: Just to be clear, the idea of a global temp table is that the table def is available to all users, but the data is private to each session? yes. Pavel -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-19 Thread Pavel Stehule
Hi I am sending updated version. It implements new long option --strict-names. If this option is used, then for any entered name (without any wildcard char) must be found least one object. This option has not impact on patters (has wildcards chars). When this option is not used, then behave is

Re: [HACKERS] Bug in bttext_abbrev_convert()

2015-07-19 Thread Andres Freund
On 2015-07-19 12:35:46 -0400, Peter Eisentraut wrote: I would like to do that, but the current host has no more capacity and the hoster is complaining, so I need to look for a new hosting solution before I can expand what is being built. Perhaps this could be moved into a virtual machine

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-07-19 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: On 07/17/2015 04:36 PM, Jim Nasby wrote: I'm guessing it'd be really ugly/hard to support at least this GUC being multi-line? Mind you, multi-line GUCs would be useful otherwise, but we don't want to hinge this feature on making that work. I'm pretty

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-19 Thread Tom Lane
Since I'm not observing any movement on the key question of redesigning the tablesample method API, and I think that's something that's absolutely necessary to fix for 9.5, attached is an attempt to respecify the API. I haven't actually written any code, but I've written a tsmapi.h file modeled

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-19 Thread Noah Misch
On Wed, Jul 15, 2015 at 11:08:53AM +0200, Andres Freund wrote: On 2015-07-15 12:04:40 +0300, Alvaro Herrera wrote: Andres Freund wrote: One thing worth mentioning is that arguably the problem is caused by the fact that we're here emitting database level information in pg_dump, normally

[HACKERS] xlc 12.1 miscompiles 32-bit ginCompareItemPointers()

2015-07-19 Thread Noah Misch
In a 32-bit build, xlc 12.1 for AIX miscompiles three inline expansions of ginCompareItemPointers(), all in ginget.c (line numbers per commit 9aa6634): 739 Assert(!ItemPointerIsValid(entry-curItem) || 740ginCompareItemPointers(entry-curItem, advancePast) = 0); 847

Re: [HACKERS] xlc 12.1 miscompiles 32-bit ginCompareItemPointers()

2015-07-19 Thread Andres Freund
On July 19, 2015 9:50:33 PM GMT+02:00, Noah Misch n...@leadboat.com wrote: In a 32-bit build, xlc 12.1 for AIX miscompiles three inline expansions of ginCompareItemPointers(), all in ginget.c (line numbers per commit 9aa6634): 739Assert(!ItemPointerIsValid(entry-curItem) || 740

Re: [HACKERS] Relation extension scalability

2015-07-19 Thread Andres Freund
On 2015-07-19 11:28:25 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: So, to get to the actual meat: My goal was to essentially get rid of an exclusive lock over relation extension alltogether. I think I found a way to do that that addresses the concerns made in this

Re: [HACKERS] xlc 12.1 miscompiles 32-bit ginCompareItemPointers()

2015-07-19 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On July 19, 2015 9:50:33 PM GMT+02:00, Noah Misch n...@leadboat.com wrote: I propose to expand the gin_private.h #ifdef PG_USE_INLINE test to exclude xlc 32-bit configurations. The last 32-bit AIX kernel exited support on 2012-04-30. I vote to simply

Re: [HACKERS] Relation extension scalability

2015-07-19 Thread Tom Lane
Andres Freund and...@anarazel.de writes: So, to get to the actual meat: My goal was to essentially get rid of an exclusive lock over relation extension alltogether. I think I found a way to do that that addresses the concerns made in this thread. Thew new algorithm basically is: 1) Acquire

Re: [HACKERS] Relation extension scalability

2015-07-19 Thread Andres Freund
On 2015-07-19 11:56:47 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: On 2015-07-19 11:28:25 -0400, Tom Lane wrote: At this point session 1 will go and create page 44, won't it, and you just wasted a page. My local code now recognizes that case and uses the page. We

Re: [HACKERS] Bug in bttext_abbrev_convert()

2015-07-19 Thread Peter Eisentraut
On 7/6/15 3:52 PM, Alvaro Herrera wrote: Kevin Grittner wrote: Alvaro Herrera alvhe...@2ndquadrant.com wrote: Peter Geoghegan wrote: It would be nice to always have a html report from gcov always available on the internet. That would be something useful to automate, IMV.

Re: [HACKERS] LWLock deadlock and gdb advice

2015-07-19 Thread Jeff Janes
On Thu, Jul 16, 2015 at 12:03 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Wed, Jul 15, 2015 at 8:44 AM, Heikki Linnakangas hlinn...@iki.fi wrote: Both. Here's the patch. Previously, LWLockAcquireWithVar set the variable associated with the lock atomically with acquiring it. Before the

Re: [HACKERS] creating extension including dependencies

2015-07-19 Thread Michael Paquier
On Sat, Jul 18, 2015 at 8:00 AM, Petr Jelinek p...@2ndquadrant.com wrote: On 2015-07-15 06:07, Michael Paquier wrote: On Fri, Jul 10, 2015 at 11:28 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@anarazel.de writes: On July 10, 2015 4:16:59 PM GMT+02:00, Tom Lane

Re: [HACKERS] LWLock deadlock and gdb advice

2015-07-19 Thread Jeff Janes
On Wed, Jul 15, 2015 at 8:44 AM, Heikki Linnakangas hlinn...@iki.fi wrote: On 06/30/2015 11:24 PM, Andres Freund wrote: On 2015-06-30 22:19:02 +0300, Heikki Linnakangas wrote: Hm. Right. A recheck of the value after the queuing should be sufficient to fix? That's how we deal with the exact

Re: [HACKERS] optimizing vacuum truncation scans

2015-07-19 Thread Simon Riggs
On 16 July 2015 at 06:51, Haribabu Kommi kommi.harib...@gmail.com wrote: I marked the patch as ready for committer. The most recent results seem to indicate that the prefetch isn't worth pursuing, but the vm test is. Can someone repeat the perf tests on something larger so we can see, when/if

Re: [HACKERS] Parallel Seq Scan

2015-07-19 Thread Amit Kapila
On Fri, Jul 17, 2015 at 1:22 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Thu, Jul 16, 2015 at 1:10 PM, Amit Kapila amit.kapil...@gmail.com wrote: Thanks, I will fix this in next version of patch. I am posting in this thread as I am not sure, whether it needs a separate thread or

Re: [HACKERS] Implementation of global temporary tables?

2015-07-19 Thread Gavin Flower
On 20/07/15 15:00, Pavel Stehule wrote: 2015-07-19 21:39 GMT+02:00 Josh Berkus j...@agliodbs.com mailto:j...@agliodbs.com: Pavel, All: Just to be clear, the idea of a global temp table is that the table def is available to all users, but the data is private to each session?

Re: [HACKERS] Implementation of global temporary tables?

2015-07-19 Thread Pavel Stehule
2015-07-20 5:33 GMT+02:00 Gavin Flower gavinflo...@archidevsys.co.nz: On 20/07/15 15:00, Pavel Stehule wrote: 2015-07-19 21:39 GMT+02:00 Josh Berkus j...@agliodbs.com mailto: j...@agliodbs.com: Pavel, All: Just to be clear, the idea of a global temp table is that the table

Re: [HACKERS] Relation extension scalability

2015-07-19 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-07-19 11:28:25 -0400, Tom Lane wrote: At this point session 1 will go and create page 44, won't it, and you just wasted a page. My local code now recognizes that case and uses the page. We just need to do an PageIsNew(). Er, what? How can