Re: [HACKERS] spinlocks on HP-UX

2011-10-18 Thread Pavan Deolasee
On Tue, Oct 18, 2011 at 10:04 AM, Robert Haas robertmh...@gmail.com wrote: Hmm, so you added the non-locked test in TAS()?  Did you try adding it just to TAS_SPIN()?  On Itanium, I found that it was slightly better to do it only in TAS_SPIN() - i.e. in the contended case. Would it be a good

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

2011-10-18 Thread Jun Ishiduka
+ /* + * The backend writes WAL of FPW at checkpoint. However, The backend do + * not need to write WAL of FPW at checkpoint shutdown because it + * performs when startup finishes. + */ +

Re: [HACKERS] BUG or strange behaviour of update on primary key

2011-10-18 Thread desmodemone
Hi there, I could workaround the behavior with deferred constraint, and it's ok, but as I show, I have different behavior for constraint with the same definition in two rdbms and Postgresql depends on the physical order of row (with the same definition of constraint NOT DEFERRABLE

Re: [HACKERS] WIP: Collecting statistics on CSV file data

2011-10-18 Thread Leonardo Francalanci
New API AnalyzeForeignTable I didn't look at the patch, but I'm using CSV foreign tables with named pipes to get near-realtime KPI calculated by postgresql. Of course, pipes can be read just once, so I wouldn't want an automatic analyze of foreign tables... -- Sent via pgsql-hackers mailing

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Jeff Davis
On Sun, 2011-10-16 at 16:00 -0400, Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: On master, I see a minor test error (at least on my machine) as well as a diff. Patch attached. Hmm, yeah, I forgot to fix this regression test when I added that DETAIL line. However, I don't see the

[HACKERS] new compiler warnings

2011-10-18 Thread Jeff Davis
I'm not sure if these can/should be fixed or not, but here are the compiler warnings I'm getting on gcc and clang on ubuntu 11.10 with -O2. The gcc ones are mostly new. GCC $ gcc --version gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 Copyright (C) 2011

Re: [HACKERS] HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts

2011-10-18 Thread Simon Riggs
On Tue, Oct 18, 2011 at 3:14 AM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: I'll add an assert to check this and a comment to explain. This means I'll have to hack it up further in my FK locks patch.  No problem with that. OK, I'll hold back to avoid interfering with your patch. --  

Re: [HACKERS] BUG or strange behaviour of update on primary key

2011-10-18 Thread desmodemone
2011/10/18 Robert Haas robertmh...@gmail.com On Mon, Oct 17, 2011 at 7:30 PM, desmodemone desmodem...@gmail.com wrote: Seems an Oracle bug not Postgresql one! I don't think it's a bug for it to work. It'd probably work in PostgreSQL too, if you inserted (2) first and then (1). It's just

[HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Thom Brown
Hi, I noticed that if the hba_file setting in the config is uncommented and set to a directory instead of the full path to the file, no error occurs when the service starts. For example: hba_file = '/home/thom/Development/data' The problem with this is you cannot get into the database as it

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Sun, 2011-10-16 at 16:00 -0400, Tom Lane wrote: Hmm, yeah, I forgot to fix this regression test when I added that DETAIL line. However, I don't see the need for fooling with the lc_time value? Here is the diff that I'm seeing on master right now with:

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 01:07 -0700, Jeff Davis wrote: On Sun, 2011-10-16 at 16:00 -0400, Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: On master, I see a minor test error (at least on my machine) as well as a diff. Patch attached. Hmm, yeah, I forgot to fix this regression test

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 01:00 -0700, Jeff Davis wrote: I'm not sure if these can/should be fixed or not, but here are the compiler warnings I'm getting on gcc and clang on ubuntu 11.10 with -O2. The gcc ones are mostly new. They are expected with gcc 4.6. There isn't anything we can do about

Re: [HACKERS] spinlocks on HP-UX

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 2:20 AM, Pavan Deolasee pavan.deola...@gmail.com wrote: On Tue, Oct 18, 2011 at 10:04 AM, Robert Haas robertmh...@gmail.com wrote: Hmm, so you added the non-locked test in TAS()?  Did you try adding it just to TAS_SPIN()?  On Itanium, I found that it was slightly better

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Jeff Davis wrote: I'm not sure if these can/should be fixed or not, but here are the compiler warnings I'm getting on gcc and clang on ubuntu 11.10 with -O2. elog.c: In function ‘write_pipe_chunks’: elog.c:2479:8: warning: ignoring return value of ‘write’, declared with attribute

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 9:03 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Jeff Davis  wrote: I'm not sure if these can/should be fixed or not, but here are the compiler warnings I'm getting on gcc and clang on ubuntu 11.10 with -O2. elog.c: In function ‘write_pipe_chunks’:

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Andrew Dunstan
On 10/18/2011 09:03 AM, Kevin Grittner wrote: Jeff Davis wrote: I'm not sure if these can/should be fixed or not, but here are the compiler warnings I'm getting on gcc and clang on ubuntu 11.10 with -O2. elog.c: In function ‘write_pipe_chunks’: elog.c:2479:8: warning: ignoring return

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: It is a pity we can't just tell the compiler to turn off the warning in a particular case. I haven't tested, but won't an explicit cast to void silence the warning? (void) fwrite(...); There are places, notably the calls in elog.c, where

Re: [HACKERS] [v9.2] make_greater_string() does not return a string in some cases

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 12:11 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Oct 17, 2011 at 11:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: http://www.faqs.org/rfcs/rfc3629.html I'm still confused.  The input string is already known to be valid UTF-8,

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 01:00 -0700, Jeff Davis wrote: I'm not sure if these can/should be fixed or not, but here are the compiler warnings I'm getting on gcc and clang on ubuntu 11.10 with -O2. The gcc ones are mostly new. They are expected with gcc

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I think that what Kevin was on about was something else entirely, namely whether we need to retry writes to disk. I would phrase it that we need to *continue* a write to disk if the OS chooses to write a portion of it and return to the caller with the

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Magnus Hagander
On Wednesday, October 12, 2011, Bruce Momjian wrote: Magnus Hagander wrote: I looked over this issue and I don't thinking having pg_ctl restart fall back to 'start' is a good solution. ?I am concerned about cases where we start a different server without shutting down the old server,

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 09:32 -0400, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: It is a pity we can't just tell the compiler to turn off the warning in a particular case. I haven't tested, but won't an explicit cast to void silence the warning? (void) fwrite(...);

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 10:06 AM, Peter Eisentraut pete...@gmx.net wrote: No, I believe we are OK everywhere else.  We are only ignoring the result in cases where we are trying to report errors in the first place. The relevant code is: while (len PIPE_MAX_PAYLOAD) {

Re: [HACKERS] [BUG] SSPI authentication fails on Windows when server parameter is localhost or domain name

2011-10-18 Thread Ahmed Shinwari
Hi, My apologies for a very late reply. I agree the fix you applied is a better one. I have verified the fix by testing the 'postgresql-9.1.1-1-windows-x64' installer. Thank you. On Thu, Jul 14, 2011 at 7:23 PM, Magnus Hagander mag...@hagander.netwrote: On Wed, Jun 15, 2011 at 10:53, Ahmed

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Which it seems to me we could change by doing rc = write(). Then if rc = 0, we bail out. If not, we add and subtract rc, rather than PIPE_MAX_PAYLOAD. Something along the general lines of this?:

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Kevin Grittner kevin.gritt...@wicourts.gov wrote: http://archives.postgresql.org/pgsql-hackers/2011-02/msg01719.php Although, it being a quick example of the general idea, I have an obvious bug there -- the write location would have to be buffer + t. I think Noah might have also posted some

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Simon Riggs
On Wed, Oct 5, 2011 at 8:02 AM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Oct 5, 2011 at 5:10 AM, Dickson S. Guedes lis...@guedesoft.net wrote: Ah ok! I started reviewing the v4 patch version, this is my comments: ... Well, all the tests was running with the default postgresql.conf

Re: [HACKERS] synchronized snapshots

2011-10-18 Thread Simon Riggs
On Mon, Oct 3, 2011 at 7:09 AM, Marko Tiikkaja marko.tiikk...@2ndquadrant.com wrote: On 2011-09-28 15:25, Joachim Wieland wrote: Yes, that's the desired behaviour, the patch add this paragraph to the documentation already: I can't believe I missed that.  My apologies. On 2011-09-29 05:16,

Re: [HACKERS] [v9.2] Object access hooks with arguments support (v1)

2011-10-18 Thread Kohei KaiGai
2011/10/18 Robert Haas robertmh...@gmail.com: On Thu, Oct 13, 2011 at 6:48 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote:    struct ObjectAccessInfoData {        ObjectAccessType   oa_type;        ObjectAddress         oa_address;        union {            struct {                HeapTuple    

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Fujii Masao
On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander mag...@hagander.net wrote: Ok, fixed and applied. You seem to have forgot to change protocol.sgml. Patch attached. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center protocol_sgml_v1.patch

Re: [HACKERS] [v9.2] Object access hooks with arguments support (v1)

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 11:25 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: For example, I hope sepgsql to perform as follows when user create a new table. - It computes a default security label that needs Oid of the namespace. - It checks db_table:{create} permission on the security label

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Fujii Masao
On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander mag...@hagander.net wrote: Ok, fixed and applied. You seem to have forgot to change protocol.sgml. Patch attached. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center protocol_sgml_v1.patch

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 10:06 AM, Peter Eisentraut pete...@gmx.net wrote: No, I believe we are OK everywhere else.  We are only ignoring the result in cases where we are trying to report errors in the first place. The relevant code is: while

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: And it would break the code. The whole point here is that the message must be sent indivisibly. If the new code splits the message, it would previously have been truncated. Is that less broken? -Kevin -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 9:18 AM, Simon Riggs si...@2ndquadrant.com wrote: Any reason or objection to committing this patch? Not on my end, though I haven't reviewed it in detail. One minor note - I was mildly surprised to see that you moved this to the checkpointer rather than leaving it in the

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Fujii Masao
On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander mag...@hagander.net wrote: Ok, fixed and applied. You seem to have forgot to change protocol.sgml. Patch attached. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center protocol_sgml_v1.patch

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Fujii Masao
On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander mag...@hagander.net wrote: Ok, fixed and applied. You seem to have forgot to change protocol.sgml. Patch attached. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center protocol_sgml_v1.patch

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 12:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 10:06 AM, Peter Eisentraut pete...@gmx.net wrote: No, I believe we are OK everywhere else.  We are only ignoring the result in cases where we are trying to

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Simon Riggs
On Tue, Oct 18, 2011 at 5:39 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Oct 18, 2011 at 9:18 AM, Simon Riggs si...@2ndquadrant.com wrote: Any reason or objection to committing this patch? Not on my end, though I haven't reviewed it in detail.  One minor note - I was mildly surprised

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 12:53 PM, Simon Riggs si...@2ndquadrant.com wrote: On Tue, Oct 18, 2011 at 5:39 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Oct 18, 2011 at 9:18 AM, Simon Riggs si...@2ndquadrant.com wrote: Any reason or objection to committing this patch? Not on my end,

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 12:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: And it would break the code.  The whole point here is that the message must be sent indivisibly. How is that different than the chunking that the while loop is already doing? The

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Fujii Masao
Oh, sorry for repeating the same posts. Gmail seems to have not worked fine... :( On Wed, Oct 19, 2011 at 1:24 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander mag...@hagander.net wrote: Ok, fixed and applied. You seem to have forgot to change

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 1:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 12:26 PM, Tom Lane t...@sss.pgh.pa.us wrote: And it would break the code.  The whole point here is that the message must be sent indivisibly. How is that

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Tom Lane t...@sss.pgh.pa.us wrote: I think that what Kevin was on about was something else entirely, namely whether we need to retry writes to disk. I would phrase it that we need to *continue* a write to disk if the OS chooses to write a

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 09:36 -0400, Tom Lane wrote: But some of the remaining -Waddress warnings are not so painless to get rid of. Ultimately we might have to add -Wno-address to the default CFLAGS. Here is the bug report to gcc on this issue: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48778

Re: [HACKERS] synchronized snapshots

2011-10-18 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Oct 3, 2011 at 7:09 AM, Marko Tiikkaja Thanks, this one looks good to me.  Going to mark this patch as ready for committer. I don't see any tests with this patch, so I personally won't be the committer on this just yet. I've already taken it

Re: [HACKERS] [v9.2] Object access hooks with arguments support (v1)

2011-10-18 Thread Kohei KaiGai
2011/10/18 Robert Haas robertmh...@gmail.com: On Tue, Oct 18, 2011 at 11:25 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: For example, I hope sepgsql to perform as follows when user create a new table. - It computes a default security label that needs Oid of the namespace. - It checks

Re: [HACKERS] synchronized snapshots

2011-10-18 Thread Simon Riggs
On Tue, Oct 18, 2011 at 6:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm also concerned that we are adding this to the BEGIN statement as the only option. Huh?  The last version of the patch has it only as SET TRANSACTION SNAPSHOT, which I think is the right way. Sorry Tom, didn't see your

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 1:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: The chunks are sent indivisibly, because they are less than the pipe buffer size.  Read the pipe man page.  It's guaranteed that the write will either succeed or fail as a whole, not

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Andrew Dunstan
On 10/18/2011 01:35 PM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 1:01 PM, Tom Lanet...@sss.pgh.pa.us wrote: The chunks are sent indivisibly, because they are less than the pipe buffer size. Read the pipe man page. It's guaranteed that the write

Re: [HACKERS] [v9.2] Object access hooks with arguments support (v1)

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 1:23 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: If you are suggesting DAC and MAC permissions should be checked on the same place like as we already doing at ExecCheckRTPerms(), I'd like to agree with the suggestion, rather than all the checks within

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte. Note the last in particular. Short writes are specifically disallowed on pipes. OK, that's pretty definitive. I

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Andrew Dunstan and...@dunslane.net wrote: My dim recollection is that Tom and I and maybe some others did tests on a bunch of platforms at the time we introduced the protocol to make sure it did work this way, since it's crucial to making sure we don't get interleaved log lines. Testing is

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 01:07 -0700, Jeff Davis wrote: If I qualify it as tr_TR.UTF-8 it works. Perhaps I have something misconfigured on my system (Ubuntu 11.10)? I just installed: language-pack-de language-pack-tr language-pack-sv in an attempt to

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 15:21 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 01:07 -0700, Jeff Davis wrote: If I qualify it as tr_TR.UTF-8 it works. Perhaps I have something misconfigured on my system (Ubuntu 11.10)? I just installed: language-pack-de

Re: [HACKERS] termination of backend waiting for sync rep generates a junk log message

2011-10-18 Thread Robert Haas
On Mon, Oct 17, 2011 at 6:53 AM, Fujii Masao masao.fu...@gmail.com wrote: WARNING:  canceling the wait for synchronous replication and terminating connection due to administrator command DETAIL:  The transaction has already committed locally, but might not have been replicated to the standby.

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 3:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andrew Dunstan and...@dunslane.net wrote: My dim recollection is that Tom and I and maybe some others did tests on a bunch of platforms at the time we introduced the protocol to make sure it did work this way,

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Unfortunately, whether Tom's right or not, we still don't have a solution to the compiler warning. I don't actually see that warning on my Fedora 15 machine, with gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) What are the people who do see

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 15:43 -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: Unfortunately, whether Tom's right or not, we still don't have a solution to the compiler warning. I don't actually see that warning on my Fedora 15 machine, with gcc version 4.6.1 20110908

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: What are the people who do see it using? Currently: gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 on Linux version 2.6.38-11-generic (buildd@allspice) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) ) #50-Ubuntu SMP Mon Sep 12 21:17:25 UTC 2011 I've

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Unfortunately, whether Tom's right or not, we still don't have a solution to the compiler warning. Would it be too weird to do something like this for each?: diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 15:43 -0400, Tom Lane wrote: I don't actually see that warning on my Fedora 15 machine, with gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) You get the unused return value warnings with -D_FORTIFY_SOURCE=2, which has been the

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 4:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 15:43 -0400, Tom Lane wrote: I don't actually see that warning on my Fedora 15 machine, with gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) You get the

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Would it be too weird to do something like this for each?: - write(fileno(stderr), line, len); + rc = write(fileno(stderr), line, len); + if (rc = 0 rc != len) + { + Assert(false); + return; +

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Heikki Linnakangas
On 18.10.2011 23:28, Tom Lane wrote: Kevin Grittnerkevin.gritt...@wicourts.gov writes: Would it be too weird to do something like this for each?: - write(fileno(stderr), line, len); + rc = write(fileno(stderr), line, len); + if (rc= 0 rc != len) + { +

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I don't think the assert is a good idea. If it ever did happen, that would promote the problem from corrupted data in the log to database crash. ... on a --enable-cassert build. If we think it's even remotely possible that it could happen, maybe we

Re: [HACKERS] termination of backend waiting for sync rep generates a junk log message

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Oct 17, 2011 at 6:53 AM, Fujii Masao masao.fu...@gmail.com wrote: The simple fix is to change InteractiveBackend() so that it calls CHECK_FOR_INTERRUPTS() before it outputs backend . Thought? I'm tempted to say we should do that in

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Tom Lane t...@sss.pgh.pa.us wrote: I don't think the assert is a good idea. If it ever did happen, that would promote the problem from corrupted data in the log to database crash. ... on a --enable-cassert build. If we think it's even

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: As far as getting rid of the compiler warning is concerned, I find that the rc = write(...); (void) rc; suggestion works for me (gcc 4.6.1). That silences the warning on my machine, too. -Kevin -- Sent via pgsql-hackers mailing list

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
I wrote: I think a large fraction of the -Waddress warnings are coming from this line in the heap_getattr macro: AssertMacro((tup) != NULL), \ Seems to me we could just lose that test and be no worse off, since the macro is surely gonna dump core anyway on a null pointer. Actually, all

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 18.10.2011 23:28, Tom Lane wrote: I don't think the assert is a good idea. If it ever did happen, that would promote the problem from corrupted data in the log to database crash. I believe the idea is that if there's a

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Tom Lane
Thom Brown t...@linux.com writes: I noticed that if the hba_file setting in the config is uncommented and set to a directory instead of the full path to the file, no error occurs when the service starts. When I try that, I get a boatload of errors ending with FATAL: could not load pg_hba.conf

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Thom Brown
On 19 October 2011 00:38, Tom Lane t...@sss.pgh.pa.us wrote: Thom Brown t...@linux.com writes: I noticed that if the hba_file setting in the config is uncommented and set to a directory instead of the full path to the file, no error occurs when the service starts. When I try that, I get a

Re: [HACKERS] termination of backend waiting for sync rep generates a junk log message

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 5:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Oct 17, 2011 at 6:53 AM, Fujii Masao masao.fu...@gmail.com wrote: The simple fix is to change InteractiveBackend() so that it calls CHECK_FOR_INTERRUPTS() before it outputs

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-10-18 Thread Robert Haas
On Sun, Oct 16, 2011 at 4:46 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: Hi Robert, I'm a bit confusing about this sentence. If you can make this work, I think it could be a pretty sweet plannner optimization even apart from the implications for security views. Consider a query of this

Re: [HACKERS] loss of transactions in streaming replication

2011-10-18 Thread Robert Haas
On Fri, Oct 14, 2011 at 7:51 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:08 AM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Oct 12, 2011 at 10:29 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 12, 2011 at 5:45 AM, Fujii Masao masao.fu...@gmail.com

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

2011-10-18 Thread Jun Ishiduka
+ /* +* The backend writes WAL of FPW at checkpoint. However, The backend do +* not need to write WAL of FPW at checkpoint shutdown because it +* performs when startup finishes. +*/ +

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sun, Oct 16, 2011 at 4:46 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I tried to reproduce the scenario with enough small from/join_collapse_limit (typically 1), but it allows to push down qualifiers into the least scan plan. Hmm, you're right.

Re: [HACKERS] termination of backend waiting for sync rep generates a junk log message

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 5:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Another question worth asking is how is it that we're getting to ReadCommand at all, if we have already determined that the client is gone.  Fixing that with an additional

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 16:13 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 15:43 -0400, Tom Lane wrote: I don't actually see that warning on my Fedora 15 machine, with gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) You get the unused return

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Peter Eisentraut
On tis, 2011-10-18 at 18:38 -0400, Tom Lane wrote: The problem with this is you cannot get into the database as it acts as if it did find the hba file but found it empty. Well, an actually empty pg_hba.conf file would have the same problem, and it's pretty hard to see any situation where

Re: [HACKERS] termination of backend waiting for sync rep generates a junk log message

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 11:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: One thing worth asking is why we're willing to violate half a dozen different coding rules if we see ProcDiePending, yet we're perfectly happy to rely on the client understanding a WARNING for the QueryCancelPending case.  

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 18:38 -0400, Tom Lane wrote: Well, an actually empty pg_hba.conf file would have the same problem, and it's pretty hard to see any situation where it would be useful to start the postmaster and not let it accept any connections.

Re: [HACKERS] pg_ctl restart - behaviour based on wrong instance

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 12:18 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander mag...@hagander.net wrote: Ok, fixed and applied. You seem to have forgot to change protocol.sgml. Patch attached. Committed. -- Robert Haas EnterpriseDB:

Re: [HACKERS] Adding CORRESPONDING to Set Operations

2011-10-18 Thread Robert Haas
On Sun, Oct 16, 2011 at 7:46 PM, Kerem Kat kerem...@gmail.com wrote: CORRESPONDING clause take 2 You should probably read this: http://wiki.postgresql.org/wiki/Submitting_a_Patch And add your patch here: https://commitfest.postgresql.org/action/commitfest_view/open -- Robert Haas

Re: [HACKERS] termination of backend waiting for sync rep generates a junk log message

2011-10-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 18, 2011 at 11:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: One thing worth asking is why we're willing to violate half a dozen different coding rules if we see ProcDiePending, yet we're perfectly happy to rely on the client understanding a

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Jeff Davis
On Tue, 2011-10-18 at 22:25 +0300, Peter Eisentraut wrote: Presumably because Jeff doesn't have that particular locale installed. locale -a would clarify that. $ locale -a |grep -i tr tr_CY.utf8 tr_TR.utf8 So, yes, I only have the UTF8 version. I didn't realize they were different -- do you

Re: [HACKERS] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Tue, 2011-10-18 at 22:25 +0300, Peter Eisentraut wrote: Presumably because Jeff doesn't have that particular locale installed. locale -a would clarify that. $ locale -a |grep -i tr tr_CY.utf8 tr_TR.utf8 So, yes, I only have the UTF8 version. Wow,

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Magnus Hagander
On Oct 19, 2011 6:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-18 at 18:38 -0400, Tom Lane wrote: Well, an actually empty pg_hba.conf file would have the same problem, and it's pretty hard to see any situation where it would be useful