Re: [HACKERS] [bug fix] connection service file doesn't take effect with ECPG apps

2013-12-27 Thread MauMau
From: "Michael Meskes" On Tue, Dec 17, 2013 at 09:26:49PM +0900, MauMau wrote: [Problem] The ECPG app runs the statement: EXEC SQL CONNECT TO 'tcp:postgresql://?service=my_service'; ... ECPGconnect() parses the URI and produces an empty host name. It passes an empty string as the value for "h

[HACKERS] [PATCH] work_mem calculation possible overflow

2013-12-27 Thread David Rowley
I was just looking through a few of the warnings flagged up by PVS Studio. I found some warnings around some calculations that were doing work_mem * 1024L and comparing that to a double. On windows 64 sizeof(long) is 4 bytes. Currently work_mem's maximum value is INT_MAX / 1024, so this should not

Re: [HACKERS] preserving forensic information when we freeze

2013-12-27 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Dec 27, 2013 at 6:15 AM, Stephen Frost wrote: > > For my 2c, I tend to agree w/ Andres on this one. I like the *idea* of > > having a function instead, but, practically, it doesn't really work. > > Perhaps if the 'function' approach

Re: [HACKERS] [bug fix] ECPG app crashes due to SIGBUS on SPARC Solaris

2013-12-27 Thread MauMau
From: "Michael Meskes" What happens to the regression test suite on your system? There are test cases that access a descriptor in a similar way I think. OK, I'll run the ECPG regression test on Solaris without the patch. Please wait until Jan 6 2014 or so, because we've just entered new yea

Re: [HACKERS] [BUGS] BUG #8676: Bug Money JSON

2013-12-27 Thread Andrew Dunstan
On 12/26/2013 01:17 PM, Andrew Dunstan wrote: On 12/17/2013 11:16 AM, Andrew Dunstan wrote: On 12/17/2013 10:31 AM, Tom Lane wrote: Andrew Dunstan writes: On Wed, Dec 11, 2013 at 02:30:04PM +, em...@andersonloyola.com.br wrote: postgres=# SELECT to_json(a) FROM (VALUES(1000::money)) a

Re: [HACKERS] [BUG FIX] Version number expressed in octal form by mistake

2013-12-27 Thread Kevin Grittner
Kevin Grittner wrote: > Joel Jacobson wrote: > >> As reported by Andrey Karpov in his article >> http://www.viva64.com/en/b/0227/ >> the version number is expressed in octal form 070100 should be >> changed to 70100. >> >> Attached patch fixes the reported issue. > > This is a bug, but it's not c

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-12-27 Thread Peter Geoghegan
On Fri, Dec 27, 2013 at 12:57 AM, Andres Freund wrote: > You know what. I don't particularly feel the need to be a reviewer of > this patch. I comment because there didn't seem enough comments on some > parts and because I see some things as problematic. If you don't want > those comments, ok. No

Re: [HACKERS] preserving forensic information when we freeze

2013-12-27 Thread Robert Haas
On Fri, Dec 27, 2013 at 6:15 AM, Stephen Frost wrote: > * Andres Freund (and...@2ndquadrant.com) wrote: >> On 2013-12-26 15:25:41 -0800, Robert Haas wrote: >> > I dunno, I just have an uneasy feeling about it. I guess if >> > everyone's happy to add pg_infomask and pg_infomask2 as new system >> >

Re: [HACKERS] [BUG FIX] Version number expressed in octal form by mistake

2013-12-27 Thread Kevin Grittner
Joel Jacobson wrote: > As reported by Andrey Karpov in his article > http://www.viva64.com/en/b/0227/ > the version number is expressed in octal form 070100 should be > changed to 70100. > > Attached patch fixes the reported issue. This is a bug, but it's not clear what the correct patch should

Re: [HACKERS] [BUGFIX] Typos when using the memcmp() function.

2013-12-27 Thread Kevin Grittner
Joel Jacobson wrote: > As reported by Andrey Karpov in his article > http://www.viva64.com/en/b/0227/ > a parenthesis has been misplaced. > > Attached patch fixes the problem. Applied to all supported branches.  Thanks! -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise Postgr

Re: [HACKERS] Question about Lockhart's book

2013-12-27 Thread Peter Eisentraut
On 12/27/13, 11:14 AM, Christian Convey wrote: > Thanks for your response. Sometimes overall software architectures stay > (mostly) unchanged for a long time, and so I figured that's possibly the > case for Postgresql as well. But I didn't know, which is why I asked. That book is actually snaps

Re: [HACKERS] [PATCH] SQL assertions prototype

2013-12-27 Thread David Fetter
On Mon, Nov 25, 2013 at 12:10:22PM -0800, Kevin Grittner wrote: > David Fetter wrote: > > On Mon, Nov 25, 2013 at 11:04:23AM -0800, Kevin Grittner wrote: > > >> As soon as we are out of this CF, I am planning to write code to > >> capture deltas and fire functions to process them "eagerly" > >> (

Re: [HACKERS] [BUGFIX] Typos when using the memcmp() function.

2013-12-27 Thread Kevin Grittner
Joel Jacobson wrote: > As reported by Andrey Karpov in his article > http://www.viva64.com/en/b/0227/ > a parenthesis has been misplaced. > > Attached patch fixes the problem. That sure looks like a bug to me.  It exists in all supported branches.  I can get this one. -- Kevin Grittner EDB: htt

Re: [HACKERS] Question about Lockhart's book

2013-12-27 Thread Christian Convey
Thanks very much Josh. Those sound like great ideas - I'll try to give them a shot. On Fri, Dec 27, 2013 at 1:52 PM, Josh Berkus wrote: > On 12/27/2013 08:14 AM, Christian Convey wrote: > > Hi Andrew, > > > > Thanks for your response. Sometimes overall software architectures stay > > (mostly)

Re: [HACKERS] [COMMITTERS] pgsql: Upgrade to Autoconf 2.69

2013-12-27 Thread Alvaro Herrera
Andres Freund wrote: > Hi, > > On 2013-12-24 12:58:04 -0300, Alvaro Herrera wrote: > > > Shortly after this patch was committed, buildfarm member locust (running > > > Mac OS X 10.5 apparently) started failing the pg_upgrade check: > > > > > > command: > > > "/Users/pgbuildfarm/Documents/workdir

Re: [HACKERS] Question about Lockhart's book

2013-12-27 Thread Josh Berkus
On 12/27/2013 08:14 AM, Christian Convey wrote: > Hi Andrew, > > Thanks for your response. Sometimes overall software architectures stay > (mostly) unchanged for a long time, and so I figured that's possibly the > case for Postgresql as well. But I didn't know, which is why I asked. Some things

[HACKERS] truncating pg_multixact/members

2013-12-27 Thread Alvaro Herrera
I started looking at bug #8673 some days ago, and I identified three separate issues that need fixing: 1. slru.c doesn't consider file names longer than 4 hexadecimal chars. 2. pg_multixact/members truncation requires more intelligence to avoid removing files that are still needed. Right now we

Re: [HACKERS] Happy new year from viva64

2013-12-27 Thread Stefan Kaltenbrunner
On 12/27/2013 01:27 PM, Alexander Korotkov wrote: > Hackers, > > I believe many of us have seen report of checking PostgreSQL with > PVS-Studio. > http://www.viva64.com/en/b/0227/ > Me and Oleg Bartunov got license key for PVS-Studio. Thanks Viva64 for it. > I've just run PVS-Studio against Postgr

Re: [HACKERS] Question about Lockhart's book

2013-12-27 Thread Christian Convey
Hi Andrew, Thanks for your response. Sometimes overall software architectures stay (mostly) unchanged for a long time, and so I figured that's possibly the case for Postgresql as well. But I didn't know, which is why I asked. Kind regards, Christian On Fri, Dec 27, 2013 at 11:11 AM, Andrew Du

Re: [HACKERS] Question about Lockhart's book

2013-12-27 Thread Andrew Dunstan
On 12/27/2013 10:55 AM, Christian Convey wrote: Hi guys, I'm starting to poke around the internals of Postgres. Does anyone know the extent to which Thomas Lockhart's book, "PostgresSQL Programmer's Guide" is accurate with respect to the current state of the code base? Umm, that book w

[HACKERS] Question about Lockhart's book

2013-12-27 Thread Christian Convey
Hi guys, I'm starting to poke around the internals of Postgres. Does anyone know the extent to which Thomas Lockhart's book, "PostgresSQL Programmer's Guide" is accurate with respect to the current state of the code base? Thanks, Christian

Re: [HACKERS] A GIN index internals question

2013-12-27 Thread Andreas Karlsson
On 12/27/2013 08:22 AM, Amit Langote wrote: Hi, Can a posting item / ItemPointer belonging to posting list/tree of some entry "stored" in a GIN index be "lossy"? If yes, under what circumstances would such a lossy ItemPointer be included for the entry? I got an impression that there may be some

Re: [HACKERS] preserving forensic information when we freeze

2013-12-27 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: > On 2013-12-26 15:25:41 -0800, Robert Haas wrote: > > I dunno, I just have an uneasy feeling about it. I guess if > > everyone's happy to add pg_infomask and pg_infomask2 as new system > > columns, we could go that route. For my part, I think that

Re: [HACKERS] [bug fix] ECPG app crashes due to SIGBUS on SPARC Solaris

2013-12-27 Thread Michael Meskes
On Tue, Dec 24, 2013 at 09:55:45PM +0900, MauMau wrote: > The attached ECPG app crashes and dumps core with SIGBUS on Solaris > for SPARC. I used Solaris 10, and Oracle Studio to compile the app > for 64-bit build. The same app completes successfully on Linux and > Windows for x86/x564. What hap

Re: [HACKERS] [bug fix] connection service file doesn't take effect with ECPG apps

2013-12-27 Thread Michael Meskes
On Tue, Dec 17, 2013 at 09:26:49PM +0900, MauMau wrote: > [Problem] > The ECPG app runs the statement: > > EXEC SQL CONNECT TO 'tcp:postgresql://?service=my_service'; > ... > ECPGconnect() parses the URI and produces an empty host name. It > passes an empty string as the value for "host" connecti

Re: [HACKERS] trailing comment ghost-timing

2013-12-27 Thread Andres Freund
On 2013-12-24 12:27:59 -0500, Tom Lane wrote: > Andres Freund writes: > >> This is inconsistent, IMO. I think if we were to fix things so that > >> leading block comments were dropped the same way -- comments are, that > >> would also take care of the behavior complained of in this thread. > >> T

Re: [HACKERS] preserving forensic information when we freeze

2013-12-27 Thread Andres Freund
On 2013-12-26 15:25:41 -0800, Robert Haas wrote: > On Tue, Dec 24, 2013 at 6:22 AM, Andres Freund wrote: > > If system columns don't have an overhead anymore, I fail to see the > > advantage that functions have over simply accessing parts of the row in > > the normal way parts of rows are accessed

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-12-27 Thread Andres Freund
Hi, On 2013-12-25 15:27:36 -0800, Peter Geoghegan wrote: > Uh, I knew that it was a problem all along. While I explored ways of > ameliorating the problem, I specifically stated that we should discuss > the subsystems interactions/design, which you were far too quick to > dismiss. Aha? > The ove