Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Heikki Linnakangas
On 05.07.2011 00:42, Florian Pflug wrote: On Jul4, 2011, at 23:11 , Peter Geoghegan wrote: On 4 July 2011 17:36, Florian Pflug wrote: Btw, with the death-watch / life-sign / whatever infrastructure in place, shouldn't PostmasterIsAlive() be using that instead of getppid() / kill(0)? Hmm, may

Re: [HACKERS] %ENV warnings during builds

2011-07-04 Thread Brar Piening
schrieb Andrew Dunstan: Hmm, I missed that you had done this. Here are two replacement perl scripts I knocked up, but haven't yet tested. One of the things about them is that they remove knowledge of particular .l and .y files. and instead get the required invocation options from the relevant

Re: [HACKERS] Online base backup from the hot-standby

2011-07-04 Thread Fujii Masao
2011/7/4 Jun Ishiduka : > >> When the standby restarts after it crashes during recovery, it always >> checks whether recovery has reached the backup end location by >> using minRecoveryPoint even though the standby doesn't start from >> the backup. This looks odd. > > Certainly. > > But, in this ca

Re: [HACKERS] Cascade replication

2011-07-04 Thread Fujii Masao
On Mon, Jul 4, 2011 at 6:24 PM, Simon Riggs wrote: > On Tue, Jun 14, 2011 at 6:08 AM, Fujii Masao wrote: > >>> The standby must not accept replication connection from that standby itself. >>> Otherwise, since any new WAL data would not appear in that standby, >>> replication cannot advance any mo

Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Fujii Masao
On Tue, Jul 5, 2011 at 1:36 AM, Florian Pflug wrote: > On Jul4, 2011, at 17:53 , Heikki Linnakangas wrote: >>>       Under Linux, select() may report a socket file descriptor as "ready >>> for >>>       reading",  while nevertheless a subsequent read blocks.  This could >>> for >>>       example

Re: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-04 Thread Joseph Adams
Thanks for reviewing my patch! On Mon, Jul 4, 2011 at 7:10 AM, Bernd Helmle wrote: > +comment = 'data type for storing and manipulating JSON content' > > I'm not sure, if "manipulating" is a correct description. Maybe i missed it, > but i didn't see functions to manipulate JSON strings directly,

Re: [HACKERS] keepalives_* parameters usefullness

2011-07-04 Thread Fujii Masao
On Tue, Jul 5, 2011 at 4:00 AM, Jaime Casanova wrote: > Simon Riggs writes: >> There's a list of preconditions as to when these settings take effect, >> otherwise they are a no-op. >> > > do we know what those preconditions are? The keepalives don't work at least on linux when the connection is

Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Peter Geoghegan
On 4 July 2011 22:42, Florian Pflug wrote: > If we do expect such event, we should close the hole instead of asserting. > If we don't, then what's the point of the assert. You can say the same thing about any assertion. I'm not going to attempt to close the hole because I don't believe that there

Re: [HACKERS] Review of patch Bugfix for XPATH() if expression returns a scalar value

2011-07-04 Thread Florian Pflug
Hi Radosław, Do you still have objections, or did I manage to convince you? Also, aside from the question of whether to escape or not, did you find any issues with either the patch (like spurious whitespace, ...) or the code, or is the patch OK implementation-wise? best regards, Florian Pflug

Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Florian Pflug
On Jul4, 2011, at 23:11 , Peter Geoghegan wrote: > On 4 July 2011 17:36, Florian Pflug wrote: >> On Jul4, 2011, at 17:53 , Heikki Linnakangas wrote: Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a subsequent read b

Re: [HACKERS] %ENV warnings during builds

2011-07-04 Thread Andrew Dunstan
On 07/03/2011 05:14 PM, Brar Piening wrote: schrieb Magnus Hagander: I think you've stumbled on just about all the bits of the MSVC build system we haven't perlized. Maybe we should complete that task, and turn clean.bat, pgbison.bat and pgflex.bat into pure one-line wrappers. (It was done f

Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Peter Geoghegan
On 4 July 2011 16:53, Heikki Linnakangas wrote: > Ok, here's a new patch, addressing the issues Fujii raised, and with a bunch > of stylistic changes of my own. Also, I committed a patch to remove > silent_mode, so the fork_process() changes are now gone. I'm going to sleep > over this and review

Re: [HACKERS] Perl 5.8 requirement for compiling on windows?

2011-07-04 Thread Heikki Linnakangas
On 04.07.2011 19:40, Marios Vodas wrote: On 4/7/2011 7:33 μμ, Heikki Linnakangas wrote: On 04.07.2011 19:30, Marios Vodas wrote: I want to ask why is there a requirement for 5.8 version of Perl to compile under windows? In this page of the documentation http://www.postgresql.org/docs/9.0/static

Re: [HACKERS] non-superuser reserved connections? connection pools?

2011-07-04 Thread Michael Glaesemann
On Jul 4, 2011, at 10:09, Magnus Hagander wrote: > On Mon, Jul 4, 2011 at 00:01, Michael Glaesemann wrote: >> It would be nice to be able to set aside a few connections for >> non-superusers, such as stats-monitoring connections. There's often no >> reason to grant these users superuser privil

Re: [HACKERS] avoid including rel.h in execnodes.h

2011-07-04 Thread Alvaro Herrera
Excerpts from Tom Lane's message of vie jul 01 18:20:50 -0400 2011: > Alvaro Herrera writes: > > I also included rel.h in spi.h, because it was previously indirectly > > included via execnodes.h and with this patch it would no longer be, > > which is a problem because it'd cause external code to

Re: [HACKERS] [BUGS] BUG #6083: psql script line numbers incorrectly count \copy data

2011-07-04 Thread David Fetter
On Mon, Jul 04, 2011 at 12:02:12PM -0400, Tom Lane wrote: > "Steve Haslam" writes: > > ... Apparently, the data read from \copy is incrementing the > > script line number counter? > > Yeah, so it is. That is correct behavior for COPY FROM STDIN, but > not so much for copying from a separate file

Re: [HACKERS] keepalives_* parameters usefullness

2011-07-04 Thread Jaime Casanova
Simon Riggs writes: > On Mon, Jul 4, 2011 at 9:42 AM, Jaime Casanova wrote: > >> i even used getsockopt() to ensure TCP_KEEPIDLE was being setted and >> tried to set it myself with setsockopt() with the same results. > > There's a list of preconditions as to when these settings take effect, > ot

Re: [HACKERS] Crash dumps

2011-07-04 Thread Radosław Smogura
Tom Lane Monday 04 of July 2011 16:32:32 > Craig Ringer writes: > > Why not produce a tool that watches the datadir for core files and > > processes them? ... > > By and large, our attitude has been that Postgres shouldn't be crashing > often enough to make this sort of infrastructure worthwhile

Re: [HACKERS] Perl 5.8 requirement for compiling on windows?

2011-07-04 Thread Marios Vodas
Yes, or at least change it by adding "or later". It is confusing without it... Thank you for your response. On 4/7/2011 7:33 μμ, Heikki Linnakangas wrote: On 04.07.2011 19:30, Marios Vodas wrote: Hello, I want to ask why is there a requirement for 5.8 version of Perl to compile under window

Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Florian Pflug
On Jul4, 2011, at 17:53 , Heikki Linnakangas wrote: >> Under Linux, select() may report a socket file descriptor as "ready for >> reading", while nevertheless a subsequent read blocks. This could for >> example happen when data has arrived but upon examination has wrong >>

Re: [HACKERS] Perl 5.8 requirement for compiling on windows?

2011-07-04 Thread Heikki Linnakangas
On 04.07.2011 19:30, Marios Vodas wrote: Hello, I want to ask why is there a requirement for 5.8 version of Perl to compile under windows? In this page of the documentation http://www.postgresql.org/docs/9.0/static/install-windows-full.html#AEN23848it sais: "Note: version 5.8 is required". I was

[HACKERS] Perl 5.8 requirement for compiling on windows?

2011-07-04 Thread Marios Vodas
Hello, I want to ask why is there a requirement for 5.8 version of Perl to compile under windows? In this page of the documentation http://www.postgresql.org/docs/9.0/static/install-windows-full.html#AEN23848it sais: "Note: version 5.8 is required". I was able to compile PostgreSQL 9.0.4 using Act

Re: [HACKERS] [BUGS] BUG #6083: psql script line numbers incorrectly count \copy data

2011-07-04 Thread Tom Lane
"Steve Haslam" writes: > ... Apparently, the data read from \copy > is incrementing the script line number counter? Yeah, so it is. That is correct behavior for COPY FROM STDIN, but not so much for copying from a separate file. The attached patch seems like an appropriate fix. However, I'm uns

Re: [HACKERS] Latch implementation that wakes on postmaster death on both win32 and Unix

2011-07-04 Thread Heikki Linnakangas
Ok, here's a new patch, addressing the issues Fujii raised, and with a bunch of stylistic changes of my own. Also, I committed a patch to remove silent_mode, so the fork_process() changes are now gone. I'm going to sleep over this and review once again tomorrow, and commit if it still looks goo

[HACKERS] proper format for printing GetLastError()

2011-07-04 Thread Peter Eisentraut
About half of our code prints GetLastError() using %d after casting it to int (actually, about half of that half uses %i, another thing to sort out, perhaps), and the other half uses %lu without casting. I gather from online documentation that GetLastError() returns DWORD, which appears to be unsi

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Alvaro Herrera
Excerpts from Heikki Linnakangas's message of lun jul 04 09:14:11 -0400 2011: > On 04.07.2011 16:07, Peter Geoghegan wrote: > That error message is bogus anyway: > > > if (!found) > > ereport(ERROR, > > (errcode(ERRCODE_UNDEFINED_OBJECT), > > errmsg("c

Re: [HACKERS] Problem installing odbc and .Net drivers on Windows 7 64 Ultimate

2011-07-04 Thread Peter Geoghegan
On 4 July 2011 15:57, Michael Gould wrote: > I am getting the following error when I run the install from stackbuilder. > > Error trying to install file destination ${installdir} resolves to empty > value. > > > > Does anyone know what might be causing this and how I can fix it. This is the devel

[HACKERS] Problem installing odbc and .Net drivers on Windows 7 64 Ultimate

2011-07-04 Thread Michael Gould
I am getting the following error when I run the install from stackbuilder. Error trying to install file destination ${installdir} resolves to empty value.   Does anyone know what might be causing this and how I can fix it.   Best Regards Michael Gould

Re: [HACKERS] Crash dumps

2011-07-04 Thread Tom Lane
Craig Ringer writes: > Why not produce a tool that watches the datadir for core files and > processes them? ... By and large, our attitude has been that Postgres shouldn't be crashing often enough to make this sort of infrastructure worthwhile. Developer time spent on it would be far better spe

Re: [HACKERS] non-superuser reserved connections? connection pools?

2011-07-04 Thread Magnus Hagander
On Mon, Jul 4, 2011 at 00:01, Michael Glaesemann wrote: > It would be nice to be able to set aside a few connections for > non-superusers, such as stats-monitoring connections. There's often no reason > to grant these users superuser privileges (they're just observers, and > security-definer fu

Re: [HACKERS] Crash dumps

2011-07-04 Thread Radoslaw Smogura
Information if backend crashed should go fast to master, to kill others as fast as possible. This what i thought is to use socket urgent data, but this require to span small thread in master (i think oob data may not be processed in secure way). From one hand processing core dump may be good, b

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Heikki Linnakangas
On 04.07.2011 16:07, Peter Geoghegan wrote: On 4 July 2011 13:53, Magnus Hagander wrote: This code is no longer present in git head, *removed* by commit 426cafc. Not added by it. at least that's how I read the history... However, it still looks to me like we could get to that code with con=NUL

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Peter Geoghegan
On 4 July 2011 13:53, Magnus Hagander wrote: > This code is no longer present in git head, *removed* by commit > 426cafc. Not added by it. at least that's how I read the history... > > However, it still looks to me like we could get to that code with > con=NULL - if the while loop is never execute

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Magnus Hagander
On Sat, Jul 2, 2011 at 20:10, Michael Mueller wrote: > Hi folks, > > Sentry found this error last night, and it looks serious enough to > report.  The error was introduced in commit 426cafc.  Here's the code > in question, starting at line 2096: > >    if (!found) >    { >        con = NULL;     /

Re: [HACKERS] per-column generic option

2011-07-04 Thread Shigeru Hanada
(2011/07/04 10:17), Shigeru Hanada wrote: > (2011/07/03 18:50), Kohei KaiGai wrote: >> I checked the per-column generic option patch. >> Right now, I have nothing to comment on anymore. >> So, it should be reviewed by committers. > > Thanks for the review!. I would like to propose adding force_no

Re: [HACKERS] Crash dumps

2011-07-04 Thread Craig Ringer
On 4/07/2011 7:03 PM, Radosław Smogura wrote: Actually this, what I was thinking about was, to add dumping of GUC, etc. List of mappings came from when I tired to mmap PostgreSQL, and due to many of errors, which sometimes occurred in unexpected places, I was in need to add something that will b

Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-04 Thread Bernd Helmle
--On 18. Juni 2011 12:29:38 +0200 Bernd Helmle wrote: Similar problems occur with a couple other modules I tried (hstore, intarray). Hmm, works for me. Seems you have messed up your installation in some way (build against current -HEAD but running against a 9.1?). I'm going to review in th

Re: [HACKERS] Crash dumps

2011-07-04 Thread Radosław Smogura
On Mon, 04 Jul 2011 12:58:46 +0800, Craig Ringer wrote: On 15/06/2011 2:37 AM, Radosław Smogura wrote: Hello, Because, I work a little bit on streaming protocol and from time to time I have crashes. I want ask if you wont crash reporting (this is one of minors products from mmap playing) tho

Re: [HACKERS] Cascade replication

2011-07-04 Thread Simon Riggs
On Tue, Jun 14, 2011 at 6:08 AM, Fujii Masao wrote: >> The standby must not accept replication connection from that standby itself. >> Otherwise, since any new WAL data would not appear in that standby, >> replication cannot advance any more. As a safeguard against this, I >> introduced >> new I

Re: [HACKERS] flex on win64 - workaround for "flex: fatal internal error, exec failed"

2011-07-04 Thread Craig Ringer
On 4/07/2011 2:36 PM, Brar Piening wrote: As you might also want to use git for developing with postgres its possible that all you need is already in place. As I use msysgit my usual way of dealing with flex and bison dependencies is putting "$ENV{PATH}=$ENV{PATH} . ';C:\Program Files (x86)\Git

Re: [HACKERS] Online base backup from the hot-standby

2011-07-04 Thread Jun Ishiduka
> When the standby restarts after it crashes during recovery, it always > checks whether recovery has reached the backup end location by > using minRecoveryPoint even though the standby doesn't start from > the backup. This looks odd. Certainly. But, in this case, the state before recovery start

Re: [HACKERS] keepalives_* parameters usefullness

2011-07-04 Thread Simon Riggs
On Mon, Jul 4, 2011 at 9:42 AM, Jaime Casanova wrote: > i even used getsockopt() to ensure TCP_KEEPIDLE was being setted and > tried to set it myself with setsockopt() with the same results. There's a list of preconditions as to when these settings take effect, otherwise they are a no-op. --  

[HACKERS] keepalives_* parameters usefullness

2011-07-04 Thread Jaime Casanova
Hi, AFAIU TFM if i set keepalives_* parameters in a conninfo they set the internal counters to these values so if i execute: """ conn = PQconnectdb("host=192.168.204.10 keepalives=1 keepalives_idle=45 keepalives_interval=5 keepalives_count=5"); """ that means that the client's connection to t

Re: [HACKERS] Full GUID support

2011-07-04 Thread Michael Gould
Dave, This is wonderful news. Best Regards Michael Gould "Dave Page" wrote: > Should be in 9.0.5/9.1b3 > > On Sunday, July 3, 2011, Michael Gould > wrote: > > Does this look to be something that will surface around for 9.1 > > > > Sent from Samsung mobile > > > > Dave Page wrote: > > > >

[HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Michael Mueller
Hi folks, Sentry found this error last night, and it looks serious enough to report. The error was introduced in commit 426cafc. Here's the code in question, starting at line 2096: if (!found) { con = NULL; /* keep compiler quiet */ ereport(ERROR, (er