[HACKERS] Transactions involving multiple postgres foreign servers

2015-01-01 Thread Ashutosh Bapat
Hi All, While looking at the patch for supporting inheritance on foreign tables, I noticed that if a transaction makes changes to more than two foreign servers the current implementation in postgres_fdw doesn't make sure that either all of them rollback or all of them commit their changes, IOW

Re: [HACKERS] add modulo (%) operator to pgbench

2015-01-01 Thread Fabien COELHO
I was about to go and look at this, but I had a problem when attempting to compile with MSVC. Thanks! Here is a v4 which includes your fix. -- Fabien.diff --git a/contrib/pgbench/.gitignore b/contrib/pgbench/.gitignore index 489a2d6..aae819e 100644 --- a/contrib/pgbench/.gitignore +++

Re: [HACKERS] Parallel Seq Scan

2015-01-01 Thread Amit Kapila
On Wed, Dec 31, 2014 at 9:46 PM, Thom Brown t...@linux.com wrote: Another issue (FYI, pgbench2 initialised with: pgbench -i -s 100 -F 10 pgbench2): ➤ psql://thom@[local]:5488/pgbench2 # explain (analyse, buffers, verbose) select distinct bid from pgbench_accounts; server closed the

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2015-01-01 Thread Andres Freund
On 2015-01-01 11:55:03 -0500, Robert Haas wrote: On Mon, Dec 29, 2014 at 6:48 PM, Andres Freund and...@2ndquadrant.com wrote: Andres reported the above 2x pgbench difference in February, but no action was taken as everyone felt there needed to be more performance testing, but it never

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2015-01-01 Thread Robert Haas
On Mon, Dec 29, 2014 at 6:48 PM, Andres Freund and...@2ndquadrant.com wrote: Andres reported the above 2x pgbench difference in February, but no action was taken as everyone felt there needed to be more performance testing, but it never happened: FWIW, I have no idea what exactly should be

Re: [HACKERS] add modulo (%) operator to pgbench

2015-01-01 Thread Fabien COELHO
Hello David, At the moment I feel the patch is a bit half done. I really think that since the gaussian and exponential stuff was added in commit ed802e7d, that this should now be changed so that we have functions like random(), erandom() and grandom() and the way to use this becomes: \set

Re: [HACKERS] add modulo (%) operator to pgbench

2015-01-01 Thread David Rowley
On 1 January 2015 at 21:23, Fabien COELHO coe...@cri.ensmp.fr wrote: I was about to go and look at this, but I had a problem when attempting to compile with MSVC. Thanks! Here is a v4 which includes your fix. Thank you. I've had a quick look at the patch as I'm quite interested in

Re: [HACKERS] Parallel Seq Scan

2015-01-01 Thread Robert Haas
On Thu, Jan 1, 2015 at 12:00 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Can we check the number of free bgworkers slots to set the max workers? The real solution here is that this patch can't throw an error if it's unable to obtain the desired number of background workers. It

Re: [HACKERS] Parallel Seq Scan

2015-01-01 Thread Fabrízio de Royes Mello
I think one thing we could do minimize the chance of such an error is set the value of parallel workers to be used for plan equal to max_worker_processes if parallel_seqscan_degree is greater than max_worker_processes. Even if we do this, still such an error can come if user has registered

Re: [HACKERS] Additional role attributes superuser review

2015-01-01 Thread Magnus Hagander
On Wed, Dec 31, 2014 at 4:23 PM, Stephen Frost sfr...@snowman.net wrote: * Magnus Hagander (mag...@hagander.net) wrote: On Wed, Dec 31, 2014 at 3:08 PM, Stephen Frost sfr...@snowman.net wrote: * Magnus Hagander (mag...@hagander.net) wrote: I think having it do exactly what pg_dump

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2015-01-01 Thread Bruce Momjian
On Thu, Jan 1, 2015 at 05:59:25PM +0100, Andres Freund wrote: That seems like a strange approach. I think it's pretty sensible to try to ensure that allocated blocks of shared memory have decent alignment, and we don't have enough of them for aligning on 64-byte boundaries (or even

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2015-01-01 Thread Bruce Momjian
On Thu, Jan 1, 2015 at 09:04:48PM +0100, Andres Freund wrote: On January 1, 2015 8:49:06 PM CET, Robert Haas robertmh...@gmail.com wrote: On Thu, Jan 1, 2015 at 11:59 AM, Andres Freund and...@2ndquadrant.com wrote: The problem is that just aligning the main allocation to some boundary

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2015-01-01 Thread Andres Freund
On January 1, 2015 8:49:06 PM CET, Robert Haas robertmh...@gmail.com wrote: On Thu, Jan 1, 2015 at 11:59 AM, Andres Freund and...@2ndquadrant.com wrote: The problem is that just aligning the main allocation to some boundary doesn't mean the hot part of the allocation is properly aligned. shmem.c

Re: [HACKERS] Misaligned BufferDescriptors causing major performance problems on AMD

2015-01-01 Thread Robert Haas
On Thu, Jan 1, 2015 at 11:59 AM, Andres Freund and...@2ndquadrant.com wrote: The problem is that just aligning the main allocation to some boundary doesn't mean the hot part of the allocation is properly aligned. shmem.c in fact can't really do much about that - so fully moving the

Re: [HACKERS] add modulo (%) operator to pgbench

2015-01-01 Thread Alvaro Herrera
David Rowley wrote: At the moment I feel the patch is a bit half done. I really think that since the gaussian and exponential stuff was added in commit ed802e7d, that this should now be changed so that we have functions like random(), erandom() and grandom() and the way to use this becomes:

[HACKERS] Problems with approach #2 to value locking (INSERT ... ON CONFLICT UPDATE/IGNORE patch)

2015-01-01 Thread Peter Geoghegan
I've been working on fixing the bugs that Jeff Janes found [1] with approach #2 to value locking [2]. Approach #1 was unaffected. I'm starting this new thread, to discuss these issues. Let's try and confine discussion of semantics and syntax to the main thread, since that has been what has mostly

Re: [HACKERS] orangutan seizes up during isolation-check

2015-01-01 Thread Noah Misch
On Wed, Dec 31, 2014 at 01:55:23PM -0500, Dave Cramer wrote: So at this point removing the --enable-nls from my config will solve the build problem. Everyone knows there is an issue so there is no point in continuing to have it fail. We hope all packagers will build with --enable-nls, so