Re: [HACKERS] loss of transactions in streaming replication

2011-10-18 Thread Fujii Masao
On Wed, Oct 19, 2011 at 11:28 AM, Robert Haas wrote: > Convince me.  :-) Yeah, I try. > My reading of the situation is that you're talking about a problem > that will only occur if, while the master is in the process of > shutting down, a network error occurs. No. This happens even if a network

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Magnus Hagander
On Oct 19, 2011 6:21 AM, "Tom Lane" wrote: > > Peter Eisentraut 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 postm

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

2011-10-18 Thread Tom Lane
Jeff Davis 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, that's int

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 h

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

2011-10-18 Thread Tom Lane
Robert Haas writes: > On Tue, Oct 18, 2011 at 11:27 PM, Tom Lane 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 >> QueryCancelPendi

Re: [HACKERS] Adding CORRESPONDING to Set Operations

2011-10-18 Thread Robert Haas
On Sun, Oct 16, 2011 at 7:46 PM, Kerem Kat 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 EnterpriseDB: http://www.ent

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 wrote: > On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander wrote: >> Ok, fixed and applied. > > You seem to have forgot to change protocol.sgml. > Patch attached. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Po

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Tom Lane
Peter Eisentraut 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. Should we

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 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.  Another is whethe

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 w

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 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"

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

2011-10-18 Thread Tom Lane
Robert Haas writes: > On Tue, Oct 18, 2011 at 5:18 PM, Tom Lane 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 CHECK_FOR_INTERRUPTS seems like >> a crock.

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

2011-10-18 Thread Tom Lane
Robert Haas writes: > On Sun, Oct 16, 2011 at 4:46 AM, Kohei KaiGai 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. LIMIT 10 prevents qual pu

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. > > +*/ > > + XLogReportPa

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 wrote: > On Thu, Oct 13, 2011 at 10:08 AM, Fujii Masao wrote: >> On Wed, Oct 12, 2011 at 10:29 PM, Robert Haas wrote: >>> On Wed, Oct 12, 2011 at 5:45 AM, Fujii Masao wrote: In 9.2dev and 9.1, when walreceiver detects an error while sending data

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 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 form: >> >> 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 wrote: > Robert Haas writes: >> On Mon, Oct 17, 2011 at 6:53 AM, Fujii Masao 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

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Thom Brown
On 19 October 2011 00:38, Tom Lane wrote: > Thom Brown 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

Re: [HACKERS] Silent failure with invalid hba_file setting

2011-10-18 Thread Tom Lane
Thom Brown 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 I suspect

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Heikki Linnakangas 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 platform that does that, we wa

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,

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane 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 (pgsql-hacker

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
"Kevin Grittner" writes: > 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". > ... on a --enable-cassert build. > If we think it's even remotely possible that it could

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

2011-10-18 Thread Tom Lane
Robert Haas writes: > On Mon, Oct 17, 2011 at 6:53 AM, Fujii Masao 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 PostgresMain() instead, maybe > something lik

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
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". ... on a --enable-cassert build. If we think it's even remotely possible that it could happen, maybe we should do the lo

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Heikki Linnakangas
On 18.10.2011 23:28, Tom Lane wrote: "Kevin Grittner" 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); +

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
"Kevin Grittner" 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; > + } I don

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 4:13 PM, Tom Lane wrote: > Peter Eisentraut 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" warni

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Peter Eisentraut 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 defaul

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Robert Haas 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 f0b3b1f..bea5489 100644 ---

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane 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 seen it on earlier ve

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 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

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas 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 it using? (I do se

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 3:03 PM, Kevin Grittner wrote: > Andrew Dunstan 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

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 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. > backend> FATAL:

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 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] (patch) regression diffs on collate.linux.utf8 test

2011-10-18 Thread Tom Lane
Peter Eisentraut 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 mak

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Andrew Dunstan 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 good; I like te

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane 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 yield the point.

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 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 > object_access_hook, although it wi

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Andrew Dunstan
On 10/18/2011 01:35 PM, Tom Lane wrote: Robert Haas writes: On Tue, Oct 18, 2011 at 1:01 PM, Tom Lane 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 Tom Lane
Robert Haas writes: > On Tue, Oct 18, 2011 at 1:01 PM, Tom Lane 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 write a partial message. >> If we

Re: [HACKERS] synchronized snapshots

2011-10-18 Thread Simon Riggs
On Tue, Oct 18, 2011 at 6:22 PM, Tom Lane 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 name on it ea

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

2011-10-18 Thread Kohei KaiGai
2011/10/18 Robert Haas : > On Tue, Oct 18, 2011 at 11:25 AM, Kohei KaiGai 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 secu

Re: [HACKERS] synchronized snapshots

2011-10-18 Thread Tom Lane
Simon Riggs 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 according to t

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=487

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane 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

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 1:01 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Oct 18, 2011 at 12:26 PM, Tom Lane 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

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 wrote: > On Tue, Oct 18, 2011 at 11:02 PM, Magnus Hagander wrote: >> Ok, fixed and applied. > > You seem to have forgot to change protocol.sgml. > Patch attached. > > Re

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas writes: > On Tue, Oct 18, 2011 at 12:26 PM, Tom Lane 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 chunks are sent indivisibly, because

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 12:53 PM, Simon Riggs wrote: > On Tue, Oct 18, 2011 at 5:39 PM, Robert Haas wrote: >> On Tue, Oct 18, 2011 at 9:18 AM, Simon Riggs wrote: >>> Any reason or objection to committing this patch? >> >> Not on my end, though I haven't reviewed it in detail.  One minor note >>

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Simon Riggs
On Tue, Oct 18, 2011 at 5:39 PM, Robert Haas wrote: > On Tue, Oct 18, 2011 at 9:18 AM, Simon Riggs 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 >

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 12:26 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Oct 18, 2011 at 10:06 AM, Peter Eisentraut 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 releva

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 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 Description: Binary dat

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 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 Description: Binary dat

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 9:18 AM, Simon Riggs 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 bgwriter: + /

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane 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 (pgsql-hackers@postgresql.or

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Robert Haas writes: > On Tue, Oct 18, 2011 at 10:06 AM, Peter Eisentraut 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] 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 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 Description: Binary dat

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 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 being computed. > -

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 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 Description: Binary dat

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

2011-10-18 Thread Kohei KaiGai
2011/10/18 Robert Haas : > On Thu, Oct 13, 2011 at 6:48 AM, Kohei KaiGai wrote: >>    struct ObjectAccessInfoData { >>        ObjectAccessType   oa_type; >>        ObjectAddress         oa_address; >>        union { >>            struct { >>                HeapTuple       newtuple; >>            

Re: [HACKERS] synchronized snapshots

2011-10-18 Thread Simon Riggs
On Mon, Oct 3, 2011 at 7:09 AM, Marko Tiikkaja 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, Joachim Wieland wrot

Re: [HACKERS] Separating bgwriter and checkpointer

2011-10-18 Thread Simon Riggs
On Wed, Oct 5, 2011 at 8:02 AM, Simon Riggs wrote: > On Wed, Oct 5, 2011 at 5:10 AM, Dickson S. Guedes > 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 in my >> laptop but I'll setup

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
"Kevin Grittner" 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 example code a month o

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Robert Haas 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?: http://archives.postgresql.org/pgsql-hackers/2011-02/msg01719.php >

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 wrote: > On Wed, Jun 15, 2011 at 10:53, Ahmed Shinwari > wrote:

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 10:06 AM, Peter Eisentraut 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) { p.proto.is_last = (dest

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 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(...); No, tried

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 o

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Kevin Grittner
Tom Lane 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 number actually writte

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Peter Eisentraut 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 4.6. Ther

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 wrote: > Robert Haas writes: >> On Mon, Oct 17, 2011 at 11:54 PM, Tom Lane wrote: >>> http://www.faqs.org/rfcs/rfc3629.html > >> I'm still confused.  The input string is already known to be valid >> UTF-8, so the second byte (if there is one) must be be

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Tom Lane
Andrew Dunstan 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 ignoring write failur

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 valu

Re: [HACKERS] new compiler warnings

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 9: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

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 w

Re: [HACKERS] spinlocks on HP-UX

2011-10-18 Thread Robert Haas
On Tue, Oct 18, 2011 at 2:20 AM, Pavan Deolasee wrote: > On Tue, Oct 18, 2011 at 10:04 AM, Robert Haas 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

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] (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 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

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

2011-10-18 Thread Tom Lane
Jeff Davis 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: > make -s

[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 act

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

2011-10-18 Thread desmodemone
> 2011/10/18 Robert Haas > >> On Mon, Oct 17, 2011 at 7:30 PM, desmodemone >> 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 >> that, as Tom says, if yo

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 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. --  Simon Riggs  

[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 Fr

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 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 need for f

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 mailin

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 INI