Re: [HACKERS] Inaccuracy in VACUUM's tuple count estimates

2014-06-08 Thread Amit Kapila
On Sat, Jun 7, 2014 at 1:28 AM, Andres Freund wrote: > > On 2014-06-06 15:44:25 -0400, Tom Lane wrote: > > I figured it'd be easy enough to get a better estimate by adding another > > counter to count just LIVE and INSERT_IN_PROGRESS tuples (thus effectively > > assuming that in-progress inserts a

Re: [HACKERS] "RETURNING PRIMARY KEY" syntax extension

2014-06-08 Thread Ian Barwick
On 09/06/14 14:47, David G Johnston wrote: Ian Barwick wrote Hi, The JDBC API provides the getGeneratedKeys() method as a way of retrieving primary key values without the need to explicitly specify the primary key column(s). This is a widely-used feature, however the implementation has signif

Re: [HACKERS] "RETURNING PRIMARY KEY" syntax extension

2014-06-08 Thread David G Johnston
David G Johnston wrote > > Ian Barwick wrote >> Hi, >> >> The JDBC API provides the getGeneratedKeys() method as a way of >> retrieving >> primary key values without the need to explicitly specify the primary key >> column(s). This is a widely-used feature, however the implementation has >> signi

Re: [HACKERS] "RETURNING PRIMARY KEY" syntax extension

2014-06-08 Thread David G Johnston
Ian Barwick wrote > Hi, > > The JDBC API provides the getGeneratedKeys() method as a way of retrieving > primary key values without the need to explicitly specify the primary key > column(s). This is a widely-used feature, however the implementation has > significant > performance drawbacks. > >

[HACKERS] "RETURNING PRIMARY KEY" syntax extension

2014-06-08 Thread Ian Barwick
Hi, The JDBC API provides the getGeneratedKeys() method as a way of retrieving primary key values without the need to explicitly specify the primary key column(s). This is a widely-used feature, however the implementation has significant performance drawbacks. Currently this feature is implemen

Re: [HACKERS] Scaling shared buffer eviction

2014-06-08 Thread Amit Kapila
On Sun, Jun 8, 2014 at 7:21 PM, Kevin Grittner wrote: > Amit Kapila wrote: > > > I have improved the patch by making following changes: > > a. Improved the bgwriter logic to log for xl_running_xacts info and > >removed the hibernate logic as bgwriter will now work only when > >there is s

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

2014-06-08 Thread Noah Misch
On Fri, May 23, 2014 at 10:10:23AM -0400, Alvaro Herrera wrote: > Sergey Muraviov wrote: > > I found some new bugs and fix them. > > And I had to make many changes. > > This version fixes some bugs I had noticed in expanded mode too. For > instance, > the original looked like this (five lines pl

Re: [HACKERS] updated emacs configuration

2014-06-08 Thread Noah Misch
On Wed, Aug 07, 2013 at 07:57:53AM -0400, Peter Eisentraut wrote: > On 7/2/13 8:42 PM, Peter Eisentraut wrote: > > Updated files with changes: > > > > - adjusted fill-column to 78, per Noah > > - added c-file-style, per Andrew > > - support both "postgresql" and "postgres" directory names > > - us

Re: [HACKERS] backup_label revisited

2014-06-08 Thread Noah Misch
On Wed, Jun 04, 2014 at 06:17:29PM +0100, Greg Stark wrote: > On Mon, Jun 2, 2014 at 2:10 PM, Fujii Masao wrote: > > What about the case where we restore the backup to another server and > > start the recovery? In this case, ISTM inode can be the same. No? > > Hm, I was about to comment that that

Re: [HACKERS] MinGW/Cygwin build snags

2014-06-08 Thread Noah Misch
On Sun, Jun 08, 2014 at 06:04:46PM -0400, Tom Lane wrote: > Noah Misch writes: > > Since src/makefiles/Makefile.win32 does not set BUILDING_DLL for src/port, > > PGDLLIMPORT is set improperly for code to be linked directly into the > > backend. > > Makefile.win32 does set BUILDING_DLL for src/com

[HACKERS] NUMA packaging and patch

2014-06-08 Thread Kevin Grittner
I ran into a situation where a machine with 4 NUMA memory nodes and 40 cores had performance problems due to NUMA.  The problems were worst right after they rebooted the OS and warmed the cache by running a script of queries to read all tables.  These were all run on a single connection.  As it tur

Re: [HACKERS] MinGW/Cygwin build snags

2014-06-08 Thread Tom Lane
Noah Misch writes: > First, when I tried to add an Assert() call to a file in src/port, a MinGW-w64 > build failed like this: > Creating library file: libpostgres.a > ../../src/port/libpgport_srv.a(fls_srv.o): In function `fls': > /home/nm/src/pg/mingw-postgresql/src/port/fls.c:63: undefined refe

[HACKERS] MinGW/Cygwin build snags

2014-06-08 Thread Noah Misch
First, when I tried to add an Assert() call to a file in src/port, a MinGW-w64 build failed like this: Creating library file: libpostgres.a ../../src/port/libpgport_srv.a(fls_srv.o): In function `fls': /home/nm/src/pg/mingw-postgresql/src/port/fls.c:63: undefined reference to `__imp_assert_enable

Re: [HACKERS] configure does not check for bison or flex

2014-06-08 Thread David G Johnston
Eric L wrote > I am installing postgresql from source on 64 bit Ubuntu 14.04 and when I > run the ./configure script, it is successful, but when I run make it fails > with an error: > > "ERROR: `flex' is missing on your system. It is needed to create the file > `bootscanner.c'. You can either ge

[HACKERS] configure does not check for bison or flex

2014-06-08 Thread Eric L
I am installing postgresql from source on 64 bit Ubuntu 14.04 and when I run the ./configure script, it is successful, but when I run make it fails with an error: "ERROR: `flex' is missing on your system. It is needed to create the file `bootscanner.c'. You can either get flex from a GNU mirr

Re: [HACKERS] Securing "make check" (CVE-2014-0067)

2014-06-08 Thread Noah Misch
On Sun, Mar 23, 2014 at 07:04:20PM -0400, Noah Misch wrote: > On Thu, Mar 06, 2014 at 11:52:22PM -0500, Noah Misch wrote: > > On Thu, Mar 06, 2014 at 12:44:34PM -0500, Tom Lane wrote: > > > I'm inclined to suggest that we should put the socket under $CWD by > > > default, but provide some way for t

Re: [HACKERS] Scaling shared buffer eviction

2014-06-08 Thread Kevin Grittner
Amit Kapila wrote: > I have improved the patch  by making following changes: > a. Improved the bgwriter logic to log for xl_running_xacts info and >    removed the hibernate logic as bgwriter will now work only when >    there is scarcity of buffer's in free list. Basic idea is when the >    numb

[HACKERS] Allowing NOT IN to use ANTI joins

2014-06-08 Thread David Rowley
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 values returned by a subquery in the IN clause could have NULLs. A simple example of this (without a subquery) is: select 1 where 3 not in (1, 2, null);

Re: [HACKERS] Proposing pg_hibernate

2014-06-08 Thread Amit Kapila
On Fri, Jun 6, 2014 at 5:31 PM, Gurjeet Singh wrote: > On Thu, Jun 5, 2014 at 11:32 PM, Amit Kapila wrote: > > Buffer saver process itself can crash while saving or restoring > > buffers. > > True. That may lead to partial list of buffers being saved. And the > code in Reader process tries hard