threads
listlengths 1
2.99k
|
---|
[
{
"msg_contents": "\n> I am working on eliminating the \"relation NNN modified while in use\"\n> misfeature by instead grabbing a lock on each relation at first use\n> in a statement, and holding that lock till end of transaction. \n\nAs anticipated, I object :-) \nIf you do this you will most likely add the code to the wrong places, \nsince what we really need is a lock for the duration of one statement only.\n\nOtherwise you will only fix this situation for those cases where the application \nis actually inside a transaction. And this is (and hopefully stays) not mandatory. \n\nAdditionally we would have the discussed lockout of admin tasks ...\n\nAndreas\n",
"msg_date": "Tue, 7 Nov 2000 17:42:56 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Issue NOTICE for attempt to raise lock level?"
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> I am working on eliminating the \"relation NNN modified while in use\"\n>> misfeature by instead grabbing a lock on each relation at first use\n>> in a statement, and holding that lock till end of transaction. \n\n> As anticipated, I object :-) \n\nYour objection is founded on two misunderstandings. In the first place,\nwe are *always* inside a transaction when executing a query. It may be\nan implicit one-statement transaction, but it's still a transaction.\nIn the second place, we already grab locks that we do not release till\nend of xact for all user-level queries. The problem is that we grab\nthem too late, ie, in the executor. I'm just planning to move up the\ngrab till first use.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 12:05:57 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Issue NOTICE for attempt to raise lock level? "
}
]
|
[
{
"msg_contents": "\n> A NOTICE might be useful to users since it would complain about\n> deadlock-prone user-level coding practices too, such as\n> \n> \tbegin;\n> \tselect * from foo;\t-- grabs read lock\n> \tlock table foo;\t\t-- grabs exclusive lock\n\nAlthough this is deadlock prone praxis, there is no mention in any standard that \nthis is not allowed or depricated. Thus we are imho not allowed to issue a notice.\n\nOf course my opinion is that you should release the lock after select\nif isolation is not RR or serializable. Thus not leading to a deadlock situation.\n(I do have strong feelings about this issue)\n\nAndreas\n",
"msg_date": "Tue, 7 Nov 2000 17:48:47 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Issue NOTICE for attempt to raise lock level?"
}
]
|
[
{
"msg_contents": "Hi,\nI'm just starded using ecpg and I have some problem with cursors.\n\nI wrote this lines\n\nexec sql begin declare section;\n char query[500];\n int CodImpianto;\n int Cod1;\n int Cod2;\n char Descr[100];\nexec sql end declare section;\nstrcpy(query, \"select ............\");\n\nexec sql connect db;\n\nsub1()\n{\n exec sql prepare stmtunimpianto from :query;\n exec sql declare CUR_UNIMPIANTO cursor for stmtunimpianto;\n .\n .\n .\n\n exec sql open CUR_UNIMPIANTO using :CodImpianto;\n exec sql fetch CUR_UNIMPIANTO into :CodImpianto, :Descr;\n .\n .\n\n exec sql close CUR_UNIMPIANTO;\n exec sql execute StmtUpdImpianti using :Cod1, :Descr, :Cod2;\n exec sql commit;\n}\n\nI call this routine a lot of time.\nIf I rem the commit all works fine but if I execute the commit the cursor was deleted and I receive some errors.\n\nAt open cursor : sqlca.sqlcode = -230 Invalid statement namei in line ......\nat fetch : NOTICE : PerformPortalFetch: portal \"cur_unimpianto\" not found\n\nPlease could anyone help me ?\n\nthanks\n\nregards\nMaurizio Cauci\nDREAMTECH di Cauci Maurizio\nVia Ronchetti, 2 - 21013 Gallarate (VA)\nwww.dreamtech-it.com\n\n\n\n\n\n\n\nHi,\nI'm just starded using ecpg and I have some problem \nwith cursors.\n \nI wrote this lines\n \nexec sql begin declare section;\n char query[500];\n int CodImpianto;\n\n int Cod1;\n\n int Cod2;\n char Descr[100];\n\nexec sql end declare section;\nstrcpy(query, \"select ............\");\n \nexec sql connect db;\n \nsub1()\n{\n exec sql prepare stmtunimpianto \nfrom :query;\n exec sql declare CUR_UNIMPIANTO \ncursor for stmtunimpianto;\n .\n .\n .\n \n exec sql open CUR_UNIMPIANTO \nusing :CodImpianto;\n exec sql fetch CUR_UNIMPIANTO \ninto :CodImpianto, :Descr;\n\n .\n .\n \n exec sql close \nCUR_UNIMPIANTO; exec sql execute StmtUpdImpianti \nusing :Cod1, :Descr, :Cod2;\n exec sql commit;\n}\n \nI call this routine a lot of time.\nIf I rem the commit all works fine but if I execute \nthe commit the cursor was deleted and I receive some errors.\n \nAt open cursor : sqlca.sqlcode = -230 Invalid \nstatement namei in line ......\nat \nfetch : NOTICE \n: PerformPortalFetch: portal \"cur_unimpianto\" not found\n \nPlease could anyone help me ?\n \nthanks\n \nregards\nMaurizio CauciDREAMTECH di Cauci \nMaurizioVia Ronchetti, 2 - 21013 Gallarate (VA)www.dreamtech-it.com",
"msg_date": "Tue, 7 Nov 2000 17:52:00 +0100",
"msg_from": "\"Maurizio\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "USE OF CURSORS IN ECPG"
},
{
"msg_contents": "On Tue, Nov 07, 2000 at 05:52:00PM +0100, Maurizio wrote:\n> I'm just starded using ecpg and I have some problem with cursors.\n> ...\n> exec sql prepare stmtunimpianto from :query;\n> .\n> .\n> exec sql commit;\n> ...\n> If I rem the commit all works fine but if I execute the commit the cursor was deleted and I receive some errors.\n> \n> At open cursor : sqlca.sqlcode = -230 Invalid statement namei in line ......\n> at fetch : NOTICE : PerformPortalFetch: portal \"cur_unimpianto\" not found\n\nNo surprise here as ending a transaction forces a deallocation of all\nprepared statements. AFAIK that's what the standard says.\n\nMichael\n\n-- \nMichael Meskes\[email protected]\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n",
"msg_date": "Wed, 8 Nov 2000 12:39:42 +0100",
"msg_from": "Michael Meskes <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: USE OF CURSORS IN ECPG"
},
{
"msg_contents": "But, how can I do ?\nI have to recall the same routine many times. I tried to prepare and declare\nthe cursor inside the routine but when I compile with ecpg I receive the\nerror Cursor already defined.\n\nMaurizio\n\n\n.\n----- Original Message -----\nFrom: \"Michael Meskes\" <[email protected]>\nTo: \"Maurizio\" <[email protected]>\nCc: <[email protected]>\nSent: Wednesday, November 08, 2000 12:39 PM\nSubject: Re: [INTERFACES] USE OF CURSORS IN ECPG\n\n\n> On Tue, Nov 07, 2000 at 05:52:00PM +0100, Maurizio wrote:\n> > I'm just starded using ecpg and I have some problem with cursors.\n> > ...\n> > exec sql prepare stmtunimpianto from :query;\n> > .\n> > .\n> > exec sql commit;\n> > ...\n> > If I rem the commit all works fine but if I execute the commit the\ncursor was deleted and I receive some errors.\n> >\n> > At open cursor : sqlca.sqlcode = -230 Invalid statement namei in line\n......\n> > at fetch : NOTICE : PerformPortalFetch: portal\n\"cur_unimpianto\" not found\n>\n> No surprise here as ending a transaction forces a deallocation of all\n> prepared statements. AFAIK that's what the standard says.\n>\n> Michael\n>\n> --\n> Michael Meskes\n> [email protected]\n> Go SF 49ers! Go Rhein Fire!\n> Use Debian GNU/Linux! Use PostgreSQL!\n\n",
"msg_date": "Thu, 9 Nov 2000 14:49:29 +0100",
"msg_from": "\"Maurizio\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [INTERFACES] USE OF CURSORS IN ECPG"
},
{
"msg_contents": "Maurizio wrote:\n\n> But, how can I do ?\n> I have to recall the same routine many times. I tried to prepare and declare\n> the cursor inside the routine but when I compile with ecpg I receive the\n> error Cursor already defined.\n\nyou should drop the cursor (exec sql close name;)\nBut there is trouble ahead (believe me - see below)\n\n> Maurizioan\n\n------------\n(Oh, I misunderstood, if you get into trouble with transactions (waiting for\nyou ;-() you might consider the following lines)\n------------\nYou certainly should disable autocommit!\n exec sql set autocommit to off;\notherwise you have no control over when a transaction starts and whether this\nsucceded.\nThen at the start of your SubProgram do\n bool my_transaction;\n exec sql begin work;\n my_transaction=!sqlca.sqlcode;\n\nat the end:\n if (my_transaction) exec sql commit work;\n\nThis should give you an idea on how to accomplish it. If not feel free to ask\nme.\n\nBut (sigh) you need my NOTICE to sqlca patch applied. It's not in 7.0 but in\n7.1! I don't know any other way (I'll attach the patch)\n\nChristof\n\nPS: You might consider applying the patch for (update where not_found) -> 100\nand the cache which doubles ecpg's speed.",
"msg_date": "Fri, 10 Nov 2000 11:52:48 +0100",
"msg_from": "Christof Petig <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [INTERFACES] USE OF CURSORS IN ECPG"
}
]
|
[
{
"msg_contents": "I've committed changes to parse_oper.c to enable fallback to string type\nwhen argument(s) are of UNKNOWN type. This is the same code (verbatim)\nas I recently added for function resolution.\n\nAn obvious example is for\n\n select '1' = '01';\n\nwhich used to throw an error and which now resolves to two text strings\n(and returns 'false'). To force these to be handled as integers, prefix\none with the \"int\" type specifier:\n\n select int '1' = '01';\n\nwhich, btw, returns 'true'.\n\nRegression tests pass without change (which I guess means that we don't\nhave good coverage there, either :/\n\n - Thomas\n",
"msg_date": "Tue, 07 Nov 2000 17:15:59 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Type resolution for operators"
},
{
"msg_contents": "Thomas Lockhart writes:\n\n> (and returns 'false'). To force these to be handled as integers, prefix\n> one with the \"int\" type specifier:\n> \n> select int '1' = '01';\n> \n> which, btw, returns 'true'.\n\nUh, how can an integer be equal to a character value? Where did the type\nsystem go?\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 8 Nov 2000 17:51:38 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Type resolution for operators"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Thomas Lockhart writes:\n>> select int '1' = '01';\n>> which, btw, returns 'true'.\n\n> Uh, how can an integer be equal to a character value? Where did the type\n> system go?\n\nNowhere. This is the same behavior as that statement had in 7.0 (and\nmany versions before, I believe): given \"int4-constant operator\nunknown-constant\", the unknown constant is preferentially resolved to\nint4.\n\nNow if you say\n\nselect int '1' = text '01';\n\nyou should and do get\n\nERROR: Unable to identify an operator '=' for types 'int4' and 'text'\n You will have to retype this query using an explicit cast\n\nBut this change is *not* to rip out the concept of unknown-type\nconstants entirely, only to fall back to treating them as text\n*after* all else fails.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 08 Nov 2000 12:08:42 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Type resolution for operators "
}
]
|
[
{
"msg_contents": "\n> >> I am working on eliminating the \"relation NNN modified while in use\"\n> >> misfeature by instead grabbing a lock on each relation at first use\n> >> in a statement, and holding that lock till end of transaction. \n> \n> > As anticipated, I object :-) \n> \n> Your objection is founded on two misunderstandings. In the first place,\n> we are *always* inside a transaction when executing a query. It may be\n> an implicit one-statement transaction, but it's still a transaction.\n\nOk, but I thought there was some optimization for readonly statements.\n\n> In the second place, we already grab locks that we do not release till\n> end of xact for all user-level queries. The problem is that we grab\n> them too late, ie, in the executor. I'm just planning to move up the\n> grab till first use.\n\nFor a \"select colname from tablename\" we do not currently hold any lock \nuntil end of tx. This is the situation you described, and I am worried about.\n\nAndreas\n",
"msg_date": "Tue, 7 Nov 2000 18:29:05 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Issue NOTICE for attempt to raise lock level? "
},
{
"msg_contents": "Tom Lane wrote:\n> I am not nearly as worried about long-running transactions that delay\n> admin actions as I am about admin actions that crash other transactions.\n> I do not believe it is safe to drop read locks intra-transaction, and\n> I am unwilling to take a chance on it being safe so close to 7.1 beta.\n\nWill we still have readers-dont-block-writers behaviour?\ni.e. will the read lock lock only rows visible to current transaction ?\nOr am i talking about something completely different ?\n\n-------------\nHannu\n",
"msg_date": "Tue, 07 Nov 2000 19:41:02 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Issue NOTICE for attempt to raise lock level?"
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n> Ok, but I thought there was some optimization for readonly statements.\n\nDoesn't have anything to do with locking, only with avoiding disk\nwrites.\n\n>> In the second place, we already grab locks that we do not release till\n>> end of xact for all user-level queries. The problem is that we grab\n>> them too late, ie, in the executor. I'm just planning to move up the\n>> grab till first use.\n\n> For a \"select colname from tablename\" we do not currently hold any lock \n> until end of tx. This is the situation you described, and I am worried about.\n\nThat's a bug in itself, because the executor's read lock is grabbed by\nheap_beginscan and released by heap_endscan, which means it may be\ngrabbed and released multiple times during a single query (think\nnested-loop join). There is nothing to stop someone from, say, dropping\nthe entire table between scans. I intend to fix that.\n\nI am not nearly as worried about long-running transactions that delay\nadmin actions as I am about admin actions that crash other transactions.\nI do not believe it is safe to drop read locks intra-transaction, and\nI am unwilling to take a chance on it being safe so close to 7.1 beta.\nWe can argue about it when 7.2 development cycle starts, if you like.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 12:56:46 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Issue NOTICE for attempt to raise lock level? "
},
{
"msg_contents": "Hannu Krosing <[email protected]> writes:\n> Tom Lane wrote:\n>> I do not believe it is safe to drop read locks intra-transaction, and\n>> I am unwilling to take a chance on it being safe so close to 7.1 beta.\n\n> Will we still have readers-dont-block-writers behaviour?\n\nSure. The only thing this really affects is VACUUM and schema-altering\ncommands, which will now have to wait until reader transactions commit.\nIn other words\n\n\tSession 1\t\t\tSession 2\n\n\tBEGIN;\n\tSELECT * FROM foo;\n\n\t\t\t\t\tALTER TABLE foo ...\n\n\t...\n\n\tCOMMIT;\n\nSession 2 will have to wait for session 1 to commit; before it didn't.\nAn example of why this is a good idea is\n\n\tSession 1\t\t\tSession 2\n\n\tBEGIN;\n\tDECLARE c CURSOR FOR\n\t SELECT * FROM foo;\n\n\t\t\t\t\tALTER TABLE foo ...\n\n\tFETCH FROM c;\n\n\tCOMMIT;\n\nWithout a held read lock on foo, session 1 is in deep trouble,\nbecause its cursor is no longer correctly planned.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 14:35:45 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Issue NOTICE for attempt to raise lock level? "
}
]
|
[
{
"msg_contents": "> Zeugswetter Andreas SB <[email protected]> writes:\n> >> I am working on eliminating the \"relation NNN modified \n> while in use\"\n> >> misfeature by instead grabbing a lock on each relation at first use\n> >> in a statement, and holding that lock till end of transaction. \n> \n> > As anticipated, I object :-) \n> \n> Your objection is founded on two misunderstandings. In the \n> first place, we are *always* inside a transaction when executing\n> a query. It may be an implicit one-statement transaction, but it's\n> still a transaction.\n> In the second place, we already grab locks that we do not release till\n> end of xact for all user-level queries. The problem is that we grab\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nEven for select?\n\n> them too late, ie, in the executor. I'm just planning to move up the\n> grab till first use.\n\nBTW, what about indices?\n\nVadim\n",
"msg_date": "Tue, 7 Nov 2000 09:54:14 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: AW: Issue NOTICE for attempt to raise lock level? "
},
{
"msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n> BTW, what about indices?\n\nCREATE/DROP INDEX grab exclusive lock on the parent table, so there's no\nproblem with indexes as long as transactions that use the parent table\nhold some kind of lock on that table. I figure it's OK for the executor\nto continue to grab and release locks on indexes on a per-scan basis.\nIt's just the parent table that we need a continuous lock on.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 14:41:09 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Issue NOTICE for attempt to raise lock level? "
},
{
"msg_contents": "I said:\n> CREATE/DROP INDEX grab exclusive lock on the parent table,\n\nCorrection: DROP INDEX grabs exclusive lock, CREATE only grabs a\nShareLock on the parent. But that's OK since addition of an index\ndoesn't hurt existing readers.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 14:51:52 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Issue NOTICE for attempt to raise lock level? "
}
]
|
[
{
"msg_contents": "\n> > For a \"select colname from tablename\" we do not currently hold any lock \n> > until end of tx. This is the situation you described, and I am worried about.\n> \n> That's a bug in itself, because the executor's read lock is grabbed by\n> heap_beginscan and released by heap_endscan, which means it may be\n> grabbed and released multiple times during a single query (think\n> nested-loop join). There is nothing to stop someone from, say, dropping\n> the entire table between scans. I intend to fix that.\n\nYes, that needs to be fixed.\n\n> I am not nearly as worried about long-running transactions that delay\n> admin actions as I am about admin actions that crash other \n> transactions.\n> I do not believe it is safe to drop read locks intra-transaction, and\n> I am unwilling to take a chance on it being safe so close to 7.1 beta.\n\nI think that this is a substantial modification that bears all sorts of application\nside riscs. I absolutely do not think that you do not take chances when keeping \nthe lock. If you think it is too close to beta, then the least risk is to release the lock\nafter each statement, because that is a lot more like current behavior.\n\nAndreas\n",
"msg_date": "Tue, 7 Nov 2000 19:06:21 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: AW: Issue NOTICE for attempt to raise lock leve\n\tl?"
}
]
|
[
{
"msg_contents": "\n> > In the second place, we already grab locks that we do not release till\n> > end of xact for all user-level queries. The problem is that we grab\n> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> Even for select?\n\nNo. Tom plans to change that, and I still think this is a bad idea.\n\n> > them too late, ie, in the executor. I'm just planning to move up the\n> > grab till first use.\n\nThis would be good.\n\n> BTW, what about indices?\n\nSame here, would need to be released after each readonly statement.\n\nAndreas\n",
"msg_date": "Tue, 7 Nov 2000 19:11:38 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Issue NOTICE for attempt to raise lock level? "
}
]
|
[
{
"msg_contents": "\nbut, there is eighter an optimizer bug or a code bug in nabstime.c\nleading to regression failure in abstime, tinterval and horology.\nThe rest all passes.\n\nDoes anybody see similar behavior ? It is a little sad, because the \noptimized code really runs a lot faster and those are somehow \nobsolete datatypes.\n\nAndreas\n\nPS: I have a patch in the works that fixes the runcheck problems for AIX 4.2 and up\nthat I would like to see into 7.1, maybe tomorrow. \n",
"msg_date": "Tue, 7 Nov 2000 19:22:19 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "Could turn on -O2 in AIX"
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n> but, there is eighter an optimizer bug or a code bug in nabstime.c\n> leading to regression failure in abstime, tinterval and horology.\n> The rest all passes.\n> Does anybody see similar behavior ?\n\nIIRC, the same regression tests fail on Linux/Alpha with 7.0.2, even\nat -O0. I had assumed it was a 64-bit issue (probably time_t is 64-bit\non that platform), but maybe not. I haven't had time to dig into the\nAlpha situation yet; can you poke at it on your machine and narrow down\nthe problem?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 13:33:38 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Could turn on -O2 in AIX "
}
]
|
[
{
"msg_contents": "> > Will we still have readers-dont-block-writers behaviour?\n> \n> Sure. The only thing this really affects is VACUUM and \n> schema-altering\n> commands, which will now have to wait until reader \n> transactions commit.\n> In other words\n> \n> \tSession 1\t\t\tSession 2\n> \n> \tBEGIN;\n> \tSELECT * FROM foo;\n> \n> \t\t\t\t\tALTER TABLE foo ...\n> \n> \t...\n> \n> \tCOMMIT;\n> \n> Session 2 will have to wait for session 1 to commit; before it didn't.\n\nNot only, Tom -:)\nUnfortunately, session 3 with just SELECT * FROM foo will also wait\nfor session 1 & session 2 commit.\n\nVadim\n",
"msg_date": "Tue, 7 Nov 2000 11:26:57 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: AW: AW: Issue NOTICE for attempt to raise lock leve\n\tl?"
},
{
"msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n> Unfortunately, session 3 with just SELECT * FROM foo will also wait\n> for session 1 & session 2 commit.\n\nSession 3 would wait for session 2 in any case, no?\n\nThis is all irrelevant unless someone can make a convincing case that\nit's safe to release read locks early. In the words of the ancient\nsage, \"I can make this program arbitrarily fast ... if it doesn't have\nto give the right answer\". I have already pointed out several cases\nwhere releasing locks early is clearly *not* safe. I don't think I\nneed to produce more examples. The burden of proof is on the other\nside to show how it can be done safely (and with an amount of work\nthat's reasonable for 7.1, which is not too darn much at this point).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 16:02:19 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Issue NOTICE for attempt to raise lock leve l? "
}
]
|
[
{
"msg_contents": "I've just started fooling with some modifications to the backend.\nI'm new at doing this in PG, so I'm blundering I'm sure.\n\nIn any event when I start the backend standalone (i.e. running\nthe 'postgres -D ....' command, it seems I have to be the root\nor postgres root user because of file permissions. But I want\naccess to the database of my normal username, which is 'kevin'.\n\nQuestions: have I identified the problem right? Is that why I\ncan't see my tables? If so, is there a way to change databases,\ngiven that the \\ commands don't work in the backend?\n\nOr am I just going at this all wrong in some way?\n\n++ kevin\n\n\n-- \nKevin O'Gorman (805) 650-6274 mailto:[email protected]\nPermanent e-mail forwarder: mailto:Kevin.O'[email protected]\nAt school: mailto:[email protected]\nWeb: http://www.cs.ucsb.edu/~kogorman/index.html\nWeb: http://trixie.kosman.via.ayuda.com/~kevin/index.html\n\n\"There is a freedom lying beyond circumstance,\nderived from the direct intuition that life can\nbe grounded upon its absorption in what is\nchangeless amid change\" \n -- Alfred North Whitehead\n",
"msg_date": "Tue, 07 Nov 2000 11:38:40 -0800",
"msg_from": "\"Kevin O'Gorman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Need a debugging tip or two"
},
{
"msg_contents": "Kevin O'Gorman writes:\n\n> In any event when I start the backend standalone (i.e. running\n> the 'postgres -D ....' command, it seems I have to be the root\n> or postgres root user because of file permissions.\n\nYup.\n\n> But I want access to the database of my normal username, which is\n> 'kevin'.\n\npostgres [options] dbname\n\n> Questions: have I identified the problem right? Is that why I\n> can't see my tables? If so, is there a way to change databases,\n> given that the \\ commands don't work in the backend?\n\nNot sure when a \\ command *changed* a database last time.\n\n> Or am I just going at this all wrong in some way?\n\nThere's probably little reason to start a backend standalone. If you want\nto do stock-of-the-trade debugging you simply start a postmaster, then\npsql (or whatever floats your boat), and attach gdb to the resulting\nbackend process.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 7 Nov 2000 21:08:20 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Need a debugging tip or two"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> There's probably little reason to start a backend standalone. If you want\n> to do stock-of-the-trade debugging you simply start a postmaster, then\n> psql (or whatever floats your boat), and attach gdb to the resulting\n> backend process.\n\nRight, that's what I always do (unless I have to debug a crash at initdb\ntime :-(). A tip here is that you can even debug backend-startup-time\nproblems this way, and no you don't have to be superhumanly quick on the\ntrigger: you set PGOPTIONS=\"-W n\" in the environment of psql. This\nwill cause an n-second sleep() call very early in the backend startup\nprocess. I find 30 seconds plenty of time to run ps, start gdb, and\nattach. You can also throw in things like \"-d2\" to crank up the\npostmaster log level for just the backend under test.\n\nI thought this lore was in the developer's FAQ already, but I don't\nsee it there at the moment. Bruce, is it lurking someplace else?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 07 Nov 2000 19:12:41 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Need a debugging tip or two "
},
{
"msg_contents": "\nI see the mention of -w in the main FAQ.\n\n> Peter Eisentraut <[email protected]> writes:\n> > There's probably little reason to start a backend standalone. If you want\n> > to do stock-of-the-trade debugging you simply start a postmaster, then\n> > psql (or whatever floats your boat), and attach gdb to the resulting\n> > backend process.\n> \n> Right, that's what I always do (unless I have to debug a crash at initdb\n> time :-(). A tip here is that you can even debug backend-startup-time\n> problems this way, and no you don't have to be superhumanly quick on the\n> trigger: you set PGOPTIONS=\"-W n\" in the environment of psql. This\n> will cause an n-second sleep() call very early in the backend startup\n> process. I find 30 seconds plenty of time to run ps, start gdb, and\n> attach. You can also throw in things like \"-d2\" to crank up the\n> postmaster log level for just the backend under test.\n> \n> I thought this lore was in the developer's FAQ already, but I don't\n> see it there at the moment. Bruce, is it lurking someplace else?\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 22 Jan 2001 01:35:28 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Need a debugging tip or two"
}
]
|
[
{
"msg_contents": "OK, it's me again with news on how I'm doing (bad) with the compilation of \nPostgreSQL 7.1 alpha (I think I'll call that way the cvsup download).\nI still can't finish the execution of the configure script (still don't know \nwhy), and I could compile 7.0.2 perfectly on the same SPARC.\nWhat could be wrong? I'm puzzled. 8-<\n\n-- \n\"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n",
"msg_date": "Tue, 7 Nov 2000 17:21:12 -0300",
"msg_from": "\"Martin A. Marques\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "still with problems to run configure"
}
]
|
[
{
"msg_contents": "> > Unfortunately, session 3 with just SELECT * FROM foo will also wait\n> > for session 1 & session 2 commit.\n> \n> Session 3 would wait for session 2 in any case, no?\n\nBut now it will wait longer - for the duration of session 1' transaction.\n\n> This is all irrelevant unless someone can make a convincing case that\n> it's safe to release read locks early. In the words of the ancient\n> sage, \"I can make this program arbitrarily fast ... if it doesn't have\n> to give the right answer\". I have already pointed out several cases\n> where releasing locks early is clearly *not* safe. I don't think I\n> need to produce more examples. The burden of proof is on the other\n> side to show how it can be done safely (and with an amount of work\n> that's reasonable for 7.1, which is not too darn much at this point).\n\nAgreed - no other way now.\n\nVadim\n",
"msg_date": "Tue, 7 Nov 2000 13:12:46 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: AW: AW: Issue NOTICE for attempt to raise lock leve\n\t l?"
}
]
|
[
{
"msg_contents": "\n> > Will we still have readers-dont-block-writers behaviour?\n> \n> Sure. The only thing this really affects is VACUUM and schema-altering\n> commands, which will now have to wait until reader transactions commit.\n\nAnd \"lock table ...\", which would need some deadlock resolution code,\nbecause two sessions with select * from foo; lock table foo; should not need\nto deadlock, since one of the two could get the lock without breaking anything.\n\n> In other words\n> \n> \tSession 1\t\t\tSession 2\n> \n> \tBEGIN;\n> \tSELECT * FROM foo;\n> \n> \t\t\t\t\tALTER TABLE foo ...\n> \n> \t...\n> \n> \tCOMMIT;\n> \n> Session 2 will have to wait for session 1 to commit; before it didn't.\n> An example of why this is a good idea is\n\nThe below is a completely different thing than the above. In the below\nit is clear that a shared lock is needed until the last row from c is fetched,\nsince the statement is still active.\nIn this particular example there would be two different behaviors in my proposal\ndepending on how many rows are in foo (1 or many).\nIf 0 or 1 row -> relese lock after fetch, if more rows release at commit.\n\n> \n> \tSession 1\t\t\tSession 2\n> \n> \tBEGIN;\n> \tDECLARE c CURSOR FOR\n> \t SELECT * FROM foo;\n> \n> \t\t\t\t\tALTER TABLE foo ...\n> \n> \tFETCH FROM c;\n> \n> \tCOMMIT;\n> \n> Without a held read lock on foo, session 1 is in deep trouble,\n> because its cursor is no longer correctly planned.\n\nAndreas\n",
"msg_date": "Wed, 8 Nov 2000 10:03:13 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: AW: Issue NOTICE for attempt to raise lock leve\n\tl?"
}
]
|
[
{
"msg_contents": "\n> relcache. Not good. Forcing the schema update to be held off in the\n> first place seems the right answer.\n\nAgreed, the only question is, how long. My idea would be until statement end,\nwhich is also how Informix does it btw. (If you wanted a prominent example)\n\nOf course a \"statement\" spans open cursor and all subsequent fetches.\n\nAndreas\n",
"msg_date": "Wed, 8 Nov 2000 10:42:24 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Issue NOTICE for attempt to raise lock level? "
}
]
|
[
{
"msg_contents": "\n> > Unfortunately, session 3 with just SELECT * FROM foo will also wait\n> > for session 1 & session 2 commit.\n> \n> Session 3 would wait for session 2 in any case, no?\n> \n> This is all irrelevant unless someone can make a convincing case that\n> it's safe to release read locks early. In the words of the ancient\n> sage, \"I can make this program arbitrarily fast ... if it doesn't have\n> to give the right answer\". I have already pointed out several cases\n> where releasing locks early is clearly *not* safe.\n\nYour cursor example was busted, I did not yet see an example \nthat would not behave perfectly well when the lock is only held until \nstatement end. (We all agree that the current way of taking several short term \nlocks during the execution of one stmt is wrong)\n\nYou yourself gave us a perfect example where not releasing the lock\nis not *safe*, since it leads to an additional deadlock situation\n(unless you add code to resolve it).\n\n> I don't think I\n> need to produce more examples. The burden of proof is on the other\n> side to show how it can be done safely\n\nsee above\n\n> (and with an amount of work\n> that's reasonable for 7.1, which is not too darn much at this point).\n\nThis is unfortunately true.\nNo idea where to put that piece of code, but didn't you add statement level \ncleanup somwhere to avoid keeping unnecessary memory until end of tx ? \nWouldn't that be the place to release those shared locks ?\n\nAndreas\n",
"msg_date": "Wed, 8 Nov 2000 10:49:14 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: AW: Issue NOTICE for attempt to raise lock leve\n\t l?"
}
]
|
[
{
"msg_contents": "Just thought I'd tell you that ZDNet have announced that v7.0.3 is released!\nDidn't think this was true. If it is did I miss the announcement! If its\nnot ready for release then some people may be using software that they don't\nknow is still in beta testing.\n\nNot sure if this is such a good idea as it may give PostgreSQL a bad name.\n\nRegards\n\nBen Trewern\n\n\n\n\n\nV7.0.3 Released! - According to ZDNet\n\n\nJust thought I'd tell you that ZDNet have announced that v7.0.3 is released! Didn't think this was true. If it is did I miss the announcement! If its not ready for release then some people may be using software that they don't know is still in beta testing.\nNot sure if this is such a good idea as it may give PostgreSQL a bad name.\n\nRegards\n\nBen Trewern",
"msg_date": "Wed, 8 Nov 2000 17:14:28 -0000 ",
"msg_from": "\"Trewern, Ben\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "V7.0.3 Released! - According to ZDNet"
},
{
"msg_contents": "\nIt has not been officially released yet ... whoever released such did so\npre-maturely ... we don't even have a link to it from the web site yet ...\n\n\n\nOn Wed, 8 Nov 2000, Trewern, Ben wrote:\n\n> Just thought I'd tell you that ZDNet have announced that v7.0.3 is released!\n> Didn't think this was true. If it is did I miss the announcement! If its\n> not ready for release then some people may be using software that they don't\n> know is still in beta testing.\n> \n> Not sure if this is such a good idea as it may give PostgreSQL a bad name.\n> \n> Regards\n> \n> Ben Trewern\n> \n\nMarc G. Fournier [email protected]\nSystems Administrator @ hub.org \nscrappy@{postgresql|isc}.org ICQ#7615664\n\n",
"msg_date": "Wed, 8 Nov 2000 12:30:05 -0500 (EST)",
"msg_from": "\"Marc G. Fournier\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: V7.0.3 Released! - According to ZDNet"
}
]
|
[
{
"msg_contents": "I was able to locate snippets of information regarding the\nimplementation of an enum column type on a European maillist archive,\nbut have been unable to locate any addition information regarding this\neffort. Could someone be so kind as to pass along an update on this\neffort and possibly suggest where I could find additional resources?\n\nThank you for your time.\nDaniel Meyer\ndmeyer tap net\n\n",
"msg_date": "Wed, 08 Nov 2000 12:18:10 -0500",
"msg_from": "Daniel Meyer <[email protected]>",
"msg_from_op": true,
"msg_subject": "[Q] Status of ENUM column type."
}
]
|
[
{
"msg_contents": "> > > > New CHECKPOINT command.\n> > > > Auto removing of offline log files and creating new file\n> > > > at checkpoint time.\n> \n> Can you tell me how to use CHECKPOINT please?\n\nYou shouldn't normally use it - postmaster will start backend\neach 3-5 minutes to do this automatically.\n\n> > > Is this the same as a SAVEPOINT?\n> > \n> > No. Checkpoints are to speedup after crash recovery and\n> > to remove/archive log files. With WAL server doesn't write\n> > any datafiles on commit, only commit record goes to log\n> > (and log fsync-ed). Dirty buffers remains in memory long\n> \n> Is log fsynced even I turn of -F?\n\nYes, though we can change this. We also can implement now\nfeature that Bruce wanted so long and so much -:) -\nfsync log not on each commit but each ~ 5sec, if\nlosing some recent commits is acceptable.\n\nNevertheless, when bufmgr replaces dirty buffer it must\nensure first that log record of last buffer update is\non disk already and so bufmgr forces log fsync if required.\nThis cannot be changed - rule is simple: log before applying\nchanges to permanent storage.\n\nVadim\n",
"msg_date": "Wed, 8 Nov 2000 09:48:05 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> > > > > New CHECKPOINT command.\n> > > > > Auto removing of offline log files and creating new file\n> > > > > at checkpoint time.\n> > \n> > Can you tell me how to use CHECKPOINT please?\n> \n> You shouldn't normally use it - postmaster will start backend\n> each 3-5 minutes to do this automatically.\n> \n> > > > Is this the same as a SAVEPOINT?\n> > > \n> > > No. Checkpoints are to speedup after crash recovery and\n> > > to remove/archive log files. With WAL server doesn't write\n> > > any datafiles on commit, only commit record goes to log\n> > > (and log fsync-ed). Dirty buffers remains in memory long\n> > \n> > Is log fsynced even I turn of -F?\n> \n> Yes, though we can change this. We also can implement now\n> feature that Bruce wanted so long and so much -:) -\n> fsync log not on each commit but each ~ 5sec, if\n> losing some recent commits is acceptable.\n\nGreat. I think this middle ground is something we could never address\nbefore.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 8 Nov 2000 13:34:29 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> > Can you tell me how to use CHECKPOINT please?\n> \n> You shouldn't normally use it - postmaster will start backend\n> each 3-5 minutes to do this automatically.\n\nOh, I see.\n\n> > > > Is this the same as a SAVEPOINT?\n> > > \n> > > No. Checkpoints are to speedup after crash recovery and\n> > > to remove/archive log files. With WAL server doesn't write\n> > > any datafiles on commit, only commit record goes to log\n> > > (and log fsync-ed). Dirty buffers remains in memory long\n\nOk, so with CHECKPOINTS, we could move the offline log files to\nsomewhere else so that we could archive them, in my\nundertstanding. Now question is, how we could recover from disaster\nlike losing every table files except log files. Can we do this with\nWAL? If so, how can we do it?\n\n> > Is log fsynced even I turn of -F?\n> \n> Yes, though we can change this. We also can implement now\n> feature that Bruce wanted so long and so much -:) -\n> fsync log not on each commit but each ~ 5sec, if\n> losing some recent commits is acceptable.\n\nSounds great.\n--\nTatsuo Ishii\n",
"msg_date": "Sat, 11 Nov 2000 11:38:21 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "* Tatsuo Ishii <[email protected]> [001110 18:42] wrote:\n> > \n> > Yes, though we can change this. We also can implement now\n> > feature that Bruce wanted so long and so much -:) -\n> > fsync log not on each commit but each ~ 5sec, if\n> > losing some recent commits is acceptable.\n> \n> Sounds great.\n\nNot really, I thought an ack on a commit would mean that the data\nis actually in stable storage, breaking that would be pretty bad\nno? Or are you only talking about when someone is running with\nasync Postgresql?\n\nAlthough this doesn't have an effect on my current application,\nwhen running Postgresql with sync commits and WAL can one expect\nthe old behavior, ie. success only after data and meta data (log)\nare written?\n\nAnother question I had was what would the effect of a mid-fsync\ncrash have on a system using WAL, let's say someone yanks the\npower while the OS in the midst of fsync, will all be ok?\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Fri, 10 Nov 2000 19:19:25 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> * Tatsuo Ishii <[email protected]> [001110 18:42] wrote:\n> > > \n> > > Yes, though we can change this. We also can implement now\n> > > feature that Bruce wanted so long and so much -:) -\n> > > fsync log not on each commit but each ~ 5sec, if\n> > > losing some recent commits is acceptable.\n> > \n> > Sounds great.\n> \n> Not really, I thought an ack on a commit would mean that the data\n> is actually in stable storage, breaking that would be pretty bad\n> no? Or are you only talking about when someone is running with\n> async Postgresql?\n\nThe default is to sync on commit, but we need to give people options of\nseveral seconds delay for performance reasons. Inforimx calls it\nbuffered logging, and it is used by most of the sites I know because it\nhas much better performance that sync on commit.\n\nIf the machine crashes five seconds after commit, many people don't have\na problem with just re-entering the data.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 11 Nov 2000 03:07:12 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> * Tatsuo Ishii <[email protected]> [001110 18:42] wrote:\n> > > \n> > > Yes, though we can change this. We also can implement now\n> > > feature that Bruce wanted so long and so much -:) -\n> > > fsync log not on each commit but each ~ 5sec, if\n> > > losing some recent commits is acceptable.\n> > \n> > Sounds great.\n> \n> Not really, I thought an ack on a commit would mean that the data\n> is actually in stable storage, breaking that would be pretty bad\n> no? Or are you only talking about when someone is running with\n> async Postgresql?\n> \n> Although this doesn't have an effect on my current application,\n> when running Postgresql with sync commits and WAL can one expect\n> the old behavior, ie. success only after data and meta data (log)\n> are written?\n\nProbably you misunderstand what Bruce expected to have. He wished to\nhave not-everytime-fsync as an *option*. I believe we wil do strict\nfsync in default.\n--\nTatsuo Ishii\n",
"msg_date": "Sat, 11 Nov 2000 18:02:37 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001111 00:16] wrote:\n> > * Tatsuo Ishii <[email protected]> [001110 18:42] wrote:\n> > > > \n> > > > Yes, though we can change this. We also can implement now\n> > > > feature that Bruce wanted so long and so much -:) -\n> > > > fsync log not on each commit but each ~ 5sec, if\n> > > > losing some recent commits is acceptable.\n> > > \n> > > Sounds great.\n> > \n> > Not really, I thought an ack on a commit would mean that the data\n> > is actually in stable storage, breaking that would be pretty bad\n> > no? Or are you only talking about when someone is running with\n> > async Postgresql?\n> \n> The default is to sync on commit, but we need to give people options of\n> several seconds delay for performance reasons. Inforimx calls it\n> buffered logging, and it is used by most of the sites I know because it\n> has much better performance that sync on commit.\n> \n> If the machine crashes five seconds after commit, many people don't have\n> a problem with just re-entering the data.\n\nWe have several critical tables and running certain updates/deletes/inserts\non them in async mode worries me. Would it be possible to add a\n'set' command to force a backend into fsync mode and perhaps back\ninto non-fsync mode as well?\n\nWhat about setting an attribute on a table that could mean\na) anyone updating me better fsync me.\nb) anyone updating me better fsync me as well as fsyncing\n anything else they touch.\n\nI swear one of these days I'm going to get more familiar with the\ncodebase and actually submit some useful patches for the backend.\n:(\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n",
"msg_date": "Sat, 11 Nov 2000 02:23:42 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> Not really, I thought an ack on a commit would mean that the data\n>> is actually in stable storage, breaking that would be pretty bad\n>> no?\n\n> The default is to sync on commit, but we need to give people options of\n> several seconds delay for performance reasons. Inforimx calls it\n> buffered logging, and it is used by most of the sites I know because it\n> has much better performance that sync on commit.\n\nI have to agree with Alfred here: this does not sound like a feature,\nit sounds like a horrid hack. You're giving up *all* consistency\nguarantees for a performance gain that is really going to be pretty\nminimal in the WAL context.\n\nEarlier, Vadim was talking about arranging to share fsyncs of the WAL\nlog file across transactions (after writing your commit record to the\nlog, sleep a few milliseconds to see if anyone else fsyncs before you\ndo; if not, issue the fsync yourself). That would offer less-than-\none-fsync-per-transaction performance without giving up any guarantees.\nIf people feel a compulsion to have a tunable parameter, let 'em tune\nthe length of the pre-fsync sleep ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 11 Nov 2000 11:01:32 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> Not really, I thought an ack on a commit would mean that the data\n> >> is actually in stable storage, breaking that would be pretty bad\n> >> no?\n> \n> > The default is to sync on commit, but we need to give people options of\n> > several seconds delay for performance reasons. Inforimx calls it\n> > buffered logging, and it is used by most of the sites I know because it\n> > has much better performance that sync on commit.\n> \n> I have to agree with Alfred here: this does not sound like a feature,\n> it sounds like a horrid hack. You're giving up *all* consistency\n> guarantees for a performance gain that is really going to be pretty\n> minimal in the WAL context.\n\nIt does not give up consistency. The db is still consistent, it is just\nconsistent from a few seconds ago, rather than commit time. This is\nstandard Informix practice at most law firms I work with.\n\n> \n> Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> log file across transactions (after writing your commit record to the\n> log, sleep a few milliseconds to see if anyone else fsyncs before you\n> do; if not, issue the fsync yourself). That would offer less-than-\n> one-fsync-per-transaction performance without giving up any guarantees.\n> If people feel a compulsion to have a tunable parameter, let 'em tune\n> the length of the pre-fsync sleep ...\n\nThat would work.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 11 Nov 2000 14:13:02 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> I have to agree with Alfred here: this does not sound like a feature,\n>> it sounds like a horrid hack. You're giving up *all* consistency\n>> guarantees for a performance gain that is really going to be pretty\n>> minimal in the WAL context.\n\n> It does not give up consistency. The db is still consistent, it is just\n> consistent from a few seconds ago, rather than commit time.\n\nNo, it isn't consistent. Without the fsync you don't know what order\nthe kernel will choose to plop down WAL log blocks in; you could end up\nwith a corrupt log. (Actually, perhaps that could be worked around if\nthe log blocks are suitably marked so that you can tell where the last\nsequentially valid one is. I haven't looked at the log structure in\nany detail...)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 11 Nov 2000 15:02:47 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> I have to agree with Alfred here: this does not sound like a feature,\n> >> it sounds like a horrid hack. You're giving up *all* consistency\n> >> guarantees for a performance gain that is really going to be pretty\n> >> minimal in the WAL context.\n> \n> > It does not give up consistency. The db is still consistent, it is just\n> > consistent from a few seconds ago, rather than commit time.\n> \n> No, it isn't consistent. Without the fsync you don't know what order\n> the kernel will choose to plop down WAL log blocks in; you could end up\n> with a corrupt log. (Actually, perhaps that could be worked around if\n> the log blocks are suitably marked so that you can tell where the last\n> sequentially valid one is. I haven't looked at the log structure in\n> any detail...)\n> \n\nI am just suggesting that instead of flushing the log on every\ntransaction end, just do it every X seconds.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 11 Nov 2000 15:10:12 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> I have to agree with Alfred here: this does not sound like a feature,\n> >> it sounds like a horrid hack. You're giving up *all* consistency\n> >> guarantees for a performance gain that is really going to be pretty\n> >> minimal in the WAL context.\n> \n> > It does not give up consistency. The db is still consistent, it is just\n> > consistent from a few seconds ago, rather than commit time.\n> \n> No, it isn't consistent. Without the fsync you don't know what order\n> the kernel will choose to plop down WAL log blocks in; you could end up\n> with a corrupt log. (Actually, perhaps that could be worked around if\n> the log blocks are suitably marked so that you can tell where the last\n> sequentially valid one is. I haven't looked at the log structure in\n> any detail...)\n\nWell, WAL already has to be careful in the order it plops down the log\nblocks because a single transaction can span multiple log blocks.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 11 Nov 2000 15:13:54 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "* Tom Lane <[email protected]> [001111 12:06] wrote:\n> Bruce Momjian <[email protected]> writes:\n> >> I have to agree with Alfred here: this does not sound like a feature,\n> >> it sounds like a horrid hack. You're giving up *all* consistency\n> >> guarantees for a performance gain that is really going to be pretty\n> >> minimal in the WAL context.\n> \n> > It does not give up consistency. The db is still consistent, it is just\n> > consistent from a few seconds ago, rather than commit time.\n> \n> No, it isn't consistent. Without the fsync you don't know what order\n> the kernel will choose to plop down WAL log blocks in; you could end up\n> with a corrupt log. (Actually, perhaps that could be worked around if\n> the log blocks are suitably marked so that you can tell where the last\n> sequentially valid one is. I haven't looked at the log structure in\n> any detail...)\n\nThis could be fixed by using O_FSYNC on the open call for the WAL\ndata files on *BSD, i'm not sure of the sysV equivelant, but I know\nit exists.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Sat, 11 Nov 2000 23:00:50 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
}
]
|
[
{
"msg_contents": "Hi:\n\nHave this curious situation and would like some help from you:\n\nCreate an employee table:\n\nCREATE TABLE employee(\n id_employee SERIAL PRIMARY KEY,\n sex CHAR(1) DEFAULT 'm' CHECK(sex = 'f' OR sex = 'm'),\n start_date DATE NOT NULL,\n charge VARCHAR(50) NOT NULL,\n last_name VARCHAR(50),\n first_name VARCHAR(50) NOT NULL,\n title VARCHAR(10) NOT NULL\n);\n\nthen fill it with a few values:\n\ninsert into employee(title,first_name,start_date,charge) values('Mr. X','Smith',date(now()),'None');\ninsert into employee(title,first_name,start_date,charge) values('Mr. Y','Smith',date(now()),'None');\ninsert into employee(title,first_name,start_date,charge) values('Mr. Z','Smith',date(now()),'None');\n\nso far there is no problem at all, the problem comes here:\n\nselect title || ' ' || first_name || ' ' || last_name as fullname from employee;\n\n fullname \n----------------\n \n \n \n (3 rows)\n\nDoesn't work !!!!, I'm thinking it is because of the null value in last_name. Have any idea or suggestion on how to workaround this situation.\n\nThank you.\n\n--\nLuis Maga�a\nGnovus Networks & Software\nwww.gnovus.com\nTel. +52 (7) 4422425\[email protected]\n\n\n",
"msg_date": "Wed, 08 Nov 2000 17:47:44 -0600",
"msg_from": "Luis =?UNKNOWN?Q?Maga=F1a?= <[email protected]>",
"msg_from_op": true,
"msg_subject": "Text concat problem"
},
{
"msg_contents": "Luis Maga�a wrote:\n> \n> Hi:\n> \n> Have this curious situation and would like some help from you:\n> \n> Create an employee table:\n> \n> CREATE TABLE employee(\n> id_employee SERIAL PRIMARY KEY,\n> sex CHAR(1) DEFAULT 'm' CHECK(sex = 'f' OR sex = 'm'),\n> start_date DATE NOT NULL,\n> charge VARCHAR(50) NOT NULL,\n> last_name VARCHAR(50),\n> first_name VARCHAR(50) NOT NULL,\n> title VARCHAR(10) NOT NULL\n> );\n> \n> then fill it with a few values:\n> \n> insert into employee(title,first_name,start_date,charge) values('Mr. X','Smith',date(now()),'None');\n> insert into employee(title,first_name,start_date,charge) values('Mr. Y','Smith',date(now()),'None');\n> insert into employee(title,first_name,start_date,charge) values('Mr. Z','Smith',date(now()),'None');\n> \n> so far there is no problem at all, the problem comes here:\n> \n> select title || ' ' || first_name || ' ' || last_name as fullname from employee;\n> \n> fullname\n> ----------------\n> \n> \n> \n> (3 rows)\n> \n> Doesn't work !!!!, I'm thinking it is because of the null value in last_name. Have any idea or suggestion on how to workaround this situation.\n\nYup.. it's due to the null.. I believe that the coalesce function can\nget you out of this... Speaking of which, why isn't it called NVL()?\n\n\nhttp://www.postgresql.org/users-lounge/docs/7.0/user/functions.htm\n\n\nTry this (untested):\n\nselect coalesce(title, ''::varchar) || ' ' || coalesce(first_name,\n''::varchar) || ' ' || coalesce(last_name, ''::varchar) as fullname from\nemployee;\n",
"msg_date": "Wed, 08 Nov 2000 23:34:36 -0500",
"msg_from": "Rod Taylor <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Text concat problem"
},
{
"msg_contents": "Rod Taylor <[email protected]> writes:\n> I believe that the coalesce function can\n> get you out of this... Speaking of which, why isn't it called NVL()?\n\nBecause the SQL92 standard calls it coalesce.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 08 Nov 2000 23:38:18 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Text concat problem "
},
{
"msg_contents": "That would be an extreamly good reason then. I suppose I've fallen into\nthe 'other' standard :(\n\nTom Lane wrote:\n> \n> Rod Taylor <[email protected]> writes:\n> > I believe that the coalesce function can\n> > get you out of this... Speaking of which, why isn't it called NVL()?\n> \n> Because the SQL92 standard calls it coalesce.\n> \n> regards, tom lane\n",
"msg_date": "Wed, 08 Nov 2000 23:44:06 -0500",
"msg_from": "Rod Taylor <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Text concat problem"
},
{
"msg_contents": "At 05:47 PM 11/8/00 -0600, Luis =?UNKNOWN?Q?Maga=F1a?= wrote:\n\n>insert into employee(title,first_name,start_date,charge) values('Mr.\nX','Smith',date(now()),'None');\n>insert into employee(title,first_name,start_date,charge) values('Mr.\nY','Smith',date(now()),'None');\n>insert into employee(title,first_name,start_date,charge) values('Mr.\nZ','Smith',date(now()),'None');\n>\n>so far there is no problem at all, the problem comes here:\n>\n>select title || ' ' || first_name || ' ' || last_name as fullname from\nemployee;\n>\n> fullname \n>----------------\n> \n> \n> \n> (3 rows)\n>\n>Doesn't work !!!!, I'm thinking it is because of the null value in last_name.\n\nRight. NULL means \"has no value\", it's not the empty string. The result of\nconcatenating with NULL is NULL.\n\n> Have any idea or suggestion on how to workaround this situation.\n\nIt's a classic NULL issue. 1+NULL = NULL, too, for instance. Try\nsomething like\n\"default ''\" in your table definition rather than use null. Then you'll be\nusing\nthe empty string for concatenation. 'abc' || NULL = NULL. 'abc' || '' =\n'abc'\nwhich appears to be what you want.\n\nThis is standard SQL92 behavior...\n\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 09 Nov 2000 06:20:57 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Text concat problem"
}
]
|
[
{
"msg_contents": "> Rollback of DROP TABLE now works in non-WAL code, and seems to work in\n> WAL code too. I did not add WAL logging, because I'm not quite sure\n> what to do, so rollforward probably does the wrong thing. Could you\n> deal with that part? smgr.c is the place that keeps the list of what\n> to delete at commit or abort.\n\nOk, thanks! I'll take list of relfilenodes to delete just before\ncommit and put it into commit record.\n\nVadim\n",
"msg_date": "Wed, 8 Nov 2000 16:14:03 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: Proposal for DROP TABLE rollback mechanism "
}
]
|
[
{
"msg_contents": "\n\nJeff MacDonald,\n\n-----------------------------------------------------\nPostgreSQL Inc\t\t| Hub.Org Networking Services\[email protected]\t\t| [email protected]\nwww.pgsql.com\t\t| www.hub.org\n1-902-542-0713\t\t| 1-902-542-3657\n-----------------------------------------------------\nFacsimile : 1 902 542 5386\nIRC Nick : bignose\n\n",
"msg_date": "Wed, 8 Nov 2000 21:44:51 -0400 (AST)",
"msg_from": "Jeff MacDonald <[email protected]>",
"msg_from_op": true,
"msg_subject": "test .. ignore"
}
]
|
[
{
"msg_contents": "Hi,\n\nI found an unreachable block during studing the PostgreSQL 7.0.2 by\nreading its souce code.\n\nStarting from line 1383 in postgres.c\n\n 1383 if (Verbose)\n 1384 {\n 1385 if (Verbose)\n 1386 {\n :\n 1389 }\n 1390 else\n 1391 {\n : // !! unreachable\n 1405 }\n 1406 }\n\nCan someone take a look of it? This shouldn't take long time to fix.\n\n\n--\nLimin Liu\n\n\n\n",
"msg_date": "Wed, 08 Nov 2000 17:58:01 -0800",
"msg_from": "Limin Liu <[email protected]>",
"msg_from_op": true,
"msg_subject": "unreachable block"
},
{
"msg_contents": "Seems to be long gone in current sources.\n\nI think at one time the two if's probably tested different flags.\nYou could dig through our CVS server if you want to know the history.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 08 Nov 2000 21:56:00 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: unreachable block "
}
]
|
[
{
"msg_contents": "============================================================================\n\nPOSTGRESQL BUG REPORT: MIC to EUC_TW code converting in mb support\n============================================================================\n\nSystem Configuration\n---------------------\n Architecture (example: Intel Pentium) :x86\n Operating System (example: Linux 2.0.26 ELF) :Linux 2.2.x and FreeBSD\n3.5R\n PostgreSQL version (example: PostgreSQL-7.0) :PostgreSQL-7.0.2\n Compiler used (example: gcc 2.8.0) :egcs-2.91.66, gcc 2.7.3\n\nA FULL description of the problem:\n------------------------------------------------\nIn PostgreSQL mb (multi-byte) support, there is a bug in code converting\n\nfor MIC to EUC_TW. Original mic2euc_tw() in conv.c converts CNS\n11643-1992\nPlane 2 into 2 bytes EUC_TW encoding. But characters in CNS 11643-1992\nPlane 2\nshould be converted into 4 bytes EUC_TW encoding instead.\n\nA way to repeat the problem:\n----------------------------------------------------------------------\nWhen you initdb with -E EUC_TW and set PGCLIENTENCODING to BIG5,\nyou will find all the characters in CNS 11643-1992 Plane 2 are\nincorrectly stored or output.\n\nThis problem might be fixed by the solution in the attachement.",
"msg_date": "Thu, 09 Nov 2000 10:12:10 +0800",
"msg_from": "Chih-Chang Hsieh <[email protected]>",
"msg_from_op": true,
"msg_subject": "A Patch for MIC to EUC_TW code converting in mb support"
},
{
"msg_contents": "> ============================================================================\n> \n> POSTGRESQL BUG REPORT: MIC to EUC_TW code converting in mb support\n> ============================================================================\n> \n> System Configuration\n> ---------------------\n> Architecture (example: Intel Pentium) :x86\n> Operating System (example: Linux 2.0.26 ELF) :Linux 2.2.x and FreeBSD\n> 3.5R\n> PostgreSQL version (example: PostgreSQL-7.0) :PostgreSQL-7.0.2\n> Compiler used (example: gcc 2.8.0) :egcs-2.91.66, gcc 2.7.3\n> \n> A FULL description of the problem:\n> ------------------------------------------------\n> In PostgreSQL mb (multi-byte) support, there is a bug in code converting\n> \n> for MIC to EUC_TW. Original mic2euc_tw() in conv.c converts CNS\n> 11643-1992\n> Plane 2 into 2 bytes EUC_TW encoding. But characters in CNS 11643-1992\n> Plane 2\n> should be converted into 4 bytes EUC_TW encoding instead.\n> \n> A way to repeat the problem:\n> ----------------------------------------------------------------------\n> When you initdb with -E EUC_TW and set PGCLIENTENCODING to BIG5,\n> you will find all the characters in CNS 11643-1992 Plane 2 are\n> incorrectly stored or output.\n> \n> This problem might be fixed by the solution in the attachement.\n\nThanks for pointing it out. Your fix seems correct.\n\nBTW I have found another bug with EUC_TW support. line 917 in conv.c:\n\n\t\t\t*p++ = c1 - LC_CNS11643_3 + 0xa3;\n\nthis should be:\n\n\t\t\t*p++ = *mic++ - LC_CNS11643_3 + 0xa3;\n\nOtherwise, CNS 11643-1992 Plane 3 or more won't work. Could you test\nit out with CNS 11643-1992 Plane 3 or more?\n\nIf they are ok, I will fix the current source and make a patch for\n7.0.3 (I guess it's too late to back-patch the 7.0 tree).\n--\nTatsuo Ishii\n",
"msg_date": "Thu, 09 Nov 2000 13:43:25 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: A Patch for MIC to EUC_TW code converting in mb\n support"
},
{
"msg_contents": "[Cced to hackers list]\n\n> > BTW I have found another bug with EUC_TW support. line 917 in conv.c:\n> >\n> > *p++ = c1 - LC_CNS11643_3 + 0xa3;\n> >\n> > this should be:\n> >\n> > *p++ = *mic++ - LC_CNS11643_3 + 0xa3;\n> >\n> > Otherwise, CNS 11643-1992 Plane 3 or more won't work. Could you test\n> > it out with CNS 11643-1992 Plane 3 or more?\n> \n> Thanks for your very quickly reply!!\n\nYou are welcome.\n\n> I think you are right, but I have not test it.\n> Because original Big5 encoding does not contain characters in CNS 11643-1992\n> Plane 3.\n> But I will have a chance to test it, we here are seeking the support for Big5E\n> (an extendied Big5\n> encoding) in PostgreSQL. Though most people who use PostgresSQL in Taiwan only\n> cares about\n> Big5 encoding .\n> \n> Would you like to answer some mb related questions for me? I am a newbie :P\n> \n> 1.) Because the 2nd byte of Big5 encoding overlaps with ASCII,\n> such as '\\' (this is very bad for many programs to work with Big5).\n\nAs long as frontend side knows the current client side encoding is\nBig5, this should be no problem. At least for libpq. It examins the\nfirst byte of Big5. If it is greater than 0x7f, then it must be a\ndouble byte Hanji. So libpq reads 2 bytes in this case, not matter the\nsecond byte is '\\'.\n\n> For example: If we initdb -E MULE_INTERNAL first,\n> SET CLIENT_ENCODING TO 'BIG5', and\n> INSERT INTO some_table VALUES (..., 'the last byte of some Big5 char is\n> backslash\\',...),\n> then we can not successfully complete this SQL INSERT -- the prompt of psql\n> changes\n> but psql does not execute it. If we initdb -E with EUC_TW, it's OK.\n> Is this is a parsing problem? What's your suggestion for the solution?\n\nHum. initdb -E MULE_INTERNAL should work as well. Let me dig into the\nproblem. It would be nice if you could send me the Big5 data for\ntesting by a private mail.\n\nBTW I would not recommend \"SET CLIENT_ENCODING TO 'BIG5'\" to do an\non-the-fly encoding changes. Since in this way, frontend side has no\nidea what the client encoding is. 7.0.x overcome this problem by\nintroducing new \\encoding command. For 6.5 or before I would recommend\nto use PGCLIENTENCODING environment variable.\n\n> 2.) Is using MULE_INTERNAL faster than EUC_TW as backend encoding when\n> PostgreSQL processing Big5 data? (It seems\n> BIG5->big52mic()->mic2euc_tw()->EUC_TW\n> needs 2 code converting procedures, but BIG5->big52mic()->EUC_TW only needs\n> one from\n> the mb sources)\n\nYes. But the difference would be very small. The expensive part is a\ntable look-up in big52mic.\n\nBTW 7.1 will support automatic encoding conversion between Unicode\n(UTF-8) and Big5 (or EUC_TW). Try the snapshot if you like.\n\n> 3.) Dose PostgreSQL's ODBC driver support mb?\n\nI don't think so. For Japanese (EUC_JP/SJIS) Kataoka has made patches\nto enable MB support in ODBC. It should not be very difficult to\nsupport EUC_TW/Big5, I don't know.\n--\nTatsuo Ishii\n",
"msg_date": "Tue, 14 Nov 2000 14:54:34 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [PATCHES] A Patch for MIC to EUC_TW code converting in mbsupport"
},
{
"msg_contents": "Tatsuo Ishii 嚙篇嚙瘩嚙瘦\n\n> > For example: If we initdb -E MULE_INTERNAL first,\n> > SET CLIENT_ENCODING TO 'BIG5', and\n> > INSERT INTO some_table VALUES (..., 'the last byte of some Big5 char is\n> > backslash\\',...),\n> > then we can not successfully complete this SQL INSERT -- the prompt of psql\n> > changes\n>\n> Hum. initdb -E MULE_INTERNAL should work as well. Let me dig into the\n> problem. It would be nice if you could send me the Big5 data for\n> testing by a private mail.\n> BTW I would not recommend \"SET CLIENT_ENCODING TO 'BIG5'\" to do an\n> on-the-fly encoding changes. Since in this way, frontend side has no\n> idea what the client encoding is. 7.0.x overcome this problem by\n> introducing new \\encoding command. For 6.5 or before I would recommend\n> to use PGCLIENTENCODING environment variable.\n\nYou are right! When I do \\encoding BIG5, it works.\nBut it seems that \"\\encoding\" can only be issued in\npsql's command prompt or be done with\nPQsetClientEncoding() in libpq.\n\nIf our application for input is written in PHP (4.0.2)\nHow do we notify PostgreSQL that the frontend encoding\nis 'BIG5' ? (pg_exec(\"\\encoding BIG5\") failed.)\nPostgreSQL 7.1 will support automatic code conversion for\nBIG5 to utf-8. Does it means that we do not have to\nannounce client encoding as long as the backend is utf-8?\n\nI have also tried to set the environment variable\nPGCLIENTENCODING to 'BIG5'. But when I execute\npsql and then issue \\encoding, it shows 'SQL_ASCII' in 7.0.2.\nIs this environment variable useless in 7.0.x and latter?\n\nThank you so much for a newbie!\n--\nChih-Chang Hsieh\n\n",
"msg_date": "Wed, 15 Nov 2000 09:16:58 +0800",
"msg_from": "Chih-Chang Hsieh <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [PATCHES] A Patch for MIC to EUC_TW code converting inmbsupport"
},
{
"msg_contents": "Can someone tell me where we are on this? Tatsuo, I think you said you\nwanted to apply this fix.\n\n\n> [Cced to hackers list]\n> \n> > > BTW I have found another bug with EUC_TW support. line 917 in conv.c:\n> > >\n> > > *p++ = c1 - LC_CNS11643_3 + 0xa3;\n> > >\n> > > this should be:\n> > >\n> > > *p++ = *mic++ - LC_CNS11643_3 + 0xa3;\n> > >\n> > > Otherwise, CNS 11643-1992 Plane 3 or more won't work. Could you test\n> > > it out with CNS 11643-1992 Plane 3 or more?\n> > \n> > Thanks for your very quickly reply!!\n> \n> You are welcome.\n> \n> > I think you are right, but I have not test it.\n> > Because original Big5 encoding does not contain characters in CNS 11643-1992\n> > Plane 3.\n> > But I will have a chance to test it, we here are seeking the support for Big5E\n> > (an extendied Big5\n> > encoding) in PostgreSQL. Though most people who use PostgresSQL in Taiwan only\n> > cares about\n> > Big5 encoding .\n> > \n> > Would you like to answer some mb related questions for me? I am a newbie :P\n> > \n> > 1.) Because the 2nd byte of Big5 encoding overlaps with ASCII,\n> > such as '\\' (this is very bad for many programs to work with Big5).\n> \n> As long as frontend side knows the current client side encoding is\n> Big5, this should be no problem. At least for libpq. It examins the\n> first byte of Big5. If it is greater than 0x7f, then it must be a\n> double byte Hanji. So libpq reads 2 bytes in this case, not matter the\n> second byte is '\\'.\n> \n> > For example: If we initdb -E MULE_INTERNAL first,\n> > SET CLIENT_ENCODING TO 'BIG5', and\n> > INSERT INTO some_table VALUES (..., 'the last byte of some Big5 char is\n> > backslash\\',...),\n> > then we can not successfully complete this SQL INSERT -- the prompt of psql\n> > changes\n> > but psql does not execute it. If we initdb -E with EUC_TW, it's OK.\n> > Is this is a parsing problem? What's your suggestion for the solution?\n> \n> Hum. initdb -E MULE_INTERNAL should work as well. Let me dig into the\n> problem. It would be nice if you could send me the Big5 data for\n> testing by a private mail.\n> \n> BTW I would not recommend \"SET CLIENT_ENCODING TO 'BIG5'\" to do an\n> on-the-fly encoding changes. Since in this way, frontend side has no\n> idea what the client encoding is. 7.0.x overcome this problem by\n> introducing new \\encoding command. For 6.5 or before I would recommend\n> to use PGCLIENTENCODING environment variable.\n> \n> > 2.) Is using MULE_INTERNAL faster than EUC_TW as backend encoding when\n> > PostgreSQL processing Big5 data? (It seems\n> > BIG5->big52mic()->mic2euc_tw()->EUC_TW\n> > needs 2 code converting procedures, but BIG5->big52mic()->EUC_TW only needs\n> > one from\n> > the mb sources)\n> \n> Yes. But the difference would be very small. The expensive part is a\n> table look-up in big52mic.\n> \n> BTW 7.1 will support automatic encoding conversion between Unicode\n> (UTF-8) and Big5 (or EUC_TW). Try the snapshot if you like.\n> \n> > 3.) Dose PostgreSQL's ODBC driver support mb?\n> \n> I don't think so. For Japanese (EUC_JP/SJIS) Kataoka has made patches\n> to enable MB support in ODBC. It should not be very difficult to\n> support EUC_TW/Big5, I don't know.\n> --\n> Tatsuo Ishii\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 01:01:30 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [PATCHES] A Patch for MIC to EUC_TW code converting\n\tin mbsupport"
},
{
"msg_contents": "> > BTW I would not recommend \"SET CLIENT_ENCODING TO 'BIG5'\" to do an\n> > on-the-fly encoding changes. Since in this way, frontend side has no\n> > idea what the client encoding is. 7.0.x overcome this problem by\n> > introducing new \\encoding command. For 6.5 or before I would recommend\n> > to use PGCLIENTENCODING environment variable.\n> \n> You are right! When I do \\encoding BIG5, it works.\n> But it seems that \"\\encoding\" can only be issued in\n> psql's command prompt or be done with\n> PQsetClientEncoding() in libpq.\n\nYes.\n\n> If our application for input is written in PHP (4.0.2)\n> How do we notify PostgreSQL that the frontend encoding\n> is 'BIG5' ? (pg_exec(\"\\encoding BIG5\") failed.)\n\nI know there are some patches for supporting \\encoding in PHP. Do you\nwant to get them?\n\n> PostgreSQL 7.1 will support automatic code conversion for\n> BIG5 to utf-8. Does it means that we do not have to\n> announce client encoding as long as the backend is utf-8?\n\nNo. You still need to declare that frontend side encoding is BIG5.\n\n> I have also tried to set the environment variable\n> PGCLIENTENCODING to 'BIG5'. But when I execute\n> psql and then issue \\encoding, it shows 'SQL_ASCII' in 7.0.2.\n> Is this environment variable useless in 7.0.x and latter?\n\nAfter checking the souce, I found the capability to recognize the\nPGCLIENTENCODING environment variable has been broken since 7.0.\nAttached is the patches for 7.0.3. I am going to fix current as well.",
"msg_date": "Fri, 17 Nov 2000 11:28:55 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [PATCHES] A Patch for MIC to EUC_TW code converting inmbsupport"
},
{
"msg_contents": "> Can someone tell me where we are on this? Tatsuo, I think you said you\n> wanted to apply this fix.\n\nI wanted to apply the fix after Chih-Chang Hsieh tested it out. But he\nsaid he couldn't becuase no test data was available for it. However I\nand he now are in the same opinion that the fix seems correct, and I\nam going to apply the fix, probably by tomorrow.\n\n> > [Cced to hackers list]\n> > \n> > > > BTW I have found another bug with EUC_TW support. line 917 in conv.c:\n> > > >\n> > > > *p++ = c1 - LC_CNS11643_3 + 0xa3;\n> > > >\n> > > > this should be:\n> > > >\n> > > > *p++ = *mic++ - LC_CNS11643_3 + 0xa3;\n> > > >\n> > > > Otherwise, CNS 11643-1992 Plane 3 or more won't work. Could you test\n> > > > it out with CNS 11643-1992 Plane 3 or more?\n> > > \n> > > Thanks for your very quickly reply!!\n> > \n> > You are welcome.\n> > \n> > > I think you are right, but I have not test it.\n> > > Because original Big5 encoding does not contain characters in CNS 11643-1992\n> > > Plane 3.\n> > > But I will have a chance to test it, we here are seeking the support for Big5E\n> > > (an extendied Big5\n> > > encoding) in PostgreSQL. Though most people who use PostgresSQL in Taiwan only\n> > > cares about\n> > > Big5 encoding .\n> > > \n> > > Would you like to answer some mb related questions for me? I am a newbie :P\n> > > \n> > > 1.) Because the 2nd byte of Big5 encoding overlaps with ASCII,\n> > > such as '\\' (this is very bad for many programs to work with Big5).\n> > \n> > As long as frontend side knows the current client side encoding is\n> > Big5, this should be no problem. At least for libpq. It examins the\n> > first byte of Big5. If it is greater than 0x7f, then it must be a\n> > double byte Hanji. So libpq reads 2 bytes in this case, not matter the\n> > second byte is '\\'.\n> > \n> > > For example: If we initdb -E MULE_INTERNAL first,\n> > > SET CLIENT_ENCODING TO 'BIG5', and\n> > > INSERT INTO some_table VALUES (..., 'the last byte of some Big5 char is\n> > > backslash\\',...),\n> > > then we can not successfully complete this SQL INSERT -- the prompt of psql\n> > > changes\n> > > but psql does not execute it. If we initdb -E with EUC_TW, it's OK.\n> > > Is this is a parsing problem? What's your suggestion for the solution?\n> > \n> > Hum. initdb -E MULE_INTERNAL should work as well. Let me dig into the\n> > problem. It would be nice if you could send me the Big5 data for\n> > testing by a private mail.\n> > \n> > BTW I would not recommend \"SET CLIENT_ENCODING TO 'BIG5'\" to do an\n> > on-the-fly encoding changes. Since in this way, frontend side has no\n> > idea what the client encoding is. 7.0.x overcome this problem by\n> > introducing new \\encoding command. For 6.5 or before I would recommend\n> > to use PGCLIENTENCODING environment variable.\n> > \n> > > 2.) Is using MULE_INTERNAL faster than EUC_TW as backend encoding when\n> > > PostgreSQL processing Big5 data? (It seems\n> > > BIG5->big52mic()->mic2euc_tw()->EUC_TW\n> > > needs 2 code converting procedures, but BIG5->big52mic()->EUC_TW only needs\n> > > one from\n> > > the mb sources)\n> > \n> > Yes. But the difference would be very small. The expensive part is a\n> > table look-up in big52mic.\n> > \n> > BTW 7.1 will support automatic encoding conversion between Unicode\n> > (UTF-8) and Big5 (or EUC_TW). Try the snapshot if you like.\n> > \n> > > 3.) Dose PostgreSQL's ODBC driver support mb?\n> > \n> > I don't think so. For Japanese (EUC_JP/SJIS) Kataoka has made patches\n> > to enable MB support in ODBC. It should not be very difficult to\n> > support EUC_TW/Big5, I don't know.\n> > --\n> > Tatsuo Ishii\n> > \n> \n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 11:29:02 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [PATCHES] A Patch for MIC to EUC_TW code\n\tconverting in mbsupport"
},
{
"msg_contents": "> > If our application for input is written in PHP (4.0.2)\n> > How do we notify PostgreSQL that the frontend encoding\n> > is 'BIG5' ? (pg_exec(\"\\encoding BIG5\") failed.)\n> \n> I know there are some patches for supporting \\encoding in PHP. Do you\n> want to get them?\n\nSorry for the delay. Here are the patches I promised against PHP\n3.0.15 or later.\n\nTo set the client encoding to BIG5:\n\npg_setclientencoding($cid, \"BIG5\");\n\n ($cid is the connection id)\n\nTo get the current client encoding:\n\npg_clientencoding($cid);\n\nNote that these fucntions are already included in the latest PHP4.\n--\nTatsuo Ishii",
"msg_date": "Fri, 22 Dec 2000 17:10:01 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [PATCHES] A Patch for MIC to EUC_TW code\n\tconverting inmbsupport"
},
{
"msg_contents": "Tatsuo Ishii wrote:\n\n> Here are the patches I promised against PHP\n> 3.0.15 or later.\n>\n> To set the client encoding to BIG5:\n>\n> pg_setclientencoding($cid, \"BIG5\");\n>\n> ($cid is the connection id)\n>\n> To get the current client encoding:\n>\n> pg_clientencoding($cid);\n>\n> Note that these fucntions are already included in the latest PHP4.\n\nThank you!\nYour README.mb has been translate into Chinese (Big5 encoding) in the\nattachement.\nWould someone like to review it?\nAfter translating it, I still have one question: (Sorry, I have not read the\nsource code.)\nWhat is the difference among \"libpq -- PQsetClientEncoding()\",\n\"SQL command -- SET NAMES\", and\n\"SQL command -- SET CLIENT_ENCODING\"?\nFor example: If we use PHP (>4.0.2), which way is correct or mostly correct?\n\n1. pg_setclientencoding($cid, \"BIG5\")\n2. pg_exec(\"SET NAMES 'BIG5'\")\n3. pg_exec(\"SET CLIENT_ENCODING TO 'BIG5'\")\n\n--\nChih-Chang Hsieh",
"msg_date": "Wed, 27 Dec 2000 19:55:47 +0800",
"msg_from": "Chih-Chang Hsieh <[email protected]>",
"msg_from_op": true,
"msg_subject": "About PQsetClientEncoding(),\"SET NAMES\",and \"SET CLIENT_ENCODING\""
},
{
"msg_contents": "> For example: If we use PHP (>4.0.2), which way is correct or mostly correct?\n> \n> 1. pg_setclientencoding($cid, \"BIG5\")\n> 2. pg_exec(\"SET NAMES 'BIG5'\")\n> 3. pg_exec(\"SET CLIENT_ENCODING TO 'BIG5'\")\n\n2 and 3 are actually identical: telling the backend \"Your client's\nencoding is BIG5, so you need to convert EUC_TW to BIG5 before sending\ndata to the client. Also you need to convert BIG5 to EUC_TW when\nreceiving data from him.\"\n\n1 is doing the same thing as 2 or 3 AND set the internal encoding of\nlibpq, which is linked to PHP, to BIG5. This is neccesary in case of\nthe second byte of BIG5 character is \"\\\" or one of other control\ncharacters.\n--\nTatsuo Ishii\n",
"msg_date": "Thu, 28 Dec 2000 08:36:41 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: About PQsetClientEncoding(),\"SET NAMES\",and \"SET CLIENT_ENCODING\""
},
{
"msg_contents": "We have merged README.mb into the official SGML docs, so the file is\ngone. Not sure what setup we have for SGML docs in different languages.\n\nSorry.\n\n\n---------------------------------------------------------------------------\n\n\nTatsuo Ishii wrote:\n\n> Here are the patches I promised against PHP\n> 3.0.15 or later.\n>\n> To set the client encoding to BIG5:\n>\n> pg_setclientencoding($cid, \"BIG5\");\n>\n> ($cid is the connection id)\n>\n> To get the current client encoding:\n>\n> pg_clientencoding($cid);\n>\n> Note that these fucntions are already included in the latest PHP4.\n\nThank you!\nYour README.mb has been translate into Chinese (Big5 encoding) in the\nattachement.\nWould someone like to review it?\nAfter translating it, I still have one question: (Sorry, I have not read the\nsource code.)\nWhat is the difference among \"libpq -- PQsetClientEncoding()\",\n\"SQL command -- SET NAMES\", and\n\"SQL command -- SET CLIENT_ENCODING\"?\nFor example: If we use PHP (>4.0.2), which way is correct or mostly correct?\n\n1. pg_setclientencoding($cid, \"BIG5\")\n2. pg_exec(\"SET NAMES 'BIG5'\")\n3. pg_exec(\"SET CLIENT_ENCODING TO 'BIG5'\")\n\n--\nChih-Chang Hsieh\n\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 29 Dec 2000 14:00:13 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] About PQsetClientEncoding(), \"SET NAMES\",\n\tand \"SET CLIENT_ENCODING\""
},
{
"msg_contents": "> We have merged README.mb into the official SGML docs, so the file is\n> gone. Not sure what setup we have for SGML docs in different languages.\n\nEven if the Big5 version of README.mb could be included in our SGML\ndocs, I don't think sgml tools could process Big5 without any problem\ndue to the nature of the encoding(probably ok for EUC-TW or\nUTF-8). What about placing it as doc/README.mb.big5 or whatever?\n--\nTatsuo Ishii\n",
"msg_date": "Sat, 30 Dec 2000 12:07:59 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] About PQsetClientEncoding(),\"SET NAMES\",and \"SET\n\tCLIENT_ENCODING\""
},
{
"msg_contents": "On Sat, 30 Dec 2000, Tatsuo Ishii wrote:\n\n> Even if the Big5 version of README.mb could be included in our SGML\n> docs, I don't think sgml tools could process Big5 without any problem\n> due to the nature of the encoding(probably ok for EUC-TW or\n> UTF-8). What about placing it as doc/README.mb.big5 or whatever?\n\nIMHO, doc/README.mb.big5 is enough.\n\n--\nChih-Chang Hsieh\n\n\n",
"msg_date": "Mon, 1 Jan 2001 20:32:48 +0800 (CST)",
"msg_from": "Chih-Chang Hsieh <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] About PQsetClientEncoding(),\"SET NAMES\",and \"SET\n\tCLIENT_ENCODING\""
},
{
"msg_contents": "\nTatsuo, I assume these are all done in 7.1, right?\n\n> > ============================================================================\n> > \n> > POSTGRESQL BUG REPORT: MIC to EUC_TW code converting in mb support\n> > ============================================================================\n> > \n> > System Configuration\n> > ---------------------\n> > Architecture (example: Intel Pentium) :x86\n> > Operating System (example: Linux 2.0.26 ELF) :Linux 2.2.x and FreeBSD\n> > 3.5R\n> > PostgreSQL version (example: PostgreSQL-7.0) :PostgreSQL-7.0.2\n> > Compiler used (example: gcc 2.8.0) :egcs-2.91.66, gcc 2.7.3\n> > \n> > A FULL description of the problem:\n> > ------------------------------------------------\n> > In PostgreSQL mb (multi-byte) support, there is a bug in code converting\n> > \n> > for MIC to EUC_TW. Original mic2euc_tw() in conv.c converts CNS\n> > 11643-1992\n> > Plane 2 into 2 bytes EUC_TW encoding. But characters in CNS 11643-1992\n> > Plane 2\n> > should be converted into 4 bytes EUC_TW encoding instead.\n> > \n> > A way to repeat the problem:\n> > ----------------------------------------------------------------------\n> > When you initdb with -E EUC_TW and set PGCLIENTENCODING to BIG5,\n> > you will find all the characters in CNS 11643-1992 Plane 2 are\n> > incorrectly stored or output.\n> > \n> > This problem might be fixed by the solution in the attachement.\n> \n> Thanks for pointing it out. Your fix seems correct.\n> \n> BTW I have found another bug with EUC_TW support. line 917 in conv.c:\n> \n> \t\t\t*p++ = c1 - LC_CNS11643_3 + 0xa3;\n> \n> this should be:\n> \n> \t\t\t*p++ = *mic++ - LC_CNS11643_3 + 0xa3;\n> \n> Otherwise, CNS 11643-1992 Plane 3 or more won't work. Could you test\n> it out with CNS 11643-1992 Plane 3 or more?\n> \n> If they are ok, I will fix the current source and make a patch for\n> 7.0.3 (I guess it's too late to back-patch the 7.0 tree).\n> --\n> Tatsuo Ishii\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 22 Jan 2001 17:21:37 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: A Patch for MIC to EUC_TW code converting in mb support"
},
{
"msg_contents": "> Tatsuo, I assume these are all done in 7.1, right?\n\nYes.\n--\nTatsuo Ishii\n\n> > > ============================================================================\n> > > \n> > > POSTGRESQL BUG REPORT: MIC to EUC_TW code converting in mb support\n> > > ============================================================================\n> > > \n> > > System Configuration\n> > > ---------------------\n> > > Architecture (example: Intel Pentium) :x86\n> > > Operating System (example: Linux 2.0.26 ELF) :Linux 2.2.x and FreeBSD\n> > > 3.5R\n> > > PostgreSQL version (example: PostgreSQL-7.0) :PostgreSQL-7.0.2\n> > > Compiler used (example: gcc 2.8.0) :egcs-2.91.66, gcc 2.7.3\n> > > \n> > > A FULL description of the problem:\n> > > ------------------------------------------------\n> > > In PostgreSQL mb (multi-byte) support, there is a bug in code converting\n> > > \n> > > for MIC to EUC_TW. Original mic2euc_tw() in conv.c converts CNS\n> > > 11643-1992\n> > > Plane 2 into 2 bytes EUC_TW encoding. But characters in CNS 11643-1992\n> > > Plane 2\n> > > should be converted into 4 bytes EUC_TW encoding instead.\n> > > \n> > > A way to repeat the problem:\n> > > ----------------------------------------------------------------------\n> > > When you initdb with -E EUC_TW and set PGCLIENTENCODING to BIG5,\n> > > you will find all the characters in CNS 11643-1992 Plane 2 are\n> > > incorrectly stored or output.\n> > > \n> > > This problem might be fixed by the solution in the attachement.\n> > \n> > Thanks for pointing it out. Your fix seems correct.\n> > \n> > BTW I have found another bug with EUC_TW support. line 917 in conv.c:\n> > \n> > \t\t\t*p++ = c1 - LC_CNS11643_3 + 0xa3;\n> > \n> > this should be:\n> > \n> > \t\t\t*p++ = *mic++ - LC_CNS11643_3 + 0xa3;\n> > \n> > Otherwise, CNS 11643-1992 Plane 3 or more won't work. Could you test\n> > it out with CNS 11643-1992 Plane 3 or more?\n> > \n> > If they are ok, I will fix the current source and make a patch for\n> > 7.0.3 (I guess it's too late to back-patch the 7.0 tree).\n> > --\n> > Tatsuo Ishii\n> > \n> \n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 23 Jan 2001 10:04:12 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: A Patch for MIC to EUC_TW code converting in mb\n support"
}
]
|
[
{
"msg_contents": "With current sources I get:\n\nregression=# select 'foo' < 'bar';\nERROR: pg_atoi: error in \"foo\": can't parse \"foo\"\n\nI was expecting the system to resolve this as a text comparison,\nbut it seems to have chosen int4 instead. This is, um, surprising\nbehavior.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 08 Nov 2000 22:23:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Bogosity in new unknown-type resolution code"
}
]
|
[
{
"msg_contents": "\n> I like that a lot. Solves the whole problem at a stroke, and even\n> adds some extra functionality (alternate templates).\n> \n> Do we need an actual enforcement mechanism for \"don't modify \n> template0\"?\n> I think we could live without that for now. If you're \n> worried about it,\n> one way would be to not allow connections of any sort to template0...\n> in fact template0 needn't be a real database at all, just a \n> $PGDATA/base\n> subdirectory with no pg_database entry.\n\nI like this \"not really a database\" idea.\nMight even be something for $libdir, no ?\nThen all that would be needed is a command that creates a\ndatabase from this location instead of template1.\n\nAndreas\n",
"msg_date": "Thu, 9 Nov 2000 08:55:59 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Unhappy thoughts about pg_dump and objects inherite\n\td from template1"
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> in fact template0 needn't be a real database at all, just a \n>> $PGDATA/base subdirectory with no pg_database entry.\n\n> I like this \"not really a database\" idea.\n> Might even be something for $libdir, no ?\n\nI thought about that but concluded that it'd just be a way to shoot\nourselves in the foot. The postmaster and backend per se don't know\nwhere $PGLIB is (offhand, I think only the initdb and createlang\nscripts do). If we add a dependency on $PGLIB, I think we'll just\nbe setting up a new way to cause configuration mistakes --- and copying\nthe wrong template0 data would be a pretty messy sort of mistake. So\nkeeping the template data under $PGDATA seems like the way to go.\n\nHowever, template0 needn't necessarily be under $PGDATA/base, it could\nbe its own subdirectory of $PGDATA. I'm not sure if that's a better\narrangement or not.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 10:19:53 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects inherite d from\n\ttemplate1"
}
]
|
[
{
"msg_contents": "\n> Just seems like we'd be forcing non-standard syntax on \n> ourselves when/if\n> CREATE DATABASE becomes CREATE SCHEMA;\n\nI do not think this will be the way.\n\n> I would assume that the two\n> statements would become synonymous? \n\nNo, I think we need the schema below the database hierarchy.\nThus you create a schema when already connected to a database.\n\nAndreas\n",
"msg_date": "Thu, 9 Nov 2000 08:59:41 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Unhappy thoughts about pg_dump and objects inherite\n\td from template1"
}
]
|
[
{
"msg_contents": "\n> >Do we still need the lastsysoid column in pg_database if we do things\n> >this way? Seems like what you really want is to suppress all the\n> >objects that are in template0, so you really only need one lastsysoid\n> >value, namely template0's. The other entries are useless AFAICS.\n\n> Where would you store the value if not in pg_database?\n\nWould probably best be a fixed value, that leaves room for modifications in \ntemplate0, that might be necessary for new versions.\n\nThis oid would have to be explicitly set as last step of initdb.\n\nAndreas\n",
"msg_date": "Thu, 9 Nov 2000 09:08:56 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Unhappy thoughts about pg_dump and objects inherite\n\td from template1"
}
]
|
[
{
"msg_contents": "At 08:59 9/11/00 +0100, Zeugswetter Andreas SB wrote:\n>\n>> Just seems like we'd be forcing non-standard syntax on \n>> ourselves when/if\n>> CREATE DATABASE becomes CREATE SCHEMA;\n>\n>I do not think this will be the way.\n>\n\nI know there was a lot of discussion of this a while ago, but was there a\nconsistant set of decisions made? \n\nI'd be very interested if someone could post the current thinking re:\nschemas, catalogs, and environments, because the way I read the SQL99 docs,\nthe catalog seems to correspond to a single postgres installation, and a\nschema seems to correspond to a postgres database (ie. tables and views are\ndefined in a schema, and schemas are defined in a catalog, and catalogs are\ndefined in an environment, and it looks like the environment is akin to the\nfile system/implementation & postmaster). \n\nPresumably this was raised before, but I'd love to see the consensus view,\nif it is documented.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Thu, 09 Nov 2000 23:40:56 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects\n\tinherited from template1"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> Presumably this was raised before, but I'd love to see the consensus view,\n> if it is documented.\n\nAFAIR, the discussion trailed off without any specific decisions being\nmade. One of the things that's still very open in my mind is whether\nwe want to keep the existing notion of independent databases within an\ninstallation, and if so how that maps onto the SQL-defined concepts.\n\nTo me, though, the point of independent databases is that they be\n*independent*, and therefore if we keep them I'd vote for mapping them\nto the top-level SQL notion (catalog, you said?). Schemas ought to be\nsubstructure within a database.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 10:36:44 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects inherited from\n\ttemplate1"
},
{
"msg_contents": "At 10:36 9/11/00 -0500, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> Presumably this was raised before, but I'd love to see the consensus view,\n>> if it is documented.\n>\n>AFAIR, the discussion trailed off without any specific decisions being\n>made. One of the things that's still very open in my mind is whether\n>we want to keep the existing notion of independent databases within an\n>installation, and if so how that maps onto the SQL-defined concepts.\n>To me, though, the point of independent databases is that they be\n>*independent*,\n\nI agree; it's a pain that one DB misbehaving kills an entire installation.\n\n\n>and therefore if we keep them I'd vote for mapping them\n>to the top-level SQL notion (catalog, you said?). Schemas ought to be\n>substructure within a database.\n\nI think the hierarchy goes:\n\n Environment->Catalog->Schema\n\n From what I can tell:\n\n1. the environment contains truly general things like the SQL parser, the\ntools for connecting to the DB etc - which I assume also contains the\nuser-authorization stuff.\n\n2. The catalog contains multiple schemas (this is the top level as far as\ndata definitions go, I think). Some predefined schemas (eg. the\nDEFINITION_SCHEMA) contain views that allow querying of all schema\ndefinitions in the catalog.\n\n3. Schemas are what we call databases. They contain tables, views wtc.\n\nThe SQL standard is careful to avoid using the term database in these\ndiscussions, though at one point it does equate 'database' with the part of\nthe environment that contains the actual SQL data (as opposed to metadata).\nIt's a pretty broad definition, and contrary to most peoples expections, I\nthink. Perhaps I'm wrong, but I think most people will equate database with\na schema (ie. the thing in which you define tables).\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Fri, 10 Nov 2000 02:53:37 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects\n\tinherited from template1"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> I think the hierarchy goes:\n> Environment->Catalog->Schema\n> From what I can tell:\n> 1. the environment contains truly general things like the SQL parser, the\n> tools for connecting to the DB etc - which I assume also contains the\n> user-authorization stuff.\n\nIn that case it would seem that environment maps to what we call an\ninstallation --- if users are environment-wide then that's certainly\nthe natural mapping. Then database maps to catalog and schema is a\nnew feature within databases.\n\n> 3. Schemas are what we call databases. They contain tables, views wtc.\n\nSchemas are *not* databases, because (IIRC) it's possible for a single\nsession to access multiple schemas.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 11:04:39 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects inherited from\n\ttemplate1"
},
{
"msg_contents": "Philip Warner writes:\n > Perhaps I'm wrong, but I think most people will equate database\n > with a schema (ie. the thing in which you define tables).\n\nI agree with most of what you say. However I am used to conflating\ncatalog with database. For example, the last product I put together\nhad one read-only schema and created one schema per project managed.\nThe client code accessed two or more schemata at a time. We used the\nterm database to mean all the schemata.\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWestern Geophysical -./\\.- by myself and does not represent\[email protected] -./\\.- the opinion of Baker Hughes or\nhttp://www.crosswinds.net/~petef -./\\.- its divisions.\n***== My old email address [email protected] will ==***\n***== not be operational from Fri 10 to Tue 14 Nov 2000. ==***\n",
"msg_date": "Thu, 9 Nov 2000 16:17:20 +0000 (GMT)",
"msg_from": "Pete Forman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects\n\tinherited from template1"
},
{
"msg_contents": "Phil - \nMy take on this can be found at:\n\nhttp://www.postgresql.org/mhonarc/pgsql-hackers/2000-03/msg00137.html\n\nPeter agrees with me (from my personal archive: the postgresql.org one\nhas holes in it!):\n\nhttp://cooker.ir.rice.edu/postgresql/msg19913.html\n\nThere was another discussion, a little earlier, over in GENERAL, I think.\n\nWhat seems to happen to all these dicussions is they wander off into\ntablespaces, and dataspaces, and what have you, instead of sticking to\njust SCHEMA. ;-)\n\nRoss\n\nOn Fri, Nov 10, 2000 at 02:53:37AM +1100, Philip Warner wrote:\n> At 10:36 9/11/00 -0500, Tom Lane wrote:\n> >Philip Warner <[email protected]> writes:\n> >> Presumably this was raised before, but I'd love to see the consensus view,\n> >> if it is documented.\n> >\n> \n> I think the hierarchy goes:\n> \n> Environment->Catalog->Schema\n\nSQL92 talks of a 'cluster of catalogs'\n\nRoss\n-- \nOpen source code is like a natural resource, it's the result of providing\nfood and sunshine to programmers, and then staying out of their way.\n[...] [It] is not going away because it has utility for both the developers \nand users independent of economic motivations. Jim Flynn, Sunnyvale, Calif.\n",
"msg_date": "Thu, 9 Nov 2000 10:34:07 -0600",
"msg_from": "\"Ross J. Reedstrom\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Unhappy thoughts about pg_dump and objects inherited from\n\ttemplate1"
},
{
"msg_contents": "Philip Warner writes:\n\n> I'd be very interested if someone could post the current thinking re:\n> schemas, catalogs, and environments, because the way I read the SQL99 docs,\n> the catalog seems to correspond to a single postgres installation, and a\n> schema seems to correspond to a postgres database (ie. tables and views are\n> defined in a schema, and schemas are defined in a catalog, and catalogs are\n> defined in an environment, and it looks like the environment is akin to the\n> file system/implementation & postmaster). \n\nThe thing you get from initdb is a \"cluster of catalogs\", a database is a\n\"catalog\", a schema is something below a catalog. (There is no such\nthing as an \"environment\" as a hierarchy level.) The idea was most likely\nthat a schema would be a purely logical hierarchy but a catalog may be a\nphysical hierarchy. (For example, it is not required that you can access\nmore than one catalog from a connection.)\n\nI think all people that were interested in this issue agreed with this. \n(If not, you better speak up, because I'd like to see schemas implemented\nASAP.)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Thu, 9 Nov 2000 17:34:49 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Schemas (Re: AW: Unhappy thoughts about pg_dump and objects\n\tinherited from template1)"
},
{
"msg_contents": "At 17:34 9/11/00 +0100, Peter Eisentraut wrote:\n>\n>The thing you get from initdb is a \"cluster of catalogs\", a database is a\n>\"catalog\", a schema is something below a catalog. (There is no such\n>thing as an \"environment\" as a hierarchy level.) \n\nI think that's what SQL99 calls the 'cluster of catalogs'.\n\n>I think all people that were interested in this issue agreed with this. \n>(If not, you better speak up, because I'd like to see schemas implemented\n>ASAP.)\n\nNope. Ross's links cover the issues I wanted to ask about.\n\nThanks.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Fri, 10 Nov 2000 04:02:46 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Schemas (Re: AW: Unhappy thoughts about pg_dump\n\tand objects inherited from template1)"
}
]
|
[
{
"msg_contents": "\nI have my server set up with one production postgres installation, and each\nuser can have their own database for their own use (usually web-related).\nThere are a limited number of trusted users, and I recently allowed one to\ndefine a C-language stored procedure. Unfortunately, I *think* this causes\nthe users database process to crash, roughly once a week (probably a memory\nleak).\n\nThe result of this is that *all* postmaster processes die, which is\nactually a problem for the other users. Now the simple solution is to have\none PG installation per user (or at least one PGDATA directory), but that\ndoes seem a little inefficient.\n\nI'd be interested to know the reason for killing the other backends; it\ndoes basically mean that each database has to have it's own PG installation\nif you want reliability.\n\nWould there be any potential to avoid these (possibly) unnecessary deaths?\nDoes the WAL and recovery process have any influence here?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Fri, 10 Nov 2000 00:08:22 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Question about reliability?"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> I'd be interested to know the reason for killing the other backends;\n\nBecause they all share the same shared-memory pool. After a backend\ncrash you can't be sure whether shared memory is corrupted or not.\n(Even if it's not been actively scribbled on by code gone wild, there\nare still going to be proc-table and lock-table entries for the failed\nbackend, and we have no other mechanism for getting rid of those.)\n\n> Would there be any potential to avoid these (possibly) unnecessary deaths?\n\nNo, at least it'll never get my vote.\n\nThere is a reason why C-language procedure creation is only allowed to\nthe superuser ;-) --- both in terms of reliability and in terms of\nability to access data, you are granting the author of a C procedure\n100% life-and-death power over your installation. If you find that his\ncode is not reliable enough for you, either remove it, fix it, or make\na separate playpen installation that he can crash at whim.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 10:43:28 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Question about reliability? "
},
{
"msg_contents": "At 10:43 9/11/00 -0500, Tom Lane wrote:\n>\n>> Would there be any potential to avoid these (possibly) unnecessary deaths?\n>\n>No, at least it'll never get my vote.\n>\n\nPresumably other than limiting to one 'database' per installation?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Fri, 10 Nov 2000 03:00:37 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Question about reliability? "
},
{
"msg_contents": "At 10:43 AM 11/9/00 -0500, Tom Lane wrote:\n\n>> Would there be any potential to avoid these (possibly) unnecessary deaths?\n>\n>No, at least it'll never get my vote.\n\nBesides, it's not that difficult for an application to recover from these\nprophylactic backend deaths. My PG driver for AOLserver does so\ntransparently,\nretrying queries that get the \"sorry I've been asked to shut down because some\nother backend screwed up and died - please retry your query\" but returning an\nerror for the actual query that caused a backend to hose itself.\n\nThe code using the driver is unaware that anything has happened (other than\nthe thread issuing the query that hosed the backend that died in execution, of\ncourse).\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 09 Nov 2000 08:47:43 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Question about reliability? "
}
]
|
[
{
"msg_contents": "\n> To me, though, the point of independent databases is that they be\n> *independent*, and therefore if we keep them I'd vote for mapping them\n> to the top-level SQL notion (catalog, you said?). Schemas ought to be\n> substructure within a database.\n\nYes, that was also \"sort of\" the bottom line of the lengthy thread, so\nI guess we could call it a plan.\n\nAndreas\n",
"msg_date": "Thu, 9 Nov 2000 16:47:16 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Unhappy thoughts about pg_dump and objects inhe\n\trited from template1"
}
]
|
[
{
"msg_contents": "\n> 3. Schemas are what we call databases. They contain tables, views wtc.\n\nLet us not start this all over again. Our database would correspond to a catalog\nif we put schemas below our database hierarchy.\n\nThe standard requires, that you see all schemas within one catalog in \none user session. We do not see tables in another database,\nthus our database is not equivalent to ANSI schemas.\n\nThe standard also requires, that you can qualify a tablename with a schema,\nlike: \"myschema\".tabname. This will be the most difficult thing for us.\n\nAndreas\n",
"msg_date": "Thu, 9 Nov 2000 17:10:02 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Unhappy thoughts about pg_dump and objects inhe\n\trited from template1"
}
]
|
[
{
"msg_contents": "\n> I agree; it's a pain that one DB misbehaving kills an entire installation.\n\nIf that is of concern you need separate postmasters, no way around that,\nand imho not a problem at all.\n\nAndreas\n",
"msg_date": "Thu, 9 Nov 2000 17:16:20 +0100 ",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Unhappy thoughts about pg_dump and objects inhe\n\trited from template1"
}
]
|
[
{
"msg_contents": "At 17:10 9/11/00 +0100, Zeugswetter Andreas SB wrote:\n>\n>> 3. Schemas are what we call databases. They contain tables, views wtc.\n>\n>Let us not start this all over again. Our database would correspond to a\ncatalog\n>if we put schemas below our database hierarchy.\n>\n>The standard requires, that you see all schemas within one catalog in \n>one user session. We do not see tables in another database,\n>thus our database is not equivalent to ANSI schemas.\n\nWe could run around in circles here: you can't define tables in a catalog,\nso our database must be a schema...so it seems that our database is part\ncatalog, part schema. The important question is how can we most efficiently\nimplement schemas & catalogs, and I assume that implementing multiple\ndatabase connections in one backend process would require a lot more work\nthan putting a schema layer into our current 'databases'.\n\n\n>The standard also requires, that you can qualify a tablename with a schema,\n>like: \"myschema\".tabname. This will be the most difficult thing for us.\n\nThe way Dec/RDB handled this transition was to have a default schema. ie.\nyou could 'attach' to a schema as the default schema (which happened by\ndefault, no pun intended). Subsequent table references that were not\nqualified by a schema name were assumed to be from this default schema. You\ncould subsequently attach to another schema and either (a) specify a schema\nalias, or (b) override the default schema. \n\nI think you can also use the schema name to qualify tables without an\nexplict attach (assuming you are in the catalog).\n\nPerhaps '\\connect catalog.schema' would open the catalog and make 'schema'\nthe default schema.\n\nThis way, client programs and users suffer the minimum confusion.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Fri, 10 Nov 2000 03:59:36 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: AW: AW: Unhappy thoughts about pg_dump and\n\tobjects inherited from template1"
}
]
|
[
{
"msg_contents": "I'm just catching up to the tip of the current tree, and find\nthat I have a reported failure in initdb. It seems to go through\n(most of) the steps, and just reports failure. I can thereafter\nstart a backend using an old RedHat script (which tries to run\ninitdb again but can't because the directory is not empty), and\nit goes okay.\n\nI've attached a capture of the initdb run. There's not much to\ngo on there....\n\n++ kevin\n\n\n-- \nKevin O'Gorman (805) 650-6274 mailto:[email protected]\nPermanent e-mail forwarder: mailto:Kevin.O'[email protected]\nAt school: mailto:[email protected]\nWeb: http://www.cs.ucsb.edu/~kogorman/index.html\nWeb: http://trixie.kosman.via.ayuda.com/~kevin/index.html\n\n\"There is a freedom lying beyond circumstance,\nderived from the direct intuition that life can\nbe grounded upon its absorption in what is\nchangeless amid change\" \n -- Alfred North Whitehead",
"msg_date": "Thu, 09 Nov 2000 10:44:51 -0800",
"msg_from": "\"Kevin O'Gorman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "initdb failure"
},
{
"msg_contents": "\"Kevin O'Gorman\" <[email protected]> writes:\n> I'm just catching up to the tip of the current tree, and find\n> that I have a reported failure in initdb.\n\ninitdb works fine for me (as of CVS from about 11:30AM EST today).\nTry running it with -d or -v or whatever the verbose-output option\nis to get more info.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 13:57:24 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: initdb failure "
}
]
|
[
{
"msg_contents": "I have a program that does a:\nDECLARE getsitescursor CURSOR FOR select...\n\nI ^C'd it and it didn't properly shut down the channel to\npostgresql and I got this crash:\n\n#0 0x4828ffc8 in kill () from /usr/lib/libc.so.4\n#1 0x482cbbf2 in abort () from /usr/lib/libc.so.4\n#2 0x814442f in ExcAbort () at excabort.c:27\n#3 0x81443ae in ExcUnCaught (excP=0x81a6070, detail=0, data=0x0, \n message=0x819a860 \"!(AllocSetContains(set, pointer))\") at exc.c:170\n#4 0x81443f5 in ExcRaise (excP=0x81a6070, detail=0, data=0x0, \n message=0x819a860 \"!(AllocSetContains(set, pointer))\") at exc.c:187\n#5 0x8143ae4 in ExceptionalCondition (\n conditionName=0x819a860 \"!(AllocSetContains(set, pointer))\", \n exceptionP=0x81a6070, detail=0x0, fileName=0x819a720 \"aset.c\", \n lineNumber=392) at assert.c:73\n#6 0x8147897 in AllocSetFree (set=0x8465134, \n pointer=0x84e0018 \"<hashtable 1>\") at aset.c:392\n#7 0x8148394 in PortalVariableMemoryFree (this=0x846512c, \n pointer=0x84e0018 \"<hashtable 1>\") at portalmem.c:204\n#8 0x8147e99 in MemoryContextFree (context=0x846512c, \n pointer=0x84e0018 \"<hashtable 1>\") at mcxt.c:245\n#9 0x81490e5 in PortalDrop (portalP=0x8467944) at portalmem.c:802\n#10 0x8148715 in CollectNamedPortals (portalP=0x0, destroy=1)\n at portalmem.c:442\n#11 0x814880f in AtEOXact_portals () at portalmem.c:472\n#12 0x80870ad in AbortTransaction () at xact.c:1053\n#13 0x80872ec in AbortOutOfAnyTransaction () at xact.c:1552\n#14 0x810b3d0 in PostgresMain (argc=9, argv=0xbfbff0e0, real_argc=10, \n real_argv=0xbfbffb40) at postgres.c:1643\n#15 0x80f0736 in DoBackend (port=0x8464000) at postmaster.c:2009\n#16 0x80f02c9 in BackendStartup (port=0x8464000) at postmaster.c:1776\n#17 0x80ef4ed in ServerLoop () at postmaster.c:1037\n#18 0x80eeed2 in PostmasterMain (argc=10, argv=0xbfbffb40) at postmaster.c:725\n#19 0x80bf3df in main (argc=10, argv=0xbfbffb40) at main.c:93\n#20 0x8063495 in _start ()\n\nthings go to pot here:\n387 {\n388 AllocChunk chunk;\n389 \n390 /* AssertArg(AllocSetIsValid(set)); */\n391 /* AssertArg(AllocPointerIsValid(pointer)); */\n392 AssertArg(AllocSetContains(set, pointer));\n393 \n394 chunk = AllocPointerGetChunk(pointer);\n395 \n396 #ifdef CLOBBER_FREED_MEMORY\n(gdb) print *set\n$2 = {blocks = 0x0, freelist = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}\n(gdb) print pointer\n$3 = 0x84e0018 \"<hashtable 1>\"\n\nThese sources are the current CVS sources with the exception of\nsome removed files by Marc.\n\nIs there any more information I can provide?\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 9 Nov 2000 17:04:30 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "* Alfred Perlstein <[email protected]> [001109 17:07] wrote:\n> I have a program that does a:\n> DECLARE getsitescursor CURSOR FOR select...\n> \n> I ^C'd it and it didn't properly shut down the channel to\n> postgresql and I got this crash:\n\n[snip]\n\n> These sources are the current CVS sources with the exception of\n> some removed files by Marc.\n> \n> Is there any more information I can provide?\n\nI forgot to mention, this is the latest REL7_0_PATCHES.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 9 Nov 2000 17:17:35 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "Alfred Perlstein <[email protected]> writes:\n> I have a program that does a:\n> DECLARE getsitescursor CURSOR FOR select...\n> I ^C'd it and it didn't properly shut down the channel to\n> postgresql and I got this crash:\n> ...\n> These sources are the current CVS sources with the exception of\n> some removed files by Marc.\n\nI tried this on my copy of 7.0.3:\n\ntest7=# begin; declare c cursor for select * from foo;\nBEGIN\nSELECT\ntest7=# fetch 1 from c;\n f1\n----\n 1\n(1 row)\n\n[kill -9 on the psql process from another window]\n\ntest7=# Killed\n\nThe postmaster log shows\n\npq_recvbuf: unexpected EOF on client connection\n\nand no sign of a crash. So there's more to this than just killing\na client that has a cursor. Can you provide a more complete example?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 20:18:59 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction "
},
{
"msg_contents": "I said:\n> So there's more to this than just killing\n> a client that has a cursor.\n\nOK, after digging some more, it seems that the critical requirement\nis that the cursor's query contain a hash join. I've been able to\nreproduce a crash here...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 20:45:27 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction "
},
{
"msg_contents": "I said:\n> OK, after digging some more, it seems that the critical requirement\n> is that the cursor's query contain a hash join.\n\nHere's the deal:\n\ntest7=# set enable_mergejoin to off;\nSET VARIABLE\ntest7=# begin;\nBEGIN\n-- I've previously checked that this produces a hash join plan:\ntest7=# declare c cursor for select * from foo t1, foo t2 where t1.f1=t2.f1;\nSELECT\ntest7=# fetch 1 from c;\n f1 | f1\n----+----\n 1 | 1\n(1 row)\n\ntest7=# abort;\nNOTICE: trying to delete portal name that does not exist.\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally\n before or while processing the request.\n\nThis happens with either 7.0.2 or 7.0.3 (probably with anything back to\n6.5, if not before). It does *not* happen with current development tip.\n\nThe problem is that two \"portal\" structures are used. One holds the\noverall query plan and execution state for the cursor, and the other\nholds the hash table for the hash join. During abort, the portal\nmanager tries to delete both of them. BUT: deleting the query plan\ncauses query cleanup to be executed, which among other things deletes\nthe hash join's table. Then the portal manager tries to delete the\nalready-deleted second portal, which leads first to the above notice\nand then to Assert failure (and probably would lead to coredump if\nyou didn't have Asserts on). Alternatively, it might try to delete\nthe hash join portal first, which would leave the query cleanup code\ndeleting an already-deleted portal, and doubtless still crashing.\n\nCurrent sources don't show the problem because hashtables aren't kept\nin portals anymore.\n\nI've thought for some time that CollectNamedPortals is a horrid kluge,\nand really ought to be rewritten. Hadn't seen it actually do the wrong\nthing before, but now...\n\nI guess the immediate question is do we want to hold up 7.0.3 release\nfor a fix? This bug is clearly ancient, so I'm not sure it's\nappropriate to go through a fire drill to fix it for 7.0.3.\nComments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 21:30:30 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction "
},
{
"msg_contents": "* Tom Lane <[email protected]> [001109 18:30] wrote:\n> I said:\n> > OK, after digging some more, it seems that the critical requirement\n> > is that the cursor's query contain a hash join.\n> \n> Here's the deal:\n> \n> test7=# set enable_mergejoin to off;\n> SET VARIABLE\n> test7=# begin;\n> BEGIN\n> -- I've previously checked that this produces a hash join plan:\n> test7=# declare c cursor for select * from foo t1, foo t2 where t1.f1=t2.f1;\n> SELECT\n> test7=# fetch 1 from c;\n> f1 | f1\n> ----+----\n> 1 | 1\n> (1 row)\n> \n> test7=# abort;\n> NOTICE: trying to delete portal name that does not exist.\n> pqReadData() -- backend closed the channel unexpectedly.\n> This probably means the backend terminated abnormally\n> before or while processing the request.\n> \n> This happens with either 7.0.2 or 7.0.3 (probably with anything back to\n> 6.5, if not before). It does *not* happen with current development tip.\n> \n> The problem is that two \"portal\" structures are used. One holds the\n> overall query plan and execution state for the cursor, and the other\n> holds the hash table for the hash join. During abort, the portal\n> manager tries to delete both of them. BUT: deleting the query plan\n> causes query cleanup to be executed, which among other things deletes\n> the hash join's table. Then the portal manager tries to delete the\n> already-deleted second portal, which leads first to the above notice\n> and then to Assert failure (and probably would lead to coredump if\n> you didn't have Asserts on). Alternatively, it might try to delete\n> the hash join portal first, which would leave the query cleanup code\n> deleting an already-deleted portal, and doubtless still crashing.\n> \n> Current sources don't show the problem because hashtables aren't kept\n> in portals anymore.\n> \n> I've thought for some time that CollectNamedPortals is a horrid kluge,\n> and really ought to be rewritten. Hadn't seen it actually do the wrong\n> thing before, but now...\n> \n> I guess the immediate question is do we want to hold up 7.0.3 release\n> for a fix? This bug is clearly ancient, so I'm not sure it's\n> appropriate to go through a fire drill to fix it for 7.0.3.\n> Comments?\n\nI dunno, having the database crash because a errant client disconnected\nwithout shutting down, or needed to abort a transaction looks like\na show stopper.\n\nWe do track CVS and wouldn't have a problem shifting to 7_0_3_PATCHES,\nbut I'm not sure if the rest of the userbase is going to have much\nfun.\n\nIt seems to be a serious problem, I think people wouldn't mind\nwaiting for you to squash this one.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 9 Nov 2000 18:43:24 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "> I guess the immediate question is do we want to hold up 7.0.3 release\n> for a fix? This bug is clearly ancient, so I'm not sure it's\n> appropriate to go through a fire drill to fix it for 7.0.3.\n> Comments?\n\nWe have delayed 7.0.3 already. Tom is fixing so many bugs, we may find\nat some point that Tom never stops fixing bugs long enough for us to do\na release. I say let's push 7.0.3 out. We can always do 7.0.4 later if\nwe wish.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 9 Nov 2000 21:54:02 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001109 18:55] wrote:\n> > I guess the immediate question is do we want to hold up 7.0.3 release\n> > for a fix? This bug is clearly ancient, so I'm not sure it's\n> > appropriate to go through a fire drill to fix it for 7.0.3.\n> > Comments?\n> \n> We have delayed 7.0.3 already. Tom is fixing so many bugs, we may find\n> at some point that Tom never stops fixing bugs long enough for us to do\n> a release. I say let's push 7.0.3 out. We can always do 7.0.4 later if\n> we wish.\n\nI think being able to crash the backend by just dropping a connection\nduring a pretty trivial query is a bad thing and it'd be more\nprudent to wait. I have no problem syncing with your guys CVS,\nbut people using redhat RPMS and FreeBSD Packages are going to wind\nup with this bug if you cut the release before squashing it. :(\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n",
"msg_date": "Thu, 9 Nov 2000 19:01:17 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "On Thu, 9 Nov 2000, Alfred Perlstein wrote:\n\n> * Bruce Momjian <[email protected]> [001109 18:55] wrote:\n> > > I guess the immediate question is do we want to hold up 7.0.3 release\n> > > for a fix? This bug is clearly ancient, so I'm not sure it's\n> > > appropriate to go through a fire drill to fix it for 7.0.3.\n> > > Comments?\n> > \n> > We have delayed 7.0.3 already. Tom is fixing so many bugs, we may find\n> > at some point that Tom never stops fixing bugs long enough for us to do\n> > a release. I say let's push 7.0.3 out. We can always do 7.0.4 later if\n> > we wish.\n> \n> I think being able to crash the backend by just dropping a connection\n> during a pretty trivial query is a bad thing and it'd be more\n> prudent to wait. I have no problem syncing with your guys CVS,\n> but people using redhat RPMS and FreeBSD Packages are going to wind\n> up with this bug if you cut the release before squashing it. :(\n\nI'm going to fall behind Alfred on this one ... something this easy to\nreproduce is a show stopper ...\n\nTom, if you can plug this one in the next, say, 48hrs (Saturday night),\nplease do ... else, I'll announce 7.0.3 on Saturday night and we'll leave\nit with such a large showstopper :(\n\n",
"msg_date": "Thu, 9 Nov 2000 23:40:17 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "The Hermit Hacker <[email protected]> writes:\n> Tom, if you can plug this one in the next, say, 48hrs (Saturday night),\n> please do ... else, I'll announce 7.0.3 on Saturday night and we'll leave\n> it with such a large showstopper :(\n\nI do have an idea for a simple stopgap answer --- testing now ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 22:42:10 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction "
},
{
"msg_contents": "The Hermit Hacker <[email protected]> writes:\n> Tom, if you can plug this one in the next, say, 48hrs (Saturday night),\n\nDone. Want to generate some new 7.0.3 release-candidate tarballs?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 23:09:16 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction "
},
{
"msg_contents": "On Thu, 9 Nov 2000, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > Tom, if you can plug this one in the next, say, 48hrs (Saturday night),\n> \n> Done. Want to generate some new 7.0.3 release-candidate tarballs?\n\nDone, and just forced a sync to ftp.postgresql.org of the new tarballs\n... if nobody reports any probs with this by ~midnight tomorrow night,\nI'll finish up the 'release links' and get vince to add release info to\nthe WWW site, followed by putting out an official announcement ...\n\nGreat work, as always :)\n\n\n",
"msg_date": "Fri, 10 Nov 2000 00:16:38 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction "
},
{
"msg_contents": "* The Hermit Hacker <[email protected]> [001109 20:19] wrote:\n> On Thu, 9 Nov 2000, Tom Lane wrote:\n> \n> > The Hermit Hacker <[email protected]> writes:\n> > > Tom, if you can plug this one in the next, say, 48hrs (Saturday night),\n> > \n> > Done. Want to generate some new 7.0.3 release-candidate tarballs?\n> \n> Done, and just forced a sync to ftp.postgresql.org of the new tarballs\n> ... if nobody reports any probs with this by ~midnight tomorrow night,\n> I'll finish up the 'release links' and get vince to add release info to\n> the WWW site, followed by putting out an official announcement ...\n> \n> Great work, as always :)\n\nTom rules.\n\n*thinking freebsd port should add user tgl rather than pgsql*\n\n:)\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 9 Nov 2000 20:54:26 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
},
{
"msg_contents": "* The Hermit Hacker <[email protected]> [001109 20:19] wrote:\n> On Thu, 9 Nov 2000, Tom Lane wrote:\n> \n> > The Hermit Hacker <[email protected]> writes:\n> > > Tom, if you can plug this one in the next, say, 48hrs (Saturday night),\n> > \n> > Done. Want to generate some new 7.0.3 release-candidate tarballs?\n> \n> Done, and just forced a sync to ftp.postgresql.org of the new tarballs\n> ... if nobody reports any probs with this by ~midnight tomorrow night,\n> I'll finish up the 'release links' and get vince to add release info to\n> the WWW site, followed by putting out an official announcement ...\n> \n> Great work, as always :)\n\nJust wanted to confirm that we haven't experianced the bug since we've\napplied Tom's patch several days ago.\n\nthanks for the excellent work!\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Sat, 11 Nov 2000 02:24:35 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 7.0.2 dies when connection dropped mid-transaction"
}
]
|
[
{
"msg_contents": "Tom asked me to bust it some more 8-)\n\nI've attached the query and the gdb backtrace. This is very\nrepeatable, so if there's more info needed, let me know.\n\n\n-- \nKevin O'Gorman (805) 650-6274 mailto:[email protected]\nPermanent e-mail forwarder: mailto:Kevin.O'[email protected]\nAt school: mailto:[email protected]\nWeb: http://www.cs.ucsb.edu/~kogorman/index.html\nWeb: http://trixie.kosman.via.ayuda.com/~kevin/index.html\n\n\"There is a freedom lying beyond circumstance,\nderived from the direct intuition that life can\nbe grounded upon its absorption in what is\nchangeless amid change\" \n -- Alfred North Whitehead",
"msg_date": "Thu, 09 Nov 2000 17:24:25 -0800",
"msg_from": "\"Kevin O'Gorman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Tip of current tree: Seg fault in query"
},
{
"msg_contents": "\"Kevin O'Gorman\" <[email protected]> writes:\n> Program received signal SIGSEGV, Segmentation fault.\n> attnameAttNum (rd=0x10000, a=0x82172a0 \"product_level\") at parse_relation.c:967\n> 967\t\tfor (i = 0; i < rd->rd_rel->relnatts; i++)\n> (gdb) bt\n> #0 attnameAttNum (rd=0x10000, a=0x82172a0 \"product_level\") at parse_relation.c:967\n> #1 0x809a818 in checkInsertTargets (pstate=0x8218350, cols=0x82172d0, attrnos=0xbffff058)\n> at parse_target.c:374\n\nIt looks to me like pstate->p_target_relation contains garbage (it seems\nunlikely that 0x10000 is a valid pointer). I changed the contents of\nstruct ParseState recently, so I'm wondering if you haven't just got\na problem with inconsistent object files. Does a make clean and rebuild\nfix it?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 22:50:37 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Tip of current tree: Seg fault in query "
}
]
|
[
{
"msg_contents": "I've run some tests with 7.1 + WAL & 7.0.2\nSetup: 5 tables (i int, t text), 100000 records in each table,\nsizeof(t column) is rand(256), indices on i column for all tables.\n-B 16384 -A 0 (+ --wal_buffers=256 in 7.1)\n\nSystem: SUN Ultra 10, 512M RAM, 1 (fast) IDE disk\n\nTest: 5 clients simultaneously performed\nUPDATE tableN SET t = '...rand(256) chars...' WHERE i = ...rand(100000)...;\nEach UPDATE was in separate transaction, client N changed tableN only,\neach client made 1000 transactions.\n\nResults: 5000 transactions took ~60 sec in 7.1, ~550 sec in 7.0.2 with fsync\nand ~60 sec without fsync.\n\nSo, seems that WAL added not just complexity to system -:)\n\nI'm going to commit redo for sequences tomorrow evening and\n#define XLOG by default after this (initdb will be required).\n\nVadim\n",
"msg_date": "Thu, 9 Nov 2000 19:44:01 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Results of testing WAL"
},
{
"msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n> Results: 5000 transactions took ~60 sec in 7.1, ~550 sec in 7.0.2 with fsync\n> and ~60 sec without fsync.\n\n> So, seems that WAL added not just complexity to system -:)\n\nSounds great!\n\n> I'm going to commit redo for sequences tomorrow evening and\n> #define XLOG by default after this (initdb will be required).\n\nI suggest bumping the catversion.h number when you #define XLOG,\nso that people won't be able to accidentally start an old postmaster\nwith new DB or vice versa.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 09 Nov 2000 23:15:11 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Results of testing WAL "
}
]
|
[
{
"msg_contents": "> > I'm going to commit redo for sequences tomorrow evening and\n> > #define XLOG by default after this (initdb will be required).\n> \n> I suggest bumping the catversion.h number when you #define XLOG,\n> so that people won't be able to accidentally start an old postmaster\n> with new DB or vice versa.\n\nThanks!\n\nVadim\n",
"msg_date": "Thu, 9 Nov 2000 20:06:37 -0800 ",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: Results of testing WAL "
}
]
|
[
{
"msg_contents": "\n> I have also mentioned this on two occasions now, and each has met with\n> total silence. I have come to interpret this to mean either (a) the idea is\n> too stupid to rate a comment, or (b) go ahead with the proposal. Since I am\n> not really proposing anything, I assume the correct interpretation is (a).\n\nI would interpret (c) it is not really that much of a problem for many,\nand what you have done so far was such an improvement that all are happy \nfor a while.\n\nAndreas\n",
"msg_date": "Fri, 10 Nov 2000 09:36:55 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Unhappy thoughts about pg_dump and objects inherite\n\td from template1"
}
]
|
[
{
"msg_contents": "\n> Results: 5000 transactions took ~60 sec in 7.1, ~550 sec in \n> 7.0.2 with fsync and ~60 sec without fsync.\n> \n> So, seems that WAL added not just complexity to system -:)\n\nWow, this sounds fantastic :-) \nI see my concerns where not justified.\n\nAndreas\n",
"msg_date": "Fri, 10 Nov 2000 09:39:54 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Results of testing WAL"
}
]
|
[
{
"msg_contents": "Yes it does look like it's the insert that's at fault. I've tested it on a\ncurrent backend here and it has the same problem.\n\nPeter\n\n-- \nPeter Mount\nEnterprise Support Officer, Maidstone Borough Council\nEmail: [email protected]\nWWW: http://www.maidstone.gov.uk\nAll views expressed within this email are not the views of Maidstone Borough\nCouncil\n\n\n-----Original Message-----\nFrom: Grant Finnemore [mailto:[email protected]]\nSent: Friday, November 10, 2000 10:21 AM\nTo: Peter Mount\nCc: Interfaces\nSubject: Re: [INTERFACES] JDBC 'Unterminated quoted string'\n\n\nPeter,\n\nJoseph Shraibman contacted me yesterday about whether or not the patch that\nI\nsent actually does the correct thing. I enclose my response below.\n\nIn brief, there seems to be some problem at the backend inserting a \\0. I\nhave\ntested the query from the modified jdbc driver, psql and a standalone\nbackend.\n\nRegards,\nGrant\n\nI tested by doing the following:-\nIn psql...\nCREATE TABLE t ( aa char(1) );\nINSERT INTO t VALUES ('\\0');\n\nIn java test program...\n PreparedStatement ps =\n conn.prepareStatement(\"insert into t values (?)\");\n ps.setString(1, String.valueOf('\\0'));\n ps.executeUpdate();\n\nIn psql...\ntest=# select * from t;\n aa\n----\n\n\n(2 rows)\ntest=# select ascii(aa) from t;\n ascii\n-------\n 32\n 32\n(2 rows)\n\nThis is wierd! Both psql and the java app insert the same value and both are\nnot 0.\n\nHowever,\ntest=# select ascii('\\0');\n ascii\n-------\n 0\n(1 row)\n\nThis appears correct, so the problem would appear to be in the insert.\n\n--\n> Poorly planned software requires a genius to write it\n> and a hero to use it.\n\nGrant Finnemore BSc(Eng) (mailto:[email protected])\nSoftware Engineer Universal Computer Services\nTel (+27)(11)712-1366 PO Box 31266 Braamfontein 2017, South Africa\nCell (+27)(82)604-5536 20th Floor, 209 Smit St., Braamfontein\nFax (+27)(11)339-3421 Johannesburg, South Africa\n\n",
"msg_date": "Fri, 10 Nov 2000 10:27:32 -0000",
"msg_from": "Peter Mount <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [INTERFACES] JDBC 'Unterminated quoted string'"
}
]
|
[
{
"msg_contents": "\nHi,\n\nI'm defining a new aggregate using a C transition function. It is of\ntype TEXT, so the C function gets pointers (*text) to the internal-state1 and\nnext-data-item parameters. \n\nQuestion is if the returning value of type *text must be palloc'ed or\ncan be just taken from the input parameters. In the latter case I get\nerror messages like \n\nNOTICE: PortalHeapMemoryFree: 0x0x40b22ce8 not in alloc set!\n\nDirk\n",
"msg_date": "Fri, 10 Nov 2000 12:19:21 +0100 (CET)",
"msg_from": "Dirk Lutzebaeck <[email protected]>",
"msg_from_op": true,
"msg_subject": "Must a C state transition function use palloc on the returned value?"
},
{
"msg_contents": "Dirk Lutzebaeck <[email protected]> writes:\n> I'm defining a new aggregate using a C transition function. It is of\n> type TEXT, so the C function gets pointers (*text) to the internal-state1 and\n> next-data-item parameters. \n\n> Question is if the returning value of type *text must be palloc'ed or\n> can be just taken from the input parameters.\n\nThe result must be a fresh palloc, since both inputs will be pfreed the\nmoment you return. 7.1 will copy the result for you if you are so\nincautious as to try to return an input, but 7.0.* just falls over :-(\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 10:03:07 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Must a C state transition function use palloc on the returned\n\tvalue?"
},
{
"msg_contents": "Tom Lane writes:\n > Dirk Lutzebaeck <[email protected]> writes:\n > > I'm defining a new aggregate using a C transition function. It is of\n > > type TEXT, so the C function gets pointers (*text) to the internal-state1 and\n > > next-data-item parameters. \n > \n > > Question is if the returning value of type *text must be palloc'ed or\n > > can be just taken from the input parameters.\n > \n > The result must be a fresh palloc, since both inputs will be pfreed the\n > moment you return. 7.1 will copy the result for you if you are so\n > incautious as to try to return an input, but 7.0.* just falls over :-(\n\nThanks! It works now...\n\nDirk\n\n",
"msg_date": "Fri, 10 Nov 2000 16:13:13 +0100 (CET)",
"msg_from": "Dirk Lutzebaeck <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Must a C state transition function use palloc on the returned\n\tvalue?"
}
]
|
[
{
"msg_contents": "\n> PS: You might consider applying the patch for (update where > not_found) -> 100\n\nNo, this is not allowed. sqlcode is supposed to be 0 in above case.\nYou need to explicitly check for the number of rows updated in your\nprogram if needed.\n\nAndreas\n",
"msg_date": "Fri, 10 Nov 2000 13:10:19 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Re: [INTERFACES] USE OF CURSORS IN ECPG"
},
{
"msg_contents": "Zeugswetter Andreas SB wrote:\n\n> > PS: You might consider applying the patch for (update where > not_found) -> 100\n>\n> No, this is not allowed. sqlcode is supposed to be 0 in above case.\n> You need to explicitly check for the number of rows updated in your\n> program if needed.\n>\n> Andreas\n\nAccording to my reading of the SQL standard this is the only compliant behaviour. Do\nyou know better?\n\nChristof\n\n\n",
"msg_date": "Fri, 10 Nov 2000 13:49:33 +0100",
"msg_from": "Christof Petig <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Re: [INTERFACES] USE OF CURSORS IN ECPG"
}
]
|
[
{
"msg_contents": "> > but, there is eighter an optimizer bug or a code bug in nabstime.c\n> > leading to regression failure in abstime, tinterval and horology.\n> > The rest all passes.\n> > Does anybody see similar behavior ?\n> \n> IIRC, the same regression tests fail on Linux/Alpha with 7.0.2, even\n> at -O0. I had assumed it was a 64-bit issue (probably time_t \n> is 64-bit on that platform), but maybe not. I haven't had time to dig into the\n> Alpha situation yet; can you poke at it on your machine and \n> narrow down the problem?\n\nThe macro AbsoluteTimeIsReal does not work somehow.\n\nAndreas\n",
"msg_date": "Fri, 10 Nov 2000 17:34:35 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Could turn on -O2 in AIX "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n> The macro AbsoluteTimeIsReal does not work somehow.\n\nHm. That expands to\n\n\t(((int) time) < ((int) 0x7FFFFFFC) && \\\n\t ((int) time) > ((int) 0x80000001))\n\nOn a machine where int is 32 bits, the second constant *ought* to be\ntreated as -2147483647, but I wonder if your compiler is doing something\nbizarre with it --- say, forcing the comparison to be done as unsigned\nrather than signed.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 11:49:14 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Could turn on -O2 in AIX "
}
]
|
[
{
"msg_contents": "Philip pointed out awhile back that it does not work to load a 7.0.*\ndump into current sources if the dumped database contains any\nprocedural language definitions. The dumped handler-function\ndefinitions will look like\n\nCREATE FUNCTION \"plpgsql_call_handler\" ( ) RETURNS opaque AS\n'/opt/postgres/lib/plpgsql.sl' LANGUAGE 'C';\n\nwhich was correct for 7.0.* ... but under 7.1 the handler functions\nuse the new-style function manager API and therefore need to be\ndeclared as LANGUAGE 'newC'. The system has no way to detect\nthis mistake, so you only find out when your plpgsql functions\ncrash :-(\n\nSomething's got to be done about this --- not being able to load\n7.0 dump files will not do.\n\nThe best kluge I've been able to think of so far is to hardwire\ninto CREATE FUNCTION a check for \"plpgsql_call_handler\" and the\nother existing PL handler function names, and force the language\nto be taken as 'newC' for these functions even if 'C' is specified.\n\nAt one time I had toyed with the idea of using 'C' to specify\ndynamically-loaded functions that use the new-style fmgr API, and\n'oldC' for old-style fmgr API. That would be nicer in the long run,\nand it'd fix this particular problem, but it'd break dumped definitions\nfor user-defined C functions that haven't yet been updated to new-style\nAPI. That doesn't seem like an acceptable tradeoff.\n\nHas anyone got a better idea?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 12:07:04 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Tom Lane writes:\n\n> Philip pointed out awhile back that it does not work to load a 7.0.*\n> dump into current sources if the dumped database contains any\n> procedural language definitions. The dumped handler-function\n> definitions will look like\n> \n> CREATE FUNCTION \"plpgsql_call_handler\" ( ) RETURNS opaque AS\n> '/opt/postgres/lib/plpgsql.sl' LANGUAGE 'C';\n> \n> which was correct for 7.0.* ... but under 7.1 the handler functions\n> use the new-style function manager API and therefore need to be\n> declared as LANGUAGE 'newC'.\n\nI don't really have a better idea, but consider if you installed 7.1 into\n/opt/postgres71: then this dump will load the old version of plpgsql.sl. \nAssuming that that would work in the first place, LANGUAGE 'C' is correct.\n\nBtw., could we use something other than 'newC'? It's going to get old\nreally fast (pun intended). Maybe 'Cv2' or something along these lines?\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Fri, 10 Nov 2000 19:05:01 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> I don't really have a better idea, but consider if you installed 7.1 into\n> /opt/postgres71: then this dump will load the old version of plpgsql.sl. \n\nTrue, but absolute paths in a dump file are a different (and\nlong-standing) issue.\n\n> Assuming that that would work in the first place, LANGUAGE 'C' is correct.\n\nIt wouldn't work, so that's irrelevant. The PL handlers know way more\nthan the average user-defined function about backend innards, and aren't\nusually cross-version compatible. They won't be this time, for sure.\n\n> Btw., could we use something other than 'newC'? It's going to get old\n> really fast (pun intended). Maybe 'Cv2' or something along these lines?\n\nWhere were you six months ago? ;-( It's a bit late in the dev cycle to\nbe running around renaming this kind of stuff...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 15:26:55 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "So new-style C functions are language \"newC\"?\n\n\n> Peter Eisentraut <[email protected]> writes:\n> > I don't really have a better idea, but consider if you installed 7.1 into\n> > /opt/postgres71: then this dump will load the old version of plpgsql.sl. \n> \n> True, but absolute paths in a dump file are a different (and\n> long-standing) issue.\n> \n> > Assuming that that would work in the first place, LANGUAGE 'C' is correct.\n> \n> It wouldn't work, so that's irrelevant. The PL handlers know way more\n> than the average user-defined function about backend innards, and aren't\n> usually cross-version compatible. They won't be this time, for sure.\n> \n> > Btw., could we use something other than 'newC'? It's going to get old\n> > really fast (pun intended). Maybe 'Cv2' or something along these lines?\n> \n> Where were you six months ago? ;-( It's a bit late in the dev cycle to\n> be running around renaming this kind of stuff...\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 10 Nov 2000 16:55:31 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "At 12:07 10/11/00 -0500, Tom Lane wrote:\n>\n>Something's got to be done about this --- not being able to load\n>7.0 dump files will not do.\n>\n\nI assume modifying pg_dump for 7.0.x is not an option, since we really need\nto support loading databases from historical dump files. If so, then would\nthere be any value in modifying the CREATE LANGUAGE code to output a\nwarning for non-newC handlers? Or just updating the function definition\n(with a WARNING) when the language is created?\n\n\n>At one time I had toyed with the idea of using 'C' to specify\n>dynamically-loaded functions that use the new-style fmgr API, and\n>'oldC' for old-style fmgr API. That would be nicer in the long run,\n>and it'd fix this particular problem, but it'd break dumped definitions\n>for user-defined C functions that haven't yet been updated to new-style\n>API. That doesn't seem like an acceptable tradeoff.\n\nAnother option in the long run would be to use language 'C' in all cases\nand add an attribute which allows people to specify the function manager to\nuse. For 7.1 this would default to 'fmgr71' or some such. Then only\nold-style functions would break as per your example (I dislike the idea of\nthe language changing when it is just the interface we modify).\n\nIn the even longer term, maybe the function manager should be able to\ninterrogate functions when they are first loaded, and ask them about the\ninterface they expect to use.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Sun, 12 Nov 2000 02:04:09 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> At 12:07 10/11/00 -0500, Tom Lane wrote:\n>> Something's got to be done about this --- not being able to load\n>> 7.0 dump files will not do.\n\n> I assume modifying pg_dump for 7.0.x is not an option,\n\nNot really ...\n\n> would\n> there be any value in modifying the CREATE LANGUAGE code to output a\n> warning for non-newC handlers? Or just updating the function definition\n> (with a WARNING) when the language is created?\n\nJust outputting a warning is possible, but it still leaves you with a\nbroken database after you reload your 7.0 dump file :-(. (And there\nisn't any supported way to fix it, short of reloading all your function\ndefinitions...) I thought about the fix-handler-at-CREATE-LANGUAGE-time\noption, but it doesn't seem noticeably cleaner than hacking CREATE\nFUNCTION.\n\n>> At one time I had toyed with the idea of using 'C' to specify\n>> dynamically-loaded functions that use the new-style fmgr API, and\n>> 'oldC' for old-style fmgr API. That would be nicer in the long run,\n>> and it'd fix this particular problem, but it'd break dumped definitions\n>> for user-defined C functions that haven't yet been updated to new-style\n>> API. That doesn't seem like an acceptable tradeoff.\n\n> Another option in the long run would be to use language 'C' in all cases\n> and add an attribute which allows people to specify the function manager to\n> use. For 7.1 this would default to 'fmgr71' or some such.\n\nNo, that just adds complexity without really accomplishing anything.\n>From the function manager's point of view, the \"language\" setting *is*\nthe interface, they're not separately twiddlable concepts.\n\nMore to the point, I think we have to assume old-style interface if we\nsee ... LANGUAGE 'C' with no other decoration, because any other\nassumption is guaranteed to break all existing user-defined functions.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 11 Nov 2000 10:55:16 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "At 10:55 11/11/00 -0500, Tom Lane wrote:\n>\n>Just outputting a warning is possible, but it still leaves you with a\n>broken database after you reload your 7.0 dump file :-(. (And there\n>isn't any supported way to fix it, short of reloading all your function\n>definitions...) I thought about the fix-handler-at-CREATE-LANGUAGE-time\n>option, but it doesn't seem noticeably cleaner than hacking CREATE\n>FUNCTION.\n\nIs it the PL manager stuff that requires the new interface for all\nlanguages, or is it up to the PL implementor to choose the language for\ntheir handler?\n\n\n>> Another option in the long run would be to use language 'C' in all cases\n>> and add an attribute which allows people to specify the function manager to\n>> use. For 7.1 this would default to 'fmgr71' or some such.\n>\n>No, that just adds complexity without really accomplishing anything.\n>>From the function manager's point of view, the \"language\" setting *is*\n>the interface, they're not separately twiddlable concepts.\n\nIt does avoid \"language 'evenNewerC'\" in the furture. By allowing optional\nattributes to use older fmgr interfaces we preserve compatibility without\ncluttering the list of languages. From the developer/user point of view,\nthe language is 'C' if it's written in C.\n\n\n>More to the point, I think we have to assume old-style interface if we\n>see ... LANGUAGE 'C' with no other decoration, because any other\n>assumption is guaranteed to break all existing user-defined functions.\n\nQuite right. The (unspecified) plan was to allow an environmental setting\nthat set the default attr for \"language 'C'\" functions. Then restoring a\ndump file would be a matter of setting this variable to use the old\ninterface at the start of the script.\n\nWhat about (not for 7.1) adding the ability for the fmgr to query object\nmodules. eg. look for an entry point 'pg_fmgr_info' or similar, and if\nfound call it to get attrs of functions. Then the person defining the\nfunction in the database is freed of the need for a large amount of\ninformation about the functions. Might even be able to implement a 'CREATE\nMODULE' which loads an object, enquires about functions in the module, and\ncreates function entries based on information returned from pg_fmgr_info...\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Sun, 12 Nov 2000 12:14:00 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language\n names"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> Is it the PL manager stuff that requires the new interface for all\n> languages, or is it up to the PL implementor to choose the language for\n> their handler?\n\nThe current fmgr implementation requires PL handlers to be newC or\nnewInternal. That could be relaxed, but I don't see any reason to do\nso, since an old-style handler would be incapable of handling null\narguments/results or supporting triggers.\n\n>> No, that just adds complexity without really accomplishing anything.\n>>> From the function manager's point of view, the \"language\" setting *is*\n>> the interface, they're not separately twiddlable concepts.\n\n> It does avoid \"language 'evenNewerC'\" in the furture.\n\nHow so? It appears to me it would just move the 'evenNewerFoo'\ndirtiness to a different keyword, which would still be essential\nfor the user to write. Net result: no gain, just more writing.\n\n> By allowing optional\n> attributes to use older fmgr interfaces we preserve compatibility without\n> cluttering the list of languages. From the developer/user point of view,\n> the language is 'C' if it's written in C.\n\nNo. 'C' is really a misnomer, since it does NOT imply anything about\nwhether the code is in C or not --- in theory you could use any language\nthat's link-compatible with C. What LANGUAGE 'C' really implies is\n\"dynamically linked, compiled function following fmgr interface\nconvention #1\"\", as opposed to (for example) LANGUAGE 'internal' which\nimplies \"statically linked, compiled function following fmgr interface\nconvention #1\". Nothing about language at all.\n\n> Quite right. The (unspecified) plan was to allow an environmental setting\n> that set the default attr for \"language 'C'\" functions. Then restoring a\n> dump file would be a matter of setting this variable to use the old\n> interface at the start of the script.\n\nInteresting idea, but it'll fall down as soon as there's more than one\npossible value. You don't think that people are going to update all\ntheir functions to a new interface style at the same time, do you?\n\n> Might even be able to implement a 'CREATE MODULE' which loads an\n> object, enquires about functions in the module, and creates function\n> entries based on information returned from pg_fmgr_info...\n\nThat could work ... something to think about for the future, anyway.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 11 Nov 2000 20:30:48 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "On Sat, Nov 11, 2000 at 08:30:48PM -0500, Tom Lane wrote:\n> Philip Warner <[email protected]> writes:\n\n...\n\n> > It does avoid \"language 'evenNewerC'\" in the furture.\n> \n> How so? It appears to me it would just move the 'evenNewerFoo'\n> dirtiness to a different keyword, which would still be essential\n> for the user to write. Net result: no gain, just more writing.\n> \n> > By allowing optional\n> > attributes to use older fmgr interfaces we preserve compatibility without\n> > cluttering the list of languages. From the developer/user point of view,\n> > the language is 'C' if it's written in C.\n> \n> No. 'C' is really a misnomer, since it does NOT imply anything about\n> whether the code is in C or not --- in theory you could use any language\n> that's link-compatible with C. What LANGUAGE 'C' really implies is\n> \"dynamically linked, compiled function following fmgr interface\n> convention #1\"\", as opposed to (for example) LANGUAGE 'internal' which\n> implies \"statically linked, compiled function following fmgr interface\n> convention #1\". Nothing about language at all.\n\nMaybe the construct\n\n CREATE FUNCTION foo(..) RETURNS ...\n AS '../foo.so' LANGUAGE 'C';\n\nwould be cleaner as\n\n CREATE FUNCTION foo(..) RETURNS ...\n FROM '../foo.so', 'pg_foo' [[WITH] VERSION abi_ver];\n\nor with more noise:\n \n FROM [LIBRARY] '../foo.so' AS 'pg_foo' [[WITH] VERSION abi_ver];\n\nbecause as said, it can be any other language besides C and also\nthe 'AS file' is weird.\n\n\n-- \nmarko\n\n",
"msg_date": "Sun, 12 Nov 2000 04:01:08 +0200",
"msg_from": "Marko Kreen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "> > No. 'C' is really a misnomer, since it does NOT imply anything about\n> > whether the code is in C or not --- in theory you could use any language\n> > that's link-compatible with C. What LANGUAGE 'C' really implies is\n> > \"dynamically linked, compiled function following fmgr interface\n> > convention #1\"\", as opposed to (for example) LANGUAGE 'internal' which\n> > implies \"statically linked, compiled function following fmgr interface\n> > convention #1\". Nothing about language at all.\n> \n> Maybe the construct\n> \n> CREATE FUNCTION foo(..) RETURNS ...\n> AS '../foo.so' LANGUAGE 'C';\n> \n> would be cleaner as\n> \n> CREATE FUNCTION foo(..) RETURNS ...\n> FROM '../foo.so', 'pg_foo' [[WITH] VERSION abi_ver];\n> \n> or with more noise:\n> \n> FROM [LIBRARY] '../foo.so' AS 'pg_foo' [[WITH] VERSION abi_ver];\n> \n> because as said, it can be any other language besides C and also\n> the 'AS file' is weird.\n\nThis is interesting. It allows us to control the default behavour of\n\"C\". I would vote to default to 7.0-style when no version is used for\n7.1, then default to 7.1 style in 7.2 and later. We don't need\nbackward C function compatibility for more than one release, I think.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 11 Nov 2000 21:15:44 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "At 21:15 11/11/00 -0500, Bruce Momjian wrote:\n>\n>This is interesting. It allows us to control the default behavour of\n>\"C\". I would vote to default to 7.0-style when no version is used for\n>7.1, then default to 7.1 style in 7.2 and later. We don't need\n>backward C function compatibility for more than one release, I think.\n>\n\nThe reason I'd like to see the 'pg_fmgr_info' method in 7.2 is that it will\ncompletely remove any ambiguity from function definitions in the future. \n\neg. something like:\n\n CREATE FUNCTION foo(..) RETURNS ...\n FROM LIBRARY '../foolib.so';\n\nWhen a backend *loads* the library file, it would call pg_fmgr_info,\npossibly passing the desired function name, and would get in return the\ncalling semantics (including version information). This would not be stored\nin the database, since updates to the object file may change the semantics.\n\nThis would make all functions upward compatible. It also has what I\nconsider a big advantage in that the person who writes the function knows\nif it is cacheable, strict etc, and it removes the effective duplication of\neffort, not to mention possible errors.\n\nAs a final bonus, it makes the following possible:\n\n CREATE MODULE foomod FROM LIBRARY '../foolib.so';\n\nwhen this statement is executed, pg_fmgr_info could be called to return a\nlist of definied functions...for functions created this way, pg_dump would\nonly need to dump the module definition.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Sun, 12 Nov 2000 13:43:56 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "At 20:30 11/11/00 -0500, Tom Lane wrote:\n>\n>The current fmgr implementation requires PL handlers to be newC or\n>newInternal. That could be relaxed, but I don't see any reason to do\n>so, since an old-style handler would be incapable of handling null\n>arguments/results or supporting triggers.\n\nOK, then given this, the CREATE LANGUAGE statement really should output a\nwarning and/or force a change in the language.\n\n\n>> It does avoid \"language 'evenNewerC'\" in the furture.\n>\n>How so? It appears to me it would just move the 'evenNewerFoo'\n>dirtiness to a different keyword, which would still be essential\n>for the user to write. Net result: no gain, just more writing.\n\nWell the gain is that by version 8.3 we won't be requiring all new\nfunctions to use 'veryVeryExtraSpecialC' as their language name. The\nclutter has no negative effect on updated and new functions. Equally well,\nif we use pg_fmgr_info or similar the problem will go away.\n\n\n>> Quite right. The (unspecified) plan was to allow an environmental setting\n>> that set the default attr for \"language 'C'\" functions. Then restoring a\n>> dump file would be a matter of setting this variable to use the old\n>> interface at the start of the script.\n>\n>Interesting idea, but it'll fall down as soon as there's more than one\n>possible value. You don't think that people are going to update all\n>their functions to a new interface style at the same time, do you?\n\nNo, but when restoring from pg_dump, they will (initially, I assume) be\nworking with old function definitions. Newer versions of pg_dump would dump\nthe appropriate attribute.\n\n\n>> Might even be able to implement a 'CREATE MODULE' which loads an\n>> object, enquires about functions in the module, and creates function\n>> entries based on information returned from pg_fmgr_info...\n>\n>That could work ... something to think about for the future, anyway.\n\nYep.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Sun, 12 Nov 2000 14:37:36 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language\n names"
},
{
"msg_contents": "At 20:33 13/11/00 -0500, Mark Hollomon wrote:\n>On Saturday 11 November 2000 20:30, Tom Lane wrote:\n>> Philip Warner <[email protected]> writes:\n>>\n>> > Might even be able to implement a 'CREATE MODULE' which loads an\n>> > object, enquires about functions in the module, and creates function\n>> > entries based on information returned from pg_fmgr_info...\n>>\n>> That could work ... something to think about for the future, anyway.\n>\n>I apporached the other way. LOAD MODULE would call a well defined\n>entry point which could then use SPI or some other facility to create \n>whatever.\n\nThe problem with this suggestion (in the current context) is it does not\nmake the function manager interface version independant. \n\n\n> I saw it as a way to distribute types and even whole applications.\n\nI don't know the details, but why not write an installer of some kind (RPM,\netc)?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Tue, 14 Nov 2000 12:08:59 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: CREATE MODULE (was: Coping with 'C' vs 'newC'\n\tfunction language names)"
},
{
"msg_contents": "On Saturday 11 November 2000 20:30, Tom Lane wrote:\n> Philip Warner <[email protected]> writes:\n>\n> > Might even be able to implement a 'CREATE MODULE' which loads an\n> > object, enquires about functions in the module, and creates function\n> > entries based on information returned from pg_fmgr_info...\n>\n> That could work ... something to think about for the future, anyway.\n\nI proposed this some time ago, even wrote up a semiformal proposal.\nI was told at the time it was a bad idea.\n\nThe only objection I remember of the top of my head had to do with set-uid.\n\nI apporached the other way. LOAD MODULE would call a well defined\nentry point which could then use SPI or some other facility to create \nwhatever. I saw it as a way to distribute types and even whole applications.\n\n-- \nMark Hollomon\n",
"msg_date": "Mon, 13 Nov 2000 20:33:54 -0500",
"msg_from": "Mark Hollomon <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: CREATE MODULE (was: Coping with 'C' vs 'newC' function language\n\tnames)"
},
{
"msg_contents": "Tom Lane wrote:\n>\n> More to the point, I think we have to assume old-style interface if we\n> see ... LANGUAGE 'C' with no other decoration, because any other\n> assumption is guaranteed to break all existing user-defined functions.\n\n Just successfully loading an old-style C function doesn't\n guarantee that it works anyway. I pointed out before that the\n changes due to TOAST require each function that takes\n arguments of varlen types to expect toasted values. Worst\n case a dump might reload and anything works fine, but a month\n later the first toasted value appears and the old-style C\n function corrupts the data without a single warning.\n\n We need to WARN, WARN and explicitly WARN users of selfmade C\n functions about this in any possible place!\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== [email protected] #\n\n\n",
"msg_date": "Wed, 15 Nov 2000 06:09:00 -0500 (EST)",
"msg_from": "Jan Wieck <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Jan Wieck writes:\n\n> Just successfully loading an old-style C function doesn't\n> guarantee that it works anyway. I pointed out before that the\n> changes due to TOAST require each function that takes\n> arguments of varlen types to expect toasted values.\n\nCouldn't the function handler detoast the values before handing them to\nthe function? That would be slower, but it would allow people to continue\nto use the \"simpler\" interface.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Fri, 17 Nov 2000 17:14:16 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Couldn't the function handler detoast the values before handing them to\n> the function? That would be slower, but it would allow people to continue\n> to use the \"simpler\" interface.\n\nThis would be a moderately expensive thing to do --- not impossible,\nbut relatively expensive. The old-style function handler would need\nto look up all the function-argument datatypes during fmgr_info()\nso that it could save a bool array telling it which argument positions\nneed detoasting. (You can't just detoast every Datum --- you have to\nat least verify that it's of a varlena type first.)\n\nOn a per-invocation basis, however, it probably wouldn't be very costly.\n\nI didn't want to do this during development, but now that there are no\nmore old-style internal functions left, I suppose you could make a good\nargument that this is worth doing for old-style dynamically loaded\nfunctions. Will put it on the to-do list.\n\nAre people satisfied with the notion of requiring an info function\nto go with each dynamically loaded new-style function? If so, I'll\nstart working on that too.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Nov 2000 11:52:12 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "> I didn't want to do this during development, but now that there are no\n> more old-style internal functions left, I suppose you could make a good\n> argument that this is worth doing for old-style dynamically loaded\n> functions. Will put it on the to-do list.\n> \n> Are people satisfied with the notion of requiring an info function\n> to go with each dynamically loaded new-style function? If so, I'll\n> start working on that too.\n\nI think we need to balance portability with inconvenence for new users.\n\nI think mixing new/old function types in the same object file is pretty\nrare, and the confusion for programmers of having to label every\nfunction seems much more error-prone.\n\nI would support a single symbol to mark the entire object file. In\nfact, I would require old-style functions to add a symbol, and have\nnew-style functions left alone.\n\nThere are not that many functions out there, are there? People are\nhaving to recompile their C files anyway for the upgrade, don't they?\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 12:34:27 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Tom Lane writes:\n\n> Are people satisfied with the notion of requiring an info function\n> to go with each dynamically loaded new-style function? If so, I'll\n> start working on that too.\n\nSounds good to me.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Fri, 17 Nov 2000 19:18:04 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "Bruce Momjian writes:\n\n> I think mixing new/old function types in the same object file is pretty\n> rare,\n\nWhat about several object files linked into a shared library? Won't work.\n\n> and the confusion for programmers of having to label every function\n> seems much more error-prone.\n\nI think of it as having to declare your function.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Fri, 17 Nov 2000 19:23:13 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> I would support a single symbol to mark the entire object file. In\n> fact, I would require old-style functions to add a symbol, and have\n> new-style functions left alone.\n\nThat won't fly.\n\n> There are not that many functions out there, are there? People are\n> having to recompile their C files anyway for the upgrade, don't they?\n\nThere's a big difference between having to recompile and having to\nchange your source code.\n\nFor that matter, I think past version updates haven't even forced\nrecompiles of user-defined functions, at least not ones that didn't poke\ninto system innards. We can't get away with requiring a source code\nchange --- people will scream about it.\n\nThe nice thing about the info-marker idea is that we'll be able to\nextend it later, so that more info about the function is stored right\nwhere the function text is, and you don't have such a problem with\nkeeping an SQL script file in sync with the function's real definition.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 17 Nov 2000 14:59:11 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "Bruce Momjian wrote:\n> \n> > I didn't want to do this during development, but now that there are no\n> > more old-style internal functions left, I suppose you could make a good\n> > argument that this is worth doing for old-style dynamically loaded\n> > functions. Will put it on the to-do list.\n> >\n> > Are people satisfied with the notion of requiring an info function\n> > to go with each dynamically loaded new-style function? If so, I'll\n> > start working on that too.\n> \n> I think we need to balance portability with inconvenence for new users.\n> \n> I think mixing new/old function types in the same object file is pretty\n> rare, and the confusion for programmers of having to label every\n> function seems much more error-prone.\n> \n> I would support a single symbol to mark the entire object file. In\n> fact, I would require old-style functions to add a symbol, and have\n> new-style functions left alone.\n> \n> There are not that many functions out there, are there? People are\n> having to recompile their C files anyway for the upgrade, don't they?\n\nCan't we insert that magic variable automatically using some\n#includ/#define tricks ?\n\nSo that people need just to recompile, but the result has the variable\nnonetheless ?\n\n-----------\nHannu\n",
"msg_date": "Sat, 18 Nov 2000 00:43:44 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "> > For that matter, I think past version updates haven't even forced\n> > recompiles of user-defined functions, at least not ones that didn't poke\n> > into system innards. We can't get away with requiring a source code\n> > change --- people will scream about it.\n> \n> imho that is *not* sufficient to keep from Doing The Right Thing. And\n> DTRT usually means designing correctly for the future. I would support a\n> design that is cleanest for the next release, and put backward\n> compatibility a (no so) distant second.\n\nAgreed.\n\n> \n> > The nice thing about the info-marker idea is that we'll be able to\n> > extend it later, so that more info about the function is stored right\n> > where the function text is, and you don't have such a problem with\n> > keeping an SQL script file in sync with the function's real definition.\n> \n> I've been wanting to think about the \"package\" or \"module\" idea (which\n> others have brought up recently). If this kind of hook gets us more\n> options to support that (e.g. running a routine when the module is first\n> loaded to install new options into \"SET key=val\") then even better. Lack\n> of hooks of this nature lead us to push datatypes down into the core\n> when if we had full-up module support we could make more things\n> loadable.\n\nOne idea we had was to define a SET variable or psql command-line switch\nso that LANGUAGE \"C\" would mean either old or new style. That way,\npg_dump loads from old versions could set the switch before load without\nchanging their code, and we could call all functions C.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 17:46:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "> Bruce Momjian wrote:\n> > \n> > > I didn't want to do this during development, but now that there are no\n> > > more old-style internal functions left, I suppose you could make a good\n> > > argument that this is worth doing for old-style dynamically loaded\n> > > functions. Will put it on the to-do list.\n> > >\n> > > Are people satisfied with the notion of requiring an info function\n> > > to go with each dynamically loaded new-style function? If so, I'll\n> > > start working on that too.\n> > \n> > I think we need to balance portability with inconvenence for new users.\n> > \n> > I think mixing new/old function types in the same object file is pretty\n> > rare, and the confusion for programmers of having to label every\n> > function seems much more error-prone.\n> > \n> > I would support a single symbol to mark the entire object file. In\n> > fact, I would require old-style functions to add a symbol, and have\n> > new-style functions left alone.\n> > \n> > There are not that many functions out there, are there? People are\n> > having to recompile their C files anyway for the upgrade, don't they?\n> \n> Can't we insert that magic variable automatically using some\n> #includ/#define tricks ?\n> \n> So that people need just to recompile, but the result has the variable\n> nonetheless ?\n\nWe thought of that. The problem is some new-style functions do not need\nto call any macros.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 17:47:40 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "> For that matter, I think past version updates haven't even forced\n> recompiles of user-defined functions, at least not ones that didn't poke\n> into system innards. We can't get away with requiring a source code\n> change --- people will scream about it.\n\nimho that is *not* sufficient to keep from Doing The Right Thing. And\nDTRT usually means designing correctly for the future. I would support a\ndesign that is cleanest for the next release, and put backward\ncompatibility a (no so) distant second.\n\n> The nice thing about the info-marker idea is that we'll be able to\n> extend it later, so that more info about the function is stored right\n> where the function text is, and you don't have such a problem with\n> keeping an SQL script file in sync with the function's real definition.\n\nI've been wanting to think about the \"package\" or \"module\" idea (which\nothers have brought up recently). If this kind of hook gets us more\noptions to support that (e.g. running a routine when the module is first\nloaded to install new options into \"SET key=val\") then even better. Lack\nof hooks of this nature lead us to push datatypes down into the core\nwhen if we had full-up module support we could make more things\nloadable.\n\n - Thomas\n",
"msg_date": "Fri, 17 Nov 2000 22:56:46 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "Jan Wieck <[email protected]> writes:\n> Just successfully loading an old-style C function doesn't\n> guarantee that it works anyway. I pointed out before that the\n> changes due to TOAST require each function that takes\n> arguments of varlen types to expect toasted values. Worst\n> case a dump might reload and anything works fine, but a month\n> later the first toasted value appears and the old-style C\n> function corrupts the data without a single warning.\n\n> We need to WARN, WARN and explicitly WARN users of selfmade C\n> functions about this in any possible place!\n\nAs of now, not.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 20 Nov 2000 15:56:32 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
}
]
|
[
{
"msg_contents": "> > Results: 5000 transactions took ~60 sec in 7.1, ~550 sec in \n> > 7.0.2 with fsync and ~60 sec without fsync.\n> > \n> > So, seems that WAL added not just complexity to system -:)\n> \n> Wow, this sounds fantastic :-) \n> I see my concerns where not justified.\n\nLet's see first how justified are my hopes that WAL code\nare bug free -:)\n\nVadim\n",
"msg_date": "Fri, 10 Nov 2000 09:43:33 -0800",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: Results of testing WAL"
}
]
|
[
{
"msg_contents": "\n> > The macro AbsoluteTimeIsReal does not work somehow.\n> \n> Hm. That expands to\n> \n> \t(((int) time) < ((int) 0x7FFFFFFC) && \\\n> \t ((int) time) > ((int) 0x80000001))\n\nThere is a special case in nabstime.h for AIX, which imho\ngot swapped. The normal case for me would be INT_MIN\nand not the 0x80000001.\nThere is a comment that I don't understand at all given the below \nsource code:\n\n/*\n * AIX considers 2147483648 == -2147483648 (since they have the same bit\n * representation) but uses a different sign sense in a comparison to\n * these integer constants depending on whether the constant is signed\n * or not!\n */\n#if defined (_AIX)\n#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)\n#else \n#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 (- 2^31) */\n#endif\n\nBut that is unfortunately not the problem. Looks like yet another broken compiler to me :-(\n\nAndreas\n",
"msg_date": "Fri, 10 Nov 2000 19:18:16 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Could turn on -O2 in AIX "
}
]
|
[
{
"msg_contents": "It appears that something is messed up with regard to Perl\nsupport on my system. Two things are happening, which may\nor may not be related.\n\n1) There is a complaint during make that \n*****\n* Cannot build PL/Perl because libperl is not a shared library.\n* Skipped.\n***** \nI'm running a pretty vanilla RedHat 6.1 setup. What should\nI do about that?\n\n2) Because _something_ was made for Perl, the 'make install'\nhas to be root. Okay. But this is leaving some stuff behind\nthat is owned by root. When I attempt a subsequent\n'make clean; make' I get into permissions trouble, and have\nto delete these things manually.\n\nThese events are illustrated in an script(1) capture file,\nwhich I have edited down to a version I have attached here.\n\n++ kevin\n\n\n\n-- \nKevin O'Gorman (805) 650-6274 mailto:[email protected]\nPermanent e-mail forwarder: mailto:Kevin.O'[email protected]\nAt school: mailto:[email protected]\nWeb: http://www.cs.ucsb.edu/~kogorman/index.html\nWeb: http://trixie.kosman.via.ayuda.com/~kevin/index.html\n\n\"There is a freedom lying beyond circumstance,\nderived from the direct intuition that life can\nbe grounded upon its absorption in what is\nchangeless amid change\" \n -- Alfred North Whitehead",
"msg_date": "Fri, 10 Nov 2000 11:40:23 -0800",
"msg_from": "\"Kevin O'Gorman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Problems with Perl"
},
{
"msg_contents": "Kevin O'Gorman wrote:\n> It appears that something is messed up with regard to Perl\n> support on my system. Two things are happening, which may\n> or may not be related.\n\nThey are not related.\n \n> 1) There is a complaint during make that\n> *****\n> * Cannot build PL/Perl because libperl is not a shared library.\n> * Skipped.\n> *****\n> I'm running a pretty vanilla RedHat 6.1 setup. What should\n> I do about that?\n\nThere are a couple of alternatives to get pl/perl (server-side perl\nfunctions) built -- but none are real good for PostgreSQL 7.0.x.\n \n> 2) Because _something_ was made for Perl, the 'make install'\n> has to be root. Okay. But this is leaving some stuff behind\n> that is owned by root. When I attempt a subsequent\n> 'make clean; make' I get into permissions trouble, and have\n> to delete these things manually.\n\nThis would be the _client_side_ perl interface, Pg. Pg allows a perl\nscript to access the PostgreSQL server. PL/Perl allows the server to\nrun perl scripts as a procedural language inside the database system.\n\nTwo different animals.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Fri, 10 Nov 2000 14:46:58 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problems with Perl"
},
{
"msg_contents": "Kevin O'Gorman writes:\n\n> 2) Because _something_ was made for Perl, the 'make install'\n> has to be root. Okay. But this is leaving some stuff behind\n> that is owned by root. When I attempt a subsequent\n> 'make clean; make' I get into permissions trouble, and have\n> to delete these things manually.\n\nYes, this is definitely broken. I just read that old thread (\"[HACKERS]\nperl interface bug?\", 14 October 1998), and it was already considered\nquestionable then.\n\nTo recap, the Pg.so thing needs to know where libpq lives. If you link\nwith libpq out of the source tree then Pg.so forever tries to find libpq\nthere. So you relink Pg.so during 'make install' when libpq is already\ninstalled at it's final location.\n\nIf I'm not completely mistaken, this behaviour could really only happen on\nHPUX. Also on other platforms you would normally have to point\nLD_LIBRARY_PATH to $(libdir) in order to get anything at all working.\n\nTheoretically we could fix this now by sneaking the $(rpath) make variable\nin to MakeMaker somehow, perhaps via OTHERLDFLAGS. However, the flag in\nthis variable is supposed to be used by the compiler driver -- if Perl\ndecides to use 'ld' to link the module you lose.\n\nMore to the point, 'rpath' is currently undefined on HPUX because HPUX\nuses 'ld' to link shared libraries, but the shared library link uses\n$(rpath), so it would break. Perhaps to start with, is there a way to use\nthe compiler driver to link shared libraries on HPUX?\n\nAnd then, do we want to risk tricking around with MakeMaker, or should we\ngo for an HPUX specific fix?\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Fri, 10 Nov 2000 22:28:24 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problems with Perl"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> More to the point, 'rpath' is currently undefined on HPUX because HPUX\n> uses 'ld' to link shared libraries, but the shared library link uses\n> $(rpath), so it would break. Perhaps to start with, is there a way to use\n> the compiler driver to link shared libraries on HPUX?\n\nI suppose you could do it that way if you were using gcc, but AFAICS\nfrom its man page, the vendor cc has no switch to build libraries of\nany sort. Just .o and executable files...\n\nA bigger problem is that if interfaces/perl5 builds itself to refer to\nan installed libpq to begin with, there'll be no way to run its selftest\nwithout installing libpq first.\n\n> And then, do we want to risk tricking around with MakeMaker, or should we\n> go for an HPUX specific fix?\n\nThe real issue here is that make install builds new files in the source\ntree. Perhaps \"make install\" should do a \"make clean\" after rebuilding\nand installing.\n\nBear in mind that if we ever start using libtool, we will have this\nproblem all over the tree, not just in interfaces/perl5. At least on\nHPUX, libtool's standard behavior is to relink just before install.\nI would imagine that the other platforms with rpath capability would\ndo the same thing. So a perl-only solution may be pointless.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 16:50:18 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problems with Perl "
},
{
"msg_contents": "Tom Lane writes:\n\n> A bigger problem is that if interfaces/perl5 builds itself to refer to\n> an installed libpq to begin with, there'll be no way to run its selftest\n> without installing libpq first.\n\nActually, there are only a few platforms where this does work at all,\nnamely on AIX, FreeBSD <2.2, HPUX, SunOS 4, and Unixware 2. (information\ndecoded from Libtool sources) These platforms record the path where the\nlibrary was originally found. On all other platforms, shared libraries\nare only searched in explicitly specified locations (\"rpath\") or some\ndefault places (/usr/lib), *not* in the place it was found at link-time. \n\nFurthermore, in order to run the self-test you need a running postmaster,\nand you probably have libpq installed by the time you have a postmaster\nup.\n\n> The real issue here is that make install builds new files in the source\n> tree. Perhaps \"make install\" should do a \"make clean\" after rebuilding\n> and installing.\n\nBuilding new files during install is certainly unclean, but the real\nproblem is that you need to be root to install the Perl module, but not\nfor the rest (necessarily), so the rebuilt files are root-owned. Running\nclean after install ought to work, but we could probably do better.\n\nIn fact, it would generally be better to get the rpath in there for any\nplatform, because otherwise we're back to ground zero where people need to\nset up LD_LIBRARY_PATH in order for the Perl module to work.\n\n> Bear in mind that if we ever start using libtool, we will have this\n> problem all over the tree, not just in interfaces/perl5. At least on\n> HPUX, libtool's standard behavior is to relink just before install.\n> I would imagine that the other platforms with rpath capability would\n> do the same thing. So a perl-only solution may be pointless.\n\nOn my system (Linux) and on FreeBSD 4.1.1 (hub.org) libtool does exactly\nwhat our code does: it installs the library file and creates two\nsymlinks. Relinking will only happen on the platforms listed above.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Fri, 10 Nov 2000 23:55:29 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problems with Perl "
},
{
"msg_contents": "Peter Eisentraut wrote:\n> \n> Kevin O'Gorman writes:\n> \n> > 2) Because _something_ was made for Perl, the 'make install'\n> > has to be root. Okay. But this is leaving some stuff behind\n> > that is owned by root. When I attempt a subsequent\n> > 'make clean; make' I get into permissions trouble, and have\n> > to delete these things manually.\n> \n> Yes, this is definitely broken. I just read that old thread (\"[HACKERS]\n> perl interface bug?\", 14 October 1998), and it was already considered\n> questionable then.\n> \n> To recap, the Pg.so thing needs to know where libpq lives. If you link\n> with libpq out of the source tree then Pg.so forever tries to find libpq\n> there. So you relink Pg.so during 'make install' when libpq is already\n> installed at it's final location.\n> \n> If I'm not completely mistaken, this behaviour could really only happen on\n> HPUX. Also on other platforms you would normally have to point\n> LD_LIBRARY_PATH to $(libdir) in order to get anything at all working.\n\n\nWell, I had the behavior on my RedHat 6.1 system. That's Linux, of course.\nIs that what you mean, or is it that the current behavior is there so that\nHPUX can be supported?\n\n\n> \n> Theoretically we could fix this now by sneaking the $(rpath) make variable\n> in to MakeMaker somehow, perhaps via OTHERLDFLAGS. However, the flag in\n> this variable is supposed to be used by the compiler driver -- if Perl\n> decides to use 'ld' to link the module you lose.\n> \n> More to the point, 'rpath' is currently undefined on HPUX because HPUX\n> uses 'ld' to link shared libraries, but the shared library link uses\n> $(rpath), so it would break. Perhaps to start with, is there a way to use\n> the compiler driver to link shared libraries on HPUX?\n> \n> And then, do we want to risk tricking around with MakeMaker, or should we\n> go for an HPUX specific fix?\n> \n> --\n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nKevin O'Gorman (805) 650-6274 mailto:[email protected]\nPermanent e-mail forwarder: mailto:Kevin.O'[email protected]\nAt school: mailto:[email protected]\nWeb: http://www.cs.ucsb.edu/~kogorman/index.html\nWeb: http://trixie.kosman.via.ayuda.com/~kevin/index.html\n\n\"There is a freedom lying beyond circumstance,\nderived from the direct intuition that life can\nbe grounded upon its absorption in what is\nchangeless amid change\" \n -- Alfred North Whitehead\n",
"msg_date": "Fri, 10 Nov 2000 16:23:34 -0800",
"msg_from": "\"Kevin O'Gorman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Problems with Perl"
}
]
|
[
{
"msg_contents": "> There is a special case in nabstime.h for AIX, which imho\n> got swapped. The normal case for me would be INT_MIN\n> and not the 0x80000001.\n> There is a comment that I don't understand at all given the below \n> source code:\n> \n> /*\n> * AIX considers 2147483648 == -2147483648 (since they have \n> the same bit\n> * representation) but uses a different sign sense in a comparison to\n> * these integer constants depending on whether the constant is signed\n> * or not!\n> */\n> #if defined (_AIX)\n> #define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)\n> #else \n> #define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) \n> /* -2147483647 (- 2^31) */\n> #endif\n> \n> But that is unfortunately not the problem. Looks like yet \n> another broken compiler to me :-(\n\nOk, the comparison ((int) time) > ((int) 0x80000001) is the problem.\nReading the comment again and again, I have come to the conclusion,\nthat the intent was originally to avoid INT_MIN on AIX.\n\nMy solution would be to use INT_MIN for all ports, which has the advantage \nthat the above problematic comparison can be converted to !=,\nsince no integer will be smaller than INT_MIN.\n\nPlease apply the patch and all works well.\n\nThanks\nAndreas",
"msg_date": "Fri, 10 Nov 2000 22:07:20 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Could turn on -O2 in AIX "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> But that is unfortunately not the problem. Looks like yet \n>> another broken compiler to me :-(\n\n> Ok, the comparison ((int) time) > ((int) 0x80000001) is the problem.\n> Reading the comment again and again, I have come to the conclusion,\n> that the intent was originally to avoid INT_MIN on AIX.\n\nNo, I think the other way round. Digging into Postgres 4.2, I find\n\n#if defined(PORTNAME_aix)\n/*\n * AIX considers 2147483648 == -2147483648 (since they have the same bit\n * representation) but uses a different sign sense in a comparison to \n * these integer constants depending on whether the constant is signed \n * or not!\n */\n#include <values.h>\n#define NOSTART_ABSTIME\t((AbsoluteTime) HIBITI)\t\t/* - 2^31 */\n#else\n#define NOSTART_ABSTIME ((AbsoluteTime) 2147483648)\t/* - 2^31 */\n#endif /* PORTNAME_aix */\n\nwhere HIBITI must come from a system header, because it doesn't appear\nanywhere else in Postgres 4.2. But I'm betting it was a representation\nof 0x80000000. By the time of our oldest CVS sources, this had\nmetamorphosed into\n\n#if defined(PORTNAME_aix)\n/*\n * AIX considers 2147483648 == -2147483648 (since they have the same bit\n * representation) but uses a different sign sense in a comparison to \n * these integer constants depending on whether the constant is signed \n * or not!\n */\n#include <values.h>\n/*#define NOSTART_ABSTIME ((AbsoluteTime) HIBITI) */ /* - 2^31 */\n#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)\n#else\n/*#define NOSTART_ABSTIME ((AbsoluteTime) 2147483648)*/ /* - 2^31 */\n#define NOSTART_ABSTIME ((AbsoluteTime) -2147483647) /* - 2^31 */\n#endif /* PORTNAME_aix */\n\nHard to tell how we got from point A to point B, but it seems\ncrystal-clear that the *original* author intended to use 0x80000000\non all platforms.\n\n> My solution would be to use INT_MIN for all ports, which has the advantage \n> that the above problematic comparison can be converted to !=,\n> since no integer will be smaller than INT_MIN.\n\nI agree. When I was looking at this code this morning, I was wondering\nwhat INT_MIN was supposed to represent anyway, if NOSTART_ABSTIME is\nINT_MIN + 1. I think someone messed this up between 4.2 and Postgres95.\n\nThomas, any objection to this plan?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 16:25:21 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Could turn on -O2 in AIX "
},
{
"msg_contents": ">> My solution would be to use INT_MIN for all ports, which has the advantage \n>> that the above problematic comparison can be converted to !=,\n>> since no integer will be smaller than INT_MIN.\n\n> I agree. When I was looking at this code this morning, I was wondering\n> what INT_MIN was supposed to represent anyway, if NOSTART_ABSTIME is\n> INT_MIN + 1. I think someone messed this up between 4.2 and Postgres95.\n\n> Thomas, any objection to this plan?\n\nI went ahead and committed this change, since Thomas hasn't weighed in\nwith an objection ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Nov 2000 00:45:36 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Could turn on -O2 in AIX "
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> Is the original issue support for 0x10... as the smallest integer, as\n> opposed to -MAX_INT? As long as we continue to map the \"reserved values\"\n> to the upper and lower range of allowed values so they are unlikely to\n> appear under normal circumstances, the change should be OK.\n\nI think that the original problem was that Andreas was seeing a compiler\ncodegen bug on AIX, having to do with the comparison\n\tfoo > INT_MIN\ngenerated by the AbsoluteTimeIsReal macro. I think he was seeing that\nthe compiler insisted on generating an unsigned compare, explicit casts\nto signed datatypes notwithstanding :-(.\n\nThe proposed fix was to recode the macro's test as foo != INT_MIN,\nthereby avoiding the issue of whether the comparison is signed or not.\nTo do that, we needed to make NOSTART_ABSTIME be defined as INT_MIN\non all platforms, not only AIX. That seemed like a good general-purpose\napproach to me anyway, since the intended meaning of 0x80000000 was very\nunclear otherwise.\n\n\t\t\tregards, tom lane\n\nPS: I'm quite sure that I'd explicitly cc'd you on the prior discussion.\nIf you didn't see it, then you've lost personal mail, not only pghackers\ntraffic...\n",
"msg_date": "Mon, 20 Nov 2000 12:55:47 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Could turn on -O2 in AIX "
},
{
"msg_contents": "> >> My solution would be to use INT_MIN for all ports, which has the advantage\n> >> that the above problematic comparison can be converted to !=,\n> >> since no integer will be smaller than INT_MIN.\n> > I agree. When I was looking at this code this morning, I was wondering\n> > what INT_MIN was supposed to represent anyway, if NOSTART_ABSTIME is\n> > INT_MIN + 1. I think someone messed this up between 4.2 and Postgres95.\n> > Thomas, any objection to this plan?\n> I went ahead and committed this change, since Thomas hasn't weighed in\n> with an objection ...\n\nHmm. I've been seeing a lot of followup messages to threads I don't\nrecall getting. Presumably all related to a combination of getting\nauto-unsubscribed to -hackers :(, traveling and getting mail on my\nlaptop, and converting service at home over to DSL.\n\nHopefully this will all settle down here in the next few days.\n\nIs the original issue support for 0x10... as the smallest integer, as\nopposed to -MAX_INT? As long as we continue to map the \"reserved values\"\nto the upper and lower range of allowed values so they are unlikely to\nappear under normal circumstances, the change should be OK.\n\n - Thomas\n",
"msg_date": "Mon, 20 Nov 2000 18:05:38 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Could turn on -O2 in AIX"
},
{
"msg_contents": "\nTom, can you remind me where we left this?\n\n> Zeugswetter Andreas SB <[email protected]> writes:\n> >> But that is unfortunately not the problem. Looks like yet \n> >> another broken compiler to me :-(\n> \n> > Ok, the comparison ((int) time) > ((int) 0x80000001) is the problem.\n> > Reading the comment again and again, I have come to the conclusion,\n> > that the intent was originally to avoid INT_MIN on AIX.\n> \n> No, I think the other way round. Digging into Postgres 4.2, I find\n> \n> #if defined(PORTNAME_aix)\n> /*\n> * AIX considers 2147483648 == -2147483648 (since they have the same bit\n> * representation) but uses a different sign sense in a comparison to \n> * these integer constants depending on whether the constant is signed \n> * or not!\n> */\n> #include <values.h>\n> #define NOSTART_ABSTIME\t((AbsoluteTime) HIBITI)\t\t/* - 2^31 */\n> #else\n> #define NOSTART_ABSTIME ((AbsoluteTime) 2147483648)\t/* - 2^31 */\n> #endif /* PORTNAME_aix */\n> \n> where HIBITI must come from a system header, because it doesn't appear\n> anywhere else in Postgres 4.2. But I'm betting it was a representation\n> of 0x80000000. By the time of our oldest CVS sources, this had\n> metamorphosed into\n> \n> #if defined(PORTNAME_aix)\n> /*\n> * AIX considers 2147483648 == -2147483648 (since they have the same bit\n> * representation) but uses a different sign sense in a comparison to \n> * these integer constants depending on whether the constant is signed \n> * or not!\n> */\n> #include <values.h>\n> /*#define NOSTART_ABSTIME ((AbsoluteTime) HIBITI) */ /* - 2^31 */\n> #define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)\n> #else\n> /*#define NOSTART_ABSTIME ((AbsoluteTime) 2147483648)*/ /* - 2^31 */\n> #define NOSTART_ABSTIME ((AbsoluteTime) -2147483647) /* - 2^31 */\n> #endif /* PORTNAME_aix */\n> \n> Hard to tell how we got from point A to point B, but it seems\n> crystal-clear that the *original* author intended to use 0x80000000\n> on all platforms.\n> \n> > My solution would be to use INT_MIN for all ports, which has the advantage \n> > that the above problematic comparison can be converted to !=,\n> > since no integer will be smaller than INT_MIN.\n> \n> I agree. When I was looking at this code this morning, I was wondering\n> what INT_MIN was supposed to represent anyway, if NOSTART_ABSTIME is\n> INT_MIN + 1. I think someone messed this up between 4.2 and Postgres95.\n> \n> Thomas, any objection to this plan?\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 22 Jan 2001 20:13:46 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Could turn on -O2 in AIX"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Tom, can you remind me where we left this?\n\nIt's done ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 22 Jan 2001 20:18:38 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Could turn on -O2 in AIX "
}
]
|
[
{
"msg_contents": "Did someone read bout this?\n\nhttp://www.angelfire.com/nv/aldev/pgsql/GreatBridge.html\n\nSaludos... :-)\n\n-- \n\"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n",
"msg_date": "Fri, 10 Nov 2000 18:08:12 -0300",
"msg_from": "\"Martin A. Marques\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Postgres article"
}
]
|
[
{
"msg_contents": "I suspect this is just a NOT updated out file:\n(UnixWare 7.1.1/UDK FS (7.1.1b) cc/Multibyte/current sources).\n\n*** ./expected/horology-solaris-1947.out\tSun Oct 22 17:15:13 2000\n--- ./results/horology.out\tFri Nov 10 15:39:00 2000\n***************\n*** 109,116 ****\n | epoch | @ 1 day 2 hours 3 mins 4 secs | Thu Jan 01 18:03:04 1970 PST\n | epoch | @ 10 days | Sat Jan 10 16:00:00 1970 PST\n | epoch | @ 3 mons | Tue Mar 31 16:00:00 1970 PST\n! | epoch | @ 5 mons | Sun May 31 17:00:00 1970 PDT\n! | epoch | @ 5 mons 12 hours | Mon Jun 01 05:00:00 1970 PDT\n | epoch | @ 6 years | Wed Dec 31 16:00:00 1975 PST\n | Wed Feb 28 17:32:01 1996 PST | @ 14 secs ago | Wed Feb 28 17:31:47 1996 PST\n | Wed Feb 28 17:32:01 1996 PST | @ 1 min | Wed Feb 28 17:33:01 1996 PST\n--- 109,116 ----\n | epoch | @ 1 day 2 hours 3 mins 4 secs | Thu Jan 01 18:03:04 1970 PST\n | epoch | @ 10 days | Sat Jan 10 16:00:00 1970 PST\n | epoch | @ 3 mons | Tue Mar 31 16:00:00 1970 PST\n! | epoch | @ 5 mons | Sun May 31 16:00:00 1970 PDT\n! | epoch | @ 5 mons 12 hours | Mon Jun 01 04:00:00 1970 PDT\n | epoch | @ 6 years | Wed Dec 31 16:00:00 1975 PST\n | Wed Feb 28 17:32:01 1996 PST | @ 14 secs ago | Wed Feb 28 17:31:47 1996 PST\n | Wed Feb 28 17:32:01 1996 PST | @ 1 min | Wed Feb 28 17:33:01 1996 PST\n***************\n*** 127,141 ****\n | Wed Feb 28 17:32:01 1996 PST | @ 10 days | Sat Mar 09 17:32:01 1996 PST\n | Thu Feb 29 17:32:01 1996 PST | @ 10 days | Sun Mar 10 17:32:01 1996 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 10 days | Mon Mar 11 17:32:01 1996 PST\n! | Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue May 28 18:32:01 1996 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed May 29 18:32:01 1996 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Sat Jun 01 18:32:01 1996 PDT\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Sun Jul 28 18:32:01 1996 PDT\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Mon Jul 29 06:32:01 1996 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Mon Jul 29 18:32:01 1996 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 06:32:01 1996 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Thu Aug 01 18:32:01 1996 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Aug 02 06:32:01 1996 PDT\n | Mon Dec 30 17:32:01 1996 PST | @ 14 secs ago | Mon Dec 30 17:31:47 1996 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 1 min | Mon Dec 30 17:33:01 1996 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 5 hours | Mon Dec 30 22:32:01 1996 PST\n--- 127,141 ----\n | Wed Feb 28 17:32:01 1996 PST | @ 10 days | Sat Mar 09 17:32:01 1996 PST\n | Thu Feb 29 17:32:01 1996 PST | @ 10 days | Sun Mar 10 17:32:01 1996 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 10 days | Mon Mar 11 17:32:01 1996 PST\n! | Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue May 28 17:32:01 1996 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed May 29 17:32:01 1996 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Sat Jun 01 17:32:01 1996 PDT\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Sun Jul 28 17:32:01 1996 PDT\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Mon Jul 29 05:32:01 1996 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Mon Jul 29 17:32:01 1996 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 05:32:01 1996 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Thu Aug 01 17:32:01 1996 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Aug 02 05:32:01 1996 PDT\n | Mon Dec 30 17:32:01 1996 PST | @ 14 secs ago | Mon Dec 30 17:31:47 1996 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 1 min | Mon Dec 30 17:33:01 1996 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 5 hours | Mon Dec 30 22:32:01 1996 PST\n***************\n*** 148,157 ****\n | Tue Dec 31 17:32:01 1996 PST | @ 10 days | Fri Jan 10 17:32:01 1997 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Sun Mar 30 17:32:01 1997 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Mar 31 17:32:01 1997 PST\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Fri May 30 18:32:01 1997 PDT\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Sat May 31 06:32:01 1997 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Sat May 31 18:32:01 1997 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Jun 01 06:32:01 1997 PDT\n | Fri Dec 31 17:32:01 1999 PST | @ 14 secs ago | Fri Dec 31 17:31:47 1999 PST\n | Fri Dec 31 17:32:01 1999 PST | @ 1 min | Fri Dec 31 17:33:01 1999 PST\n | Fri Dec 31 17:32:01 1999 PST | @ 5 hours | Fri Dec 31 22:32:01 1999 PST\n--- 148,157 ----\n | Tue Dec 31 17:32:01 1996 PST | @ 10 days | Fri Jan 10 17:32:01 1997 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Sun Mar 30 17:32:01 1997 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Mar 31 17:32:01 1997 PST\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Fri May 30 17:32:01 1997 PDT\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Sat May 31 05:32:01 1997 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Sat May 31 17:32:01 1997 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Jun 01 05:32:01 1997 PDT\n | Fri Dec 31 17:32:01 1999 PST | @ 14 secs ago | Fri Dec 31 17:31:47 1999 PST\n | Fri Dec 31 17:32:01 1999 PST | @ 1 min | Fri Dec 31 17:33:01 1999 PST\n | Fri Dec 31 17:32:01 1999 PST | @ 5 hours | Fri Dec 31 22:32:01 1999 PST\n***************\n*** 189,213 ****\n | Wed Mar 15 08:14:01 2000 PST | @ 10 days | Sat Mar 25 08:14:01 2000 PST\n | Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Fri Mar 31 17:32:01 2000 PST\n | Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Sat Apr 01 17:32:01 2000 PST\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Wed May 31 18:32:01 2000 PDT\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Thu Jun 01 06:32:01 2000 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Thu Jun 01 18:32:01 2000 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 02 06:32:01 2000 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 3 mons | Thu Jun 15 02:14:05 2000 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 3 mons | Thu Jun 15 03:14:03 2000 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Thu Jun 15 04:14:04 2000 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 3 mons | Thu Jun 15 05:14:02 2000 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Thu Jun 15 09:14:01 2000 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons | Tue Aug 15 02:14:05 2000 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons | Tue Aug 15 03:14:03 2000 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Tue Aug 15 04:14:04 2000 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons | Tue Aug 15 05:14:02 2000 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Tue Aug 15 09:14:01 2000 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons 12 hours | Tue Aug 15 14:14:05 2000 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons 12 hours | Tue Aug 15 15:14:03 2000 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Tue Aug 15 16:14:04 2000 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons 12 hours | Tue Aug 15 17:14:02 2000 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Tue Aug 15 21:14:01 2000 PDT\n | Sun Dec 31 17:32:01 2000 PST | @ 14 secs ago | Sun Dec 31 17:31:47 2000 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 1 min | Sun Dec 31 17:33:01 2000 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 5 hours | Sun Dec 31 22:32:01 2000 PST\n--- 189,213 ----\n | Wed Mar 15 08:14:01 2000 PST | @ 10 days | Sat Mar 25 08:14:01 2000 PST\n | Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Fri Mar 31 17:32:01 2000 PST\n | Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Sat Apr 01 17:32:01 2000 PST\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Wed May 31 17:32:01 2000 PDT\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Thu Jun 01 05:32:01 2000 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Thu Jun 01 17:32:01 2000 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 02 05:32:01 2000 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 3 mons | Thu Jun 15 01:14:05 2000 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 3 mons | Thu Jun 15 02:14:03 2000 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Thu Jun 15 03:14:04 2000 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 3 mons | Thu Jun 15 04:14:02 2000 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 3 mons | Thu Jun 15 08:14:01 2000 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons | Tue Aug 15 01:14:05 2000 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons | Tue Aug 15 02:14:03 2000 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Tue Aug 15 03:14:04 2000 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons | Tue Aug 15 04:14:02 2000 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Tue Aug 15 08:14:01 2000 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons 12 hours | Tue Aug 15 13:14:05 2000 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons 12 hours | Tue Aug 15 14:14:03 2000 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Tue Aug 15 15:14:04 2000 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons 12 hours | Tue Aug 15 16:14:02 2000 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Tue Aug 15 20:14:01 2000 PDT\n | Sun Dec 31 17:32:01 2000 PST | @ 14 secs ago | Sun Dec 31 17:31:47 2000 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 1 min | Sun Dec 31 17:33:01 2000 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 5 hours | Sun Dec 31 22:32:01 2000 PST\n***************\n*** 219,229 ****\n | Sun Dec 31 17:32:01 2000 PST | @ 10 days | Wed Jan 10 17:32:01 2001 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 10 days | Thu Jan 11 17:32:01 2001 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Mar 31 17:32:01 2001 PST\n! | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Apr 01 18:32:01 2001 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Thu May 31 18:32:01 2001 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 01 06:32:01 2001 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Fri Jun 01 18:32:01 2001 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Sat Jun 02 06:32:01 2001 PDT\n | Wed Feb 28 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST\n | Thu Feb 29 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 6 years | Fri Mar 01 17:32:01 2002 PST\n--- 219,229 ----\n | Sun Dec 31 17:32:01 2000 PST | @ 10 days | Wed Jan 10 17:32:01 2001 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 10 days | Thu Jan 11 17:32:01 2001 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Mar 31 17:32:01 2001 PST\n! | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Apr 01 17:32:01 2001 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Thu May 31 17:32:01 2001 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Fri Jun 01 05:32:01 2001 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Fri Jun 01 17:32:01 2001 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Sat Jun 02 05:32:01 2001 PDT\n | Wed Feb 28 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST\n | Thu Feb 29 17:32:01 1996 PST | @ 6 years | Thu Feb 28 17:32:01 2002 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 6 years | Fri Mar 01 17:32:01 2002 PST\n***************\n*** 277,285 ****\n | Wed Mar 15 08:14:01 2000 PST | @ 34 years | Tue Mar 15 08:14:01 1966 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 34 years | Sat Dec 31 17:32:01 1966 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 34 years | Sun Jan 01 17:32:01 1967 PST\n! | epoch | @ 5 mons 12 hours | Thu Jul 31 05:00:00 1969 PDT\n! | epoch | @ 5 mons | Thu Jul 31 17:00:00 1969 PDT\n! | epoch | @ 3 mons | Tue Sep 30 17:00:00 1969 PDT\n | epoch | @ 10 days | Sun Dec 21 16:00:00 1969 PST\n | epoch | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 30 13:56:56 1969 PST\n | epoch | @ 5 hours | Wed Dec 31 11:00:00 1969 PST\n--- 277,285 ----\n | Wed Mar 15 08:14:01 2000 PST | @ 34 years | Tue Mar 15 08:14:01 1966 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 34 years | Sat Dec 31 17:32:01 1966 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 34 years | Sun Jan 01 17:32:01 1967 PST\n! | epoch | @ 5 mons 12 hours | Thu Jul 31 04:00:00 1969 PDT\n! | epoch | @ 5 mons | Thu Jul 31 16:00:00 1969 PDT\n! | epoch | @ 3 mons | Tue Sep 30 16:00:00 1969 PDT\n | epoch | @ 10 days | Sun Dec 21 16:00:00 1969 PST\n | epoch | @ 1 day 2 hours 3 mins 4 secs | Tue Dec 30 13:56:56 1969 PST\n | epoch | @ 5 hours | Wed Dec 31 11:00:00 1969 PST\n***************\n*** 299,310 ****\n | Wed Mar 15 08:14:01 2000 PST | @ 6 years | Tue Mar 15 08:14:01 1994 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 6 years | Sat Dec 31 17:32:01 1994 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 6 years | Sun Jan 01 17:32:01 1995 PST\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Thu Sep 28 06:32:01 1995 PDT\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Thu Sep 28 18:32:01 1995 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Sep 29 06:32:01 1995 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Fri Sep 29 18:32:01 1995 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Oct 01 06:32:01 1995 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Sun Oct 01 18:32:01 1995 PDT\n | Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue Nov 28 17:32:01 1995 PST\n | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed Nov 29 17:32:01 1995 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Fri Dec 01 17:32:01 1995 PST\n--- 299,310 ----\n | Wed Mar 15 08:14:01 2000 PST | @ 6 years | Tue Mar 15 08:14:01 1994 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 6 years | Sat Dec 31 17:32:01 1994 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 6 years | Sun Jan 01 17:32:01 1995 PST\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons 12 hours | Thu Sep 28 05:32:01 1995 PDT\n! | Wed Feb 28 17:32:01 1996 PST | @ 5 mons | Thu Sep 28 17:32:01 1995 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons 12 hours | Fri Sep 29 05:32:01 1995 PDT\n! | Thu Feb 29 17:32:01 1996 PST | @ 5 mons | Fri Sep 29 17:32:01 1995 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons 12 hours | Sun Oct 01 05:32:01 1995 PDT\n! | Fri Mar 01 17:32:01 1996 PST | @ 5 mons | Sun Oct 01 17:32:01 1995 PDT\n | Wed Feb 28 17:32:01 1996 PST | @ 3 mons | Tue Nov 28 17:32:01 1995 PST\n | Thu Feb 29 17:32:01 1996 PST | @ 3 mons | Wed Nov 29 17:32:01 1995 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 3 mons | Fri Dec 01 17:32:01 1995 PST\n***************\n*** 323,334 ****\n | Fri Mar 01 17:32:01 1996 PST | @ 5 hours | Fri Mar 01 12:32:01 1996 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 1 min | Fri Mar 01 17:31:01 1996 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 14 secs ago | Fri Mar 01 17:32:15 1996 PST\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 06:32:01 1996 PDT\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Tue Jul 30 18:32:01 1996 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Wed Jul 31 06:32:01 1996 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Wed Jul 31 18:32:01 1996 PDT\n! | Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 18:32:01 1996 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 18:32:01 1996 PDT\n | Mon Dec 30 17:32:01 1996 PST | @ 10 days | Fri Dec 20 17:32:01 1996 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 10 days | Sat Dec 21 17:32:01 1996 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Dec 29 15:28:57 1996 PST\n--- 323,334 ----\n | Fri Mar 01 17:32:01 1996 PST | @ 5 hours | Fri Mar 01 12:32:01 1996 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 1 min | Fri Mar 01 17:31:01 1996 PST\n | Fri Mar 01 17:32:01 1996 PST | @ 14 secs ago | Fri Mar 01 17:32:15 1996 PST\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons 12 hours | Tue Jul 30 05:32:01 1996 PDT\n! | Mon Dec 30 17:32:01 1996 PST | @ 5 mons | Tue Jul 30 17:32:01 1996 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons 12 hours | Wed Jul 31 05:32:01 1996 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 5 mons | Wed Jul 31 17:32:01 1996 PDT\n! | Mon Dec 30 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 17:32:01 1996 PDT\n! | Tue Dec 31 17:32:01 1996 PST | @ 3 mons | Mon Sep 30 17:32:01 1996 PDT\n | Mon Dec 30 17:32:01 1996 PST | @ 10 days | Fri Dec 20 17:32:01 1996 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 10 days | Sat Dec 21 17:32:01 1996 PST\n | Mon Dec 30 17:32:01 1996 PST | @ 1 day 2 hours 3 mins 4 secs | Sun Dec 29 15:28:57 1996 PST\n***************\n*** 339,360 ****\n | Tue Dec 31 17:32:01 1996 PST | @ 5 hours | Tue Dec 31 12:32:01 1996 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 1 min | Tue Dec 31 17:31:01 1996 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 14 secs ago | Tue Dec 31 17:32:15 1996 PST\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Sat Jul 31 06:32:01 1999 PDT\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Sat Jul 31 18:32:01 1999 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Sun Aug 01 06:32:01 1999 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Sun Aug 01 18:32:01 1999 PDT\n! | Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Thu Sep 30 18:32:01 1999 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Fri Oct 01 18:32:01 1999 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons 12 hours | Thu Oct 14 14:14:05 1999 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons 12 hours | Thu Oct 14 15:14:03 1999 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Thu Oct 14 16:14:04 1999 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons 12 hours | Thu Oct 14 17:14:02 1999 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Thu Oct 14 21:14:01 1999 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons | Fri Oct 15 02:14:05 1999 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons | Fri Oct 15 03:14:03 1999 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Fri Oct 15 04:14:04 1999 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons | Fri Oct 15 05:14:02 1999 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Fri Oct 15 09:14:01 1999 PDT\n | Wed Mar 15 01:14:05 2000 PST | @ 3 mons | Wed Dec 15 01:14:05 1999 PST\n | Wed Mar 15 02:14:03 2000 PST | @ 3 mons | Wed Dec 15 02:14:03 1999 PST\n | Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Wed Dec 15 03:14:04 1999 PST\n--- 339,360 ----\n | Tue Dec 31 17:32:01 1996 PST | @ 5 hours | Tue Dec 31 12:32:01 1996 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 1 min | Tue Dec 31 17:31:01 1996 PST\n | Tue Dec 31 17:32:01 1996 PST | @ 14 secs ago | Tue Dec 31 17:32:15 1996 PST\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons 12 hours | Sat Jul 31 05:32:01 1999 PDT\n! | Fri Dec 31 17:32:01 1999 PST | @ 5 mons | Sat Jul 31 17:32:01 1999 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons 12 hours | Sun Aug 01 05:32:01 1999 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 5 mons | Sun Aug 01 17:32:01 1999 PDT\n! | Fri Dec 31 17:32:01 1999 PST | @ 3 mons | Thu Sep 30 17:32:01 1999 PDT\n! | Sat Jan 01 17:32:01 2000 PST | @ 3 mons | Fri Oct 01 17:32:01 1999 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons 12 hours | Thu Oct 14 13:14:05 1999 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons 12 hours | Thu Oct 14 14:14:03 1999 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons 12 hours | Thu Oct 14 15:14:04 1999 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons 12 hours | Thu Oct 14 16:14:02 1999 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons 12 hours | Thu Oct 14 20:14:01 1999 PDT\n! | Wed Mar 15 01:14:05 2000 PST | @ 5 mons | Fri Oct 15 01:14:05 1999 PDT\n! | Wed Mar 15 02:14:03 2000 PST | @ 5 mons | Fri Oct 15 02:14:03 1999 PDT\n! | Wed Mar 15 03:14:04 2000 PST | @ 5 mons | Fri Oct 15 03:14:04 1999 PDT\n! | Wed Mar 15 04:14:02 2000 PST | @ 5 mons | Fri Oct 15 04:14:02 1999 PDT\n! | Wed Mar 15 08:14:01 2000 PST | @ 5 mons | Fri Oct 15 08:14:01 1999 PDT\n | Wed Mar 15 01:14:05 2000 PST | @ 3 mons | Wed Dec 15 01:14:05 1999 PST\n | Wed Mar 15 02:14:03 2000 PST | @ 3 mons | Wed Dec 15 02:14:03 1999 PST\n | Wed Mar 15 03:14:04 2000 PST | @ 3 mons | Wed Dec 15 03:14:04 1999 PST\n***************\n*** 395,406 ****\n | Wed Mar 15 04:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 04:14:16 2000 PST\n | Wed Mar 15 08:14:01 2000 PST | @ 1 min | Wed Mar 15 08:13:01 2000 PST\n | Wed Mar 15 08:14:01 2000 PST | @ 14 secs ago | Wed Mar 15 08:14:15 2000 PST\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Mon Jul 31 06:32:01 2000 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Mon Jul 31 18:32:01 2000 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Tue Aug 01 06:32:01 2000 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Tue Aug 01 18:32:01 2000 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Sep 30 18:32:01 2000 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Oct 01 18:32:01 2000 PDT\n | Sun Dec 31 17:32:01 2000 PST | @ 10 days | Thu Dec 21 17:32:01 2000 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 10 days | Fri Dec 22 17:32:01 2000 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Dec 30 15:28:57 2000 PST\n--- 395,406 ----\n | Wed Mar 15 04:14:02 2000 PST | @ 14 secs ago | Wed Mar 15 04:14:16 2000 PST\n | Wed Mar 15 08:14:01 2000 PST | @ 1 min | Wed Mar 15 08:13:01 2000 PST\n | Wed Mar 15 08:14:01 2000 PST | @ 14 secs ago | Wed Mar 15 08:14:15 2000 PST\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons 12 hours | Mon Jul 31 05:32:01 2000 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 5 mons | Mon Jul 31 17:32:01 2000 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons 12 hours | Tue Aug 01 05:32:01 2000 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 5 mons | Tue Aug 01 17:32:01 2000 PDT\n! | Sun Dec 31 17:32:01 2000 PST | @ 3 mons | Sat Sep 30 17:32:01 2000 PDT\n! | Mon Jan 01 17:32:01 2001 PST | @ 3 mons | Sun Oct 01 17:32:01 2000 PDT\n | Sun Dec 31 17:32:01 2000 PST | @ 10 days | Thu Dec 21 17:32:01 2000 PST\n | Mon Jan 01 17:32:01 2001 PST | @ 10 days | Fri Dec 22 17:32:01 2000 PST\n | Sun Dec 31 17:32:01 2000 PST | @ 1 day 2 hours 3 mins 4 secs | Sat Dec 30 15:28:57 2000 PST\n\n======================================================================\n\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Fri, 10 Nov 2000 15:54:13 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Horology failure on UW711/cc..."
},
{
"msg_contents": "Larry Rosenman <[email protected]> writes:\n> I suspect this is just a NOT updated out file:\n\nYup. Patch applied, thanks!\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 10 Nov 2000 18:20:18 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Horology failure on UW711/cc... "
}
]
|
[
{
"msg_contents": "Just a BIG *THANK YOU* to tom for making the inet/cidr stuff\nwork as one would expect. \n\nLarry\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Fri, 10 Nov 2000 16:55:12 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "NEW Inet/Cidr"
}
]
|
[
{
"msg_contents": "set digest\n\n\n\n\n\n\n\nset digest",
"msg_date": "Sat, 11 Nov 2000 10:36:35 +0100",
"msg_from": "\"J.J. Karels\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "None"
}
]
|
[
{
"msg_contents": "Hi!\n\nI'll be in Las Vegas (Comdex) till next week\nWednesday.\nI wasn't able to implement redo for sequences but\nwas going to turn WAL on by default anyway.\nUnfortunately, I've got core in regress:opr_sanity\ntest (in FileSeek code), so WAL still is not \ndefault.\n\nSee you!\n\nVadim\n\n\n",
"msg_date": "Sat, 11 Nov 2000 02:43:56 -0800",
"msg_from": "\"Vadim Mikheev\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "WAL"
},
{
"msg_contents": "Now WAL is ON by default. make distclean + initdb are required.\n\nVadim\n\n\n",
"msg_date": "Mon, 20 Nov 2000 01:27:33 -0800",
"msg_from": "\"Vadim Mikheev\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: WAL"
}
]
|
[
{
"msg_contents": "FINALLY, the SCO UDK Feature Supplement is released. I know\na couple of other people were waiting for it, so I figured I'd tell\npeople it's out. \n\nPeter,\n The released version is now on lerami. \n\nLER\n\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sat, 11 Nov 2000 09:18:09 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "UW711/UDK FS"
}
]
|
[
{
"msg_contents": "Hi\n\nI hope this is the right list to write to.\n\nA danish company just got a patent which we at SSLUG www.sslug.dk do not\nthink is a new invention.\n\nI want to get in contact with somebody who can confirm that this patent is\nnot new and has been in PostgreSQL before the patent was taken.\n\nIf we can prove that this patent was not new when requested, we plan to\nstart a trial against the company or Patent Office to get the patent\nredrawn.\n\nIt is a bit troublesome to get all the documents. \nYou can find a tar-ball here:\n http://www.sslug.dk/~chlor/targit.tgz\nThere is four pages which is interesting:\n http://www.sslug.dk/~chlor/targit/bns01.pdf\n http://www.sslug.dk/~chlor/targit/bns31.pdf\n http://www.sslug.dk/~chlor/targit/bns32.pdf\n http://www.sslug.dk/~chlor/targit/bns33.pdf\n\nbest regards\nPatent group, SSLUG, Hans Schou\n\n",
"msg_date": "Sat, 11 Nov 2000 17:23:40 +0100 (CET)",
"msg_from": "Hans Schou <[email protected]>",
"msg_from_op": true,
"msg_subject": "Danish database patent"
},
{
"msg_contents": "Hans Schou wrote:\n> \n> Hi\n> \n> I hope this is the right list to write to.\n> \n> A danish company just got a patent which we at SSLUG www.sslug.dk do not\n> think is a new invention.\n> \n> I want to get in contact with somebody who can confirm that this patent is\n> not new and has been in PostgreSQL before the patent was taken.\n> \n> If we can prove that this patent was not new when requested, we plan to\n> start a trial against the company or Patent Office to get the patent\n> redrawn.\n> \n> It is a bit troublesome to get all the documents.\n> You can find a tar-ball here:\n> http://www.sslug.dk/~chlor/targit.tgz\n> There is four pages which is interesting:\n> http://www.sslug.dk/~chlor/targit/bns01.pdf\n> http://www.sslug.dk/~chlor/targit/bns31.pdf\n> http://www.sslug.dk/~chlor/targit/bns32.pdf\n> http://www.sslug.dk/~chlor/targit/bns33.pdf\n> \n\nI took only a brief look at them, so i may be in a state of\nmisunderstanding :)\n\nAs I understand it, the patent is about generating/composing queries\n_before_ \nsubmitting them to backend, not about query processing in the backend.\n\nSo there is not much hope that postgres has done it before, as 99% of\npostgres \nis concerned with backend activities.\n\n-----------\nHannu\n",
"msg_date": "Sat, 11 Nov 2000 18:35:26 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Danish database patent"
},
{
"msg_contents": "At 06:35 PM 11/11/00 +0200, Hannu Krosing wrote:\n\n>I took only a brief look at them, so i may be in a state of\n>misunderstanding :)\n>\n>As I understand it, the patent is about generating/composing queries\n>_before_ \n>submitting them to backend, not about query processing in the backend.\n\nYes, it's a query generation technique separate from the database server,\ngenerating and executing SQL queries on a set of tables in order to satisfy\nsome goal.\n\nHas nothing to do with the RDBMS itself.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Sat, 11 Nov 2000 08:52:02 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Danish database patent"
}
]
|
[
{
"msg_contents": "* Gary MacDougall <[email protected]> [001111 11:28] wrote:\n> I'm trying to compile postgresql on Windows 2000. I've followed the directions accordingly.\n> \n> When I run the \"configure\" script, and I get the following error message:\n> \n> \n> configure: error installation or configuration problem: C compiler cannot creat\n> e executables.\n> \n> If anyone has any clues, I'd greatly appreciate the assistance.\n\nI think you need to ask on the cygwin lists. If you're compiling\nthis on Windows 2000 you already need a compiler to compile it.\n\nI would just find the binary distribution and install that.\n\n-Alfred\n",
"msg_date": "Sat, 11 Nov 2000 11:31:00 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: cygwin gcc problem."
},
{
"msg_contents": "I'm trying to compile postgresql on Windows 2000. I've followed the directions accordingly.\n\nWhen I run the \"configure\" script, and I get the following error message:\n\n\nconfigure: error installation or configuration problem: C compiler cannot creat\ne executables.\n\nIf anyone has any clues, I'd greatly appreciate the assistance.\n\nThanks,\nGary\n\n\n//////////////////////////////////////\n$ ./configure\nloading cache ./config.cache\nchecking host system type... i686-pc-cygwin\nchecking echo setting...\nchecking setting template to... cygwin32\nconfigure: warning: *** Include directory /usr/local/include does not exist.\nchecking whether to support locale... disabled\nchecking whether to support cyrillic recode... disabled\nchecking whether to support multibyte... disabled\nchecking setting DEF_PGPORT... 5432\nchecking setting DEF_MAXBACKENDS... 32\nchecking setting USE_TCL... disabled\nchecking setting USE_PERL... disabled\nchecking setting USE_ODBC... disabled\nchecking setproctitle... disabled\nchecking setting ASSERT CHECKING... disabled\nchecking for gcc... gcc\nchecking whether the C compiler (gcc -O2 ) works... no\nconfigure: error: installation or configuration problem: C compiler cannot creat\ne executables.\n\n\n\n\n\n\n\nI'm trying to compile postgresql on Windows \n2000. I've followed the directions accordingly.\n \nWhen I run the \"configure\" script, and I get the \nfollowing error message:\n \n \nconfigure: error installation or configuration \nproblem: C compiler cannot create executables.\n \nIf anyone has any clues, I'd greatly appreciate the \nassistance.\n \nThanks,\nGary\n \n \n//////////////////////////////////////\n$ ./configureloading cache \n./config.cachechecking host system type... i686-pc-cygwinchecking echo \nsetting...checking setting template to... cygwin32configure: warning: \n*** Include directory /usr/local/include does not exist.checking whether to \nsupport locale... disabledchecking whether to support cyrillic recode... \ndisabledchecking whether to support multibyte... disabledchecking \nsetting DEF_PGPORT... 5432checking setting DEF_MAXBACKENDS... 32checking \nsetting USE_TCL... disabledchecking setting USE_PERL... disabledchecking \nsetting USE_ODBC... disabledchecking setproctitle... disabledchecking \nsetting ASSERT CHECKING... disabledchecking for gcc... gccchecking \nwhether the C compiler (gcc -O2 ) works... noconfigure: error: installation \nor configuration problem: C compiler cannot create \nexecutables.",
"msg_date": "Sat, 11 Nov 2000 14:29:06 -0800",
"msg_from": "\"Gary MacDougall\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "cygwin gcc problem."
}
]
|
[
{
"msg_contents": "I sucessfully compiled 7.0.2 on Win 2000 recently. I had a lot of problems\nwhen I first installed cygwin and I select default text type of DOS. When i\nremoved cygwin, and changed that option during install it all worked (I'm\nnot sure if I swited it from DOS to Unix, or from Unix to DOS). I'm not\nsure that's the problem you are having but it helped me. \n\n-----Original Message-----\nFrom: Alfred Perlstein\nTo: Gary MacDougall\nCc: [email protected]\nSent: 11/11/00 1:31 PM\nSubject: Re: [HACKERS] cygwin gcc problem.\n\n* Gary MacDougall <[email protected]> [001111 11:28] wrote:\n> I'm trying to compile postgresql on Windows 2000. I've followed the\ndirections accordingly.\n> \n> When I run the \"configure\" script, and I get the following error\nmessage:\n> \n> \n> configure: error installation or configuration problem: C compiler\ncannot creat\n> e executables.\n> \n> If anyone has any clues, I'd greatly appreciate the assistance.\n\nI think you need to ask on the cygwin lists. If you're compiling\nthis on Windows 2000 you already need a compiler to compile it.\n\nI would just find the binary distribution and install that.\n\n-Alfred\n",
"msg_date": "Sat, 11 Nov 2000 15:29:08 -0600",
"msg_from": "Matthew <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: cygwin gcc problem."
},
{
"msg_contents": "I can't remember now where I found this, but I followed the instructions\nhere --\nhttp://people.freebsd.org/~kevlo/postgres/portNT.html -- to the letter just\nlast night and was successful in getting PostgreSQL running on my W2K\nlaptop. As mentioned below, I selected Unix file type for the CYGWIN\ninstallation. I haven't played too much with it yet, but I was able to\ncreate a new database and load a database dump from a RedHat machine.\n\nHope this helps,\n\nJoe\n\n----- Original Message -----\nFrom: \"Gary MacDougall\" <[email protected]>\nTo: <[email protected]>\nCc: \"Matthew\" <[email protected]>; \"'Alfred Perlstein '\" <[email protected]>\nSent: Sunday, November 12, 2000 12:22 PM\nSubject: Re: [HACKERS] cygwin gcc problem.\n\n\n> Still no luck with this. I'm at a loss.\n>\n> Has ANYONE been able to compile PostgreSQL on Windows 2000\n> with the CYGWIN package? If so, I'd be glad to know what steps\n> were taken to accomplish this.\n> I tried Matthew's suggestions, but that didn't seem to make a difference.\n> I'm starting to wonder now if I've got a buggy CYGWIN...\n>\n> My goal here is to have a decent PostgresSQL distribution for W2K, which\n> of course I'll make available in Installation form. However, if I can't\nget\n> this sucker going, its not going to happen.\n>\n> Thanks in advance,\n> Gary\n>\n> ----- Original Message -----\n> From: \"Matthew\" <[email protected]>\n> To: \"'Alfred Perlstein '\" <[email protected]>; \"'Gary MacDougall '\"\n> <[email protected]>\n> Cc: <[email protected]>\n> Sent: Saturday, November 11, 2000 1:29 PM\n> Subject: RE: [HACKERS] cygwin gcc problem.\n>\n>\n> > I sucessfully compiled 7.0.2 on Win 2000 recently. I had a lot of\n> problems\n> > when I first installed cygwin and I select default text type of DOS.\nWhen\n> i\n> > removed cygwin, and changed that option during install it all worked\n(I'm\n> > not sure if I swited it from DOS to Unix, or from Unix to DOS). I'm not\n> > sure that's the problem you are having but it helped me.\n> >\n> > -----Original Message-----\n> > From: Alfred Perlstein\n> > To: Gary MacDougall\n> > Cc: [email protected]\n> > Sent: 11/11/00 1:31 PM\n> > Subject: Re: [HACKERS] cygwin gcc problem.\n> >\n> > * Gary MacDougall <[email protected]> [001111 11:28] wrote:\n> > > I'm trying to compile postgresql on Windows 2000. I've followed the\n> > directions accordingly.\n> > >\n> > > When I run the \"configure\" script, and I get the following error\n> > message:\n> > >\n> > >\n> > > configure: error installation or configuration problem: C compiler\n> > cannot creat\n> > > e executables.\n> > >\n> > > If anyone has any clues, I'd greatly appreciate the assistance.\n> >\n> > I think you need to ask on the cygwin lists. If you're compiling\n> > this on Windows 2000 you already need a compiler to compile it.\n> >\n> > I would just find the binary distribution and install that.\n> >\n> > -Alfred\n>\n>\n\n",
"msg_date": "Sun, 12 Nov 2000 10:22:30 -0800",
"msg_from": "\"Joe Conway\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: cygwin gcc problem."
},
{
"msg_contents": "Still no luck with this. I'm at a loss.\n\nHas ANYONE been able to compile PostgreSQL on Windows 2000\nwith the CYGWIN package? If so, I'd be glad to know what steps\nwere taken to accomplish this.\nI tried Matthew's suggestions, but that didn't seem to make a difference.\nI'm starting to wonder now if I've got a buggy CYGWIN...\n\nMy goal here is to have a decent PostgresSQL distribution for W2K, which\nof course I'll make available in Installation form. However, if I can't get\nthis sucker going, its not going to happen.\n\nThanks in advance,\nGary\n\n----- Original Message -----\nFrom: \"Matthew\" <[email protected]>\nTo: \"'Alfred Perlstein '\" <[email protected]>; \"'Gary MacDougall '\"\n<[email protected]>\nCc: <[email protected]>\nSent: Saturday, November 11, 2000 1:29 PM\nSubject: RE: [HACKERS] cygwin gcc problem.\n\n\n> I sucessfully compiled 7.0.2 on Win 2000 recently. I had a lot of\nproblems\n> when I first installed cygwin and I select default text type of DOS. When\ni\n> removed cygwin, and changed that option during install it all worked (I'm\n> not sure if I swited it from DOS to Unix, or from Unix to DOS). I'm not\n> sure that's the problem you are having but it helped me.\n>\n> -----Original Message-----\n> From: Alfred Perlstein\n> To: Gary MacDougall\n> Cc: [email protected]\n> Sent: 11/11/00 1:31 PM\n> Subject: Re: [HACKERS] cygwin gcc problem.\n>\n> * Gary MacDougall <[email protected]> [001111 11:28] wrote:\n> > I'm trying to compile postgresql on Windows 2000. I've followed the\n> directions accordingly.\n> >\n> > When I run the \"configure\" script, and I get the following error\n> message:\n> >\n> >\n> > configure: error installation or configuration problem: C compiler\n> cannot creat\n> > e executables.\n> >\n> > If anyone has any clues, I'd greatly appreciate the assistance.\n>\n> I think you need to ask on the cygwin lists. If you're compiling\n> this on Windows 2000 you already need a compiler to compile it.\n>\n> I would just find the binary distribution and install that.\n>\n> -Alfred\n\n\n",
"msg_date": "Sun, 12 Nov 2000 12:22:42 -0800",
"msg_from": "\"Gary MacDougall\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: cygwin gcc problem."
}
]
|
[
{
"msg_contents": "Dear all, \n\nSorry if I post in the wrong list, but I've been tortured by the\nproblem for quite sometime.\n\nI've been tring for several combinations, say\n\nBACKEND \t\t\tFRONTEND\n\nMULE_INTERNAL \t\tEUC_TW\n\t\t\t\tBIG5\n\t\t\t\tEUC_LATIN1\nEUC_TW\t\t\tEUC_TW\n\t\t\t\tBIG5\n\t\t\t\tEUC_JP\n......\n.....\n\nNone of them can use varchar as fields, and insert \"�\\\" into the row.\nCan anyone help?\n\nThanks\nDave\n",
"msg_date": "Sun, 12 Nov 2000 15:53:45 +0800",
"msg_from": "Dave <[email protected]>",
"msg_from_op": true,
"msg_subject": "=?ISO-8859-1?Q?can't_insert_\"=B3\\\"_as_varchar_in_7.0.2_and_7.1?="
},
{
"msg_contents": "> Sorry if I post in the wrong list, but I've been tortured by the\n> problem for quite sometime.\n> \n> I've been tring for several combinations, say\n> \n> BACKEND \t\t\tFRONTEND\n> \n> MULE_INTERNAL \t\tEUC_TW\n> \t\t\t\tBIG5\n> \t\t\t\tEUC_LATIN1\n> EUC_TW\t\t\tEUC_TW\n> \t\t\t\tBIG5\n> \t\t\t\tEUC_JP\n> ......\n> .....\n> \n> None of them can use varchar as fields, and insert \"�\\\" into the row.\n> Can anyone help?\n\nWhat is \"�\\\" anyway? Is this a valid member of BIG5 or EUC_TW or\nwhatver?\n\nBTW, there is no such an encoding EUC_LATIN1.\n--\nTatsuo Ishii\n",
"msg_date": "Mon, 13 Nov 2000 10:01:49 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: can't insert =?iso-8859-1?Q?\"=B3\\\"?= as varchar in 7.0.2 and 7.1"
},
{
"msg_contents": "> Sorry, I mixed it up with LATIN1.\n> \n> Yes, \"�\\\" is a valid big5 code, but I don't know how\n> to convert it to big5. This problem has been raised in \n> Taiwan forum many times, you can check it out from\n> http://www.linuxfab.cx. However, this site supports only\n> chinese.\n> \n> Thanks\n> Dave\n\nWhat is the hex value of \"�\\\"?\n--\nTatsuo Ishii\n",
"msg_date": "Wed, 15 Nov 2000 09:59:48 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: can't insert =?iso-8859-1?Q?\"=B3\\\"?= as varchar in 7.0.2 and 7.1"
}
]
|
[
{
"msg_contents": "\nAfter a couple of pre-release tarballs, the PostgreSQL Developers are\nproud to announce v7.0.3, our most stable release yet. \n\nThere have been *several* fixes in this release, from v7.0.2, but, being a\nminor release, there have been *no* changes that will require a\ndump/restore to happen ... download the source, compile it and plug-n-play\n...\n\nDue to a last minute fix of a bug by Tom Lane that prevents a crash of the\nbackend, it is recommended that if you have downloaded one of the\npre-release 7.0.3 tarballs, you download this version and upgrade, to be\nsure you have the fix.\n\nIf anyone has any problems, please report bugs to\[email protected], or submit a but through our handy web interface\navailable at http://www.postgresql.org ...\n\nChanges\n-------\nJdbc fixes (Peter)\nLarge object fix (Tom)\nFix lean in COPY WITH OIDS leak (Tom)\nFix backwards-index-scan (Tom)\nFix SELECT ... FOR UPDATE so it checks for duplicate keys (Hiroshi)\nAdd --enable-syslog to configure (Marc)\nFix abort transaction at backend exit in rare cases (Tom)\nFix for psql \\l+ when multi-byte enabled (Tatsuo)\nAllow PL/pgSQL to accept non ascii identifiers (Tatsuo)\nMake vacuum always flush buffers (Tom)\nFix to allow cancel while waiting for a lock (Hiroshi)\nFix for memory aloocation problem in user authentication code (Tom)\nRemove bogus use of int4out() (Tom)\nFixes for multiple subqueries in COALESCE or BETWEEN (Tom)\nFix for failure of triggers on heap open in certain cases (Jeroen van\n Vianen)\nFix for erroneous selectivity of not-equals (Tom)\nFix for erroneous use of strcmp() (Tom)\nFix for bug where storage manager accesses items beyond end of file\n (Tom)\nFix to include kernel errno message in all smgr elog messages (Tom)\nFix for '.' not in PATH at build time (SL Baur)\nFix for out-of-file-descriptors error (Tom)\nFix to make pg_dump dump 'iscachable' flag for functions (Tom)\nFix for subselect in targetlist of Append node (Tom)\nFix for mergejoin plans (Tom)\nFix TRUNCATE failure on relations with indexes (Tom)\nAvoid database-wide restart on write error (Hiroshi)\nFix nodeMaterial to honor chgParam by recomputing its output (Tom)\nFix VACUUM problem with moving chain of update tuples when source and\n destination of a tuple lie on the same page (Tom)\nFix user.c CommandCounterIncrement (Tom)\nFix for AM/PM boundary problem in to_char() (Karel Zak)\nFix TIME aggregate handling (Tom)\nFix to_char() to avoid coredump on NULL input (Tom)\nBuffer fix (Tom)\nFix for inserting/copying longer multibyte strings into char() data\n types (Tatsuo)\nFix for crash of backend, on abort (Tom)\n\n\n\n",
"msg_date": "Sun, 12 Nov 2000 04:36:32 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": true,
"msg_subject": "[RELEASE ANNOUNCEMENT] v7.0.3 *Final* now Available "
}
]
|
[
{
"msg_contents": "\nAny reason to NOT make the facility used (Currently hardcoded to\nLOG_LOCAL0) settable at runtime? (or at least compile)? \n\nLarry\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 10:16:18 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "SYSLOG/LOG_LOCAL0"
}
]
|
[
{
"msg_contents": "Here is a patch for allowing the syslog facility to be set.\n\n\nIndex: doc/src/sgml/runtime.sgml\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\nretrieving revision 1.33\ndiff -c -r1.33 runtime.sgml\n*** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n--- doc/src/sgml/runtime.sgml\t2000/11/12 17:13:37\n***************\n*** 822,827 ****\n--- 822,839 ----\n </varlistentry>\n \n <varlistentry>\n+ <term>SYSLOG_FACILITY (<type>string</type>)</term>\n+ <listitem>\n+ <para>\n+ If the SYSLOG option is set to 1 or greater, this option determines\n+ the <application>syslog</application> facility used. You may choose\n+ from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n+ the default is LOCAL0\n+ </para>\n+ </listitem>\n+ </varlistentry>\n+ \n+ <varlistentry>\n <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n <listitem>\n <para>\nIndex: src/backend/utils/error/elog.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\nretrieving revision 1.65\ndiff -c -r1.65 elog.c\n*** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n--- src/backend/utils/error/elog.c\t2000/11/12 17:13:39\n***************\n*** 58,63 ****\n--- 58,64 ----\n * ... in theory anyway\n */\n int Use_syslog = 0;\n+ char *Syslog_facility = \"LOCAL0\";\n \n static void write_syslog(int level, const char *line);\n \n***************\n*** 620,625 ****\n--- 621,627 ----\n \n \tstatic bool\topenlog_done = false;\n \tstatic unsigned long seq = 0;\n+ \tstatic int\tsyslog_fac = LOG_LOCAL0;\n \tint len = strlen(line);\n \n \tif (Use_syslog == 0)\n***************\n*** 627,633 ****\n \n \tif (!openlog_done)\n \t{\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n \t\topenlog_done = true;\n \t}\n \n--- 629,651 ----\n \n \tif (!openlog_done)\n \t{\n! \t\tif (strcmp(Syslog_facility,\"LOCAL0\") == 0) \n! \t\t\tsyslog_fac = LOG_LOCAL0;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL1\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL1;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL2\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL2;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL3\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL3;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL4\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL4;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL5\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL5;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL6\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL6;\n! \t\tif (strcmp(Syslog_facility,\"LOCAL7\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL7;\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, syslog_fac);\n \t\topenlog_done = true;\n \t}\n \nIndex: src/backend/utils/misc/guc.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\nretrieving revision 1.16\ndiff -c -r1.16 guc.c\n*** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n--- src/backend/utils/misc/guc.c\t2000/11/12 17:13:39\n***************\n*** 39,44 ****\n--- 39,45 ----\n extern int CheckPointTimeout;\n extern int XLOGbuffers;\n extern int XLOG_DEBUG;\n+ extern char * Syslog_facility;\n \n /*\n * Debugging options\n***************\n*** 303,308 ****\n--- 304,312 ----\n \n \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n \t \"\", NULL},\n+ #ifdef ENABLE_SYSLOG\n+ \t{\"syslog_facility\",\tPGC_SIGHUP,\t&Syslog_facility, \"LOCAL0\", NULL},\t \n+ #endif\n \n \t{NULL, 0, NULL, NULL, NULL}\n };\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 11:15:36 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> Here is a patch for allowing the syslog facility to be set.\n\nI think you want to check for invalid values, like \"LOCAL37.5\". The last\nfield in the ConfigNamesString structure (see below) allows you to set a\n\"parse hook\", that is, a function that parses the input value and returns\ntrue if it is okay. At least this is how it is supposed to work, I've\nnever actually tried it. :) Or maybe just make it an integer option?\n\n> ***************\n> *** 303,308 ****\n> --- 304,312 ----\n> \n> \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> \t \"\", NULL},\n> + #ifdef ENABLE_SYSLOG\n> + \t{\"syslog_facility\",\tPGC_SIGHUP,\t&Syslog_facility, \"LOCAL0\", NULL},\t \n> + #endif\n> \n> \t{NULL, 0, NULL, NULL, NULL}\n> };\n> \n> \n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Sun, 12 Nov 2000 19:22:15 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "OK, I don't like it (it just says \"syntax error\"), but here is an\nimproved version. I also switched to strcasecmp...\n\n\nIndex: doc/src/sgml/runtime.sgml\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\nretrieving revision 1.33\ndiff -c -r1.33 runtime.sgml\n*** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n--- doc/src/sgml/runtime.sgml\t2000/11/12 19:59:10\n***************\n*** 822,827 ****\n--- 822,839 ----\n </varlistentry>\n \n <varlistentry>\n+ <term>SYSLOG_FACILITY (<type>string</type>)</term>\n+ <listitem>\n+ <para>\n+ If the SYSLOG option is set to 1 or greater, this option determines\n+ the <application>syslog</application> facility used. You may choose\n+ from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n+ the default is LOCAL0\n+ </para>\n+ </listitem>\n+ </varlistentry>\n+ \n+ <varlistentry>\n <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n <listitem>\n <para>\nIndex: src/backend/utils/error/elog.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\nretrieving revision 1.65\ndiff -c -r1.65 elog.c\n*** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n--- src/backend/utils/error/elog.c\t2000/11/12 19:59:13\n***************\n*** 58,63 ****\n--- 58,64 ----\n * ... in theory anyway\n */\n int Use_syslog = 0;\n+ char *Syslog_facility = \"LOCAL0\";\n \n static void write_syslog(int level, const char *line);\n \n***************\n*** 620,625 ****\n--- 621,627 ----\n \n \tstatic bool\topenlog_done = false;\n \tstatic unsigned long seq = 0;\n+ \tstatic int\tsyslog_fac = LOG_LOCAL0;\n \tint len = strlen(line);\n \n \tif (Use_syslog == 0)\n***************\n*** 627,633 ****\n \n \tif (!openlog_done)\n \t{\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n \t\topenlog_done = true;\n \t}\n \n--- 629,651 ----\n \n \tif (!openlog_done)\n \t{\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL0\") == 0) \n! \t\t\tsyslog_fac = LOG_LOCAL0;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL1\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL1;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL2\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL2;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL3\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL3;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL4\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL4;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL5\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL5;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL6\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL6;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL7\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL7;\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, syslog_fac);\n \t\topenlog_done = true;\n \t}\n \nIndex: src/backend/utils/misc/guc.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\nretrieving revision 1.16\ndiff -c -r1.16 guc.c\n*** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n--- src/backend/utils/misc/guc.c\t2000/11/12 19:59:15\n***************\n*** 39,44 ****\n--- 39,48 ----\n extern int CheckPointTimeout;\n extern int XLOGbuffers;\n extern int XLOG_DEBUG;\n+ #ifdef ENABLE_SYSLOG\n+ extern char * Syslog_facility;\n+ bool check_facility(const char *facility);\n+ #endif\n \n /*\n * Debugging options\n***************\n*** 303,308 ****\n--- 307,315 ----\n \n \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n \t \"\", NULL},\n+ #ifdef ENABLE_SYSLOG\n+ \t{\"syslog_facility\",\tPGC_SIGHUP,\t&Syslog_facility, \"LOCAL0\", check_facility},\t \n+ #endif\n \n \t{NULL, 0, NULL, NULL, NULL}\n };\n***************\n*** 807,809 ****\n--- 814,832 ----\n \t\tif (*cp == '-')\n \t\t\t*cp = '_';\n }\n+ #ifdef ENABLE_SYSLOG\n+ bool check_facility(const char *facility)\n+ {\n+ \tif (strcasecmp(facility,\"LOCAL0\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL1\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL2\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL3\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL4\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL5\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL6\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL7\") == 0) return true;\n+ \tfprintf(stderr,\"invalid syslog_facility %s\\n\",facility);\n+ \telog(FATAL,\"invalid syslog_facility %s\",facility);\n+ \treturn false;\n+ }\n+ #endif\n* Peter Eisentraut <[email protected]> [001112 12:18]:\n> Larry Rosenman writes:\n> \n> > Here is a patch for allowing the syslog facility to be set.\n> \n> I think you want to check for invalid values, like \"LOCAL37.5\". The last\n> field in the ConfigNamesString structure (see below) allows you to set a\n> \"parse hook\", that is, a function that parses the input value and returns\n> true if it is okay. At least this is how it is supposed to work, I've\n> never actually tried it. :) Or maybe just make it an integer option?\n> \n> > ***************\n> > *** 303,308 ****\n> > --- 304,312 ----\n> > \n> > \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> > \t \"\", NULL},\n> > + #ifdef ENABLE_SYSLOG\n> > + \t{\"syslog_facility\",\tPGC_SIGHUP,\t&Syslog_facility, \"LOCAL0\", NULL},\t \n> > + #endif\n> > \n> > \t{NULL, 0, NULL, NULL, NULL}\n> > };\n> > \n> > \n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 14:01:22 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001112 14:02]:\n> OK, I don't like it (it just says \"syntax error\"), but here is an\n> improved version. I also switched to strcasecmp...\nIn looking at this some more, it appears that *SOMETHING* is not\nallowing messages from set_config_option() in\n/src/backend/utils/misc/guc.c out WHEN WE ARE DEALING WITH syslog type\nstuff and we are reading it from the postgresql.conf file. I'm not\nsure how to deal with this.. I set syslog=2 then syslog_facility to \nsome invalid value, and all I get is the syntax error message, not the \n\"option rejects value\" message. \n\nAnyone got any ideas? \n\nOh, delete the elog() and fprintf() before you commit my patch (in\ncheck_facility() in guc.c), please. \n\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 15:40:22 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001112 15:41]:\n> * Larry Rosenman <[email protected]> [001112 14:02]:\n> > OK, I don't like it (it just says \"syntax error\"), but here is an\n> > improved version. I also switched to strcasecmp...\n> In looking at this some more, it appears that *SOMETHING* is not\n> allowing messages from set_config_option() in\n> /src/backend/utils/misc/guc.c out WHEN WE ARE DEALING WITH syslog type\n> stuff and we are reading it from the postgresql.conf file. I'm not\n> sure how to deal with this.. I set syslog=2 then syslog_facility to \n> some invalid value, and all I get is the syntax error message, not the \n> \"option rejects value\" message. \n> \n> Anyone got any ideas? \n> \n> Oh, delete the elog() and fprintf() before you commit my patch (in\n> check_facility() in guc.c), please. \nOh, more, if I give an invalid value on the command line, we get the\nright message out. So, it appears to be a conf file issue. \n\nI'm no (f)lex guru, nor do I totally understand the startup stuff. \n\nI feel the patch (modulo the killing of the elog() and fprintf() is\nvaluable. I think I am the first to use the string parse_hook, so\nthis is probably the first time we've had this issue. \n\nAny help would be appreciated. \n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 15:58:54 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Here is a cleaned up patch, without the elog() and fprintf(), and some\nminor formatting fixups. \n\n\nIndex: doc/src/sgml/runtime.sgml\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\nretrieving revision 1.33\ndiff -c -r1.33 runtime.sgml\n*** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n--- doc/src/sgml/runtime.sgml\t2000/11/12 23:02:17\n***************\n*** 822,827 ****\n--- 822,839 ----\n </varlistentry>\n \n <varlistentry>\n+ <term>SYSLOG_FACILITY (<type>string</type>)</term>\n+ <listitem>\n+ <para>\n+ If the SYSLOG option is set to 1 or greater, this option determines\n+ the <application>syslog</application> facility used. You may choose\n+ from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n+ the default is LOCAL0\n+ </para>\n+ </listitem>\n+ </varlistentry>\n+ \n+ <varlistentry>\n <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n <listitem>\n <para>\nIndex: src/backend/utils/error/elog.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\nretrieving revision 1.65\ndiff -c -r1.65 elog.c\n*** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n--- src/backend/utils/error/elog.c\t2000/11/12 23:02:20\n***************\n*** 58,63 ****\n--- 58,64 ----\n * ... in theory anyway\n */\n int Use_syslog = 0;\n+ char *Syslog_facility = \"LOCAL0\";\n \n static void write_syslog(int level, const char *line);\n \n***************\n*** 620,625 ****\n--- 621,627 ----\n \n \tstatic bool\topenlog_done = false;\n \tstatic unsigned long seq = 0;\n+ \tstatic int\tsyslog_fac = LOG_LOCAL0;\n \tint len = strlen(line);\n \n \tif (Use_syslog == 0)\n***************\n*** 627,633 ****\n \n \tif (!openlog_done)\n \t{\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n \t\topenlog_done = true;\n \t}\n \n--- 629,651 ----\n \n \tif (!openlog_done)\n \t{\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL0\") == 0) \n! \t\t\tsyslog_fac = LOG_LOCAL0;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL1\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL1;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL2\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL2;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL3\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL3;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL4\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL4;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL5\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL5;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL6\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL6;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL7\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL7;\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, syslog_fac);\n \t\topenlog_done = true;\n \t}\n \nIndex: src/backend/utils/misc/guc.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\nretrieving revision 1.16\ndiff -c -r1.16 guc.c\n*** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n--- src/backend/utils/misc/guc.c\t2000/11/12 23:02:22\n***************\n*** 39,44 ****\n--- 39,48 ----\n extern int CheckPointTimeout;\n extern int XLOGbuffers;\n extern int XLOG_DEBUG;\n+ #ifdef ENABLE_SYSLOG\n+ extern char *Syslog_facility;\n+ bool check_facility(const char *facility);\n+ #endif\n \n /*\n * Debugging options\n***************\n*** 303,308 ****\n--- 307,316 ----\n \n \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n \t \"\", NULL},\n+ #ifdef ENABLE_SYSLOG\n+ \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n+ \t\"LOCAL0\", check_facility},\t \n+ #endif\n \n \t{NULL, 0, NULL, NULL, NULL}\n };\n***************\n*** 807,809 ****\n--- 815,832 ----\n \t\tif (*cp == '-')\n \t\t\t*cp = '_';\n }\n+ #ifdef ENABLE_SYSLOG\n+ bool \n+ check_facility(const char *facility)\n+ {\n+ \tif (strcasecmp(facility,\"LOCAL0\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL1\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL2\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL3\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL4\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL5\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL6\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL7\") == 0) return true;\n+ \treturn false;\n+ }\n+ #endif\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 17:05:19 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Ok, You guys are probably tired of me, BUT, here is another one, that\nadds the facility to set the program name used in syslog. \n(this includes the other ones). \n\nOne gotcha, the parser doesn't like special characters in strings.\nFor example, i tried to use pg-test, and if failed the parse coming\nfrom the postgresql.conf file. \n\nI don't think it's a showstopper..\n\nComments?\n\n\n\nIndex: doc/src/sgml/runtime.sgml\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\nretrieving revision 1.33\ndiff -c -r1.33 runtime.sgml\n*** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n--- doc/src/sgml/runtime.sgml\t2000/11/13 01:15:34\n***************\n*** 822,827 ****\n--- 822,851 ----\n </varlistentry>\n \n <varlistentry>\n+ <term>SYSLOG_FACILITY (<type>string</type>)</term>\n+ <listitem>\n+ <para>\n+ If the SYSLOG option is set to 1 or greater, this option determines\n+ the <application>syslog</application> facility used. You may choose\n+ from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n+ the default is LOCAL0\n+ </para>\n+ </listitem>\n+ </varlistentry>\n+ \n+ <varlistentry>\n+ <term>SYSLOG_PROGID (<type>string</type>)</term>\n+ <listitem>\n+ <para>\n+ If the SYSLOG option is set to 1 or greater, this option determines\n+ the program id used to identify <product>PostgreSQL</product> messages\n+ in <application>syslog</application> log messages. The default is\n+ postgres.\n+ </para>\n+ </listitem>\n+ </varlistentry>\n+ \n+ <varlistentry>\n <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n <listitem>\n <para>\nIndex: src/backend/utils/error/elog.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\nretrieving revision 1.65\ndiff -c -r1.65 elog.c\n*** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n--- src/backend/utils/error/elog.c\t2000/11/13 01:15:37\n***************\n*** 58,63 ****\n--- 58,65 ----\n * ... in theory anyway\n */\n int Use_syslog = 0;\n+ char *Syslog_facility = \"LOCAL0\";\n+ char *Syslog_progid = \"postgres\";\n \n static void write_syslog(int level, const char *line);\n \n***************\n*** 620,625 ****\n--- 622,628 ----\n \n \tstatic bool\topenlog_done = false;\n \tstatic unsigned long seq = 0;\n+ \tstatic int\tsyslog_fac = LOG_LOCAL0;\n \tint len = strlen(line);\n \n \tif (Use_syslog == 0)\n***************\n*** 627,633 ****\n \n \tif (!openlog_done)\n \t{\n! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n \t\topenlog_done = true;\n \t}\n \n--- 630,652 ----\n \n \tif (!openlog_done)\n \t{\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL0\") == 0) \n! \t\t\tsyslog_fac = LOG_LOCAL0;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL1\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL1;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL2\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL2;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL3\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL3;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL4\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL4;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL5\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL5;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL6\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL6;\n! \t\tif (strcasecmp(Syslog_facility,\"LOCAL7\") == 0)\n! \t\t\tsyslog_fac = LOG_LOCAL7;\n! \t\topenlog(Syslog_progid, LOG_PID | LOG_NDELAY, syslog_fac);\n \t\topenlog_done = true;\n \t}\n \nIndex: src/backend/utils/misc/guc.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\nretrieving revision 1.16\ndiff -c -r1.16 guc.c\n*** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n--- src/backend/utils/misc/guc.c\t2000/11/13 01:15:38\n***************\n*** 39,44 ****\n--- 39,49 ----\n extern int CheckPointTimeout;\n extern int XLOGbuffers;\n extern int XLOG_DEBUG;\n+ #ifdef ENABLE_SYSLOG\n+ extern char *Syslog_facility;\n+ extern char *Syslog_progid;\n+ bool check_facility(const char *facility);\n+ #endif\n \n /*\n * Debugging options\n***************\n*** 303,308 ****\n--- 308,319 ----\n \n \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n \t \"\", NULL},\n+ #ifdef ENABLE_SYSLOG\n+ \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n+ \t\"LOCAL0\", check_facility},\t \n+ \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n+ \t\"postgres\", NULL},\t \n+ #endif\n \n \t{NULL, 0, NULL, NULL, NULL}\n };\n***************\n*** 807,809 ****\n--- 818,835 ----\n \t\tif (*cp == '-')\n \t\t\t*cp = '_';\n }\n+ #ifdef ENABLE_SYSLOG\n+ bool \n+ check_facility(const char *facility)\n+ {\n+ \tif (strcasecmp(facility,\"LOCAL0\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL1\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL2\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL3\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL4\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL5\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL6\") == 0) return true;\n+ \tif (strcasecmp(facility,\"LOCAL7\") == 0) return true;\n+ \treturn false;\n+ }\n+ #endif\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sun, 12 Nov 2000 19:18:54 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001112 19:20]:\n> Ok, You guys are probably tired of me, BUT, here is another one, that\n> adds the facility to set the program name used in syslog. \n> (this includes the other ones). \n> \n> One gotcha, the parser doesn't like special characters in strings.\n> For example, i tried to use pg-test, and if failed the parse coming\n> from the postgresql.conf file. \n> \n> I don't think it's a showstopper..\n> \n> Comments?\nAny chance of this getting committed? \n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Mon, 13 Nov 2000 12:25:34 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Applied.\n\n\n> Ok, You guys are probably tired of me, BUT, here is another one, that\n> adds the facility to set the program name used in syslog. \n> (this includes the other ones). \n> \n> One gotcha, the parser doesn't like special characters in strings.\n> For example, i tried to use pg-test, and if failed the parse coming\n> from the postgresql.conf file. \n> \n> I don't think it's a showstopper..\n> \n> Comments?\n> \n> \n> \n> Index: doc/src/sgml/runtime.sgml\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\n> retrieving revision 1.33\n> diff -c -r1.33 runtime.sgml\n> *** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n> --- doc/src/sgml/runtime.sgml\t2000/11/13 01:15:34\n> ***************\n> *** 822,827 ****\n> --- 822,851 ----\n> </varlistentry>\n> \n> <varlistentry>\n> + <term>SYSLOG_FACILITY (<type>string</type>)</term>\n> + <listitem>\n> + <para>\n> + If the SYSLOG option is set to 1 or greater, this option determines\n> + the <application>syslog</application> facility used. You may choose\n> + from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n> + the default is LOCAL0\n> + </para>\n> + </listitem>\n> + </varlistentry>\n> + \n> + <varlistentry>\n> + <term>SYSLOG_PROGID (<type>string</type>)</term>\n> + <listitem>\n> + <para>\n> + If the SYSLOG option is set to 1 or greater, this option determines\n> + the program id used to identify <product>PostgreSQL</product> messages\n> + in <application>syslog</application> log messages. The default is\n> + postgres.\n> + </para>\n> + </listitem>\n> + </varlistentry>\n> + \n> + <varlistentry>\n> <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n> <listitem>\n> <para>\n> Index: src/backend/utils/error/elog.c\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\n> retrieving revision 1.65\n> diff -c -r1.65 elog.c\n> *** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n> --- src/backend/utils/error/elog.c\t2000/11/13 01:15:37\n> ***************\n> *** 58,63 ****\n> --- 58,65 ----\n> * ... in theory anyway\n> */\n> int Use_syslog = 0;\n> + char *Syslog_facility = \"LOCAL0\";\n> + char *Syslog_progid = \"postgres\";\n> \n> static void write_syslog(int level, const char *line);\n> \n> ***************\n> *** 620,625 ****\n> --- 622,628 ----\n> \n> \tstatic bool\topenlog_done = false;\n> \tstatic unsigned long seq = 0;\n> + \tstatic int\tsyslog_fac = LOG_LOCAL0;\n> \tint len = strlen(line);\n> \n> \tif (Use_syslog == 0)\n> ***************\n> *** 627,633 ****\n> \n> \tif (!openlog_done)\n> \t{\n> ! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n> \t\topenlog_done = true;\n> \t}\n> \n> --- 630,652 ----\n> \n> \tif (!openlog_done)\n> \t{\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL0\") == 0) \n> ! \t\t\tsyslog_fac = LOG_LOCAL0;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL1\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL1;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL2\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL2;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL3\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL3;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL4\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL4;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL5\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL5;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL6\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL6;\n> ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL7\") == 0)\n> ! \t\t\tsyslog_fac = LOG_LOCAL7;\n> ! \t\topenlog(Syslog_progid, LOG_PID | LOG_NDELAY, syslog_fac);\n> \t\topenlog_done = true;\n> \t}\n> \n> Index: src/backend/utils/misc/guc.c\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\n> retrieving revision 1.16\n> diff -c -r1.16 guc.c\n> *** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n> --- src/backend/utils/misc/guc.c\t2000/11/13 01:15:38\n> ***************\n> *** 39,44 ****\n> --- 39,49 ----\n> extern int CheckPointTimeout;\n> extern int XLOGbuffers;\n> extern int XLOG_DEBUG;\n> + #ifdef ENABLE_SYSLOG\n> + extern char *Syslog_facility;\n> + extern char *Syslog_progid;\n> + bool check_facility(const char *facility);\n> + #endif\n> \n> /*\n> * Debugging options\n> ***************\n> *** 303,308 ****\n> --- 308,319 ----\n> \n> \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> \t \"\", NULL},\n> + #ifdef ENABLE_SYSLOG\n> + \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n> + \t\"LOCAL0\", check_facility},\t \n> + \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n> + \t\"postgres\", NULL},\t \n> + #endif\n> \n> \t{NULL, 0, NULL, NULL, NULL}\n> };\n> ***************\n> *** 807,809 ****\n> --- 818,835 ----\n> \t\tif (*cp == '-')\n> \t\t\t*cp = '_';\n> }\n> + #ifdef ENABLE_SYSLOG\n> + bool \n> + check_facility(const char *facility)\n> + {\n> + \tif (strcasecmp(facility,\"LOCAL0\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL1\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL2\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL3\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL4\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL5\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL6\") == 0) return true;\n> + \tif (strcasecmp(facility,\"LOCAL7\") == 0) return true;\n> + \treturn false;\n> + }\n> + #endif\n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 16:34:58 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001113 15:36]:\n> Applied.\n> \nThanks. FWIW, I had to pull the CVS copy of guc.c (my cvs update got \ntwo copies of my updates to the table). \n\nComments on my postgresql.conf issues from the rest of the -hackers\ncorp? \n\nThanks!\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Mon, 13 Nov 2000 16:06:54 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001113 17:41]:\n> Bruce Momjian writes:\n> \n> > Applied.\n> \n> Uh, shouldn't the problems Larry pointed out be fixed first?\nI don't think the problems are BECAUSE of my code. The new stuff\nworks, just putting the new options in postgresql.conf with a bad\nvalue causes weird messages. I think the new code should stay, and\nnow we have stuff to figure out why guc-file.l or guc.c has a problem\ngetting the message out. \n\nI requested the commit. \n\nI think the issue is in guc-file.l or somewhere else in the startup of\na new backend to get the right error out. \n\nI'm not familiar enough with the backend startup to debug these\nwierdnesses(sp?). \n\n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Mon, 13 Nov 2000 17:45:02 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "There were problems? I saw someone asking why it hadn't been applied\nyet. What do people want? I can back it out.\n\n\n> Bruce Momjian writes:\n> \n> > Applied.\n> \n> Uh, shouldn't the problems Larry pointed out be fixed first?\n> \n> > \n> > \n> > > Ok, You guys are probably tired of me, BUT, here is another one, that\n> > > adds the facility to set the program name used in syslog. \n> > > (this includes the other ones). \n> > > \n> > > One gotcha, the parser doesn't like special characters in strings.\n> > > For example, i tried to use pg-test, and if failed the parse coming\n> > > from the postgresql.conf file. \n> > > \n> > > I don't think it's a showstopper..\n> > > \n> > > Comments?\n> > > \n> > > \n> > > \n> > > Index: doc/src/sgml/runtime.sgml\n> > > ===================================================================\n> > > RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\n> > > retrieving revision 1.33\n> > > diff -c -r1.33 runtime.sgml\n> > > *** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n> > > --- doc/src/sgml/runtime.sgml\t2000/11/13 01:15:34\n> > > ***************\n> > > *** 822,827 ****\n> > > --- 822,851 ----\n> > > </varlistentry>\n> > > \n> > > <varlistentry>\n> > > + <term>SYSLOG_FACILITY (<type>string</type>)</term>\n> > > + <listitem>\n> > > + <para>\n> > > + If the SYSLOG option is set to 1 or greater, this option determines\n> > > + the <application>syslog</application> facility used. You may choose\n> > > + from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n> > > + the default is LOCAL0\n> > > + </para>\n> > > + </listitem>\n> > > + </varlistentry>\n> > > + \n> > > + <varlistentry>\n> > > + <term>SYSLOG_PROGID (<type>string</type>)</term>\n> > > + <listitem>\n> > > + <para>\n> > > + If the SYSLOG option is set to 1 or greater, this option determines\n> > > + the program id used to identify <product>PostgreSQL</product> messages\n> > > + in <application>syslog</application> log messages. The default is\n> > > + postgres.\n> > > + </para>\n> > > + </listitem>\n> > > + </varlistentry>\n> > > + \n> > > + <varlistentry>\n> > > <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n> > > <listitem>\n> > > <para>\n> > > Index: src/backend/utils/error/elog.c\n> > > ===================================================================\n> > > RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\n> > > retrieving revision 1.65\n> > > diff -c -r1.65 elog.c\n> > > *** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n> > > --- src/backend/utils/error/elog.c\t2000/11/13 01:15:37\n> > > ***************\n> > > *** 58,63 ****\n> > > --- 58,65 ----\n> > > * ... in theory anyway\n> > > */\n> > > int Use_syslog = 0;\n> > > + char *Syslog_facility = \"LOCAL0\";\n> > > + char *Syslog_progid = \"postgres\";\n> > > \n> > > static void write_syslog(int level, const char *line);\n> > > \n> > > ***************\n> > > *** 620,625 ****\n> > > --- 622,628 ----\n> > > \n> > > \tstatic bool\topenlog_done = false;\n> > > \tstatic unsigned long seq = 0;\n> > > + \tstatic int\tsyslog_fac = LOG_LOCAL0;\n> > > \tint len = strlen(line);\n> > > \n> > > \tif (Use_syslog == 0)\n> > > ***************\n> > > *** 627,633 ****\n> > > \n> > > \tif (!openlog_done)\n> > > \t{\n> > > ! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n> > > \t\topenlog_done = true;\n> > > \t}\n> > > \n> > > --- 630,652 ----\n> > > \n> > > \tif (!openlog_done)\n> > > \t{\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL0\") == 0) \n> > > ! \t\t\tsyslog_fac = LOG_LOCAL0;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL1\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL1;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL2\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL2;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL3\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL3;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL4\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL4;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL5\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL5;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL6\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL6;\n> > > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL7\") == 0)\n> > > ! \t\t\tsyslog_fac = LOG_LOCAL7;\n> > > ! \t\topenlog(Syslog_progid, LOG_PID | LOG_NDELAY, syslog_fac);\n> > > \t\topenlog_done = true;\n> > > \t}\n> > > \n> > > Index: src/backend/utils/misc/guc.c\n> > > ===================================================================\n> > > RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\n> > > retrieving revision 1.16\n> > > diff -c -r1.16 guc.c\n> > > *** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n> > > --- src/backend/utils/misc/guc.c\t2000/11/13 01:15:38\n> > > ***************\n> > > *** 39,44 ****\n> > > --- 39,49 ----\n> > > extern int CheckPointTimeout;\n> > > extern int XLOGbuffers;\n> > > extern int XLOG_DEBUG;\n> > > + #ifdef ENABLE_SYSLOG\n> > > + extern char *Syslog_facility;\n> > > + extern char *Syslog_progid;\n> > > + bool check_facility(const char *facility);\n> > > + #endif\n> > > \n> > > /*\n> > > * Debugging options\n> > > ***************\n> > > *** 303,308 ****\n> > > --- 308,319 ----\n> > > \n> > > \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> > > \t \"\", NULL},\n> > > + #ifdef ENABLE_SYSLOG\n> > > + \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n> > > + \t\"LOCAL0\", check_facility},\t \n> > > + \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n> > > + \t\"postgres\", NULL},\t \n> > > + #endif\n> > > \n> > > \t{NULL, 0, NULL, NULL, NULL}\n> > > };\n> > > ***************\n> > > *** 807,809 ****\n> > > --- 818,835 ----\n> > > \t\tif (*cp == '-')\n> > > \t\t\t*cp = '_';\n> > > }\n> > > + #ifdef ENABLE_SYSLOG\n> > > + bool \n> > > + check_facility(const char *facility)\n> > > + {\n> > > + \tif (strcasecmp(facility,\"LOCAL0\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL1\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL2\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL3\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL4\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL5\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL6\") == 0) return true;\n> > > + \tif (strcasecmp(facility,\"LOCAL7\") == 0) return true;\n> > > + \treturn false;\n> > > + }\n> > > + #endif\n> > > -- \n> > > Larry Rosenman http://www.lerctr.org/~ler\n> > > Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> > > US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> > > \n> > \n> > \n> > \n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 18:45:10 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "> * Peter Eisentraut <[email protected]> [001113 17:41]:\n> > Bruce Momjian writes:\n> > \n> > > Applied.\n> > \n> > Uh, shouldn't the problems Larry pointed out be fixed first?\n> I don't think the problems are BECAUSE of my code. The new stuff\n> works, just putting the new options in postgresql.conf with a bad\n> value causes weird messages. I think the new code should stay, and\n> now we have stuff to figure out why guc-file.l or guc.c has a problem\n> getting the message out. \n> \n> I requested the commit. \n\nMan, I knew I saw that request somewhere. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 18:45:50 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001113 17:43]:\n> Larry Rosenman writes:\n> \n> > Ok, You guys are probably tired of me, BUT, here is another one, that\n> > adds the facility to set the program name used in syslog. \n> > (this includes the other ones). \n> \n> Why would one want to do that? ISTM that that would just be a means to\n> play games with the sysadmin.\ntest vs. production postgresDB's, virtual users (ala uunet), multiple\ndifferent pg's listening on different ports. \n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Mon, 13 Nov 2000 17:46:06 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Bruce Momjian writes:\n\n> Applied.\n\nUh, shouldn't the problems Larry pointed out be fixed first?\n\n> \n> \n> > Ok, You guys are probably tired of me, BUT, here is another one, that\n> > adds the facility to set the program name used in syslog. \n> > (this includes the other ones). \n> > \n> > One gotcha, the parser doesn't like special characters in strings.\n> > For example, i tried to use pg-test, and if failed the parse coming\n> > from the postgresql.conf file. \n> > \n> > I don't think it's a showstopper..\n> > \n> > Comments?\n> > \n> > \n> > \n> > Index: doc/src/sgml/runtime.sgml\n> > ===================================================================\n> > RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v\n> > retrieving revision 1.33\n> > diff -c -r1.33 runtime.sgml\n> > *** doc/src/sgml/runtime.sgml\t2000/11/10 16:32:09\t1.33\n> > --- doc/src/sgml/runtime.sgml\t2000/11/13 01:15:34\n> > ***************\n> > *** 822,827 ****\n> > --- 822,851 ----\n> > </varlistentry>\n> > \n> > <varlistentry>\n> > + <term>SYSLOG_FACILITY (<type>string</type>)</term>\n> > + <listitem>\n> > + <para>\n> > + If the SYSLOG option is set to 1 or greater, this option determines\n> > + the <application>syslog</application> facility used. You may choose\n> > + from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.\n> > + the default is LOCAL0\n> > + </para>\n> > + </listitem>\n> > + </varlistentry>\n> > + \n> > + <varlistentry>\n> > + <term>SYSLOG_PROGID (<type>string</type>)</term>\n> > + <listitem>\n> > + <para>\n> > + If the SYSLOG option is set to 1 or greater, this option determines\n> > + the program id used to identify <product>PostgreSQL</product> messages\n> > + in <application>syslog</application> log messages. The default is\n> > + postgres.\n> > + </para>\n> > + </listitem>\n> > + </varlistentry>\n> > + \n> > + <varlistentry>\n> > <term>TRACE_NOTIFY (<type>boolean</type>)</term>\n> > <listitem>\n> > <para>\n> > Index: src/backend/utils/error/elog.c\n> > ===================================================================\n> > RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/error/elog.c,v\n> > retrieving revision 1.65\n> > diff -c -r1.65 elog.c\n> > *** src/backend/utils/error/elog.c\t2000/10/30 06:48:36\t1.65\n> > --- src/backend/utils/error/elog.c\t2000/11/13 01:15:37\n> > ***************\n> > *** 58,63 ****\n> > --- 58,65 ----\n> > * ... in theory anyway\n> > */\n> > int Use_syslog = 0;\n> > + char *Syslog_facility = \"LOCAL0\";\n> > + char *Syslog_progid = \"postgres\";\n> > \n> > static void write_syslog(int level, const char *line);\n> > \n> > ***************\n> > *** 620,625 ****\n> > --- 622,628 ----\n> > \n> > \tstatic bool\topenlog_done = false;\n> > \tstatic unsigned long seq = 0;\n> > + \tstatic int\tsyslog_fac = LOG_LOCAL0;\n> > \tint len = strlen(line);\n> > \n> > \tif (Use_syslog == 0)\n> > ***************\n> > *** 627,633 ****\n> > \n> > \tif (!openlog_done)\n> > \t{\n> > ! \t\topenlog(\"postgres\", LOG_PID | LOG_NDELAY, LOG_LOCAL0);\n> > \t\topenlog_done = true;\n> > \t}\n> > \n> > --- 630,652 ----\n> > \n> > \tif (!openlog_done)\n> > \t{\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL0\") == 0) \n> > ! \t\t\tsyslog_fac = LOG_LOCAL0;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL1\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL1;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL2\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL2;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL3\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL3;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL4\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL4;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL5\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL5;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL6\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL6;\n> > ! \t\tif (strcasecmp(Syslog_facility,\"LOCAL7\") == 0)\n> > ! \t\t\tsyslog_fac = LOG_LOCAL7;\n> > ! \t\topenlog(Syslog_progid, LOG_PID | LOG_NDELAY, syslog_fac);\n> > \t\topenlog_done = true;\n> > \t}\n> > \n> > Index: src/backend/utils/misc/guc.c\n> > ===================================================================\n> > RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\n> > retrieving revision 1.16\n> > diff -c -r1.16 guc.c\n> > *** src/backend/utils/misc/guc.c\t2000/11/09 11:25:59\t1.16\n> > --- src/backend/utils/misc/guc.c\t2000/11/13 01:15:38\n> > ***************\n> > *** 39,44 ****\n> > --- 39,49 ----\n> > extern int CheckPointTimeout;\n> > extern int XLOGbuffers;\n> > extern int XLOG_DEBUG;\n> > + #ifdef ENABLE_SYSLOG\n> > + extern char *Syslog_facility;\n> > + extern char *Syslog_progid;\n> > + bool check_facility(const char *facility);\n> > + #endif\n> > \n> > /*\n> > * Debugging options\n> > ***************\n> > *** 303,308 ****\n> > --- 308,319 ----\n> > \n> > \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> > \t \"\", NULL},\n> > + #ifdef ENABLE_SYSLOG\n> > + \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n> > + \t\"LOCAL0\", check_facility},\t \n> > + \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n> > + \t\"postgres\", NULL},\t \n> > + #endif\n> > \n> > \t{NULL, 0, NULL, NULL, NULL}\n> > };\n> > ***************\n> > *** 807,809 ****\n> > --- 818,835 ----\n> > \t\tif (*cp == '-')\n> > \t\t\t*cp = '_';\n> > }\n> > + #ifdef ENABLE_SYSLOG\n> > + bool \n> > + check_facility(const char *facility)\n> > + {\n> > + \tif (strcasecmp(facility,\"LOCAL0\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL1\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL2\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL3\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL4\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL5\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL6\") == 0) return true;\n> > + \tif (strcasecmp(facility,\"LOCAL7\") == 0) return true;\n> > + \treturn false;\n> > + }\n> > + #endif\n> > -- \n> > Larry Rosenman http://www.lerctr.org/~ler\n> > Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> > US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> > \n> \n> \n> \n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 00:46:45 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> Ok, You guys are probably tired of me, BUT, here is another one, that\n> adds the facility to set the program name used in syslog. \n> (this includes the other ones). \n\nWhy would one want to do that? ISTM that that would just be a means to\nplay games with the sysadmin.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 00:48:55 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "> Larry Rosenman writes:\n> \n> > Ok, You guys are probably tired of me, BUT, here is another one, that\n> > adds the facility to set the program name used in syslog. \n> > (this includes the other ones). \n> \n> Why would one want to do that? ISTM that that would just be a means to\n> play games with the sysadmin.\n\nDon't rule out the attractiveness of that. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 18:51:23 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> * Peter Eisentraut <[email protected]> [001113 17:43]:\n> > Larry Rosenman writes:\n> > \n> > > Ok, You guys are probably tired of me, BUT, here is another one, that\n> > > adds the facility to set the program name used in syslog. \n> > > (this includes the other ones). \n> > \n> > Why would one want to do that? ISTM that that would just be a means to\n> > play games with the sysadmin.\n> test vs. production postgresDB's, virtual users (ala uunet), multiple\n> different pg's listening on different ports. \n\nOkay, but you can't make these options PGC_SIGHUP unless you make sure to\nclose and re-open the syslog channel whenever these options\nchange. Probably ought to be PGC_POSTMASTER.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 06:57:43 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001113 23:52]:\n> Okay, but you can't make these options PGC_SIGHUP unless you make sure to\n> close and re-open the syslog channel whenever these options\n> change. Probably ought to be PGC_POSTMASTER.\nIs there a mechanism to \"hear\" the SIGHUP? Although, it probably\ndoesn't matter. I'll do a patch. I was just following the syslog\nlead. \n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 07:09:13 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001113 23:52]:\n> Okay, but you can't make these options PGC_SIGHUP unless you make sure to\n> close and re-open the syslog channel whenever these options\n> change. Probably ought to be PGC_POSTMASTER.\nHere is a patch to change to PGC_POSTMASTER...\n\n\nIndex: guc.c\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\nretrieving revision 1.19\ndiff -c -r1.19 guc.c\n*** guc.c\t2000/11/14 01:15:02\t1.19\n--- guc.c\t2000/11/14 13:11:33\n***************\n*** 309,317 ****\n \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n \t \"\", NULL},\n #ifdef ENABLE_SYSLOG\n! \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n \t\"LOCAL0\", check_facility},\t \n! \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n \t\"postgres\", NULL},\t \n #endif\n \n--- 309,317 ----\n \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n \t \"\", NULL},\n #ifdef ENABLE_SYSLOG\n! \t{\"syslog_facility\", PGC_POSTMASTER,\t &Syslog_facility, \n \t\"LOCAL0\", check_facility},\t \n! \t{\"syslog_progid\", PGC_POSTMASTER,\t &Syslog_progid, \n \t\"postgres\", NULL},\t \n #endif\n \n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 07:13:00 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> Is there a mechanism to \"hear\" the SIGHUP?\n\nThere currently isn't a way to have side effects when an option is\nset. Might be something for the future, but it doesn't seem so wildly\nimportant.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 19:48:37 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> In looking at this some more, it appears that *SOMETHING* is not\n> allowing messages from set_config_option() in\n> /src/backend/utils/misc/guc.c out WHEN WE ARE DEALING WITH syslog type\n> stuff and we are reading it from the postgresql.conf file. I'm not\n> sure how to deal with this.. I set syslog=2 then syslog_facility to \n> some invalid value, and all I get is the syntax error message, not the \n> \"option rejects value\" message. \n\nI can't reproduce that. I set 'syslog_facility = local97' and got the\nright error message.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 19:51:02 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Larry Rosenman writes:\n>> In looking at this some more, it appears that *SOMETHING* is not\n>> allowing messages from set_config_option() in\n>> /src/backend/utils/misc/guc.c out WHEN WE ARE DEALING WITH syslog type\n>> stuff and we are reading it from the postgresql.conf file. I'm not\n>> sure how to deal with this.. I set syslog=2 then syslog_facility to \n>> some invalid value, and all I get is the syntax error message, not the \n>> \"option rejects value\" message. \n\n> I can't reproduce that. I set 'syslog_facility = local97' and got the\n> right error message.\n\nI'm surprised you get any error message at all (as seen by a client,\nthat is, not as seen in the postmaster log). AFAICT, backend libpq\nis not fired up until well down inside PostmasterMain --- look at the\ncall to pq_init. Until that's done, it's impossible to send error\nmessages to the client. I've been meaning to look at whether the\npq_init call couldn't be moved up to before (instead of after) option\nand switch processing ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 13:53:57 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch "
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001114 12:45]:\n> Larry Rosenman writes:\n> \n> > In looking at this some more, it appears that *SOMETHING* is not\n> > allowing messages from set_config_option() in\n> > /src/backend/utils/misc/guc.c out WHEN WE ARE DEALING WITH syslog type\n> > stuff and we are reading it from the postgresql.conf file. I'm not\n> > sure how to deal with this.. I set syslog=2 then syslog_facility to \n> > some invalid value, and all I get is the syntax error message, not the \n> > \"option rejects value\" message. \n> \n> I can't reproduce that. I set 'syslog_facility = local97' and got the\n> right error message.\ntry setting it in postgresql.conf....\n\n\n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 12:59:40 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "I said:\n> I'm surprised you get any error message at all (as seen by a client,\n> that is, not as seen in the postmaster log). AFAICT, backend libpq\n> is not fired up until well down inside PostmasterMain --- look at the\n> call to pq_init.\n\ns/PostmasterMain/PostgresMain/ ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 14:00:53 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch "
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001114 13:18]:\n> Larry Rosenman writes:\n> \n> > > I can't reproduce that. I set 'syslog_facility = local97' and got the\n> > > right error message.\n> > try setting it in postgresql.conf....\n> \n> That's what I did.\nHmm. Here is what I get: \n$ ../bin/pg_ctl -D ~/pg-test/data -o \"-p 7777 -i\" start\npostmaster successfully started up.\n$ FATAL 1: postgresql.conf:17: syntax error\n\n$\n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 13:19:57 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> > I can't reproduce that. I set 'syslog_facility = local97' and got the\n> > right error message.\n> try setting it in postgresql.conf....\n\nThat's what I did.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 20:20:13 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Tom Lane writes:\n\n> > I can't reproduce that. I set 'syslog_facility = local97' and got the\n> > right error message.\n> \n> I'm surprised you get any error message at all (as seen by a client,\n> that is, not as seen in the postmaster log).\n\nI was talking about the postmaster log. No clients involved.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 20:23:05 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch "
},
{
"msg_contents": "Larry Rosenman writes:\n\n> Here is a patch to change to PGC_POSTMASTER...\n\nThanks. I polished things a bit and it works well for me now.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 20:23:51 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001114 14:39]:\n> Larry Rosenman writes:\n> \n> > * Peter Eisentraut <[email protected]> [001114 13:18]:\n> > > Larry Rosenman writes:\n> > > \n> > > > > I can't reproduce that. I set 'syslog_facility = local97' and got the\n> > > > > right error message.\n> > > > try setting it in postgresql.conf....\n> > > \n> > > That's what I did.\n> > Hmm. Here is what I get: \n> > $ ../bin/pg_ctl -D ~/pg-test/data -o \"-p 7777 -i\" start\n> > postmaster successfully started up.\n> > $ FATAL 1: postgresql.conf:17: syntax error\n> \n> Check that you have a newline at the end of the file.\nI do. If I put the correct value all works fine (I took the\nsample and edited it).\n\n\"postgresql.conf\" 25L, 685C [w]\nThanks for using Vim 507 . --Sven [email protected]!\n$ pwd\n/home/ler/pg-test/data\n$ cd ..\n$ bin/pg_ctl -D ./data -o \"-p 7777 -i\" start\npostmaster successfully started up.\n$ FATAL 1: postgresql.conf:17: syntax error\n\n$ cat data/postgresql.conf\n#\n# PostgreSQL configuration file\n# -----------------------------\n#\n# This file consists of lines of the form\n#\n# name = value\n#\n# (The `=' is optional.) White space is collapsed, comments are\n# introduced by `#' anywhere on a line. The complete list of option\n# names and allowed values can be found in the PostgreSQL\n# documentation. Examples are:\n\nlog_connections = on\nfsync = off\n#max_backends = 64\nsyslog_facility = LOCAL5.3we4rwjtasrtuert\nsyslog_progid = pgtest\nsyslog=2\nshowportnumber = on\n\n# Any option can also be given as a command line switch to the\n# postmaster, e.g., `postmaster --log-connections=on'. Some options\n# can be set at run-time with the `SET' SQL command.\n\n$\n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 14:41:22 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> * Peter Eisentraut <[email protected]> [001114 13:18]:\n> > Larry Rosenman writes:\n> > \n> > > > I can't reproduce that. I set 'syslog_facility = local97' and got the\n> > > > right error message.\n> > > try setting it in postgresql.conf....\n> > \n> > That's what I did.\n> Hmm. Here is what I get: \n> $ ../bin/pg_ctl -D ~/pg-test/data -o \"-p 7777 -i\" start\n> postmaster successfully started up.\n> $ FATAL 1: postgresql.conf:17: syntax error\n\nCheck that you have a newline at the end of the file.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 21:44:27 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "\n* Larry Rosenman <[email protected]> [001114 14:44]:\n> * Peter Eisentraut <[email protected]> [001114 14:39]:\n> > Larry Rosenman writes:\n> > \n> > > * Peter Eisentraut <[email protected]> [001114 13:18]:\n> > > > Larry Rosenman writes:\n> > > > \n> > > > > > I can't reproduce that. I set 'syslog_facility = local97' and got the\n> > > > > > right error message.\n> > > > > try setting it in postgresql.conf....\n> > > > \n> > > > That's what I did.\n> > > Hmm. Here is what I get: \n> > > $ ../bin/pg_ctl -D ~/pg-test/data -o \"-p 7777 -i\" start\n> > > postmaster successfully started up.\n> > > $ FATAL 1: postgresql.conf:17: syntax error\n> > \n> > Check that you have a newline at the end of the file.\n> I do. If I put the correct value all works fine (I took the\n> sample and edited it).\n> \n> \"postgresql.conf\" 25L, 685C [w]\n> Thanks for using Vim 507 . --Sven [email protected]!\n> $ pwd\n> /home/ler/pg-test/data\n> $ cd ..\n> $ bin/pg_ctl -D ./data -o \"-p 7777 -i\" start\n> postmaster successfully started up.\n> $ FATAL 1: postgresql.conf:17: syntax error\n> \n> $ cat data/postgresql.conf\n> #\n> # PostgreSQL configuration file\n> # -----------------------------\n> #\n> # This file consists of lines of the form\n> #\n> # name = value\n> #\n> # (The `=' is optional.) White space is collapsed, comments are\n> # introduced by `#' anywhere on a line. The complete list of option\n> # names and allowed values can be found in the PostgreSQL\n> # documentation. Examples are:\n> \n> log_connections = on\n> fsync = off\n> #max_backends = 64\n> syslog_facility = LOCAL5.3we4rwjtasrtuert\n> syslog_progid = pgtest\n> syslog=2\n> showportnumber = on\n> \n> # Any option can also be given as a command line switch to the\n> # postmaster, e.g., `postmaster --log-connections=on'. Some options\n> # can be set at run-time with the `SET' SQL command.\n> \n> $\n> > \n> > -- \n> > Peter Eisentraut [email protected] http://yi.org/peter-e/\nInterestingly, on my FreeBSD box:\n$ ../bin/pg_ctl -D ~/pg-test/data -o \"-p 7777 -i\" start\npostmaster successfully started up.\n$ FATAL 1: invalid value for option 'syslog_facility':\n'LOCAL112oieq4u2345'\n\n$ uname -a\nFreeBSD lerbsd.lerctr.org 4.2-BETA FreeBSD 4.2-BETA #82: Sun Nov 12\n16:57:22 CST\n 2000 [email protected]:/usr/src/sys/compile/LERBSD i386\n$\n\nThis looks like a portability issue. The other stuff I sent was\nfrom UnixWare 7.1.1 using native cc. \n\nLER\n\n> \n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:28:32 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001114 16:03]:\n> Larry Rosenman writes:\n> \n> > log_connections = on\n> > fsync = off\n> > #max_backends = 64\n> > syslog_facility = LOCAL5.3we4rwjtasrtuert\n> \n> It's the dot. The regular expression needs some work. Make a note to\n> always test with identical values next time. :-)\nOK, so the parser needs help? Can I try and fix it? What DON'T we \nwant guc-file.l to accept for a string?\n\n\n> \n> > syslog_progid = pgtest\n> > syslog=2\n> > showportnumber = on\n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 16:04:59 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> log_connections = on\n> fsync = off\n> #max_backends = 64\n> syslog_facility = LOCAL5.3we4rwjtasrtuert\n\nIt's the dot. The regular expression needs some work. Make a note to\nalways test with identical values next time. :-)\n\n> syslog_progid = pgtest\n> syslog=2\n> showportnumber = on\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 23:09:05 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001114 16:06]:\n> * Peter Eisentraut <[email protected]> [001114 16:03]:\n> > Larry Rosenman writes:\n> > \n> > > log_connections = on\n> > > fsync = off\n> > > #max_backends = 64\n> > > syslog_facility = LOCAL5.3we4rwjtasrtuert\n> > \n> > It's the dot. The regular expression needs some work. Make a note to\n> > always test with identical values next time. :-)\n> OK, so the parser needs help? Can I try and fix it? What DON'T we \n> want guc-file.l to accept for a string?\nOk, so what I think(?) needs to happen is the FIXME: tag needs to be\nhandled. We need to code a version of src/backend/parser/scansup.c\nthat doesn't use palloc, and also strips the apostrophes from the\nfront and end of the string? This doesn't look that hard. Do I have \n\"permission\" to play with it, and submit a patch when I've got it\nfixed? \n\nI ass/u/me we want to allow any of the 'C' escapes? or just\na-zA-Z0-9-. for a GUC_STRING? \n> \n> \n> > \n> > > syslog_progid = pgtest\n> > > syslog=2\n> > > showportnumber = on\n> > \n> > -- \n> > Peter Eisentraut [email protected] http://yi.org/peter-e/\n> \n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 16:54:59 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001114 16:56]:\n> Ok, so what I think(?) needs to happen is the FIXME: tag needs to be\n> handled. We need to code a version of src/backend/parser/scansup.c\n> that doesn't use palloc, and also strips the apostrophes from the\n> front and end of the string? This doesn't look that hard. Do I have \n> \"permission\" to play with it, and submit a patch when I've got it\n> fixed? \n> \n> I ass/u/me we want to allow any of the 'C' escapes? or just\n> a-zA-Z0-9-. for a GUC_STRING? \nOk, baring objections, I'm going to code up a routine to put into\nguc-file.l that removes the quotes/apostrophes from a GUC_STRING, and\nmatches for [-.a-zA-Z0-9] within the string. We can tune more later. \n\nProbably won't get posted tonight, but in the next 48 hours. \n\nLarry\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 20:44:05 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001114 20:45]:\n> * Larry Rosenman <[email protected]> [001114 16:56]:\n> > Ok, so what I think(?) needs to happen is the FIXME: tag needs to be\n> > handled. We need to code a version of src/backend/parser/scansup.c\n> > that doesn't use palloc, and also strips the apostrophes from the\n> > front and end of the string? This doesn't look that hard. Do I have \n> > \"permission\" to play with it, and submit a patch when I've got it\n> > fixed? \n> > \n> > I ass/u/me we want to allow any of the 'C' escapes? or just\n> > a-zA-Z0-9-. for a GUC_STRING? \n> Ok, baring objections, I'm going to code up a routine to put into\n> guc-file.l that removes the quotes/apostrophes from a GUC_STRING, and\n> matches for [-.a-zA-Z0-9] within the string. We can tune more later. \n> \n> Probably won't get posted tonight, but in the next 48 hours. \nOk, I changed my mind, and brute forced it. Here's a patch that \naccepts either 'string' or \"string\", and then kills off the ' or \". \nLet me know if this violates style or portability guidelines. \nIt depends on ANSI memmove(). \n\nIndex: guc-file.l\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v\nretrieving revision 1.4\ndiff -c -r1.4 guc-file.l\n*** guc-file.l\t2000/07/27 19:49:18\t1.4\n--- guc-file.l\t2000/11/15 05:52:57\n***************\n*** 45,51 ****\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n- \n %}\n \n SIGN (\"-\"|\"+\")\n--- 45,50 ----\n***************\n*** 69,76 ****\n * work right. Now there are no string options, and if there were then\n * the unquoted (`ID') tokens should still work. Of course this only\n * affects the configuration file.\n */\n! STRING \\'([^'\\n]|\\\\.)*'\n \n %%\n \n--- 68,79 ----\n * work right. Now there are no string options, and if there were then\n * the unquoted (`ID') tokens should still work. Of course this only\n * affects the configuration file.\n+ * LER 14NOV2000: I set it up to accept either a quoted string or a string\n+ * in apostrophes. I then kill off the 1st and last characters. There is \n+ * no special handling for doubled terminators or 'C' escapes. \n+ * this allows most other characters to be used.\n */\n! STRING (\\'|\\\")([^'\"\\n]|\\\\.)*(\\'|\\\")\n \n %%\n \n***************\n*** 215,220 ****\n--- 218,232 ----\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n+ \t\tif (token == GUC_STRING)\n+ \t\t{\n+ \t\t\t/* remove the beginning and ending quote/apostrophe */\n+ \t\t\t/* first: shift the whole shooting match down one\n+ \t\t\tcharacter */\n+ \t\t\tmemmove(opt_value,opt_value+1,strlen(opt_value)-1);\n+ \t\t\t/* second: null out the 2 characters we shifted */\n+ opt_value[strlen(opt_value)-2]='\\0';\n+ \t\t}\n parse_state = 2;\n break;\n \n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 23:55:50 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> Ok, so what I think(?) needs to happen is the FIXME: tag needs to be\n> handled. We need to code a version of src/backend/parser/scansup.c\n> that doesn't use palloc, and also strips the apostrophes from the\n> front and end of the string? This doesn't look that hard. Do I have \n> \"permission\" to play with it, and submit a patch when I've got it\n> fixed? \n\nSome background information: The current\n\n name = value\n\nsyntax is lexically compatible with the syntax of the SET command. \nTherefore you can't have \"funny\" characters in 'value' unless\nsingle-quoted.\n\nNow in the context of the config file this seems overly restrictive. \nTherefore I'd agree that we relax that a bit and allow more characters to\ngo into 'value' unquoted. I'm not quite sure which, but to prevent\nconfusion I'd prefer no semicolons, whitespace, or equal signs, possibly\nothers.\n\nThis would require making 'value' a different token type from 'name',\nbecause the latter should not accept these characters.\n\nAdditionally, the FIXME ought to be done. I'd prefer it if it accepted\nthe exact same escapes and all as does the SQL parser/scanner. So it\nought to be a copy and paste from scansup.c. I'm not excited about\nallowing double-quotes though.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 15 Nov 2000 17:31:42 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001115 10:26]:\n> Larry Rosenman writes:\n> \n> > Ok, so what I think(?) needs to happen is the FIXME: tag needs to be\n> > handled. We need to code a version of src/backend/parser/scansup.c\n> > that doesn't use palloc, and also strips the apostrophes from the\n> > front and end of the string? This doesn't look that hard. Do I have \n> > \"permission\" to play with it, and submit a patch when I've got it\n> > fixed? \n> \n> Some background information: The current\n> \n> name = value\n> \n> syntax is lexically compatible with the syntax of the SET command. \n> Therefore you can't have \"funny\" characters in 'value' unless\n> single-quoted.\nI added period(.), hyphen(-), and underscore(_).\n> \n> Now in the context of the config file this seems overly restrictive. \n> Therefore I'd agree that we relax that a bit and allow more characters to\n> go into 'value' unquoted. I'm not quite sure which, but to prevent\n> confusion I'd prefer no semicolons, whitespace, or equal signs, possibly\n> others.\n> \n> This would require making 'value' a different token type from 'name',\n> because the latter should not accept these characters.\ndone, as GUC_UNQUOTED_STRING.\n> \n> Additionally, the FIXME ought to be done. I'd prefer it if it accepted\n> the exact same escapes and all as does the SQL parser/scanner. So it\n> ought to be a copy and paste from scansup.c. I'm not excited about\n> allowing double-quotes though.\nDone. Added as GUC_scanstr. \n\nHere is a patch. Comments? \n\nIndex: src/backend/utils/misc/guc-file.l\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v\nretrieving revision 1.4\ndiff -c -r1.4 guc-file.l\n*** src/backend/utils/misc/guc-file.l\t2000/07/27 19:49:18\t1.4\n--- src/backend/utils/misc/guc-file.l\t2000/11/15 18:13:20\n***************\n*** 16,21 ****\n--- 16,22 ----\n #include <sys/stat.h>\n #include <unistd.h>\n #include <errno.h>\n+ #include <ctype.h>\n \n #include \"miscadmin.h\"\n #include \"storage/fd.h\"\n***************\n*** 32,37 ****\n--- 33,39 ----\n \tGUC_INTEGER = 3,\n \tGUC_REAL = 4,\n \tGUC_EQUALS = 5,\n+ \tGUC_UNQUOTED_STRING = 6,\n \tGUC_EOL = 99,\n \tGUC_ERROR = 100\n };\n***************\n*** 45,51 ****\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n! \n %}\n \n SIGN (\"-\"|\"+\")\n--- 47,53 ----\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n! char *GUC_scanstr(char *);\n %}\n \n SIGN (\"-\"|\"+\")\n***************\n*** 69,76 ****\n * work right. Now there are no string options, and if there were then\n * the unquoted (`ID') tokens should still work. Of course this only\n * affects the configuration file.\n */\n! STRING \\'([^'\\n]|\\\\.)*'\n \n %%\n \n--- 71,83 ----\n * work right. Now there are no string options, and if there were then\n * the unquoted (`ID') tokens should still work. Of course this only\n * affects the configuration file.\n+ * LER 14NOV2000: I set it up to accept either a quoted string or a string\n+ * in apostrophes. I then kill off the 1st and last characters. There is \n+ * no special handling for doubled terminators or 'C' escapes. \n+ * this allows most other characters to be used.\n */\n! UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._])*\n! STRING (\\'|\\\")([^'\"\\n]|\\\\.)*(\\'|\\\")\n \n %%\n \n***************\n*** 80,85 ****\n--- 87,93 ----\n \n {ID} return GUC_ID;\n {STRING} return GUC_STRING;\n+ {UNQUOTED_STRING} return GUC_UNQUOTED_STRING;\n {INTEGER} return GUC_INTEGER;\n {REAL} return GUC_REAL;\n = return GUC_EQUALS;\n***************\n*** 210,220 ****\n if (token == GUC_EQUALS)\n token = yylex();\n \n! if (token != GUC_ID && token != GUC_STRING && token != GUC_INTEGER && token != GUC_REAL)\n goto parse_error;\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n parse_state = 2;\n break;\n \n--- 218,239 ----\n if (token == GUC_EQUALS)\n token = yylex();\n \n! if (token != GUC_ID && token != GUC_STRING && token != GUC_INTEGER && token != GUC_REAL && token != GUC_UNQUOTED_STRING)\n goto parse_error;\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n+ \t\tif (token == GUC_STRING)\n+ \t\t{\n+ \t\t\t/* remove the beginning and ending quote/apostrophe */\n+ \t\t\t/* first: shift the whole shooting match down one\n+ \t\t\tcharacter */\n+ \t\t\tmemmove(opt_value,opt_value+1,strlen(opt_value)-1);\n+ \t\t\t/* second: null out the 2 characters we shifted */\n+ opt_value[strlen(opt_value)-2]='\\0';\n+ \t\t\t/* do the escape thing. free()'s the strdup above */\n+ \t\t\topt_value=GUC_scanstr(opt_value);\n+ \t\t}\n parse_state = 2;\n break;\n \n***************\n*** 283,286 ****\n--- 302,400 ----\n yywrap(void)\n {\n \treturn 1;\n+ }\n+ \n+ /* ----------------\n+ *\t\tscanstr\n+ *\n+ * if the string passed in has escaped codes, map the escape codes to actual\n+ * chars\n+ *\n+ * the string returned is palloc'd and should eventually be pfree'd by the\n+ * caller!\n+ * ----------------\n+ */\n+ \n+ char *\n+ GUC_scanstr(char *s)\n+ {\n+ \tchar\t *newStr;\n+ \tint\t\t\tlen,\n+ \t\t\t\ti,\n+ \t\t\t\tj;\n+ \n+ \tif (s == NULL || s[0] == '\\0')\n+ \t{\n+ \t\tif (s != NULL) free (s);\n+ \t\treturn strdup(\"\");\n+ \n+ \t}\n+ \tlen = strlen(s);\n+ \n+ \tnewStr = malloc(len + 1);\t/* string cannot get longer */\n+ \n+ \tfor (i = 0, j = 0; i < len; i++)\n+ \t{\n+ \t\tif (s[i] == '\\'')\n+ \t\t{\n+ \n+ \t\t\t/*\n+ \t\t\t * Note: if scanner is working right, unescaped quotes can\n+ \t\t\t * only appear in pairs, so there should be another character.\n+ \t\t\t */\n+ \t\t\ti++;\n+ \t\t\tnewStr[j] = s[i];\n+ \t\t}\n+ \t\telse if (s[i] == '\\\\')\n+ \t\t{\n+ \t\t\ti++;\n+ \t\t\tswitch (s[i])\n+ \t\t\t{\n+ \t\t\t\tcase 'b':\n+ \t\t\t\t\tnewStr[j] = '\\b';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'f':\n+ \t\t\t\t\tnewStr[j] = '\\f';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'n':\n+ \t\t\t\t\tnewStr[j] = '\\n';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'r':\n+ \t\t\t\t\tnewStr[j] = '\\r';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 't':\n+ \t\t\t\t\tnewStr[j] = '\\t';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase '0':\n+ \t\t\t\tcase '1':\n+ \t\t\t\tcase '2':\n+ \t\t\t\tcase '3':\n+ \t\t\t\tcase '4':\n+ \t\t\t\tcase '5':\n+ \t\t\t\tcase '6':\n+ \t\t\t\tcase '7':\n+ \t\t\t\t\t{\n+ \t\t\t\t\t\tint\t\t\tk;\n+ \t\t\t\t\t\tlong\t\toctVal = 0;\n+ \n+ \t\t\t\t\t\tfor (k = 0;\n+ \t\t\t\t\t\t\t s[i + k] >= '0' && s[i + k] <= '7' && k < 3;\n+ \t\t\t\t\t\t\t k++)\n+ \t\t\t\t\t\t\toctVal = (octVal << 3) + (s[i + k] - '0');\n+ \t\t\t\t\t\ti += k - 1;\n+ \t\t\t\t\t\tnewStr[j] = ((char) octVal);\n+ \t\t\t\t\t}\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tdefault:\n+ \t\t\t\t\tnewStr[j] = s[i];\n+ \t\t\t\t\tbreak;\n+ \t\t\t}\t\t\t\t\t/* switch */\n+ \t\t}\t\t\t\t\t\t/* s[i] == '\\\\' */\n+ \t\telse\n+ \t\t\tnewStr[j] = s[i];\n+ \t\tj++;\n+ \t}\n+ \tnewStr[j] = '\\0';\n+ \tfree(s);\n+ \treturn newStr;\n }\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Wed, 15 Nov 2000 12:16:33 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Larry Rosenman writes:\n\n> > syntax is lexically compatible with the syntax of the SET command. \n> > Therefore you can't have \"funny\" characters in 'value' unless\n> > single-quoted.\n> I added period(.), hyphen(-), and underscore(_).\n\nProbably '/' and ':' as well, for krb_server_keyfile.\n\n> ! UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._])*\n> ! STRING (\\'|\\\")([^'\"\\n]|\\\\.)*(\\'|\\\")\n\nThat will accept strings that start with one kind of quote and end with\nanother. Please stick to single-quotes only, unless you want to make a\ncase for the double-quotes.\n\nI'm also not quite sure about\n\n> + \t\tif (s[i] == '\\'')\n> + \t\t{\n> + \n> + \t\t\t/*\n> + \t\t\t * Note: if scanner is working right, unescaped quotes can\n> + \t\t\t * only appear in pairs, so there should be another character.\n> + \t\t\t */\n> + \t\t\ti++;\n> + \t\t\tnewStr[j] = s[i];\n> + \t\t}\n\nThe SQL scanner accepts 'foo''bar' as the SQL-approved method of escaping\nquotes in quotes. GUC doesn't do that (way too complicated for now), so\nthis probably needs to be adjusted.\n\nOther than that, looks good.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 15 Nov 2000 20:15:09 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001115 13:11]:\n> Larry Rosenman writes:\n> \n> > > syntax is lexically compatible with the syntax of the SET command. \n> > > Therefore you can't have \"funny\" characters in 'value' unless\n> > > single-quoted.\n> > I added period(.), hyphen(-), and underscore(_).\n> \n> Probably '/' and ':' as well, for krb_server_keyfile.\nAdded. \n> \n> > ! UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._])*\n> > ! STRING (\\'|\\\")([^'\"\\n]|\\\\.)*(\\'|\\\")\n> \n> That will accept strings that start with one kind of quote and end with\n> another. Please stick to single-quotes only, unless you want to make a\n> case for the double-quotes.\nDone. \n> \n> I'm also not quite sure about\n> \n> > + \t\tif (s[i] == '\\'')\n> > + \t\t{\n> > + \n> > + \t\t\t/*\n> > + \t\t\t * Note: if scanner is working right, unescaped quotes can\n> > + \t\t\t * only appear in pairs, so there should be another character.\n> > + \t\t\t */\n> > + \t\t\ti++;\n> > + \t\t\tnewStr[j] = s[i];\n> > + \t\t}\n> \n> The SQL scanner accepts 'foo''bar' as the SQL-approved method of escaping\n> quotes in quotes. GUC doesn't do that (way too complicated for now), so\n> this probably needs to be adjusted.\nRemoved. \n> \n> Other than that, looks good.\nI also added the token that caused the parse error to be printed out. \n\nI also added some whitespace on a couple of places that the lines\nwere getting, err, long. \n\nNew Version:\n\nIndex: src/backend/utils/misc/guc-file.l\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v\nretrieving revision 1.4\ndiff -c -r1.4 guc-file.l\n*** src/backend/utils/misc/guc-file.l\t2000/07/27 19:49:18\t1.4\n--- src/backend/utils/misc/guc-file.l\t2000/11/15 19:34:54\n***************\n*** 16,21 ****\n--- 16,22 ----\n #include <sys/stat.h>\n #include <unistd.h>\n #include <errno.h>\n+ #include <ctype.h>\n \n #include \"miscadmin.h\"\n #include \"storage/fd.h\"\n***************\n*** 32,37 ****\n--- 33,39 ----\n \tGUC_INTEGER = 3,\n \tGUC_REAL = 4,\n \tGUC_EQUALS = 5,\n+ \tGUC_UNQUOTED_STRING = 6,\n \tGUC_EOL = 99,\n \tGUC_ERROR = 100\n };\n***************\n*** 45,51 ****\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n! \n %}\n \n SIGN (\"-\"|\"+\")\n--- 47,53 ----\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n! char *GUC_scanstr(char *);\n %}\n \n SIGN (\"-\"|\"+\")\n***************\n*** 61,77 ****\n LETTER_OR_DIGIT [A-Za-z_0-9\\200-\\377]\n \n ID {LETTER}{LETTER_OR_DIGIT}*\n- /*\n- * FIXME: This string syntax is nice and all but of course the quotes\n- * need to be stripped before we can make any use of the string value.\n- * There is a function in parser/scansup.c that does this but it uses\n- * palloc and there might be a little more magic needed to get it to\n- * work right. Now there are no string options, and if there were then\n- * the unquoted (`ID') tokens should still work. Of course this only\n- * affects the configuration file.\n- */\n- STRING \\'([^'\\n]|\\\\.)*'\n \n %%\n \n \\n ConfigFileLineno++; return GUC_EOL;\n--- 63,72 ----\n LETTER_OR_DIGIT [A-Za-z_0-9\\200-\\377]\n \n ID {LETTER}{LETTER_OR_DIGIT}*\n \n+ UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._:/�])*\n+ STRING \\'([^'\"\\n]|\\\\.)*\\'\n+ \n %%\n \n \\n ConfigFileLineno++; return GUC_EOL;\n***************\n*** 80,85 ****\n--- 75,81 ----\n \n {ID} return GUC_ID;\n {STRING} return GUC_STRING;\n+ {UNQUOTED_STRING} return GUC_UNQUOTED_STRING;\n {INTEGER} return GUC_INTEGER;\n {REAL} return GUC_REAL;\n = return GUC_EQUALS;\n***************\n*** 139,145 ****\n \tint elevel;\n \tFILE * fp;\n \n! \tAssert(context == PGC_POSTMASTER || context == PGC_BACKEND || context == PGC_SIGHUP);\n \tAssert(DataDir);\n \televel = (context == PGC_SIGHUP) ? DEBUG : ERROR;\n \n--- 135,142 ----\n \tint elevel;\n \tFILE * fp;\n \n! \tAssert(context == PGC_POSTMASTER || context == PGC_BACKEND \n! \t\t|| context == PGC_SIGHUP);\n \tAssert(DataDir);\n \televel = (context == PGC_SIGHUP) ? DEBUG : ERROR;\n \n***************\n*** 210,220 ****\n if (token == GUC_EQUALS)\n token = yylex();\n \n! if (token != GUC_ID && token != GUC_STRING && token != GUC_INTEGER && token != GUC_REAL)\n goto parse_error;\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n parse_state = 2;\n break;\n \n--- 207,230 ----\n if (token == GUC_EQUALS)\n token = yylex();\n \n! if (token != GUC_ID && token != GUC_STRING && \n! \t\t\ttoken != GUC_INTEGER && token != GUC_REAL && \n! \t\t\ttoken != GUC_UNQUOTED_STRING)\n goto parse_error;\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n+ \t\tif (token == GUC_STRING)\n+ \t\t{\n+ \t\t\t/* remove the beginning and ending quote/apostrophe */\n+ \t\t\t/* first: shift the whole shooting match down one\n+ \t\t\tcharacter */\n+ \t\t\tmemmove(opt_value,opt_value+1,strlen(opt_value)-1);\n+ \t\t\t/* second: null out the 2 characters we shifted */\n+ opt_value[strlen(opt_value)-2]='\\0';\n+ \t\t\t/* do the escape thing. free()'s the strdup above */\n+ \t\t\topt_value=GUC_scanstr(opt_value);\n+ \t\t}\n parse_state = 2;\n break;\n \n***************\n*** 266,272 ****\n \tFreeFile(fp);\n \tfree(filename);\n \tfree_name_value_list(head);\n! \telog(elevel, CONFIG_FILENAME \":%u: syntax error\", ConfigFileLineno);\n \treturn;\n \n out_of_memory:\n--- 276,283 ----\n \tFreeFile(fp);\n \tfree(filename);\n \tfree_name_value_list(head);\n! \telog(elevel, CONFIG_FILENAME \":%u: syntax error, token=\\\"%s\\\"\", \n! \t\tConfigFileLineno,yytext);\n \treturn;\n \n out_of_memory:\n***************\n*** 283,286 ****\n--- 294,382 ----\n yywrap(void)\n {\n \treturn 1;\n+ }\n+ \n+ /* ----------------\n+ *\t\tscanstr\n+ *\n+ * if the string passed in has escaped codes, map the escape codes to actual\n+ * chars\n+ *\n+ * the string returned is malloc'd and should eventually be free'd by the\n+ * caller!\n+ * ----------------\n+ */\n+ \n+ char *\n+ GUC_scanstr(char *s)\n+ {\n+ \tchar\t *newStr;\n+ \tint\t\t\tlen,\n+ \t\t\t\ti,\n+ \t\t\t\tj;\n+ \n+ \tif (s == NULL || s[0] == '\\0')\n+ \t{\n+ \t\tif (s != NULL) free (s);\n+ \t\treturn strdup(\"\");\n+ \n+ \t}\n+ \tlen = strlen(s);\n+ \n+ \tnewStr = malloc(len + 1);\t/* string cannot get longer */\n+ \n+ \tfor (i = 0, j = 0; i < len; i++)\n+ \t{\n+ \t\tif (s[i] == '\\\\')\n+ \t\t{\n+ \t\t\ti++;\n+ \t\t\tswitch (s[i])\n+ \t\t\t{\n+ \t\t\t\tcase 'b':\n+ \t\t\t\t\tnewStr[j] = '\\b';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'f':\n+ \t\t\t\t\tnewStr[j] = '\\f';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'n':\n+ \t\t\t\t\tnewStr[j] = '\\n';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'r':\n+ \t\t\t\t\tnewStr[j] = '\\r';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 't':\n+ \t\t\t\t\tnewStr[j] = '\\t';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase '0':\n+ \t\t\t\tcase '1':\n+ \t\t\t\tcase '2':\n+ \t\t\t\tcase '3':\n+ \t\t\t\tcase '4':\n+ \t\t\t\tcase '5':\n+ \t\t\t\tcase '6':\n+ \t\t\t\tcase '7':\n+ \t\t\t\t\t{\n+ \t\t\t\t\t\tint\t\t\tk;\n+ \t\t\t\t\t\tlong\t\toctVal = 0;\n+ \n+ \t\t\t\t\t\tfor (k = 0;\n+ \t\t\t\t\t\t\t s[i + k] >= '0' && s[i + k] <= '7' && k < 3;\n+ \t\t\t\t\t\t\t k++)\n+ \t\t\t\t\t\t\toctVal = (octVal << 3) + (s[i + k] - '0');\n+ \t\t\t\t\t\ti += k - 1;\n+ \t\t\t\t\t\tnewStr[j] = ((char) octVal);\n+ \t\t\t\t\t}\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tdefault:\n+ \t\t\t\t\tnewStr[j] = s[i];\n+ \t\t\t\t\tbreak;\n+ \t\t\t\t}\n+ \t\t\t}\t\t\t\t\t/* switch */\n+ \t\telse\n+ \t\t\tnewStr[j] = s[i];\n+ \t\tj++;\n+ \t}\n+ \tnewStr[j] = '\\0';\n+ \tfree(s);\n+ \treturn newStr;\n }\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Wed, 15 Nov 2000 13:38:08 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Here is one with a stray character removed. \n\n\nIndex: src/backend/utils/misc/guc-file.l\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v\nretrieving revision 1.4\ndiff -c -r1.4 guc-file.l\n*** src/backend/utils/misc/guc-file.l\t2000/07/27 19:49:18\t1.4\n--- src/backend/utils/misc/guc-file.l\t2000/11/15 19:50:32\n***************\n*** 16,21 ****\n--- 16,22 ----\n #include <sys/stat.h>\n #include <unistd.h>\n #include <errno.h>\n+ #include <ctype.h>\n \n #include \"miscadmin.h\"\n #include \"storage/fd.h\"\n***************\n*** 32,37 ****\n--- 33,39 ----\n \tGUC_INTEGER = 3,\n \tGUC_REAL = 4,\n \tGUC_EQUALS = 5,\n+ \tGUC_UNQUOTED_STRING = 6,\n \tGUC_EOL = 99,\n \tGUC_ERROR = 100\n };\n***************\n*** 45,51 ****\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n! \n %}\n \n SIGN (\"-\"|\"+\")\n--- 47,53 ----\n \n /* prototype, so compiler is happy with our high warnings setting */\n int GUC_yylex(void);\n! char *GUC_scanstr(char *);\n %}\n \n SIGN (\"-\"|\"+\")\n***************\n*** 61,77 ****\n LETTER_OR_DIGIT [A-Za-z_0-9\\200-\\377]\n \n ID {LETTER}{LETTER_OR_DIGIT}*\n- /*\n- * FIXME: This string syntax is nice and all but of course the quotes\n- * need to be stripped before we can make any use of the string value.\n- * There is a function in parser/scansup.c that does this but it uses\n- * palloc and there might be a little more magic needed to get it to\n- * work right. Now there are no string options, and if there were then\n- * the unquoted (`ID') tokens should still work. Of course this only\n- * affects the configuration file.\n- */\n- STRING \\'([^'\\n]|\\\\.)*'\n \n %%\n \n \\n ConfigFileLineno++; return GUC_EOL;\n--- 63,72 ----\n LETTER_OR_DIGIT [A-Za-z_0-9\\200-\\377]\n \n ID {LETTER}{LETTER_OR_DIGIT}*\n \n+ UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._:/])*\n+ STRING \\'([^'\"\\n]|\\\\.)*\\'\n+ \n %%\n \n \\n ConfigFileLineno++; return GUC_EOL;\n***************\n*** 80,85 ****\n--- 75,81 ----\n \n {ID} return GUC_ID;\n {STRING} return GUC_STRING;\n+ {UNQUOTED_STRING} return GUC_UNQUOTED_STRING;\n {INTEGER} return GUC_INTEGER;\n {REAL} return GUC_REAL;\n = return GUC_EQUALS;\n***************\n*** 139,145 ****\n \tint elevel;\n \tFILE * fp;\n \n! \tAssert(context == PGC_POSTMASTER || context == PGC_BACKEND || context == PGC_SIGHUP);\n \tAssert(DataDir);\n \televel = (context == PGC_SIGHUP) ? DEBUG : ERROR;\n \n--- 135,142 ----\n \tint elevel;\n \tFILE * fp;\n \n! \tAssert(context == PGC_POSTMASTER || context == PGC_BACKEND \n! \t\t|| context == PGC_SIGHUP);\n \tAssert(DataDir);\n \televel = (context == PGC_SIGHUP) ? DEBUG : ERROR;\n \n***************\n*** 210,220 ****\n if (token == GUC_EQUALS)\n token = yylex();\n \n! if (token != GUC_ID && token != GUC_STRING && token != GUC_INTEGER && token != GUC_REAL)\n goto parse_error;\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n parse_state = 2;\n break;\n \n--- 207,230 ----\n if (token == GUC_EQUALS)\n token = yylex();\n \n! if (token != GUC_ID && token != GUC_STRING && \n! \t\t\ttoken != GUC_INTEGER && token != GUC_REAL && \n! \t\t\ttoken != GUC_UNQUOTED_STRING)\n goto parse_error;\n opt_value = strdup(yytext);\n \t\t\t\tif (opt_value == NULL)\n \t\t\t\t\tgoto out_of_memory;\n+ \t\tif (token == GUC_STRING)\n+ \t\t{\n+ \t\t\t/* remove the beginning and ending quote/apostrophe */\n+ \t\t\t/* first: shift the whole shooting match down one\n+ \t\t\tcharacter */\n+ \t\t\tmemmove(opt_value,opt_value+1,strlen(opt_value)-1);\n+ \t\t\t/* second: null out the 2 characters we shifted */\n+ opt_value[strlen(opt_value)-2]='\\0';\n+ \t\t\t/* do the escape thing. free()'s the strdup above */\n+ \t\t\topt_value=GUC_scanstr(opt_value);\n+ \t\t}\n parse_state = 2;\n break;\n \n***************\n*** 266,272 ****\n \tFreeFile(fp);\n \tfree(filename);\n \tfree_name_value_list(head);\n! \telog(elevel, CONFIG_FILENAME \":%u: syntax error\", ConfigFileLineno);\n \treturn;\n \n out_of_memory:\n--- 276,283 ----\n \tFreeFile(fp);\n \tfree(filename);\n \tfree_name_value_list(head);\n! \telog(elevel, CONFIG_FILENAME \":%u: syntax error, token=\\\"%s\\\"\", \n! \t\tConfigFileLineno,yytext);\n \treturn;\n \n out_of_memory:\n***************\n*** 283,286 ****\n--- 294,382 ----\n yywrap(void)\n {\n \treturn 1;\n+ }\n+ \n+ /* ----------------\n+ *\t\tscanstr\n+ *\n+ * if the string passed in has escaped codes, map the escape codes to actual\n+ * chars\n+ *\n+ * the string returned is malloc'd and should eventually be free'd by the\n+ * caller!\n+ * ----------------\n+ */\n+ \n+ char *\n+ GUC_scanstr(char *s)\n+ {\n+ \tchar\t *newStr;\n+ \tint\t\t\tlen,\n+ \t\t\t\ti,\n+ \t\t\t\tj;\n+ \n+ \tif (s == NULL || s[0] == '\\0')\n+ \t{\n+ \t\tif (s != NULL) free (s);\n+ \t\treturn strdup(\"\");\n+ \n+ \t}\n+ \tlen = strlen(s);\n+ \n+ \tnewStr = malloc(len + 1);\t/* string cannot get longer */\n+ \n+ \tfor (i = 0, j = 0; i < len; i++)\n+ \t{\n+ \t\tif (s[i] == '\\\\')\n+ \t\t{\n+ \t\t\ti++;\n+ \t\t\tswitch (s[i])\n+ \t\t\t{\n+ \t\t\t\tcase 'b':\n+ \t\t\t\t\tnewStr[j] = '\\b';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'f':\n+ \t\t\t\t\tnewStr[j] = '\\f';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'n':\n+ \t\t\t\t\tnewStr[j] = '\\n';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 'r':\n+ \t\t\t\t\tnewStr[j] = '\\r';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase 't':\n+ \t\t\t\t\tnewStr[j] = '\\t';\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tcase '0':\n+ \t\t\t\tcase '1':\n+ \t\t\t\tcase '2':\n+ \t\t\t\tcase '3':\n+ \t\t\t\tcase '4':\n+ \t\t\t\tcase '5':\n+ \t\t\t\tcase '6':\n+ \t\t\t\tcase '7':\n+ \t\t\t\t\t{\n+ \t\t\t\t\t\tint\t\t\tk;\n+ \t\t\t\t\t\tlong\t\toctVal = 0;\n+ \n+ \t\t\t\t\t\tfor (k = 0;\n+ \t\t\t\t\t\t\t s[i + k] >= '0' && s[i + k] <= '7' && k < 3;\n+ \t\t\t\t\t\t\t k++)\n+ \t\t\t\t\t\t\toctVal = (octVal << 3) + (s[i + k] - '0');\n+ \t\t\t\t\t\ti += k - 1;\n+ \t\t\t\t\t\tnewStr[j] = ((char) octVal);\n+ \t\t\t\t\t}\n+ \t\t\t\t\tbreak;\n+ \t\t\t\tdefault:\n+ \t\t\t\t\tnewStr[j] = s[i];\n+ \t\t\t\t\tbreak;\n+ \t\t\t\t}\n+ \t\t\t}\t\t\t\t\t/* switch */\n+ \t\telse\n+ \t\t\tnewStr[j] = s[i];\n+ \t\tj++;\n+ \t}\n+ \tnewStr[j] = '\\0';\n+ \tfree(s);\n+ \treturn newStr;\n }\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Wed, 15 Nov 2000 13:52:17 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Applied.\n\n\n> * Peter Eisentraut <[email protected]> [001113 23:52]:\n> > Okay, but you can't make these options PGC_SIGHUP unless you make sure to\n> > close and re-open the syslog channel whenever these options\n> > change. Probably ought to be PGC_POSTMASTER.\n> Here is a patch to change to PGC_POSTMASTER...\n> \n> \n> Index: guc.c\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\n> retrieving revision 1.19\n> diff -c -r1.19 guc.c\n> *** guc.c\t2000/11/14 01:15:02\t1.19\n> --- guc.c\t2000/11/14 13:11:33\n> ***************\n> *** 309,317 ****\n> \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> \t \"\", NULL},\n> #ifdef ENABLE_SYSLOG\n> ! \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n> \t\"LOCAL0\", check_facility},\t \n> ! \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n> \t\"postgres\", NULL},\t \n> #endif\n> \n> --- 309,317 ----\n> \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> \t \"\", NULL},\n> #ifdef ENABLE_SYSLOG\n> ! \t{\"syslog_facility\", PGC_POSTMASTER,\t &Syslog_facility, \n> \t\"LOCAL0\", check_facility},\t \n> ! \t{\"syslog_progid\", PGC_POSTMASTER,\t &Syslog_progid, \n> \t\"postgres\", NULL},\t \n> #endif\n> \n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 00:46:16 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Sorry, this was not applied. Seems it is already fixed.\n\n\n\n> * Peter Eisentraut <[email protected]> [001113 23:52]:\n> > Okay, but you can't make these options PGC_SIGHUP unless you make sure to\n> > close and re-open the syslog channel whenever these options\n> > change. Probably ought to be PGC_POSTMASTER.\n> Here is a patch to change to PGC_POSTMASTER...\n> \n> \n> Index: guc.c\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc.c,v\n> retrieving revision 1.19\n> diff -c -r1.19 guc.c\n> *** guc.c\t2000/11/14 01:15:02\t1.19\n> --- guc.c\t2000/11/14 13:11:33\n> ***************\n> *** 309,317 ****\n> \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> \t \"\", NULL},\n> #ifdef ENABLE_SYSLOG\n> ! \t{\"syslog_facility\", PGC_SIGHUP,\t &Syslog_facility, \n> \t\"LOCAL0\", check_facility},\t \n> ! \t{\"syslog_progid\", PGC_SIGHUP,\t &Syslog_progid, \n> \t\"postgres\", NULL},\t \n> #endif\n> \n> --- 309,317 ----\n> \t{\"unix_socket_group\", PGC_POSTMASTER, &Unix_socket_group,\n> \t \"\", NULL},\n> #ifdef ENABLE_SYSLOG\n> ! \t{\"syslog_facility\", PGC_POSTMASTER,\t &Syslog_facility, \n> \t\"LOCAL0\", check_facility},\t \n> ! \t{\"syslog_progid\", PGC_POSTMASTER,\t &Syslog_progid, \n> \t\"postgres\", NULL},\t \n> #endif\n> \n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 00:49:05 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
},
{
"msg_contents": "Applied.\n\n\n> Here is one with a stray character removed. \n> \n> \n> Index: src/backend/utils/misc/guc-file.l\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v\n> retrieving revision 1.4\n> diff -c -r1.4 guc-file.l\n> *** src/backend/utils/misc/guc-file.l\t2000/07/27 19:49:18\t1.4\n> --- src/backend/utils/misc/guc-file.l\t2000/11/15 19:50:32\n> ***************\n> *** 16,21 ****\n> --- 16,22 ----\n> #include <sys/stat.h>\n> #include <unistd.h>\n> #include <errno.h>\n> + #include <ctype.h>\n> \n> #include \"miscadmin.h\"\n> #include \"storage/fd.h\"\n> ***************\n> *** 32,37 ****\n> --- 33,39 ----\n> \tGUC_INTEGER = 3,\n> \tGUC_REAL = 4,\n> \tGUC_EQUALS = 5,\n> + \tGUC_UNQUOTED_STRING = 6,\n> \tGUC_EOL = 99,\n> \tGUC_ERROR = 100\n> };\n> ***************\n> *** 45,51 ****\n> \n> /* prototype, so compiler is happy with our high warnings setting */\n> int GUC_yylex(void);\n> ! \n> %}\n> \n> SIGN (\"-\"|\"+\")\n> --- 47,53 ----\n> \n> /* prototype, so compiler is happy with our high warnings setting */\n> int GUC_yylex(void);\n> ! char *GUC_scanstr(char *);\n> %}\n> \n> SIGN (\"-\"|\"+\")\n> ***************\n> *** 61,77 ****\n> LETTER_OR_DIGIT [A-Za-z_0-9\\200-\\377]\n> \n> ID {LETTER}{LETTER_OR_DIGIT}*\n> - /*\n> - * FIXME: This string syntax is nice and all but of course the quotes\n> - * need to be stripped before we can make any use of the string value.\n> - * There is a function in parser/scansup.c that does this but it uses\n> - * palloc and there might be a little more magic needed to get it to\n> - * work right. Now there are no string options, and if there were then\n> - * the unquoted (`ID') tokens should still work. Of course this only\n> - * affects the configuration file.\n> - */\n> - STRING \\'([^'\\n]|\\\\.)*'\n> \n> %%\n> \n> \\n ConfigFileLineno++; return GUC_EOL;\n> --- 63,72 ----\n> LETTER_OR_DIGIT [A-Za-z_0-9\\200-\\377]\n> \n> ID {LETTER}{LETTER_OR_DIGIT}*\n> \n> + UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._:/])*\n> + STRING \\'([^'\"\\n]|\\\\.)*\\'\n> + \n> %%\n> \n> \\n ConfigFileLineno++; return GUC_EOL;\n> ***************\n> *** 80,85 ****\n> --- 75,81 ----\n> \n> {ID} return GUC_ID;\n> {STRING} return GUC_STRING;\n> + {UNQUOTED_STRING} return GUC_UNQUOTED_STRING;\n> {INTEGER} return GUC_INTEGER;\n> {REAL} return GUC_REAL;\n> = return GUC_EQUALS;\n> ***************\n> *** 139,145 ****\n> \tint elevel;\n> \tFILE * fp;\n> \n> ! \tAssert(context == PGC_POSTMASTER || context == PGC_BACKEND || context == PGC_SIGHUP);\n> \tAssert(DataDir);\n> \televel = (context == PGC_SIGHUP) ? DEBUG : ERROR;\n> \n> --- 135,142 ----\n> \tint elevel;\n> \tFILE * fp;\n> \n> ! \tAssert(context == PGC_POSTMASTER || context == PGC_BACKEND \n> ! \t\t|| context == PGC_SIGHUP);\n> \tAssert(DataDir);\n> \televel = (context == PGC_SIGHUP) ? DEBUG : ERROR;\n> \n> ***************\n> *** 210,220 ****\n> if (token == GUC_EQUALS)\n> token = yylex();\n> \n> ! if (token != GUC_ID && token != GUC_STRING && token != GUC_INTEGER && token != GUC_REAL)\n> goto parse_error;\n> opt_value = strdup(yytext);\n> \t\t\t\tif (opt_value == NULL)\n> \t\t\t\t\tgoto out_of_memory;\n> parse_state = 2;\n> break;\n> \n> --- 207,230 ----\n> if (token == GUC_EQUALS)\n> token = yylex();\n> \n> ! if (token != GUC_ID && token != GUC_STRING && \n> ! \t\t\ttoken != GUC_INTEGER && token != GUC_REAL && \n> ! \t\t\ttoken != GUC_UNQUOTED_STRING)\n> goto parse_error;\n> opt_value = strdup(yytext);\n> \t\t\t\tif (opt_value == NULL)\n> \t\t\t\t\tgoto out_of_memory;\n> + \t\tif (token == GUC_STRING)\n> + \t\t{\n> + \t\t\t/* remove the beginning and ending quote/apostrophe */\n> + \t\t\t/* first: shift the whole shooting match down one\n> + \t\t\tcharacter */\n> + \t\t\tmemmove(opt_value,opt_value+1,strlen(opt_value)-1);\n> + \t\t\t/* second: null out the 2 characters we shifted */\n> + opt_value[strlen(opt_value)-2]='\\0';\n> + \t\t\t/* do the escape thing. free()'s the strdup above */\n> + \t\t\topt_value=GUC_scanstr(opt_value);\n> + \t\t}\n> parse_state = 2;\n> break;\n> \n> ***************\n> *** 266,272 ****\n> \tFreeFile(fp);\n> \tfree(filename);\n> \tfree_name_value_list(head);\n> ! \telog(elevel, CONFIG_FILENAME \":%u: syntax error\", ConfigFileLineno);\n> \treturn;\n> \n> out_of_memory:\n> --- 276,283 ----\n> \tFreeFile(fp);\n> \tfree(filename);\n> \tfree_name_value_list(head);\n> ! \telog(elevel, CONFIG_FILENAME \":%u: syntax error, token=\\\"%s\\\"\", \n> ! \t\tConfigFileLineno,yytext);\n> \treturn;\n> \n> out_of_memory:\n> ***************\n> *** 283,286 ****\n> --- 294,382 ----\n> yywrap(void)\n> {\n> \treturn 1;\n> + }\n> + \n> + /* ----------------\n> + *\t\tscanstr\n> + *\n> + * if the string passed in has escaped codes, map the escape codes to actual\n> + * chars\n> + *\n> + * the string returned is malloc'd and should eventually be free'd by the\n> + * caller!\n> + * ----------------\n> + */\n> + \n> + char *\n> + GUC_scanstr(char *s)\n> + {\n> + \tchar\t *newStr;\n> + \tint\t\t\tlen,\n> + \t\t\t\ti,\n> + \t\t\t\tj;\n> + \n> + \tif (s == NULL || s[0] == '\\0')\n> + \t{\n> + \t\tif (s != NULL) free (s);\n> + \t\treturn strdup(\"\");\n> + \n> + \t}\n> + \tlen = strlen(s);\n> + \n> + \tnewStr = malloc(len + 1);\t/* string cannot get longer */\n> + \n> + \tfor (i = 0, j = 0; i < len; i++)\n> + \t{\n> + \t\tif (s[i] == '\\\\')\n> + \t\t{\n> + \t\t\ti++;\n> + \t\t\tswitch (s[i])\n> + \t\t\t{\n> + \t\t\t\tcase 'b':\n> + \t\t\t\t\tnewStr[j] = '\\b';\n> + \t\t\t\t\tbreak;\n> + \t\t\t\tcase 'f':\n> + \t\t\t\t\tnewStr[j] = '\\f';\n> + \t\t\t\t\tbreak;\n> + \t\t\t\tcase 'n':\n> + \t\t\t\t\tnewStr[j] = '\\n';\n> + \t\t\t\t\tbreak;\n> + \t\t\t\tcase 'r':\n> + \t\t\t\t\tnewStr[j] = '\\r';\n> + \t\t\t\t\tbreak;\n> + \t\t\t\tcase 't':\n> + \t\t\t\t\tnewStr[j] = '\\t';\n> + \t\t\t\t\tbreak;\n> + \t\t\t\tcase '0':\n> + \t\t\t\tcase '1':\n> + \t\t\t\tcase '2':\n> + \t\t\t\tcase '3':\n> + \t\t\t\tcase '4':\n> + \t\t\t\tcase '5':\n> + \t\t\t\tcase '6':\n> + \t\t\t\tcase '7':\n> + \t\t\t\t\t{\n> + \t\t\t\t\t\tint\t\t\tk;\n> + \t\t\t\t\t\tlong\t\toctVal = 0;\n> + \n> + \t\t\t\t\t\tfor (k = 0;\n> + \t\t\t\t\t\t\t s[i + k] >= '0' && s[i + k] <= '7' && k < 3;\n> + \t\t\t\t\t\t\t k++)\n> + \t\t\t\t\t\t\toctVal = (octVal << 3) + (s[i + k] - '0');\n> + \t\t\t\t\t\ti += k - 1;\n> + \t\t\t\t\t\tnewStr[j] = ((char) octVal);\n> + \t\t\t\t\t}\n> + \t\t\t\t\tbreak;\n> + \t\t\t\tdefault:\n> + \t\t\t\t\tnewStr[j] = s[i];\n> + \t\t\t\t\tbreak;\n> + \t\t\t\t}\n> + \t\t\t}\t\t\t\t\t/* switch */\n> + \t\telse\n> + \t\t\tnewStr[j] = s[i];\n> + \t\tj++;\n> + \t}\n> + \tnewStr[j] = '\\0';\n> + \tfree(s);\n> + \treturn newStr;\n> }\n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 00:50:00 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Syslog Facility Patch"
}
]
|
[
{
"msg_contents": "You have to dump/initdb/reload if you change the block size. Simply\nrecompiling is not going to work.\n\nCheers...\n\n\nMikeA\n\n-----Original Message-----\nFrom: Mitch Vincent\nTo: [email protected]\nSent: 11-13-00 12:57 AM\nSubject: [HACKERS] 7.0.2 -> 7.0.3 problem\n\nI just upgraded to 7.0.3 and tried to start the backend like\n\n/usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n/usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n\n.. as I've done with 7.0.2, it failed to start and got this in my\npostgresql.log :\n\nDEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\nFATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\nFATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\nStartup failed - abort\n\nThe only compilation change I made was to increase BLCKSZ to 32k (which\nhas\nbeen running in a production 7.0.2 environment for quite some time).\n\nSo what's up? Just to make sure I made the permissions 777 all the way\ndown\nto pg_control but it had no effect.\n\n----\n\nHmm, I just re-installed 7.0.2 and I get the same error with it -- not\ngood.\n\nMy development server, which is virtually the same, did fine when I\ninstalled 7.0.3 so I'm guessing it's not a problem across the board..\n\nI also notice in the log that it's\nRead(\"/usr/local/pgsql/data/pg_control\")\nthat's failing and when I move pg_control out of the way, it's Open()\nthat\nfails..\n\nI did nothing but stop the postmaster, compile and install 7.0.3 and\nstart\nthe postmaster. then compiled and installed 7.0.2 again and all of the\nsudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n\nAs always, any help is appreciated. Thanks!\n\n-Mitch\n\n\n\n\n\nRE: [HACKERS] 7.0.2 -> 7.0.3 problem\n\n\nYou have to dump/initdb/reload if you change the block size. Simply recompiling is not going to work.\n\nCheers...\n\n\nMikeA\n\n-----Original Message-----\nFrom: Mitch Vincent\nTo: [email protected]\nSent: 11-13-00 12:57 AM\nSubject: [HACKERS] 7.0.2 -> 7.0.3 problem\n\nI just upgraded to 7.0.3 and tried to start the backend like\n\n/usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n/usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n\n.. as I've done with 7.0.2, it failed to start and got this in my\npostgresql.log :\n\nDEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\nFATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\nFATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\nStartup failed - abort\n\nThe only compilation change I made was to increase BLCKSZ to 32k (which\nhas\nbeen running in a production 7.0.2 environment for quite some time).\n\nSo what's up? Just to make sure I made the permissions 777 all the way\ndown\nto pg_control but it had no effect.\n\n----\n\nHmm, I just re-installed 7.0.2 and I get the same error with it -- not\ngood.\n\nMy development server, which is virtually the same, did fine when I\ninstalled 7.0.3 so I'm guessing it's not a problem across the board..\n\nI also notice in the log that it's\nRead(\"/usr/local/pgsql/data/pg_control\")\nthat's failing and when I move pg_control out of the way, it's Open()\nthat\nfails..\n\nI did nothing but stop the postmaster, compile and install 7.0.3 and\nstart\nthe postmaster. then compiled and installed 7.0.2 again and all of the\nsudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n\nAs always, any help is appreciated. Thanks!\n\n-Mitch",
"msg_date": "Mon, 13 Nov 2000 00:02:00 -0000",
"msg_from": "Michael Ansley <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: 7.0.2 -> 7.0.3 problem"
},
{
"msg_contents": "By the way, what is pg_control and what does it do?\n\n-Mitch\n----- Original Message ----- \nFrom: \"Michael Ansley\" <[email protected]>\nTo: \"'Mitch Vincent '\" <[email protected]>\nCc: <[email protected]>\nSent: Sunday, November 12, 2000 4:02 PM\nSubject: RE: [HACKERS] 7.0.2 -> 7.0.3 problem\n\n\n> You have to dump/initdb/reload if you change the block size. Simply\n> recompiling is not going to work.\n> \n> Cheers...\n> \n> \n> MikeA\n> \n> -----Original Message-----\n> From: Mitch Vincent\n> To: [email protected]\n> Sent: 11-13-00 12:57 AM\n> Subject: [HACKERS] 7.0.2 -> 7.0.3 problem\n> \n> I just upgraded to 7.0.3 and tried to start the backend like\n> \n> /usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n> /usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n> \n> .. as I've done with 7.0.2, it failed to start and got this in my\n> postgresql.log :\n> \n> DEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\n> FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> Startup failed - abort\n> \n> The only compilation change I made was to increase BLCKSZ to 32k (which\n> has\n> been running in a production 7.0.2 environment for quite some time).\n> \n> So what's up? Just to make sure I made the permissions 777 all the way\n> down\n> to pg_control but it had no effect.\n> \n> ----\n> \n> Hmm, I just re-installed 7.0.2 and I get the same error with it -- not\n> good.\n> \n> My development server, which is virtually the same, did fine when I\n> installed 7.0.3 so I'm guessing it's not a problem across the board..\n> \n> I also notice in the log that it's\n> Read(\"/usr/local/pgsql/data/pg_control\")\n> that's failing and when I move pg_control out of the way, it's Open()\n> that\n> fails..\n> \n> I did nothing but stop the postmaster, compile and install 7.0.3 and\n> start\n> the postmaster. then compiled and installed 7.0.2 again and all of the\n> sudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n> \n> As always, any help is appreciated. Thanks!\n> \n> -Mitch\n> \n\n",
"msg_date": "Sun, 12 Nov 2000 17:11:26 -0800",
"msg_from": "\"Mitch Vincent\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 -> 7.0.3 problem"
},
{
"msg_contents": "Block size can not be changes without dump/reload. If you think it\nworked once, you are wrong. Sorry. The page headers have to be written\nat the start of every block.\n\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> I realize it's Sunday night and not many people will be checking their\n> email, however I must ask one final time before I take some drastic measures\n> (erasing the data directory and initdb 'ing, then restoring the data from\n> last night's backup, losing an entire day's worth of data) -- does anyone\n> have any ideas on how I might be able to fix the problems outlined below?\n> \n> I'm nearly positive that I shouldn't have had to dump/restore or initdb\n> again, since I made the same changes on another machine with the same\n> databases, data and BLCKSZ (an upgrade to 7.0.3 without an initdb or\n> anything), which went flawlessly.\n> \n> Thanks to anyone who could even offer a guess, I've guessed all I can and\n> none of my guesses have paid off.. BTW, one might be lead to believe that\n> this is a permission problem, it's not, I'm positive of that. The same user\n> was accessing the same file seconds before I upgraded, that and the fact\n> that I changed permissions to 777 all the way down the tree to make sure..\n> \n> -Mitch\n> \n> > You have to dump/initdb/reload if you change the block size. Simply\n> > recompiling is not going to work.\n> >\n> > Cheers...\n> >\n> >\n> > MikeA\n> >\n> > -----Original Message-----\n> > From: Mitch Vincent\n> > To: [email protected]\n> > Sent: 11-13-00 12:57 AM\n> > Subject: [HACKERS] 7.0.2 -> 7.0.3 problem\n> >\n> > I just upgraded to 7.0.3 and tried to start the backend like\n> >\n> > /usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n> > /usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n> >\n> > .. as I've done with 7.0.2, it failed to start and got this in my\n> > postgresql.log :\n> >\n> > DEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\n> > FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> > FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> > Startup failed - abort\n> >\n> > The only compilation change I made was to increase BLCKSZ to 32k (which\n> > has\n> > been running in a production 7.0.2 environment for quite some time).\n> >\n> > So what's up? Just to make sure I made the permissions 777 all the way\n> > down\n> > to pg_control but it had no effect.\n> >\n> > ----\n> >\n> > Hmm, I just re-installed 7.0.2 and I get the same error with it -- not\n> > good.\n> >\n> > My development server, which is virtually the same, did fine when I\n> > installed 7.0.3 so I'm guessing it's not a problem across the board..\n> >\n> > I also notice in the log that it's\n> > Read(\"/usr/local/pgsql/data/pg_control\")\n> > that's failing and when I move pg_control out of the way, it's Open()\n> > that\n> > fails..\n> >\n> > I did nothing but stop the postmaster, compile and install 7.0.3 and\n> > start\n> > the postmaster. then compiled and installed 7.0.2 again and all of the\n> > sudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n> >\n> > As always, any help is appreciated. Thanks!\n> >\n> > -Mitch\n> >\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 12 Nov 2000 21:34:20 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone?"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> I think I might have explained this wrong..\n> \n> Ok, both databases had a BLCKSZ of 32k before the upgrade (in 7.0.2), one\n> database that I upgraded first to 7.0.3 went flawlessly, it started, I can\n> do every operation fine and it's BLCKSZ is 32k (so the BLCKSZ never changed\n> between the installs, it is exactly as it was before).. I used the exact\n> same procedure for my production database and it doesn't start..\n> \n> If I have to dump and reload in this situation, that's fine.. You absolutely\n> know more than I do about PostgreSQL but I know what I did on the\n> development machine and it didn't have these problems -- that's why I didn't\n> think any dump and/or reload was needed...\n> \n> When I went back to 7.0.2, I shouldn't have had to dump and restore, should\n> I? I never did an initdb on the 7.0.3 installation so the data (and\n> virtually everything else as far as data is concerned was the same as when I\n> was running 7.0.2\n> \n> Knowing all the above, do you still think a dump and reload was required? If\n> so that's fine, I just need to know..\n\nYou are correct. It does not need a dump/restore.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 12 Nov 2000 21:44:36 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone?"
},
{
"msg_contents": "I realize it's Sunday night and not many people will be checking their\nemail, however I must ask one final time before I take some drastic measures\n(erasing the data directory and initdb 'ing, then restoring the data from\nlast night's backup, losing an entire day's worth of data) -- does anyone\nhave any ideas on how I might be able to fix the problems outlined below?\n\nI'm nearly positive that I shouldn't have had to dump/restore or initdb\nagain, since I made the same changes on another machine with the same\ndatabases, data and BLCKSZ (an upgrade to 7.0.3 without an initdb or\nanything), which went flawlessly.\n\nThanks to anyone who could even offer a guess, I've guessed all I can and\nnone of my guesses have paid off.. BTW, one might be lead to believe that\nthis is a permission problem, it's not, I'm positive of that. The same user\nwas accessing the same file seconds before I upgraded, that and the fact\nthat I changed permissions to 777 all the way down the tree to make sure..\n\n-Mitch\n\n> You have to dump/initdb/reload if you change the block size. Simply\n> recompiling is not going to work.\n>\n> Cheers...\n>\n>\n> MikeA\n>\n> -----Original Message-----\n> From: Mitch Vincent\n> To: [email protected]\n> Sent: 11-13-00 12:57 AM\n> Subject: [HACKERS] 7.0.2 -> 7.0.3 problem\n>\n> I just upgraded to 7.0.3 and tried to start the backend like\n>\n> /usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n> /usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n>\n> .. as I've done with 7.0.2, it failed to start and got this in my\n> postgresql.log :\n>\n> DEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\n> FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> Startup failed - abort\n>\n> The only compilation change I made was to increase BLCKSZ to 32k (which\n> has\n> been running in a production 7.0.2 environment for quite some time).\n>\n> So what's up? Just to make sure I made the permissions 777 all the way\n> down\n> to pg_control but it had no effect.\n>\n> ----\n>\n> Hmm, I just re-installed 7.0.2 and I get the same error with it -- not\n> good.\n>\n> My development server, which is virtually the same, did fine when I\n> installed 7.0.3 so I'm guessing it's not a problem across the board..\n>\n> I also notice in the log that it's\n> Read(\"/usr/local/pgsql/data/pg_control\")\n> that's failing and when I move pg_control out of the way, it's Open()\n> that\n> fails..\n>\n> I did nothing but stop the postmaster, compile and install 7.0.3 and\n> start\n> the postmaster. then compiled and installed 7.0.2 again and all of the\n> sudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n>\n> As always, any help is appreciated. Thanks!\n>\n> -Mitch\n>\n\n",
"msg_date": "Sun, 12 Nov 2000 19:18:31 -0800",
"msg_from": "\"Mitch Vincent\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 -> 7.0.3 problem - anyone?"
},
{
"msg_contents": "I think I might have explained this wrong..\n\nOk, both databases had a BLCKSZ of 32k before the upgrade (in 7.0.2), one\ndatabase that I upgraded first to 7.0.3 went flawlessly, it started, I can\ndo every operation fine and it's BLCKSZ is 32k (so the BLCKSZ never changed\nbetween the installs, it is exactly as it was before).. I used the exact\nsame procedure for my production database and it doesn't start..\n\nIf I have to dump and reload in this situation, that's fine.. You absolutely\nknow more than I do about PostgreSQL but I know what I did on the\ndevelopment machine and it didn't have these problems -- that's why I didn't\nthink any dump and/or reload was needed...\n\nWhen I went back to 7.0.2, I shouldn't have had to dump and restore, should\nI? I never did an initdb on the 7.0.3 installation so the data (and\nvirtually everything else as far as data is concerned was the same as when I\nwas running 7.0.2\n\nKnowing all the above, do you still think a dump and reload was required? If\nso that's fine, I just need to know..\n\n-Mitch\n\n----- Original Message -----\nFrom: \"Bruce Momjian\" <[email protected]>\nTo: \"Mitch Vincent\" <[email protected]>\nCc: <[email protected]>; <[email protected]>\nSent: Sunday, November 12, 2000 6:34 PM\nSubject: Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone?\n\n\n> Block size can not be changes without dump/reload. If you think it\n> worked once, you are wrong. Sorry. The page headers have to be written\n> at the start of every block.\n>\n>\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > I realize it's Sunday night and not many people will be checking their\n> > email, however I must ask one final time before I take some drastic\nmeasures\n> > (erasing the data directory and initdb 'ing, then restoring the data\nfrom\n> > last night's backup, losing an entire day's worth of data) -- does\nanyone\n> > have any ideas on how I might be able to fix the problems outlined\nbelow?\n> >\n> > I'm nearly positive that I shouldn't have had to dump/restore or initdb\n> > again, since I made the same changes on another machine with the same\n> > databases, data and BLCKSZ (an upgrade to 7.0.3 without an initdb or\n> > anything), which went flawlessly.\n> >\n> > Thanks to anyone who could even offer a guess, I've guessed all I can\nand\n> > none of my guesses have paid off.. BTW, one might be lead to believe\nthat\n> > this is a permission problem, it's not, I'm positive of that. The same\nuser\n> > was accessing the same file seconds before I upgraded, that and the fact\n> > that I changed permissions to 777 all the way down the tree to make\nsure..\n> >\n> > -Mitch\n> >\n> > > You have to dump/initdb/reload if you change the block size. Simply\n> > > recompiling is not going to work.\n> > >\n> > > Cheers...\n> > >\n> > >\n> > > MikeA\n> > >\n> > > -----Original Message-----\n> > > From: Mitch Vincent\n> > > To: [email protected]\n> > > Sent: 11-13-00 12:57 AM\n> > > Subject: [HACKERS] 7.0.2 -> 7.0.3 problem\n> > >\n> > > I just upgraded to 7.0.3 and tried to start the backend like\n> > >\n> > > /usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n> > > /usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n> > >\n> > > .. as I've done with 7.0.2, it failed to start and got this in my\n> > > postgresql.log :\n> > >\n> > > DEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\n> > > FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> > > FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> > > Startup failed - abort\n> > >\n> > > The only compilation change I made was to increase BLCKSZ to 32k\n(which\n> > > has\n> > > been running in a production 7.0.2 environment for quite some time).\n> > >\n> > > So what's up? Just to make sure I made the permissions 777 all the way\n> > > down\n> > > to pg_control but it had no effect.\n> > >\n> > > ----\n> > >\n> > > Hmm, I just re-installed 7.0.2 and I get the same error with it -- not\n> > > good.\n> > >\n> > > My development server, which is virtually the same, did fine when I\n> > > installed 7.0.3 so I'm guessing it's not a problem across the board..\n> > >\n> > > I also notice in the log that it's\n> > > Read(\"/usr/local/pgsql/data/pg_control\")\n> > > that's failing and when I move pg_control out of the way, it's Open()\n> > > that\n> > > fails..\n> > >\n> > > I did nothing but stop the postmaster, compile and install 7.0.3 and\n> > > start\n> > > the postmaster. then compiled and installed 7.0.2 again and all of the\n> > > sudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n> > >\n> > > As always, any help is appreciated. Thanks!\n> > >\n> > > -Mitch\n> > >\n> >\n> >\n>\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n>\n\n",
"msg_date": "Sun, 12 Nov 2000 19:48:12 -0800",
"msg_from": "\"Mitch Vincent\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 -> 7.0.3 problem - anyone?"
}
]
|
[
{
"msg_contents": "I just upgraded to 7.0.3 and tried to start the backend like\n\n/usr/local/pgsql/bin/postmaster -B 256 -o '-S 10240 -s' -D\n/usr/local/pgsql/data -i > /usr/local/pgsql/postgres.log 2>&1 &\n\n.. as I've done with 7.0.2, it failed to start and got this in my\npostgresql.log :\n\nDEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\nFATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\nFATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\nStartup failed - abort\n\nThe only compilation change I made was to increase BLCKSZ to 32k (which has\nbeen running in a production 7.0.2 environment for quite some time).\n\nSo what's up? Just to make sure I made the permissions 777 all the way down\nto pg_control but it had no effect.\n\n----\n\nHmm, I just re-installed 7.0.2 and I get the same error with it -- not good.\n\nMy development server, which is virtually the same, did fine when I\ninstalled 7.0.3 so I'm guessing it's not a problem across the board..\n\nI also notice in the log that it's Read(\"/usr/local/pgsql/data/pg_control\")\nthat's failing and when I move pg_control out of the way, it's Open() that\nfails..\n\nI did nothing but stop the postmaster, compile and install 7.0.3 and start\nthe postmaster. then compiled and installed 7.0.2 again and all of the\nsudden the 7.0.2 or 7.0.3 backend doesn't start -- it makes no sense.\n\nAs always, any help is appreciated. Thanks!\n\n-Mitch\n\n",
"msg_date": "Sun, 12 Nov 2000 16:57:37 -0800",
"msg_from": "\"Mitch Vincent\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "7.0.2 -> 7.0.3 problem"
},
{
"msg_contents": "\"Mitch Vincent\" <[email protected]> writes:\n> DEBUG: Data Base System is starting up at Sun Nov 12 18:20:04 2000\n> FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> FATAL 2: Read(\"/usr/local/pgsql/data/pg_control\") failed: 2\n> Startup failed - abort\n\n> The only compilation change I made was to increase BLCKSZ to 32k (which has\n> been running in a production 7.0.2 environment for quite some time).\n\nThis case should now deliver a more reasonable error message in current\nsources, ie, something about BLCKSZ mismatch...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 25 Nov 2000 15:41:11 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 7.0.2 -> 7.0.3 problem "
}
]
|
[
{
"msg_contents": "I attach(create language) language PL/pgSQL in PG and\n create test function (cut it from help ) :\n\n --О©╫О©╫О©╫О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫ О©╫ О©╫О©╫О©╫О©╫\n CREATE FUNCTION ct1(text, text) RETURNS text AS '\n BEGIN\n RETURN $1 || $2;\n END;\n ' LANGUAGE 'plpgsql';\n\nSo that is my log :\n\npvic@ses:~ > pslq\nstoage \nbash: pslq: command not\nfound \npvic@ses:~ > psql\nstorage \nWelcome to the POSTGRESQL interactive sql\nmonitor: \n Please read the file COPYRIGHT for copyright terms of\nPOSTGRESQL \n[PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc\negcs-2.91.66] \n \n type \\? for help on slash\ncommands \n type \\q to\nquit \n type \\g or terminate with semicolon to execute\nquery \n You are currently connected to the database:\nstorage \n \nstorage=> select\nct1('ddd','ddd'); \nERROR: plpgsql: cache lookup from pg_proc\nfailed \n\nCan anyone tell me how correct this error and/or its my mistake\nor PG bug ? \n\nThanks in advance.\n\n Vic (AKA MorDoor)",
"msg_date": "Mon, 13 Nov 2000 04:41:25 +0200",
"msg_from": "Vic <[email protected]>",
"msg_from_op": true,
"msg_subject": "Pl/Sql Error (may be..... )"
}
]
|
[
{
"msg_contents": "It wasn't PostgreSQL, it was me of course!\n\nSeeing as it was so long ago, I forgot that the BLCKSZ on the production\nserver wasn't 32k, it was 31k (for whatever reason).. When I set the BLCKSZ\nlower than that and tried to start the backend it told me that the database\nwas initialized with a BLCKSZ of 31k, strange that it didn't say that when I\ncompiled with a BLCKSZ of 32k but regardless of all that it was my stupidity\nthat was the problem, nothing more..\n\nMy apologies for wasting everyone's time, file this problem in the \"stupid\nuser\" category.\n\nThanks to all, I'm off to sit in the corner for a while...\n\n-Mitch\n\n----- Original Message -----\nFrom: \"Bruce Momjian\" <[email protected]>\nTo: \"Mitch Vincent\" <[email protected]>\nSent: Sunday, November 12, 2000 6:47 PM\nSubject: Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone?\n\n\n> Quite strange. There isn't much in 7.0.3 that would cause that.\n>\n>\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> >\n> > > You are correct. It does not need a dump/restore.\n> >\n> > Excellent, my apologies for not being clear before... Do you have any\nother\n> > ideas as to what might have caused this problem?\n> >\n> > -Mitch\n> >\n> >\n>\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n>\n\n",
"msg_date": "Sun, 12 Nov 2000 20:07:56 -0800",
"msg_from": "\"Mitch Vincent\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 7.0.2 -> 7.0.3 problem - anyone? - Fixed!"
},
{
"msg_contents": "\"Mitch Vincent\" <[email protected]> writes:\n> It wasn't PostgreSQL, it was me of course!\n> Seeing as it was so long ago, I forgot that the BLCKSZ on the production\n> server wasn't 32k, it was 31k (for whatever reason).. When I set the BLCKSZ\n> lower than that and tried to start the backend it told me that the database\n> was initialized with a BLCKSZ of 31k, strange that it didn't say that when I\n> compiled with a BLCKSZ of 32k but regardless of all that it was my stupidity\n> that was the problem, nothing more..\n\nHmm, there is a test specifically designed to catch this mistake in\nbackend/access/transam/xlog.c: the initdb-time BLCKSZ is stored in\npg_control, and we have\n\n if (ControlFile->blcksz != BLCKSZ)\n elog(STOP, \"database was initialized with BLCKSZ %d,\\n\\tbut the backend was compiled with BLCKSZ %d.\\n\\tlooks like you need to initdb.\",\n ControlFile->blcksz, BLCKSZ);\n\nBut I haven't stress-tested it. From your report, it sounds like\nsomething may blow up before control gets to this point if the compiled\nBLCKSZ is larger than the value used by initdb :-(\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 00:21:35 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone? - Fixed! "
},
{
"msg_contents": "I said:\n> if (ControlFile->blcksz != BLCKSZ)\n> elog(STOP, \"database was initialized with BLCKSZ %d,\\n\\tbut the backend was compiled with BLCKSZ %d.\\n\\tlooks like you need to initdb.\",\nControlFile-> blcksz, BLCKSZ);\n\n> But I haven't stress-tested it. From your report, it sounds like\n> something may blow up before control gets to this point if the compiled\n> BLCKSZ is larger than the value used by initdb :-(\n\nOh ... duh! Three statements before the above test, we read in the\npg_control data with\n\n\tif (read(fd, ControlFile, BLCKSZ) != BLCKSZ)\n\t\telog(STOP, \"Read(\\\"%s\\\") failed: %d\", ControlFilePath, errno);\n\nNow pg_control is only a one-block file anyway. So if it was written\nwith a smaller BLCKSZ than the backend is expecting, the read() will\nindeed not read as many bytes as the code is expecting --- whereupon\nit fails with this not-so-informative error message instead of the\none that would be useful.\n\nEasy to fix, now that we've had our noses rubbed in the problem.\nThanks for the report, and sorry you were confused for awhile...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 00:34:51 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone? - Fixed! "
}
]
|
[
{
"msg_contents": "Thought this may be of interest to some...\n\nhttp://www.phpbuilder.com/columns/tim20001112.php3\n\nMichael Fork - CCNA - MCP - A+\nNetwork Support - Toledo Internet Access - Toledo Ohio\n\n",
"msg_date": "Sun, 12 Nov 2000 23:38:17 -0500 (EST)",
"msg_from": "Michael Fork <[email protected]>",
"msg_from_op": true,
"msg_subject": "PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "And now it's on www.slashdot.org ...\n\nhttp://slashdot.org/articles/00/11/13/1342208.shtml\n\nPoul L. Christiansen\n\nMichael Fork wrote:\n> \n> Thought this may be of interest to some...\n> \n> http://www.phpbuilder.com/columns/tim20001112.php3\n> \n> Michael Fork - CCNA - MCP - A+\n> Network Support - Toledo Internet Access - Toledo Ohio\n",
"msg_date": "Mon, 13 Nov 2000 15:58:57 +0000",
"msg_from": "\"Poul L. Christiansen\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: PHPBuilder article -- Postgres vs MySQL"
}
]
|
[
{
"msg_contents": "At 11:38 PM 11/12/00 -0500, Michael Fork wrote:\n>Thought this may be of interest to some...\n>\n>http://www.phpbuilder.com/columns/tim20001112.php3\n\nI just submitted it to slashdot, what the heck :)\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Sun, 12 Nov 2000 21:46:06 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] PHPBuilder article -- Postgres vs MySQL"
}
]
|
[
{
"msg_contents": "\n> I have to agree with Alfred here: this does not sound like a feature,\n> it sounds like a horrid hack. You're giving up *all* consistency\n> guarantees for a performance gain that is really going to be pretty\n> minimal in the WAL context.\n\nThe \"buffered log\" still guarantees consistency within the database. \nThe only thing that is a problem, is that the client had his transaction \ncommitted, but the whole transaction may be lost if the machine crashes \nhard.\n\nThis is a point where a lot of people sit on an impression of false safety.\nTo actually guarantee that a committed transaction is safe, at least\ntwo separate machines with an independent set of disks on two different \nlocations with synchronous replication (of at least the log) are needed.\nIn all other situations there is still a too high risc of loosing committed \ntransactions.\n\nI have made the experience, that telling your programmers and clients,\nthat a few of their latest transactions are not guaranteed to be safe leads \nto a lot higher robustness overall. There is nothing worse that a false \nfeeling of safety.\n\n> Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> log file across transactions (after writing your commit record to the\n> log, sleep a few milliseconds to see if anyone else fsyncs before you\n> do; if not, issue the fsync yourself). That would offer less-than-\n> one-fsync-per-transaction performance without giving up any \n> guarantees.\n> If people feel a compulsion to have a tunable parameter, let 'em tune\n> the length of the pre-fsync sleep ...\n\nThis is not a solution to the perfomance aspect with the same impact as \n\"buffered log\", since if you tune that time up every commit has to wait longer. \nThere is a tradeoff between the wait time and the time fsync needs. \nThus we are talking about rather short times in the milliseconds here.\n\nAndreas\n",
"msg_date": "Mon, 13 Nov 2000 09:33:36 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
}
]
|
[
{
"msg_contents": "\n> I am just suggesting that instead of flushing the log on every\n> transaction end, just do it every X seconds.\n\nOr maybe more practical is, when the log buffer fills. \nAnd of course during checkpoints.\n\nAndreas\n",
"msg_date": "Mon, 13 Nov 2000 09:36:53 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> \n> > I am just suggesting that instead of flushing the log on every\n> > transaction end, just do it every X seconds.\n> \n> Or maybe more practical is, when the log buffer fills. \n> And of course during checkpoints.\n\nLog filling is too abritrary. If I commit something, and nothing\nhappens for 2 hours, we should commit that transaction.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 09:48:59 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: RE: [COMMITTERS] pgsql/src/backend/access/transam\n\t( xact.c xlog.c)"
}
]
|
[
{
"msg_contents": "\n> > because as said, it can be any other language besides C and also\n> > the 'AS file' is weird.\n> \n> This is interesting. It allows us to control the default behavour of\n> \"C\". I would vote to default to 7.0-style when no version is used for\n> 7.1, then default to 7.1 style in 7.2 and later. We don't need\n> backward C function compatibility for more than one release, I think.\n\nWe need the 7.0 style for compatibility with other DB's. Postgres was \n\"the\" pioneer in this area, but similar functionality is now available in other DB's.\n\nI think it would be worthwhile, to at least peek at what Informix and DB/2\ndoes here.\n\nAndreas\n",
"msg_date": "Mon, 13 Nov 2000 09:58:30 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "On Mon, Nov 13, 2000 at 09:58:30AM +0100, Zeugswetter Andreas SB wrote:\n> \n> > > because as said, it can be any other language besides C and also\n> > > the 'AS file' is weird.\n> > \n> > This is interesting. It allows us to control the default behavour of\n> > \"C\". I would vote to default to 7.0-style when no version is used for\n> > 7.1, then default to 7.1 style in 7.2 and later. We don't need\n> > backward C function compatibility for more than one release, I think.\n> \n> We need the 7.0 style for compatibility with other DB's. Postgres was \n> \"the\" pioneer in this area, but similar functionality is now available in other DB's.\n\nCould you explain? PostgreSQL cant be compatible in C level, why\nthe SQL compatibility? (I mean the LANGUAGE 'C' specifically)\n\nI see already three different C interfaces:\n\n1) 7.0.x\n2) 7.1.x\n3) > 7.1 where is possible to give a generic funtion/struct where\n the backend can guess the actual params, also with some\n docstrings, etc... Per-function interface needs not to change.\n\nHow do you see it possible to solve with current LANGUAGE 'fooC'\napproach?\n\n\n-- \nmarko\n\n",
"msg_date": "Wed, 15 Nov 2000 15:22:02 +0200",
"msg_from": "Marko Kreen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
}
]
|
[
{
"msg_contents": "\n> > Or maybe more practical is, when the log buffer fills. \n> > And of course during checkpoints.\n> \n> Log filling is too abritrary. If I commit something, and nothing\n> happens for 2 hours, we should commit that transaction.\n\nCheckpoint, as I said ?\n\nAndreas\n",
"msg_date": "Mon, 13 Nov 2000 15:56:34 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: RE: [COMMITTERS] pgsql/src/backend/access/trans\n\tam ( xact.c xlog.c)"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> \n> > > Or maybe more practical is, when the log buffer fills. \n> > > And of course during checkpoints.\n> > \n> > Log filling is too abritrary. If I commit something, and nothing\n> > happens for 2 hours, we should commit that transaction.\n> \n> Checkpoint, as I said ?\n\nSorry. My mistake. Of course, checkpoint timing is fine.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 09:57:37 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: RE: [COMMITTERS] pgsql/src/backend/access/trans\n\tam ( xact.c xlog.c)"
}
]
|
[
{
"msg_contents": " Date: Monday, November 13, 2000 @ 10:18:11\nAuthor: momjian\n\nUpdate of /home/projects/pgsql/cvsroot/pgsql/src/backend/postmaster\n from hub.org:/home/projects/pgsql/tmp/cvs-serv65584/pgsql/src/backend/postmaster\n\nModified Files:\n\tpostmaster.c \n\n----------------------------- Log Message -----------------------------\n\nUUNET is looking into offering PostgreSQL as a part of a managed web\nhosting product, on both shared and dedicated machines. We currently\noffer Oracle and MySQL, and it would be a nice middle-ground.\nHowever, as shipped, PostgreSQL lacks the following features we need\nthat MySQL has:\n\n1. The ability to listen only on a particular IP address. Each\n hosting customer has their own IP address, on which all of their\n servers (http, ftp, real media, etc.) run.\n2. The ability to place the Unix-domain socket in a mode 700 directory.\n This allows us to automatically create an empty database, with an\n empty DBA password, for new or upgrading customers without having\n to interactively set a DBA password and communicate it to (or from)\n the customer. This in turn cuts down our install and upgrade times.\n3. The ability to connect to the Unix-domain socket from within a\n change-rooted environment. We run CGI programs chrooted to the\n user's home directory, which is another reason why we need to be\n able to specify where the Unix-domain socket is, instead of /tmp.\n4. The ability to, if run as root, open a pid file in /var/run as\n root, and then setuid to the desired user. (mysqld -u can almost\n do this; I had to patch it, too).\n\nThe patch below fixes problem 1-3. I plan to address #4, also, but\nhaven't done so yet. These diffs are big enough that they should give\nthe PG development team something to think about in the meantime :-)\nAlso, I'm about to leave for 2 weeks' vacation, so I thought I'd get\nout what I have, which works (for the problems it tackles), now.\n\nWith these changes, we can set up and run PostgreSQL with scripts the\nsame way we can with apache or proftpd or mysql.\n\nIn summary, this patch makes the following enhancements:\n\n1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,\n and command line options -k --unix-socket to the relevant programs.\n2. Adds a -h option to postmaster to set the hostname or IP address to\n listen on instead of the default INADDR_ANY.\n3. Extends some library interfaces to support the above.\n4. Fixes a few memory leaks in PQconnectdb().\n\nThe default behavior is unchanged from stock 7.0.2; if you don't use\nany of these new features, they don't change the operation.\n\nDavid J. MacKenzie\n\n",
"msg_date": "Mon, 13 Nov 2000 10:18:11 -0500 (EST)",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "pgsql/src/backend/postmaster (postmaster.c)"
},
{
"msg_contents": "I have to agree with Peter E. on this patch: it's poorly thought out.\n\nI don't mind the idea of being able to relocate the socket file,\nbut the client-side interface they've chosen is silly. Having to\nadd another switch to every client app is not reasonable --- it's\nbad enough that you had to hack every one of the clients we supply,\nbut what of client apps that just use libpq or one of the other\ninterface libraries? They'll be unable to talk to such a postmaster\nwithout further work.\n\nWe should revert all the client-side changes from this patch, and\ninstead teach libpq and the other interfaces to treat a host name\nthat starts with a slash as being a path to a socket file (replacing\nthe default assumption of \"/tmp\"). Much cleaner, especially for\nexisting client apps.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 12:33:52 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: UUNET socket-file-location patch"
},
{
"msg_contents": "> I have to agree with Peter E. on this patch: it's poorly thought out.\n\nNow you tell me. :-)\n\n> I don't mind the idea of being able to relocate the socket file,\n> but the client-side interface they've chosen is silly. Having to\n> add another switch to every client app is not reasonable --- it's\n> bad enough that you had to hack every one of the clients we supply,\n> but what of client apps that just use libpq or one of the other\n> interface libraries? They'll be unable to talk to such a postmaster\n> without further work.\n\nThe only solution for other apps is to use the environment variable\nPGUNXSOCKET or use PQconnectdb with unixsocket=\"lkjasdf\". \n\nOverloading the hostname with a leading slash is another nice option. \nIf I do that in libpq, then all the apps can benefit, right?\n\n> We should revert all the client-side changes from this patch, and\n> instead teach libpq and the other interfaces to treat a host name\n> that starts with a slash as being a path to a socket file (replacing\n> the default assumption of \"/tmp\"). Much cleaner, especially for\n> existing client apps.\n\nI can easily back out whatever you want. Let me back out the client\nchanges, and hack libpq to handle the leading slash. Sounds good.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 12:51:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Actually, the thing doesn't even compile:\n\npqcomm.c: In function `StreamServerPort':\npqcomm.c:259: warning: implicit declaration of function `hstrerror'\npqcomm.c:259: `h_errno' undeclared (first use in this function)\npqcomm.c:259: (Each undeclared identifier is reported only once\npqcomm.c:259: for each function it appears in.)\nmake[3]: *** [pqcomm.o] Error 1\n\npostmaster.c: In function `get_host_port':\npostmaster.c:1338: warning: implicit declaration of function `hstrerror'\npostmaster.c:1338: `h_errno' undeclared (first use in this function)\npostmaster.c:1338: (Each undeclared identifier is reported only once\npostmaster.c:1338: for each function it appears in.)\nmake[3]: *** [postmaster.o] Error 1\n\nPlease revert this patch, so I can get some work done?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 14:08:36 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "Looks like it needs a resolver include....\n\nLER\n\n* Tom Lane <[email protected]> [001113 13:11]:\n> Actually, the thing doesn't even compile:\n> \n> pqcomm.c: In function `StreamServerPort':\n> pqcomm.c:259: warning: implicit declaration of function `hstrerror'\n> pqcomm.c:259: `h_errno' undeclared (first use in this function)\n> pqcomm.c:259: (Each undeclared identifier is reported only once\n> pqcomm.c:259: for each function it appears in.)\n> make[3]: *** [pqcomm.o] Error 1\n> \n> postmaster.c: In function `get_host_port':\n> postmaster.c:1338: warning: implicit declaration of function `hstrerror'\n> postmaster.c:1338: `h_errno' undeclared (first use in this function)\n> postmaster.c:1338: (Each undeclared identifier is reported only once\n> postmaster.c:1338: for each function it appears in.)\n> make[3]: *** [postmaster.o] Error 1\n> \n> Please revert this patch, so I can get some work done?\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Mon, 13 Nov 2000 13:21:04 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "On BSDI, hstrerror is defined in netdb.h. Do you have it anywhere? Is\nthat a proper function call?\n\n\n> Actually, the thing doesn't even compile:\n> \n> pqcomm.c: In function `StreamServerPort':\n> pqcomm.c:259: warning: implicit declaration of function `hstrerror'\n> pqcomm.c:259: `h_errno' undeclared (first use in this function)\n> pqcomm.c:259: (Each undeclared identifier is reported only once\n> pqcomm.c:259: for each function it appears in.)\n> make[3]: *** [pqcomm.o] Error 1\n> \n> postmaster.c: In function `get_host_port':\n> postmaster.c:1338: warning: implicit declaration of function `hstrerror'\n> postmaster.c:1338: `h_errno' undeclared (first use in this function)\n> postmaster.c:1338: (Each undeclared identifier is reported only once\n> postmaster.c:1338: for each function it appears in.)\n> make[3]: *** [postmaster.o] Error 1\n> \n> Please revert this patch, so I can get some work done?\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 16:15:20 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> On BSDI, hstrerror is defined in netdb.h. Do you have it anywhere? Is\n> that a proper function call?\n\nThere is no hstrerror anywhere on HPUX. h_errno is defined in\n<netdb.h>, but only with nonstandard compilation options:\n\n#ifdef _XOPEN_SOURCE_EXTENDED\nextern int h_errno;\n#endif\n\nThe man page for gethostbyname() points out that h_errno will be garbage\nif the hostname was not resolved via a nameserver, anyway.\n\nOn the whole, this code looks much less than portable to me.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 16:29:26 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "OK, hterror removed.\n\n\n> Bruce Momjian <[email protected]> writes:\n> > On BSDI, hstrerror is defined in netdb.h. Do you have it anywhere? Is\n> > that a proper function call?\n> \n> There is no hstrerror anywhere on HPUX. h_errno is defined in\n> <netdb.h>, but only with nonstandard compilation options:\n> \n> #ifdef _XOPEN_SOURCE_EXTENDED\n> extern int h_errno;\n> #endif\n> \n> The man page for gethostbyname() points out that h_errno will be garbage\n> if the hostname was not resolved via a nameserver, anyway.\n> \n> On the whole, this code looks much less than portable to me.\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 16:36:19 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Tom Lane writes:\n\n> We should revert all the client-side changes from this patch, and\n> instead teach libpq and the other interfaces to treat a host name\n> that starts with a slash as being a path to a socket file (replacing\n> the default assumption of \"/tmp\"). Much cleaner, especially for\n> existing client apps.\n\nShould the parameter determine the directory or the full file name? I'd\ngo for the former, but it's not a strong case.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 18:45:36 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Should the parameter determine the directory or the full file name? I'd\n> go for the former, but it's not a strong case.\n\nDirectory was what I had in mind too, but I'm not sure what Bruce\nactually did ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 12:48:35 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "> Peter Eisentraut <[email protected]> writes:\n> > Should the parameter determine the directory or the full file name? I'd\n> > go for the former, but it's not a strong case.\n> \n> Directory was what I had in mind too, but I'm not sure what Bruce\n> actually did ...\n\nI did whatever the patch did. I believe it is the full path. I believe\nit is used here:\n\n#define UNIXSOCK_PATH(sun,port,defpath) \\\n ((defpath && defpath[0] != '\\0') ? (strncpy((sun).sun_path,\ndefpath, sizeof((sun).sun_path)),\n(sun).sun_path[sizeof((sun).sun_path)-1] = '\\0') :\nsprintf((sun).sun_path, \"/tmp/.s.PGSQL.%d\", (port)))\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Tue, 14 Nov 2000 18:54:35 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> Peter Eisentraut <[email protected]> writes:\n>>>> Should the parameter determine the directory or the full file name? I'd\n>>>> go for the former, but it's not a strong case.\n>> \n>> Directory was what I had in mind too, but I'm not sure what Bruce\n>> actually did ...\n\n> I did whatever the patch did. I believe it is the full path. I believe\n> it is used here:\n\n> #define UNIXSOCK_PATH(sun,port,defpath) \\\n> ((defpath && defpath[0] != '\\0') ? (strncpy((sun).sun_path,\n> defpath, sizeof((sun).sun_path)),\n> (sun).sun_path[sizeof((sun).sun_path)-1] = '\\0') :\n> sprintf((sun).sun_path, \"/tmp/.s.PGSQL.%d\", (port)))\n\nHmm. I think it would make more sense to make the parameter be just\nthe directory, not the full path including filename --- for one thing,\ndoing it like that renders the port-number parameter useless. Why not\n\n#define UNIXSOCK_PATH(sun,port,defpath) \\\n snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n (((defpath) && *(defpath) != '\\0') ? (defpath) : \"/tmp\"), \\\n (port))\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 23:28:52 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> Peter Eisentraut <[email protected]> writes:\n> >>>> Should the parameter determine the directory or the full file name? I'd\n> >>>> go for the former, but it's not a strong case.\n> >> \n> >> Directory was what I had in mind too, but I'm not sure what Bruce\n> >> actually did ...\n> \n> > I did whatever the patch did. I believe it is the full path. I believe\n> > it is used here:\n> \n> > #define UNIXSOCK_PATH(sun,port,defpath) \\\n> > ((defpath && defpath[0] != '\\0') ? (strncpy((sun).sun_path,\n> > defpath, sizeof((sun).sun_path)),\n> > (sun).sun_path[sizeof((sun).sun_path)-1] = '\\0') :\n> > sprintf((sun).sun_path, \"/tmp/.s.PGSQL.%d\", (port)))\n> \n> Hmm. I think it would make more sense to make the parameter be just\n> the directory, not the full path including filename --- for one thing,\n> doing it like that renders the port-number parameter useless. Why not\n> \n> #define UNIXSOCK_PATH(sun,port,defpath) \\\n> snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n> (((defpath) && *(defpath) != '\\0') ? (defpath) : \"/tmp\"), \\\n> (port))\n\nI can do that. Of course, I have to now change all the documentation to\nmatch it. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 15 Nov 2000 09:15:50 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Bruce Momjian writes:\n\n> > Hmm. I think it would make more sense to make the parameter be just\n> > the directory, not the full path including filename --- for one thing,\n> > doing it like that renders the port-number parameter useless. Why not\n> > \n> > #define UNIXSOCK_PATH(sun,port,defpath) \\\n> > snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n> > (((defpath) && *(defpath) != '\\0') ? (defpath) : \"/tmp\"), \\\n> > (port))\n> \n> I can do that. Of course, I have to now change all the documentation to\n> match it. :-)\n\nRather:\n\n#define UNIXSOCK_PATH(sun,port,defpath) \\\n snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n (defpath), (port))\n\nand make \"/tmp\" the default in guc.c.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 15 Nov 2000 17:38:12 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> #define UNIXSOCK_PATH(sun,port,defpath) \\\n> snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n> (defpath), (port))\n\n> and make \"/tmp\" the default in guc.c.\n\nNo, because this has to work on the client side too. The default path\n*must* be determined at compile time, or clients and servers will be\nunable to find each other.\n\nI wouldn't object to having \"/tmp\" be given as a macro PG_STD_SOCKET_DIR\nin config.h, making it potentially configurable on a site-wide basis,\nbut that's as far as I think we can go.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 11:42:43 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "Tom Lane writes:\n\n> > #define UNIXSOCK_PATH(sun,port,defpath) \\\n> > snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n> > (defpath), (port))\n> \n> > and make \"/tmp\" the default in guc.c.\n> \n> No, because this has to work on the client side too. The default path\n> *must* be determined at compile time, or clients and servers will be\n> unable to find each other.\n\nThe only difference between your snippet and mine is that yours sets the\ndefault to \"\" and interprets it as \"/tmp\" when it is used, whereas mine\nsets the default to \"/tmp\" to begin with. Clients don't see the\ndifference.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 15 Nov 2000 18:15:14 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Tom Lane writes:\n>>>> and make \"/tmp\" the default in guc.c.\n>> \n>> No, because this has to work on the client side too. The default path\n>> *must* be determined at compile time, or clients and servers will be\n>> unable to find each other.\n\n> The only difference between your snippet and mine is that yours sets the\n> default to \"\" and interprets it as \"/tmp\" when it is used, whereas mine\n> sets the default to \"/tmp\" to begin with. Clients don't see the\n> difference.\n\nClients that don't contain guc.c are going to see a difference, no?\nWhere are they getting the default from?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 12:54:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch "
},
{
"msg_contents": "> Peter Eisentraut <[email protected]> writes:\n> > Tom Lane writes:\n> >>>> and make \"/tmp\" the default in guc.c.\n> >> \n> >> No, because this has to work on the client side too. The default path\n> >> *must* be determined at compile time, or clients and servers will be\n> >> unable to find each other.\n> \n> > The only difference between your snippet and mine is that yours sets the\n> > default to \"\" and interprets it as \"/tmp\" when it is used, whereas mine\n> > sets the default to \"/tmp\" to begin with. Clients don't see the\n> > difference.\n> \n> Clients that don't contain guc.c are going to see a difference, no?\n> Where are they getting the default from?\n\nGood point. This macro is called by the backend, and the libpq frontend\ncode. We would have to push the /tmp default into libpq code too, which\nseems messier.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 00:18:48 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> Peter Eisentraut <[email protected]> writes:\n> >>>> Should the parameter determine the directory or the full file name? I'd\n> >>>> go for the former, but it's not a strong case.\n> >> \n> >> Directory was what I had in mind too, but I'm not sure what Bruce\n> >> actually did ...\n> \n> > I did whatever the patch did. I believe it is the full path. I believe\n> > it is used here:\n> \n> > #define UNIXSOCK_PATH(sun,port,defpath) \\\n> > ((defpath && defpath[0] != '\\0') ? (strncpy((sun).sun_path,\n> > defpath, sizeof((sun).sun_path)),\n> > (sun).sun_path[sizeof((sun).sun_path)-1] = '\\0') :\n> > sprintf((sun).sun_path, \"/tmp/.s.PGSQL.%d\", (port)))\n> \n> Hmm. I think it would make more sense to make the parameter be just\n> the directory, not the full path including filename --- for one thing,\n> doing it like that renders the port-number parameter useless. Why not\n> \n> #define UNIXSOCK_PATH(sun,port,defpath) \\\n> snprintf((sun).sun_path, sizeof((sun).sun_path), \"%s/.s.PGSQL.%d\", \\\n> (((defpath) && *(defpath) != '\\0') ? (defpath) : \"/tmp\"), \\\n> (port))\n> \n> \t\t\tregards, tom lane\n> \n\nOK, here is the diff to make the socket file option specify just a\ndirectory, not a full path. Documentation changes were also made.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n\n? Makefile.custom\n? GNUmakefile\n? Makefile.global\n? log\n? crtags\n? backend/postgres\n? backend/catalog/global.description\n? backend/catalog/global.bki\n? backend/catalog/template1.bki\n? backend/catalog/template1.description\n? backend/port/Makefile\n? bin/initdb/initdb\n? bin/initlocation/initlocation\n? bin/ipcclean/ipcclean\n? bin/pg_config/pg_config\n? bin/pg_ctl/pg_ctl\n? bin/pg_dump/pg_dump\n? bin/pg_dump/pg_restore\n? bin/pg_dump/pg_dumpall\n? bin/pg_id/pg_id\n? bin/pg_passwd/pg_passwd\n? bin/pgaccess/pgaccess\n? bin/pgtclsh/Makefile.tkdefs\n? bin/pgtclsh/Makefile.tcldefs\n? bin/pgtclsh/pgtclsh\n? bin/pgtclsh/pgtksh\n? bin/psql/psql\n? bin/scripts/createlang\n? include/config.h\n? include/stamp-h\n? interfaces/ecpg/lib/libecpg.so.3.2.0\n? interfaces/ecpg/preproc/ecpg\n? interfaces/libpgeasy/libpgeasy.so.2.1\n? interfaces/libpgtcl/libpgtcl.so.2.1\n? interfaces/libpq/libpq.so.2.1\n? interfaces/perl5/blib\n? interfaces/perl5/Makefile\n? interfaces/perl5/pm_to_blib\n? interfaces/perl5/Pg.c\n? interfaces/perl5/Pg.bs\n? pl/plperl/blib\n? pl/plperl/Makefile\n? pl/plperl/pm_to_blib\n? pl/plperl/SPI.c\n? pl/plperl/plperl.bs\n? pl/plpgsql/src/libplpgsql.so.1.0\n? pl/tcl/Makefile.tcldefs\nIndex: include/libpq/pqcomm.h\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/libpq/pqcomm.h,v\nretrieving revision 1.45\ndiff -c -r1.45 pqcomm.h\n*** include/libpq/pqcomm.h\t2000/11/15 18:36:06\t1.45\n--- include/libpq/pqcomm.h\t2000/11/22 01:33:54\n***************\n*** 51,66 ****\n /* Configure the UNIX socket address for the well known port. */\n \n #if defined(SUN_LEN)\n- #define UNIXSOCK_PATH(sun,port,defpath) \\\n- ((defpath && defpath[0] != '\\0') ? (strncpy((sun).sun_path, defpath, sizeof((sun).sun_path)), (sun).sun_path[sizeof((sun).sun_path)-1] = '\\0') : sprintf((sun).sun_path, \"/tmp/.s.PGSQL.%d\", (port)))\n #define UNIXSOCK_LEN(sun) \\\n (SUN_LEN(&(sun)))\n #else\n- #define UNIXSOCK_PATH(sun,port,defpath) \\\n- ((defpath && defpath[0] != '\\0') ? (strncpy((sun).sun_path, defpath, sizeof((sun).sun_path)), (sun).sun_path[sizeof((sun).sun_path)-1] = '\\0') : sprintf((sun).sun_path, \"/tmp/.s.PGSQL.%d\", (port)))\n #define UNIXSOCK_LEN(sun) \\\n (strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))\n #endif\n \n /*\n *\t\tWe do this because sun_len is in BSD's struct, while others don't.\n--- 51,65 ----\n /* Configure the UNIX socket address for the well known port. */\n \n #if defined(SUN_LEN)\n #define UNIXSOCK_LEN(sun) \\\n (SUN_LEN(&(sun)))\n #else\n #define UNIXSOCK_LEN(sun) \\\n (strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))\n #endif\n+ \n+ #define UNIXSOCK_PATH(sun,port,defpath) \\\n+ (snprintf((sun).sun_path, UNIXSOCK_LEN(sun), \"%s/.s.PGSQL.%d\", (defpath && *(defpath) != '\\0') ? (defpath) : \"/tmp\", (port)))\n \n /*\n *\t\tWe do this because sun_len is in BSD's struct, while others don't.",
"msg_date": "Tue, 21 Nov 2000 20:37:51 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: UUNET socket-file-location patch"
}
]
|
[
{
"msg_contents": ">And now it's on www.slashdot.org ...\n>\n>http://slashdot.org/articles/00/11/13/1342208.shtml\n>\n>Poul L. Christiansen\n>\n>Michael Fork wrote:\n>>\n>> Thought this may be of interest to some...\n>>\n>> http://www.phpbuilder.com/columns/tim20001112.php3\n>>\n>> Michael Fork - CCNA - MCP - A+\n>> Network Support - Toledo Internet Access - Toledo Ohio\n\nIt would be nice if the fourth page were there. Am I the only one getting \n\"Not Found\"?\n\n\nRob Nelson\[email protected]\n\n",
"msg_date": "Mon, 13 Nov 2000 10:32:00 -0500",
"msg_from": "\"Robert D. Nelson\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> >And now it's on www.slashdot.org ...\n> >\n> >http://slashdot.org/articles/00/11/13/1342208.shtml\n> >\n> >Poul L. Christiansen\n> >\n> >Michael Fork wrote:\n> >>\n> >> Thought this may be of interest to some...\n> >>\n> >> http://www.phpbuilder.com/columns/tim20001112.php3\n> >>\n> >> Michael Fork - CCNA - MCP - A+\n> >> Network Support - Toledo Internet Access - Toledo Ohio\n> \n> It would be nice if the fourth page were there. Am I the only one getting \n> \"Not Found\"?\n\nThey are getting lots of hits. Hit reload and eventually it will\nappear. I am on page six now.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 10:40:37 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: PHPBuilder article -- Postgres vs MySQL"
}
]
|
[
{
"msg_contents": "I made it all the way through the article. I'll summarize it for you:\nPostgres - hooray!\nMySQL - boo!\nSince this is an open source database article linked off of slashdot, I\nimagine they're getting pounded.\n\nDavid Boerwinkle\n\n-----Original Message-----\nFrom: Robert D. Nelson <[email protected]>\nTo: Michael Fork <[email protected]>; Poul L.Christiansen\n<[email protected]>\nCc: pgsql-general <[email protected]>; pgsql-hackers\n<[email protected]>\nDate: Monday, November 13, 2000 8:31 AM\nSubject: RE: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n\n\n>>And now it's on www.slashdot.org ...\n>>\n>>http://slashdot.org/articles/00/11/13/1342208.shtml\n>>\n>>Poul L. Christiansen\n>>\n>>Michael Fork wrote:\n>>>\n>>> Thought this may be of interest to some...\n>>>\n>>> http://www.phpbuilder.com/columns/tim20001112.php3\n>>>\n>>> Michael Fork - CCNA - MCP - A+\n>>> Network Support - Toledo Internet Access - Toledo Ohio\n>\n>It would be nice if the fourth page were there. Am I the only one getting\n>\"Not Found\"?\n>\n>\n>Rob Nelson\n>[email protected]\n>\n>\n\n",
"msg_date": "Mon, 13 Nov 2000 09:43:50 -0600",
"msg_from": "<[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "At 09:43 AM 11/13/00 -0600, [email protected] wrote:\n>I made it all the way through the article. I'll summarize it for you:\n>Postgres - hooray!\n>MySQL - boo!\n>Since this is an open source database article linked off of slashdot, I\n>imagine they're getting pounded.\n\nWhy is all this e-mail showing up so late?\n\n(I'm curious because there have been complaints about the mail server here,\nand the article is old hat).\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Mon, 20 Nov 2000 20:52:40 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "On Mon, 20 Nov 2000, Don Baccus wrote:\n\n> At 09:43 AM 11/13/00 -0600, [email protected] wrote:\n> >I made it all the way through the article. I'll summarize it for you:\n> >Postgres - hooray!\n> >MySQL - boo!\n> >Since this is an open source database article linked off of slashdot, I\n> >imagine they're getting pounded.\n> \n> Why is all this e-mail showing up so late?\n> \n> (I'm curious because there have been complaints about the mail server here,\n> and the article is old hat).\n\nI was away for the past week at Comdex and didn't keep up very well on\napproving postings from ppl that don't subscribe to the list before\nposting ... for anti-spam purposes, you have to be subscribed before\nposting, or else it has to be approved :(\n\n\n",
"msg_date": "Tue, 21 Nov 2000 01:20:49 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
}
]
|
[
{
"msg_contents": ">I made it all the way through the article. I'll summarize it for you:\n>Postgres - hooray!\n>MySQL - boo!\n\nYeah, and that's about it. No analysis or anything. Disappointing, after \nwaiting so long for the pages to load.\n\n>Since this is an open source database article linked off of slashdot, I\n>imagine they're getting pounded.\n\nStill...Regardless of what database they're running, either their \nabstraction layer is shit or their queries really need optimized. Is that \nperhaps why, even at 5 clients, the page views he shows never went \nsignificantly above 10/sec?\n\n\nRob Nelson\[email protected]\n\n",
"msg_date": "Mon, 13 Nov 2000 11:22:00 -0500",
"msg_from": "\"Robert D. Nelson\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "> Still...Regardless of what database they're running, either their \n> abstraction layer is shit or their queries really need optimized. Is that \n> perhaps why, even at 5 clients, the page views he shows never went \n> significantly above 10/sec?\n> \nI think this could be because they used real killer pages in the test, \nand maybe this also the reason PgSQL fared this good (I've always \nbeen and I'm still a postgres fan, but looking at that results I've \nbeen quite astonished!!). Have you looked the spec? If I remember \nwell, Tim was talking about executing cuncurrently a page that \njoined a dozen tables and another that was doing \nupdate/select/insert on the same tables. Under these condition, 10 \npages/sec it seems lighting to me!!!!\n\nbye!\n\n\n/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\n\nFabrizio Ermini Alternate E-mail:\nC.so Umberto, 7 [email protected]\nloc. Meleto Valdarno Mail on GSM: (keep it short!)\n52020 Cavriglia (AR) [email protected]\n",
"msg_date": "Mon, 13 Nov 2000 18:16:39 +0100",
"msg_from": "[email protected]",
"msg_from_op": false,
"msg_subject": "RE: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "On Lun 13 Nov 2000 13:22, Robert D. Nelson wrote:\n>\n> Still...Regardless of what database they're running, either their\n> abstraction layer is shit or their queries really need optimized. Is that\n> perhaps why, even at 5 clients, the page views he shows never went\n> significantly above 10/sec?\n\nIn the article it was said that the querys were unoptimized to get the best \nout of the database. Tim said that with some changes to the querys they could \nhave gotten much better results.\n\nSaludos... :-)\n\n\n-- \n\"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n",
"msg_date": "Wed, 15 Nov 2000 09:14:18 -0300",
"msg_from": "\"Martin A. Marques\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "Speaking of MySQL, has anyone looked at www.mysql.org recently?\n\nThey have a big news article:\n\nMySQL wins Linux Journal Readers Choice Award again!\n For the third Year in a row MySQL won the Readers Choice Award in Linux\nJournal. Considering that MySQL earlier this fall won the Linux Magazine\nEditors Choice Award, reading magazines on the whole has been a very\nrewarding experience for MySQL fans lately.\n\nIf you follow their link to www.linuxjournal.com, all I can find is an\narticle about how _PostgreSQL_ won the Linux Magazine Editors Choice award!\nWhat's with that???\n\nChris\n\n> -----Original Message-----\n> From: [email protected]\n> [mailto:[email protected]]On Behalf Of Robert D. Nelson\n> Sent: Tuesday, November 14, 2000 12:22 AM\n> To: [email protected]; Michael Fork; Poul L.Christiansen\n> Cc: pgsql-general; pgsql-hackers\n> Subject: [HACKERS] RE: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n>\n>\n> >I made it all the way through the article. I'll summarize it for you:\n> >Postgres - hooray!\n> >MySQL - boo!\n>\n> Yeah, and that's about it. No analysis or anything. Disappointing, after\n> waiting so long for the pages to load.\n>\n> >Since this is an open source database article linked off of slashdot, I\n> >imagine they're getting pounded.\n>\n> Still...Regardless of what database they're running, either their\n> abstraction layer is shit or their queries really need optimized. Is that\n> perhaps why, even at 5 clients, the page views he shows never went\n> significantly above 10/sec?\n>\n>\n> Rob Nelson\n> [email protected]\n>\n\n",
"msg_date": "Tue, 21 Nov 2000 11:05:35 +0800",
"msg_from": "\"Christopher Kings-Lynne\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: [HACKERS] RE: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "At 11:22 AM 11/13/00 -0500, Robert D. Nelson wrote:\n\n>Still...Regardless of what database they're running, either their \n>abstraction layer is shit or their queries really need optimized. Is that \n>perhaps why, even at 5 clients, the page views he shows never went \n>significantly above 10/sec?\n\nThey don't appear to do any client-side query caching, which is understandable\nfrom one point of view (you need some sort of handle on which queries are\nhit frequently enough to warrant devoting RAM to caching the result, or else\nyou risk caching things that don't gain you much and cut down on the amount\nof the DB cached in RAM which hits you on other queries). On the other hand,\nyou'd think they'd do some analysis...\n\nStill, the table-locking of MySQL just gets in the way. If you can cache\neverything, then you can send a postal worker to the mailbox to retrieve\nuncached data without significantly impacting throughput (in other words,\nthe MySQL argument that simple select benchmarks are all you need are\nnot relevant). If you can't cache anything but have few users, then perhaps\nlow levels of concurrency don't hurt. If you don't cache anything but have\nlots of users, scaling well under high levels of load rule. \n\nMy thinking is that intellegent caching coupled with a highly-scalable\ndatabase wins. That's the world I'm used to...\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Mon, 20 Nov 2000 20:48:35 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] RE: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "At 06:16 PM 11/13/00 +0100, [email protected] wrote:\n>> Still...Regardless of what database they're running, either their \n>> abstraction layer is shit or their queries really need optimized. Is that \n>> perhaps why, even at 5 clients, the page views he shows never went \n>> significantly above 10/sec?\n>> \n>I think this could be because they used real killer pages in the test, \n>and maybe this also the reason PgSQL fared this good (I've always \n>been and I'm still a postgres fan, but looking at that results I've \n>been quite astonished!!). Have you looked the spec? If I remember \n>well, Tim was talking about executing cuncurrently a page that \n>joined a dozen tables and another that was doing \n>update/select/insert on the same tables. Under these condition, 10 \n>pages/sec it seems lighting to me!!!!\n\nBut much of this could still be cached. I visit my homepage at sourceforge\nrarely, because my project uses sourceforge for its cvs repository, only.\nSo all those joins are mostly a waste. I never have new postings in my\nproject forums, blah blah. Some level of caching could help (not for me\npersonally, I visit too rarely for a system to want to cache my query\nreturns involved in building my home page, but I'm sure there are many\ncases where caching would help).\n\nAgain, you have to balance query cache RAM consumption against the benefits\nof extra RAM availability to the RDBMS (assuming you have one, which\nMySQL isn't :) \n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Mon, 20 Nov 2000 20:51:36 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] RE: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "* Christopher Kings-Lynne in \"RE: [HACKERS] RE: [GENERAL] PHPBuilder\n* article -- Postgres vs MySQL\" dated 2000/11/21 11:05 wrote:\n\n> MySQL wins Linux Journal Readers Choice Award again! For the third\n> Year in a row MySQL won the Readers Choice Award in Linux Journal.\n> Considering that MySQL earlier this fall won the Linux Magazine\n> Editors Choice Award, reading magazines on the whole has been a very\n> rewarding experience for MySQL fans lately.\n> \n> If you follow their link to www.linuxjournal.com, all I can find is\n> an article about how _PostgreSQL_ won the Linux Magazine Editors\n> Choice award! What's with that???\n\nWell, it would seem that Postgres won the _Editor's_ [1] Choice Awards\nwhile MySQL won the _Reader's_ [2] Choice Awards\n\n-- \nhackers ally\n\n1. http://www2.linuxjournal.com/advertising/Press/2000ec_winners.html\n2. http://www2.linuxjournal.com/articles/misc/0029.html",
"msg_date": "Tue, 21 Nov 2000 01:47:25 -0600",
"msg_from": "Ashley Clark <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] RE: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": " I've wondered and am still wondering what a lot of these benchmark tests\nare out to prove. I'm not sure that any PostgreSQL advocate has ever said or\nimplied that PostgreSQL is faster than anything, much less MySQL. While I'm\nsure it's faster than some, I've just never heard the argument for using\nPostgreSQL as \"It's faster than anything else\". I chose PostgreSQL by what\nit could do, not how fast it can SELECT... No benchmark between MySQL and\nPostgreSQL (or any other RDBMS ) is ever going to be truly accurate since\nthere are so many things MySQL simply can't to that PostgreSQL (and others)\ncan..\n\n As Don often out often and accurately points out, MySQL is not an RDBMS,\nI'm not sure what it really is beyond a semi-fancy SQL interface to a file\nsystem.. Is it fast? Yes, it is pretty fast. Fast at the expense of\nfunctionality and stability -- two things that just aren't optional when\nyou're talking about a good database for anything more complicated than\nclick-through tracking...\n\n I don't dislike MySQL for any other reason except that it can't do what\nI need it to do, period... I'm sure it's good for some things and some\npeople, I've tried MySQL, tested MySQL and then tossed MySQL into the\ngarbage can...\n\n I found some very educational conversation here :\nhttp://openacs.org/philosophy/why-not-mysql.html courtesy of Don and others.\n\n-Mitch\n\n----- Original Message -----\nFrom: \"Don Baccus\" <[email protected]>\nTo: \"Robert D. Nelson\" <[email protected]>; <[email protected]>;\n\"Michael Fork\" <[email protected]>; \"Poul L.Christiansen\"\n<[email protected]>\nCc: \"pgsql-general\" <[email protected]>; \"pgsql-hackers\"\n<[email protected]>\nSent: Monday, November 20, 2000 8:48 PM\nSubject: Re: [HACKERS] RE: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n\n\n> At 11:22 AM 11/13/00 -0500, Robert D. Nelson wrote:\n>\n> >Still...Regardless of what database they're running, either their\n> >abstraction layer is shit or their queries really need optimized. Is that\n> >perhaps why, even at 5 clients, the page views he shows never went\n> >significantly above 10/sec?\n>\n> They don't appear to do any client-side query caching, which is\nunderstandable\n> from one point of view (you need some sort of handle on which queries are\n> hit frequently enough to warrant devoting RAM to caching the result, or\nelse\n> you risk caching things that don't gain you much and cut down on the\namount\n> of the DB cached in RAM which hits you on other queries). On the other\nhand,\n> you'd think they'd do some analysis...\n>\n> Still, the table-locking of MySQL just gets in the way. If you can cache\n> everything, then you can send a postal worker to the mailbox to retrieve\n> uncached data without significantly impacting throughput (in other words,\n> the MySQL argument that simple select benchmarks are all you need are\n> not relevant). If you can't cache anything but have few users, then\nperhaps\n> low levels of concurrency don't hurt. If you don't cache anything but\nhave\n> lots of users, scaling well under high levels of load rule.\n>\n> My thinking is that intellegent caching coupled with a highly-scalable\n> database wins. That's the world I'm used to...\n>\n>\n>\n> - Don Baccus, Portland OR <[email protected]>\n> Nature photos, on-line guides, Pacific Northwest\n> Rare Bird Alert Service and other goodies at\n> http://donb.photo.net.\n>\n\n",
"msg_date": "Mon, 20 Nov 2000 23:55:27 -0800",
"msg_from": "\"Mitch Vincent\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] RE: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "> I've wondered and am still wondering what a lot of these benchmark tests\n> are out to prove.\n\nIn this case, the \"benchmark test\" was not out to prove anything. It was\nan good-faith result of a porting effort with a suprising (to the\ntester) result.\n\n> I'm not sure that any PostgreSQL advocate has ever said or\n> implied that PostgreSQL is faster than anything, much less MySQL. While I'm\n> sure it's faster than some, I've just never heard the argument for using\n> PostgreSQL as \"It's faster than anything else\".\n\nVery true. But it turns out that in at least some real-world tests, in\nthis case a real application *built for MySQL*, PostgreSQL was\nsubstantially faster when the number of users climbed above a very small\nnumber. These results are consistant with and supported by GB's initial\npublished benchmark results.\n\nTwo separate styles of comparisons with consistant results might help\nsomeone choose the right solution for their application. No harm in\nthat, eh?\n\n> I chose PostgreSQL by what\n> it could do, not how fast it can SELECT... No benchmark between MySQL and\n> PostgreSQL (or any other RDBMS ) is ever going to be truly accurate since\n> there are so many things MySQL simply can't to that PostgreSQL (and others)\n> can..\n\nWell, that is another dimension to the evaluation/comparison. But the\ntesting results stand on their own: you *can* choose PostgreSQL for its\nperformance, and you *will* have made the right choice. This is\nespecially gratifying for all of us who have contributed to PostgreSQL\nbecause we *didn't* benchmark it, and *assumed* that MySQL claims for\nsuperior speed under all circumstances were accurate. Turns out it may\nbe true for single-user mode, but that we've built a darn fast RDBMS for\nreal-world applications.\n\nOne *very unfair* part of these benchmarks and comparisons is that both\nMySQL and PostgreSQL can be identified by name for the comparisons, so\nthey tend to be talked about the most. But the GB benchmarks could lead\none to conclude that if SourceForge had been built with another database\nproduct it would also have seen a performance improvement when tested\nwith PostgreSQL.\n\n - Thomas\n",
"msg_date": "Tue, 21 Nov 2000 14:14:57 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [GENERAL] PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "I'm building a new geo type and would like to index it. I have heard about\nRTREE and boundary box but I'm clueless for the moment about the\nimplementation....\n\nI have tried to look into PG source code to find the location where the\nindexing is done of current line object is done, but couldn't pin point where\nis the code and how it works.\n\nI would greatly appreciate if someone could guide me through the methodology to\nbuild an index for a custom type or point me to some readings where the\nalgorithm is explained (web, book, etc...). I plan to use 3D geographical\nobjects...\n\nTake this request as a newbie request, because I have never done database\nindexing, not because I haven't done programming.\n\nPlease reply directly to my e-mail address\nThanks a lot.\n\[email protected]\n\n",
"msg_date": "Sat, 25 Nov 2000 10:43:16 +1300",
"msg_from": "Franck Martin <[email protected]>",
"msg_from_op": false,
"msg_subject": "Indexing for geographic objects?"
},
{
"msg_contents": "Franck Martin <[email protected]> writes:\n> I would greatly appreciate if someone could guide me through the\n> methodology to build an index for a custom type or point me to some\n> readings where the algorithm is explained (web, book, etc...).\n\nThe Programmer's Guide chapter \"Interfacing Extensions To Indices\"\noutlines the procedure for making a new datatype indexable. It\nonly discusses the case of adding btree support for a new type,\nthough. For other index classes such as R-tree there are different\nsets of required operators, which are not as well documented but\nyou can find out by looking at code for the already-supported\ndatatypes.\n\n> I plan to use 3D geographical objects...\n\nThat's a bit hard since we don't have any indexes suitable for 3-D\ncoordinates --- the existing R-tree type is for 2-D objects. What's\nmore it assumes that coordinates are Euclidean, which is probably\nnot the model you want for geographical coordinates.\n\nIn theory you could build a new index type suitable for indexing\n3-D points, using the R-tree code as a starting point. I wouldn't\nclass it as a project suitable for a newbie however :-(.\n\nDepending on what your needs are, you might be able to get by with\nprojecting your objects into a flat 2-D coordinate system and using\nan R-tree index in that space. It'd just be approximate but that\nmight be close enough for index purposes.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 25 Nov 2000 23:35:40 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Indexing for geographic objects? "
}
]
|
[
{
"msg_contents": "Here's what I'm planning to do to make the world safe for backup/restore\nof user-added template1 data:\n\n1. pg_database will have two new boolean columns, dbistemplate and\n dballowconn --- if dballowconn is false then no new connections to that\n database will be accepted. (An even better solution would be to make\n a \"dbisreadonly\" attribute, but implementing such a thing would be a\n bigger change than I have time for now.)\n\n2. CREATE DATABASE will accept a new option \"TEMPLATE = name\", where the\n name is the name of an existing database to be cloned. To clone\n a database that isn't marked \"dbistemplate\" in pg_database, you must\n be superuser or owner of the source database. In any case, you can't\n clone a database that has any active connections other than your own\n (implementation restriction to ensure we don't copy inconsistent\n data from transactions-in-progress).\n\n3. initdb will create two identical databases named template0 and\n template1. Both will be marked dbistemplate, but only template1\n will be marked dballowconn.\n\n4. CREATE DATABASE will always create new databases with dbistemplate =\n false and dballowconn = true. Also, the lastsysoid will be copied\n from the source database.\n\n5. pg_dump should ignore objects with OID <= lastsysoid of the target\n database. pg_dumpall should ignore databases not marked dballowconn,\n and should save/restore the setting of dbistemplate. All databases\n created by a pg_dumpall script will be created WITH TEMPLATE template0.\n\nDiscussion:\n\ndbistemplate is intended to avoid hard-wiring any notion about which\ndatabase(s) can be the template for CREATE DATABASE. I started out\nintending to allow templates named \"templateSOMETHING\", but a flag\ncolumn seems a better idea.\n\ntemplate0 will be a real database, just not one you can connect to\n(unless you are so foolhardy as to flip its dballowconn bit ;-)).\nThis is to prevent people from changing it, accidentally or otherwise.\nWhat we really want is a read-only database, but implementing a\nrestriction like that looks like too much work for 7.1. I think that\na dballowconn flag might have other uses anyway, such as temporarily\ndisallowing new connections to a database you are doing major work in.\n\nlastsysoid will probably always be the same for all databases in an\ninstallation, since they'll all inherit the value from template0 or\ntemplate1. However, there is the possibility of changing it to exclude\nsome items from backup, so I'm continuing to treat it as a per-database\nvalue.\n\nWith this scheme, template1 is actually not special except for being\nthe default CREATE DATABASE template and the default connection target\nfor various scripts like createdb. You could drop it and recreate it\nfrom template0, if you were so inclined --- this could be a recovery\nmethod if template1 got messed up.\n\nComments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 11:48:49 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Details for planned template0/template1 change"
},
{
"msg_contents": "Tom Lane wrote:\n> 1. pg_database will have two new boolean columns, dbistemplate and\n> dballowconn --- if dballowconn is false then no new connections to that\n> database will be accepted. (An even better solution would be to make\n> a \"dbisreadonly\" attribute, but implementing such a thing would be a\n> bigger change than I have time for now.)\n\nI like the dballowconn, but an eventual dbreadonly might prove useful\nfor static data sources.\n \n> 2. CREATE DATABASE will accept a new option \"TEMPLATE = name\", where the\n> name is the name of an existing database to be cloned. To clone\n\nReasonable implementation.\n \n> 5. pg_dump should ignore objects with OID <= lastsysoid of the target\n> database. pg_dumpall should ignore databases not marked dballowconn,\n> and should save/restore the setting of dbistemplate. All databases\n> created by a pg_dumpall script will be created WITH TEMPLATE template0.\n\nFinally, a good backup of user data in template1. I've documented the\nfact that template1 data wasn't dumpable in the RPM README, as of last\nyear -- I'll be rather happy to remove that paragraph. :-) Since\nupgrading involves dump/restore, and the dump of template1 user data\ndidn't work, template1 data was unupgradeable.\n \n> dbistemplate is intended to avoid hard-wiring any notion about which\n> database(s) can be the template for CREATE DATABASE. I started out\n> intending to allow templates named \"templateSOMETHING\", but a flag\n> column seems a better idea.\n\nThe less that is hardwired, the better. That is, after all, part of the\nPostgres Paradigm.\n \n> restriction like that looks like too much work for 7.1. I think that\n> a dballowconn flag might have other uses anyway, such as temporarily\n> disallowing new connections to a database you are doing major work in.\n\nThis could potentially be a very useful feature -- I know of more than\none instance I could have used such (instead of stopping postmaster,\nthen restarting on another port in order to do major work of various\nsorts).\n \n> With this scheme, template1 is actually not special except for being\n> the default CREATE DATABASE template and the default connection target\n> for various scripts like createdb. You could drop it and recreate it\n> from template0, if you were so inclined --- this could be a recovery\n> method if template1 got messed up.\n\nThat is a great side-effect. Now, if there were a way to initdb just\ntemplate0, leaving everything else in place, then rebuilding template1\n-- of course, a similar ability is there now, but the two-stage initdb\nthis implies could make pg_upgrade work smoother, in cases where the\nsystem catalogs are the only change from one major version to the next.\n\nAll in all, sounds like you;ve done your homework again, Tom.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 13 Nov 2000 12:02:17 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change"
},
{
"msg_contents": "Lamar Owen <[email protected]> writes:\n> That is a great side-effect. Now, if there were a way to initdb just\n> template0, leaving everything else in place, then rebuilding template1\n> -- of course, a similar ability is there now, but the two-stage initdb\n> this implies could make pg_upgrade work smoother, in cases where the\n> system catalogs are the only change from one major version to the next.\n\nI'm missing something --- I don't see how this affects pg_upgrade one\nway or the other, except of course that it should be prepared to cope\nwith user data in template1 (not sure if it does or not now).\n\npg_upgrade won't be usable for the 7.1 transition anyway, because of WAL\nchanges (page header format is changing). I dunno whether it will be\nusable at all under WAL --- Vadim will have to comment on that.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 12:22:09 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "At 11:48 13/11/00 -0500, Tom Lane wrote:\n>\n>5. pg_dump should ignore objects with OID <= lastsysoid of the target\n> database.\n\nI think it should ignore objects with OID <= lastsysoid of template0; then\nwhen it does a restore, it should use 'WITH TEMPLATE template0'. At least\nthis should be an option.\n\n>I think that\n>a dballowconn flag might have other uses anyway, such as temporarily\n>disallowing new connections to a database you are doing major work in.\n\neg. while a restore script is running...\n\nBTW: are there any nice ways to:\n\n- set the flag\n- kick current users off without corrupting memory\n\n(ie. shutdown a single database).\n\n\n>lastsysoid will probably always be the same for all databases in an\n>installation, since they'll all inherit the value from template0 or\n>template1. However, there is the possibility of changing it to exclude\n>some items from backup, so I'm continuing to treat it as a per-database\n>value.\n\nSounds fine; but we need to use lastsysoid of template0 in pg_dump. Consider:\n\n- add function foo() to template1, OID=100000\n- create db1 (inherits foo())\n- update function foo() in template1, and also update it in db1. New OID >\n100000\n- dump db1 - will dump foo().\n- restore db1 using template1->crash\n\nHowever, dumping based oi lastsysoid of template0, then restoring based on\ntemplate0 works...\n\n\nOtherwise sounds good!\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Tue, 14 Nov 2000 04:28:04 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n>> 5. pg_dump should ignore objects with OID <= lastsysoid of the target\n>> database.\n\n> I think it should ignore objects with OID <= lastsysoid of template0; then\n> when it does a restore, it should use 'WITH TEMPLATE template0'.\n\nRestores will be with template template0 anyway, but it seems to me that\ndump should look to lastsysoid of the database being dumped (sorry if my\nterm \"target database\" confused you). I'm not sure whether there's any\nvalue in altering lastsysoid of individual databases to suppress dumping\nof some items therein, but it can't hurt to retain the flexibility.\n\n> BTW: are there any nice ways to:\n> (ie. shutdown a single database).\n\nNot at the moment.\n\n> Sounds fine; but we need to use lastsysoid of template0 in pg_dump. Consider:\n\n> - add function foo() to template1, OID=100000\n> - create db1 (inherits foo())\n> - update function foo() in template1, and also update it in db1. New OID >\n> 100000\n> - dump db1 - will dump foo().\n> - restore db1 using template1->crash\n\nNo, because you aren't ever going to restore db1 using template1 as\ntemplate. That's specifically what template0 is for.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 12:38:13 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "Tom Lane wrote:\n> Lamar Owen <[email protected]> writes:\n> > That is a great side-effect. Now, if there were a way to initdb just\n> > template0, leaving everything else in place, then rebuilding template1\n \n> I'm missing something --- I don't see how this affects pg_upgrade one\n> way or the other, except of course that it should be prepared to cope\n> with user data in template1 (not sure if it does or not now).\n\nMaybe I spoke too soon....\n \n> pg_upgrade won't be usable for the 7.1 transition anyway, because of WAL\n> changes (page header format is changing). I dunno whether it will be\n> usable at all under WAL --- Vadim will have to comment on that.\n\nOf course, the upgrade from 7.0 to 7.1 involves a physical on disk\nformat change (implying pg_upgrade's uselessness in doing its job\nthere). You know, our version numbers aren't at all consistent WRT disk\nformat. ISTM that 6.5 should have been 7.0 due to its format change,\nand 7.1 should be 8.0.\n\nChanging from 6.5 to 7.0 is less of a format change than 6.4 to 6.5 or\n7.0 to 7.1.\n\nBut, what's in a version number.... :-) They don't _have_ to be\nconsistent, really.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 13 Nov 2000 12:40:54 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change"
},
{
"msg_contents": "At 12:38 13/11/00 -0500, Tom Lane wrote:\n>>\n>> I think it should ignore objects with OID <= lastsysoid of template0; then\n>> when it does a restore, it should use 'WITH TEMPLATE template0'.\n>\n>Restores will be with template template0 anyway, but it seems to me that\n>dump should look to lastsysoid of the database being dumped\n\nI may have been a little unclear in my message (it was late), or I may have\nmisundertsood your response (it's now a little early), but I don't think\nthis will work; dump & restore must use the same baseline, and I think that\nhas to be template0.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Tue, 14 Nov 2000 10:28:01 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "I've committed the template0/template1 changes we were discussing\nearlier. Plain pg_dump and pg_dumpall are changed to behave properly,\nbut I didn't touch pg_backup or pg_restore; can you deal with those?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 13:39:40 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "At 13:39 14/11/00 -0500, Tom Lane wrote:\n>I've committed the template0/template1 changes we were discussing\n>earlier. Plain pg_dump and pg_dumpall are changed to behave properly,\n>but I didn't touch pg_backup or pg_restore; can you deal with those?\n\nThere's no such think as pg_backup, but pg_restore should work if pg_dump\nis working. I'll have a look...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Wed, 15 Nov 2000 09:34:50 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change "
}
]
|
[
{
"msg_contents": "This's great. I have tested Postgres and MySQL with the benchmark\nshipped with mysql and (of course) MySQL out perform Postgres.\n\nI wonder does anyone know where can we download the ANSI SQL benchmark\n(AN3AP) suite? I'd like to run this benchmark test myself, since this\nis the only benchmark I have read so far that Postgres out perform\nMySQL.\n\nThanx in advance.\n\n>\n> Did someone read bout this?\n>\n> http://www.angelfire.com/nv/aldev/pgsql/GreatBridge.html\n>\n\n\n--\nLimin Liu\n\n\n\n\nThis's great. I have tested Postgres and MySQL with the benchmark\nshipped with mysql and (of course) MySQL out perform Postgres.\nI wonder does anyone know where can we download the ANSI SQL benchmark\n(AN3AP) suite? I'd like to run this benchmark test myself, since\nthis is the only benchmark I have read so far that Postgres out perform\nMySQL.\nThanx in advance.\n>\n> Did someone read bout this?\n>\n> http://www.angelfire.com/nv/aldev/pgsql/GreatBridge.html\n>\n \n-- \nLimin Liu",
"msg_date": "Mon, 13 Nov 2000 10:24:21 -0800",
"msg_from": "Limin Liu <[email protected]>",
"msg_from_op": true,
"msg_subject": "(download ANSI SQL benchmark?) Re: Postgres article"
},
{
"msg_contents": "(bcc to -hackers)\n\nThe Benchmark Factory software, recently acquired by Quest Software,\ncan be downloaded for a 30-day trial (limited # of users) at:\n\nhttp://www.benchmarkfactory.com/emaildatabase/FormBenchmarkFactoryTrial.asp?product=BenchmarkFactory\n\n(note long URL above might have wrapped)\n\nThat's the package we used - also the one that eWeek (formerly\nPCWeek) and other trade magazines use. See\nhttp://www.greatbridge.com/about/press.php?content_id=4 for more\ninfo on how we conducted the test.\n\nRegards,\nNed\n\nLimin Liu wrote:\n\n> This's great. I have tested Postgres and MySQL with the benchmark\n> shipped with mysql and (of course) MySQL out perform Postgres.\n>\n> I wonder does anyone know where can we download the ANSI SQL\n> benchmark (AN3AP) suite? I'd like to run this benchmark test\n> myself, since this is the only benchmark I have read so far that\n> Postgres out perform MySQL.\n>\n> Thanx in advance.\n>\n> >\n> > Did someone read bout this?\n> >\n> > http://www.angelfire.com/nv/aldev/pgsql/GreatBridge.html\n> >\n>\n>\n> --\n> Limin Liu\n>\n>\n\n",
"msg_date": "Mon, 20 Nov 2000 22:35:40 -0500",
"msg_from": "Ned Lilly <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] (download ANSI SQL benchmark?) Re: Postgres article"
},
{
"msg_contents": "",
"msg_date": "Mon, 20 Nov 2000 20:56:17 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] (download ANSI SQL benchmark?) Re: Postgres\n article"
},
{
"msg_contents": "Don Baccus writes:\n > I also hope that the PG crew, and Great Bridge, never stoop so low\n > as to ship benchmarks wired to \"prove\" PG's superiority.\n\nI thought that Great Bridge's August benchmarks were rather skewed.\nThey only used one particular test from the AS3AP suite. That was the\nbasis for their headline figure of 4-5 times the performance of the\ncompetition.\n\nI was however impressed by the TPC-C results. MySQL and Interbase\nwere unable to complete them. PostgreSQL showed almost identical\nperformance over a range of loads to Proprietary 1 (version 8.1.5, on\nLinux) and Proprietary 2 (version 7.0, on NT).\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWestern Geophysical -./\\.- by myself and does not represent\[email protected] -./\\.- the opinion of Baker Hughes or\nhttp://www.crosswinds.net/~petef -./\\.- its divisions.\n",
"msg_date": "Tue, 21 Nov 2000 10:19:53 +0000 (GMT)",
"msg_from": "Pete Forman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: (download ANSI SQL benchmark?) Re: Postgres\n article"
},
{
"msg_contents": "At 10:19 AM 11/21/00 +0000, Pete Forman wrote:\n>Don Baccus writes:\n> > I also hope that the PG crew, and Great Bridge, never stoop so low\n> > as to ship benchmarks wired to \"prove\" PG's superiority.\n>\n>I thought that Great Bridge's August benchmarks were rather skewed.\n>They only used one particular test from the AS3AP suite. That was the\n>basis for their headline figure of 4-5 times the performance of the\n>competition.\n>\n>I was however impressed by the TPC-C results. MySQL and Interbase\n>were unable to complete them. PostgreSQL showed almost identical\n>performance over a range of loads to Proprietary 1 (version 8.1.5, on\n>Linux) and Proprietary 2 (version 7.0, on NT).\n\nGreat Bridge didn't do the benchmarking, they hired a third party to\ndo so. And that third party didn't, AFAIK, cherry-pick tests in order\nto \"prove\" PG's superiority.\n\nThe report itself mentioned the testing group's surprise over MySQL's\npoor showing in the simple, non-TPC-C test. I'm sure it was tossed\nin so they could answer the question \"how much does it cost you to\nuse a transaction-based system rather than MySQL\", since avoiding that\noverhead is the big argument that the MySQL makes in favor of their\nproduct. I'm sure the hope was there that the answer would be \"not all\nthat much\", instead the answer was \"gee, you're not that fast after\nall\".\n\nClearly the real target of the benchmark effort was Oracle. However\ninadequate the benchmarking effort might've been (they're all inadequate,\nafter all) the fact is that Great Bridge at least did run a set of\nstandard benchmarks.\n\nThe MySQL folk have always cherry-picked their benchmarks, long lied\nabout features in PG, do their benchmarking using default values\nfor PG's shared buffer etc WITHOUT TELLING PEOPLE while at the same\ntime installing MySQL with larger-than-default memory usage limits (the\ngroup hired by GB used MySQL's default installation, but EXPLICITLY SAID\nSO in the report), etc.\n\nThe GB-financed benchmarks weren't perfect, but they weren't dishonest.\nThe MySQL folks have done things over the years that have been out-and-out\ndishonest, IMO.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Tue, 21 Nov 2000 06:33:35 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: (download ANSI SQL benchmark?) Re: Postgres\n article"
},
{
"msg_contents": "Pete Forman <[email protected]> writes:\n> I thought that Great Bridge's August benchmarks were rather skewed.\n> They only used one particular test from the AS3AP suite.\n\nAFAIK there was nothing particularly sinister about that --- they\ndidn't have time to run a large number of different tests, so they\nchose ones that seemed most important. They certainly didn't try\na bunch of tests and then publish only the most favorable; the two\ntests used were selected at the beginning of the project, before\nanyone knew what the results would look like.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 21 Nov 2000 10:29:06 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] (download ANSI SQL benchmark?) Re: Postgres article "
},
{
"msg_contents": "Don Baccus <[email protected]> writes:\n> Great Bridge didn't do the benchmarking, they hired a third party to\n> do so. And that third party didn't, AFAIK, cherry-pick tests in order\n> to \"prove\" PG's superiority.\n\nIn fairness, the third party was Xperts Inc, who have long done a lot\nof programming-related work for Landmark Communications; so there's a\npretty close working relationship, it's not exactly arms-length.\n\nI think what may be more worth noting is that that benchmarking project\nwas started as part of Landmark's \"due diligence\" investigation while\ndeciding whether they wanted to bet a company on Postgres. They didn't\ngo into it with the notion of proving Postgres superior; they went into\nit to find out if they were betting on a dog. They were very pleasantly\nsurprised (as was the core group, when we first saw the results!).\nNaturally, their marketing guys said \"hey, let's clean this up and\npublish it\". There's a certain amount of after-the-fact selection here,\nsince you'd certainly never have seen the results if they hadn't been\nfavorable to Postgres; but there was no attempt to skew the results in\nPostgres' favor. If anything, the opposite.\n\n> The MySQL folk have always cherry-picked their benchmarks, long lied\n> about features in PG, do their benchmarking using default values\n> for PG's shared buffer etc WITHOUT TELLING PEOPLE while at the same\n> time installing MySQL with larger-than-default memory usage limits (the\n> group hired by GB used MySQL's default installation, but EXPLICITLY SAID\n> SO in the report), etc.\n\nThe revised results that are on GB's site now include curves for MySQL\n*with* tuning per advice from the MySQL folk.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 21 Nov 2000 10:58:35 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] (download ANSI SQL benchmark?) Re: Postgres article "
},
{
"msg_contents": "At 10:58 AM 11/21/00 -0500, Tom Lane wrote:\n\n>> The MySQL folk have always cherry-picked their benchmarks, long lied\n>> about features in PG, do their benchmarking using default values\n>> for PG's shared buffer etc WITHOUT TELLING PEOPLE while at the same\n>> time installing MySQL with larger-than-default memory usage limits (the\n>> group hired by GB used MySQL's default installation, but EXPLICITLY SAID\n>> SO in the report), etc.\n>\n>The revised results that are on GB's site now include curves for MySQL\n>*with* tuning per advice from the MySQL folk.\n\nThat's good. Have the MySQL folk made any effort to reciprocate?\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Tue, 21 Nov 2000 09:51:54 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: (download ANSI SQL benchmark?) Re: Postgres\n article"
}
]
|
[
{
"msg_contents": "ISTM that\n\n SET SESSION CHARACTERISTICS parameter value\n\nis really a more SQL'ish form of the current\n\n SET parameter =/TO value\n\nPerhaps they should be made equivalent, in order to avoid too many subtly\ndifferent subversions of the 'SET' command.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Mon, 13 Nov 2000 22:29:13 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": true,
"msg_subject": "SET SESSION CHARACTERISTICS"
}
]
|
[
{
"msg_contents": " Date: Monday, November 13, 2000 @ 16:31:47\nAuthor: momjian\n\nUpdate of /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq\n from hub.org:/home/projects/pgsql/tmp/cvs-serv56413/pgsql/src/backend/libpq\n\nModified Files:\n\tpqcomm.c \n\n----------------------------- Log Message -----------------------------\n\nFix for no hterror().\n\n",
"msg_date": "Mon, 13 Nov 2000 16:31:47 -0500 (EST)",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "pgsql/src/backend/libpq (pqcomm.c)"
},
{
"msg_contents": "You need to remove it from src/backend/postmaster/postmaster.c as\nwell......\n\n\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o guc.o guc.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o guc-file.o guc-file.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o ps_status.o ps_status.c\n/usr/bin/ld -r -o SUBSYS.o database.o superuser.o guc.o guc-file.o ps_status.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/misc'\ngmake -C mmgr SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/mmgr'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o aset.o aset.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o mcxt.o mcxt.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o portalmem.o portalmem.c\n/usr/bin/ld -r -o SUBSYS.o aset.o mcxt.o portalmem.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/mmgr'\ngmake -C sort SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/sort'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o logtape.o logtape.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o tuplesort.o tuplesort.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o tuplestore.o tuplestore.c\n/usr/bin/ld -r -o SUBSYS.o logtape.o tuplesort.o tuplestore.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/sort'\ngmake -C time SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/time'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o tqual.o tqual.c\n/usr/bin/ld -r -o SUBSYS.o tqual.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/time'\ngmake -C mb SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/mb'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o common.o common.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o conv.o conv.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o mbutils.o mbutils.c\nUX:acomp: WARNING: \"mbutils.c\", line 139: argument #1 incompatible with prototype: strlen()\nUX:acomp: WARNING: \"mbutils.c\", line 178: argument #1 incompatible with prototype: strlen()\nUX:acomp: WARNING: \"mbutils.c\", line 195: argument #1 incompatible with prototype: strlen()\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o wchar.o wchar.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o wstrcmp.o wstrcmp.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o wstrncmp.o wstrncmp.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o big5.o big5.c\n/usr/bin/ld -r -o SUBSYS.o common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o big5.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/mb'\n/usr/bin/ld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBSYS.o mmgr/SUBSYS.o sort/SUBSYS.o time/SUBSYS.o mb/SUBSYS.o\ngmake[3]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils'\ncc -O -K inline -o postgres access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -L/usr/local/lib -lz -lgen -lld -lnsl -lsocket -ldl -lm -lreadline -ltermcap -lcurses -Wl,-R/home/ler/pg-test/lib -Wl,-Bexport\nUndefined\t\t\tfirst referenced\nsymbol \t\t\t in file\nhstrerror postmaster/SUBSYS.o\nUX:ld: ERROR: Symbol referencing errors. No output written to postgres\ngmake[2]: *** [postgres] Error 1\ngmake[2]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend'\ngmake[1]: *** [all] Error 2\ngmake[1]: Leaving directory `/home/ler/pg-dev/pgsql/src'\ngmake: *** [all] Error 2\n* [email protected] <[email protected]> [001113 15:35]:\n> Date: Monday, November 13, 2000 @ 16:31:47\n> Author: momjian\n> \n> Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq\n> from hub.org:/home/projects/pgsql/tmp/cvs-serv56413/pgsql/src/backend/libpq\n> \n> Modified Files:\n> \tpqcomm.c \n> \n> ----------------------------- Log Message -----------------------------\n> \n> Fix for no hterror().\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Mon, 13 Nov 2000 16:12:06 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgsql/src/backend/libpq (pqcomm.c)"
},
{
"msg_contents": "OK, working on it now.\n\nThanks.\n\n\n> You need to remove it from src/backend/postmaster/postmaster.c as\n> well......\n> \n> \n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o guc.o guc.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o guc-file.o guc-file.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o ps_status.o ps_status.c\n> /usr/bin/ld -r -o SUBSYS.o database.o superuser.o guc.o guc-file.o ps_status.o\n> gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/misc'\n> gmake -C mmgr SUBSYS.o\n> gmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/mmgr'\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o aset.o aset.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o mcxt.o mcxt.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o portalmem.o portalmem.c\n> /usr/bin/ld -r -o SUBSYS.o aset.o mcxt.o portalmem.o\n> gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/mmgr'\n> gmake -C sort SUBSYS.o\n> gmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/sort'\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o logtape.o logtape.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o tuplesort.o tuplesort.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o tuplestore.o tuplestore.c\n> /usr/bin/ld -r -o SUBSYS.o logtape.o tuplesort.o tuplestore.o\n> gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/sort'\n> gmake -C time SUBSYS.o\n> gmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/time'\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o tqual.o tqual.c\n> /usr/bin/ld -r -o SUBSYS.o tqual.o\n> gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/time'\n> gmake -C mb SUBSYS.o\n> gmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/mb'\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o common.o common.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o conv.o conv.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o mbutils.o mbutils.c\n> UX:acomp: WARNING: \"mbutils.c\", line 139: argument #1 incompatible with prototype: strlen()\n> UX:acomp: WARNING: \"mbutils.c\", line 178: argument #1 incompatible with prototype: strlen()\n> UX:acomp: WARNING: \"mbutils.c\", line 195: argument #1 incompatible with prototype: strlen()\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o wchar.o wchar.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o wstrcmp.o wstrcmp.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o wstrncmp.o wstrncmp.c\n> cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o big5.o big5.c\n> /usr/bin/ld -r -o SUBSYS.o common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o big5.o\n> gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/mb'\n> /usr/bin/ld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBSYS.o mmgr/SUBSYS.o sort/SUBSYS.o time/SUBSYS.o mb/SUBSYS.o\n> gmake[3]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils'\n> cc -O -K inline -o postgres access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -L/usr/local/lib -lz -lgen -lld -lnsl -lsocket -ldl -lm -lreadline -ltermcap -lcurses -Wl,-R/home/ler/pg-test/lib -Wl,-Bexport\n> Undefined\t\t\tfirst referenced\n> symbol \t\t\t in file\n> hstrerror postmaster/SUBSYS.o\n> UX:ld: ERROR: Symbol referencing errors. No output written to postgres\n> gmake[2]: *** [postgres] Error 1\n> gmake[2]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend'\n> gmake[1]: *** [all] Error 2\n> gmake[1]: Leaving directory `/home/ler/pg-dev/pgsql/src'\n> gmake: *** [all] Error 2\n> * [email protected] <[email protected]> [001113 15:35]:\n> > Date: Monday, November 13, 2000 @ 16:31:47\n> > Author: momjian\n> > \n> > Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq\n> > from hub.org:/home/projects/pgsql/tmp/cvs-serv56413/pgsql/src/backend/libpq\n> > \n> > Modified Files:\n> > \tpqcomm.c \n> > \n> > ----------------------------- Log Message -----------------------------\n> > \n> > Fix for no hterror().\n> \n> -- \n> Larry Rosenman http://www.lerctr.org/~ler\n> Phone: +1 972-414-9812 (voice) Internet: [email protected]\n> US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Mon, 13 Nov 2000 17:15:57 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pgsql/src/backend/libpq (pqcomm.c)"
}
]
|
[
{
"msg_contents": "Are the @postgresql.org addresses supposed to work?\n\n\n\n-----Original Message-----\nFrom: Mail Delivery Subsystem [mailto:[email protected]]\nSent: Monday, November 13, 2000 4:13 PM\nTo: [email protected]\nSubject: Returned mail: see transcript for details\n\n\nThe original message was received at Mon, 13 Nov 2000 17:13:15 -0500 (EST)\nfrom lerami.lerctr.org [207.158.72.11]\n\n ----- The following addresses had permanent fatal errors -----\n<[email protected]>\n (reason: 550 5.1.1 User unknown)\n\n ----- Transcript of session follows -----\nMessage delivered to mailing list <[email protected]>\nMessage delivered to mailing list <[email protected]>\n... while talking to localhost:\n>>> RCPT To:<momjian>\n<<< 550 5.1.1 User unknown\n550 5.1.1 <[email protected]>... User unknown\n\n\nYou need to remove it from src/backend/postmaster/postmaster.c as\nwell......\n\n\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o guc.o\nguc.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nguc-file.o guc-file.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nps_status.o ps_status.c\n/usr/bin/ld -r -o SUBSYS.o database.o superuser.o guc.o guc-file.o\nps_status.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/misc'\ngmake -C mmgr SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/mmgr'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o aset.o\naset.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o mcxt.o\nmcxt.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nportalmem.o portalmem.c\n/usr/bin/ld -r -o SUBSYS.o aset.o mcxt.o portalmem.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/mmgr'\ngmake -C sort SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/sort'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nlogtape.o logtape.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\ntuplesort.o tuplesort.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\ntuplestore.o tuplestore.c\n/usr/bin/ld -r -o SUBSYS.o logtape.o tuplesort.o tuplestore.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/sort'\ngmake -C time SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/time'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\ntqual.o tqual.c\n/usr/bin/ld -r -o SUBSYS.o tqual.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/time'\ngmake -C mb SUBSYS.o\ngmake[4]: Entering directory `/home/ler/pg-dev/pgsql/src/backend/utils/mb'\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\ncommon.o common.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o conv.o\nconv.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nmbutils.o mbutils.c\nUX:acomp: WARNING: \"mbutils.c\", line 139: argument #1 incompatible with\nprototype: strlen()\nUX:acomp: WARNING: \"mbutils.c\", line 178: argument #1 incompatible with\nprototype: strlen()\nUX:acomp: WARNING: \"mbutils.c\", line 195: argument #1 incompatible with\nprototype: strlen()\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nwchar.o wchar.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nwstrcmp.o wstrcmp.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o\nwstrncmp.o wstrncmp.c\ncc -O -K inline -I/usr/local/include -I../../../../src/include -c -o big5.o\nbig5.c\n/usr/bin/ld -r -o SUBSYS.o common.o conv.o mbutils.o wchar.o wstrcmp.o\nwstrncmp.o big5.o\ngmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/mb'\n/usr/bin/ld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o\nerror/SUBSYS.o fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o misc/SUBSYS.o\nmmgr/SUBSYS.o sort/SUBSYS.o time/SUBSYS.o mb/SUBSYS.o\ngmake[3]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils'\ncc -O -K inline -o postgres access/SUBSYS.o bootstrap/SUBSYS.o\ncatalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o\nlib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o\nport/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o\nstorage/SUBSYS.o tcop/SUBSYS.o\nutils/SUBSYS.o -L/usr/local/lib -lz -lgen -lld -lnsl -lsocket -ldl -lm -lrea\ndline -ltermcap -lcurses -Wl,-R/home/ler/pg-test/lib -Wl,-Bexport\nUndefined\t\t\tfirst referenced\nsymbol \t\t\t in file\nhstrerror postmaster/SUBSYS.o\nUX:ld: ERROR: Symbol referencing errors. No output written to postgres\ngmake[2]: *** [postgres] Error 1\ngmake[2]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend'\ngmake[1]: *** [all] Error 2\ngmake[1]: Leaving directory `/home/ler/pg-dev/pgsql/src'\ngmake: *** [all] Error 2\n* [email protected] <[email protected]> [001113 15:35]:\n> Date: Monday, November 13, 2000 @ 16:31:47\n> Author: momjian\n>\n> Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/libpq\n> from\nhub.org:/home/projects/pgsql/tmp/cvs-serv56413/pgsql/src/backend/libpq\n>\n> Modified Files:\n> \tpqcomm.c\n>\n> ----------------------------- Log Message -----------------------------\n>\n> Fix for no hterror().\n\n--\nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749",
"msg_date": "Mon, 13 Nov 2000 16:13:32 -0600",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "FW: Returned mail: see transcript for details"
},
{
"msg_contents": "\nfixed, let mek now if there are any others I've missed ...\n\nOn Mon, 13 Nov 2000, Larry Rosenman wrote:\n\n> Are the @postgresql.org addresses supposed to work?\n> \n> \n> \n> -----Original Message-----\n> From: Mail Delivery Subsystem [mailto:[email protected]]\n> Sent: Monday, November 13, 2000 4:13 PM\n> To: [email protected]\n> Subject: Returned mail: see transcript for details\n> \n> \n> The original message was received at Mon, 13 Nov 2000 17:13:15 -0500 (EST)\n> from lerami.lerctr.org [207.158.72.11]\n> \n> ----- The following addresses had permanent fatal errors -----\n> <[email protected]>\n> (reason: 550 5.1.1 User unknown)\n> \n> ----- Transcript of session follows -----\n> Message delivered to mailing list <[email protected]>\n> Message delivered to mailing list <[email protected]>\n> ... while talking to localhost:\n> >>> RCPT To:<momjian>\n> <<< 550 5.1.1 User unknown\n> 550 5.1.1 <[email protected]>... User unknown\n> \n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n",
"msg_date": "Tue, 14 Nov 2000 03:12:19 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: FW: Returned mail: see transcript for details"
}
]
|
[
{
"msg_contents": "I've got the multiple-template-database feature nearly ready to commit,\nbut I was just noticing that the way we handle default MB encoding\nselection seems wrong for this way of looking at things. Currently,\nif you don't specify \"ENCODING = something\" in CREATE DATABASE, the\ndefault is to use the encoding that applies to the database you're\ncurrently connected to. Seems to me that it'd make more sense to\ndefault to the encoding used by the DB you're copying. Comments?\n\n(Of course, there'd be no difference for the common case where you\nconnect to template1 and then clone template1.)\n\nIt's actually a little worrisome that we even allow selection of\nencoding during CREATE DATABASE. If template1 (or any other source\ndatabase) contains non-ASCII data such as table or field names,\nthen the indexes on the system catalogs aren't necessarily in the\nright order for a different encoding. You could get into big trouble\nby carelessly asking for a different encoding during CREATE DATABASE.\nI don't quite want to prohibit it, since usually template1 doesn't\ncontain any non-ASCII data. But this certainly seems like a good reason\nfor making the default behavior be to copy the encoding of the database\nyou're copying.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 13 Nov 2000 23:31:27 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Shouldn't default multibyte encoding come from template database?"
},
{
"msg_contents": "At 23:31 13/11/00 -0500, Tom Lane wrote:\n>Seems to me that it'd make more sense to\n>default to the encoding used by the DB you're copying. Comments?\n\nDefinitely. Especially when/if people start using 'WITH TEMPLATE' for more\ndatabases.\n\n\n>It's actually a little worrisome that we even allow selection of\n>encoding during CREATE DATABASE. If template1 (or any other source\n>database) contains non-ASCII data\n\nIt is probably woth issuing a NOTICE or WARNING when the requested encoding\nis different to the template.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Tue, 14 Nov 2000 15:57:50 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Shouldn't default multibyte encoding come from template database?"
},
{
"msg_contents": "Tom Lane writes:\n\n> I've got the multiple-template-database feature nearly ready to commit,\n> but I was just noticing that the way we handle default MB encoding\n> selection seems wrong for this way of looking at things. Currently,\n> if you don't specify \"ENCODING = something\" in CREATE DATABASE, the\n> default is to use the encoding that applies to the database you're\n> currently connected to.\n\nHow so?\n\n | CREATE DATABASE database_name\n {\n CreatedbStmt *n = makeNode(CreatedbStmt);\n n->dbname = $3;\n n->dbpath = NULL;\n n->encoding = GetTemplateEncoding();\n $$ = (Node *)n;\n }\n\nOr does GetTemplateEncoding() not get the template encoding?\n\nIn any case, it should, because that's how it used to work and how it's\ndocumented.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Tue, 14 Nov 2000 07:28:30 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Shouldn't default multibyte encoding come from template database?"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> How so?\n> Or does GetTemplateEncoding() not get the template encoding?\n\nGetTemplateEncoding gets the current DB's encoding. I think that\nmay have been because of a hack replacing a kluge ;-) ... but that's\nhow it works now.\n\nAssuming that it did once produce template1's encoding, that would\nseem to be further evidence in favor of my proposal to copy the\nsource (template) database's encoding.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 02:23:43 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Shouldn't default multibyte encoding come from template database?"
}
]
|
[
{
"msg_contents": "Hi all,\n\nI have a question about CleanupProc() and reaper().\nCleanupProc() sends SIGUSR1 signal to all backends\nif the exitStatus parameter is not 0.\nCould we expect that other backends die with non\nzero exit status ? Seems CheckPoint process could\nbe invoked after CleanupProc() is called and it\nwould remain alive unless SIGUSR1 is sent to the\nprocess. The reset_shared() isn't called and so\nthe CheckPoint process may be blocked by spinlock/\nBufferLock etc...\n\nRegards.\nHiroshi Inoue\n",
"msg_date": "Tue, 14 Nov 2000 14:38:57 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": true,
"msg_subject": "Question about CleanupProc()"
}
]
|
[
{
"msg_contents": "Hi\n\nI fixed a few bugs caused by SearchSysCacheTuple()\nrecently. There seems to remain more similar bugs.\nThey are ill-natured and so we seem to have to \navoid such bugs by some means. The simplest way is\nto call SearchSysCacheTupleCopy() instead of Search\nSysCacheTuple(). I've thought another (debugging)\nmechanism but it would be much harder.\n\nComments ?\n\nRegargs.\nHiroshi Inoue\n",
"msg_date": "Tue, 14 Nov 2000 14:51:25 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": true,
"msg_subject": "SearchSysCacheTuple(Copy)"
},
{
"msg_contents": "Hiroshi Inoue <[email protected]> writes:\n> I fixed a few bugs caused by SearchSysCacheTuple()\n> recently. There seems to remain more similar bugs.\n\nYes, I'm sure there are a lot :-(. We have talked about solving this\nby using some form of reference-counting in the cache, but I don't\nbelieve anyone's put forward a complete proposal. See for example\nthe pghackers thread \"Another nasty cache problem\" around 30-Jan-2000.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 00:59:19 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: SearchSysCacheTuple(Copy) "
},
{
"msg_contents": "Tom Lane wrote:\n\n> Hiroshi Inoue <[email protected]> writes:\n> > I fixed a few bugs caused by SearchSysCacheTuple()\n> > recently. There seems to remain more similar bugs.\n>\n> Yes, I'm sure there are a lot :-(. We have talked about solving this\n> by using some form of reference-counting in the cache, but I don't\n> believe anyone's put forward a complete proposal. See for example\n> the pghackers thread \"Another nasty cache problem\" around 30-Jan-2000.\n>\n\nThose bugs are pretty serious.\nSometimes they caused ERROR with strange messags.\nSometimes database-wide restart has been caused\nby segmentation fault error. Database-wide restart\nis pretty serious for any dbms.\nAnd possibly they might have done the wrong thing\nsilently.\nIsn't it practical to replace all susipicious Search\nSysCacheTuple() by SearchSysCacheTupleCopy() ?\n\nRegards.\nHiroshi Inoue\n\n",
"msg_date": "Tue, 14 Nov 2000 16:26:52 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: SearchSysCacheTuple(Copy)"
},
{
"msg_contents": "Hiroshi Inoue <[email protected]> writes:\n> Isn't it practical to replace all susipicious Search\n> SysCacheTuple() by SearchSysCacheTupleCopy() ?\n\nThat would replace a rare failure condition by a not-at-all-rare\nmemory leak. I'm not sure there'd be a net gain in reliability :-(\n\nA more serious objection to SearchSysCacheTupleCopy is that once the\ntuple is copied out of the syscache, there isn't any mechanism to\ndetect whether it's still valid. If an SI message arrives for a\nrecently-copied tuple, we have no way to know if we have a problem\nor not.\n\nI think that the right fix is to add reference counts to syscache\nentries. This has been on my todo list for awhile, but hasn't got\nto the top yet...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 02:35:44 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: SearchSysCacheTuple(Copy) "
},
{
"msg_contents": "Tom Lane wrote:\n\n> Hiroshi Inoue <[email protected]> writes:\n> > Isn't it practical to replace all susipicious Search\n> > SysCacheTuple() by SearchSysCacheTupleCopy() ?\n>\n> That would replace a rare failure condition by a not-at-all-rare\n> memory leak. I'm not sure there'd be a net gain in reliability :-(\n\n> A more serious objection to SearchSysCacheTupleCopy is that once the\n> tuple is copied out of the syscache, there isn't any mechanism to\n> detect whether it's still valid. If an SI message arrives for a\n> recently-copied tuple, we have no way to know if we have a problem\n> or not.\n>\n\nIs it more serious than doing the wrong thing silently ?\nIs it more serious than forcing database restart ?\nWe couldn't handle SI messages immediately.\nCache machanism couldn't gurantee the validty of\ntuples without some locking mechanism in the first\nplace.\n\nRegards.\nHiroshi Inoue\n\n",
"msg_date": "Tue, 14 Nov 2000 17:24:22 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: SearchSysCacheTuple(Copy)"
},
{
"msg_contents": "Hiroshi Inoue <[email protected]> writes:\n>> A more serious objection to SearchSysCacheTupleCopy is that once the\n>> tuple is copied out of the syscache, there isn't any mechanism to\n>> detect whether it's still valid. If an SI message arrives for a\n>> recently-copied tuple, we have no way to know if we have a problem\n>> or not.\n\n> Is it more serious than doing the wrong thing silently ?\n\nIt'd still be doing the wrong thing silently, in my opinion.\n\nThis class of bugs has been there since the beginning of Postgres,\nso I do not feel that we need to panic about it. Let's take the\ntime to design and implement a proper solution, rather than expending\neffort on a stopgap solution that'll have to be undone later.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 10:39:06 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: SearchSysCacheTuple(Copy) "
},
{
"msg_contents": "I said:\n> This class of bugs has been there since the beginning of Postgres,\n> so I do not feel that we need to panic about it. Let's take the\n> time to design and implement a proper solution, rather than expending\n> effort on a stopgap solution that'll have to be undone later.\n\nI've reviewed the earlier threads on SearchSysCache and done some more\nthinking. Here is a concrete proposal for doing it right:\n\n1. Add a reference-count field and an already-dead boolean to each\n syscache entry. (The already-dead flag indicates that we received\n an SI inval message for this tuple, but we couldn't delete it yet\n because it has refcount > 0. A tuple with this flag set will never\n be returned by a new SearchSysCache call, and it will be deleted\n from the cache as soon as its refcount goes to zero.)\n\n2. SearchSysCache() will increment the reference count of the tuple\n it returns.\n\n3. A new entry point ReleaseSysCache() will be provided to decrement\n the reference count of a syscache entry. Thus, the standard calling\n sequence becomes\n\n\ttuple = SearchSysCacheTuple(...);\n\tif (HeapTupleIsValid(tuple))\n\t{\n\t\t... use tuple ...\n\t\tReleaseSysCache(tuple);\n\t}\n\n4. SearchSysCacheTupleCopy() goes away, since we may as well use\n SearchSysCacheTuple() and ReleaseSysCache() instead of\n SearchSysCacheTupleCopy() and heap_freetuple().\n\n5. Since SearchSysCache() is called from exactly one place, namely\n SearchSysCacheTuple(), I am inclined to rename SearchSysCache()\n to SearchCatCache() and then give the name SearchSysCache() to\n the more widely used routine. So SearchSysCache() and\n ReleaseSysCache() would really be the widely used pair of routines.\n\n6. When a shared-cache-inval message arrives, the syscache code\n behaves as follows for each affected cache entry:\n A. If refcount is zero, just delete the entry.\n B. Otherwise, set the \"already-dead\" flag, so that future cache\n searches will not return this tuple and it will be released\n once its refcount reaches zero.\n\n7. At end of transaction (whether normal or abort), scan the syscaches\n to reset refcounts to zero and delete any marked-dead entries. We\n should not consider it a software error to leave syscache entries\n still locked at end of transaction. (The parser, in particular,\n would need a lot of work to avoid doing so, and I don't see much\n value in expending such work.)\n\nNote that this proposal does not include any attempt to detect whether\na cache inval message means that the tuple has actually been changed\n(as opposed to just relocated, for example). It seems too expensive\nto go out and re-read such tuples, and I'm not sure that it's safe to\ntry to read new cache entries during cache inval anyway. Besides,\nmost callers that are using a cache entry are happy to continue to use\nthe copy that was valid when they got it --- they don't care if a\nsubsequent transaction commit changes the tuple.\n\nCallers that want to be certain they have a completely-up-to-date copy\nshould acquire a suitable lock on the associated system relation before\ncalling SearchSysCache(). In practice, the only callers that really need\nthis are places that are going to update or delete the tuple, and so they\nneed to acquire a write lock on the system relation anyway. The coding\nrule is then just \"lock the relation before finding the tuple to update,\nnot after\". We have that rule in place already.\n\nComments? I think I might have time to do this before Vadim finishes\nwith WAL ;-)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 12:45:42 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: SearchSysCacheTuple(Copy) "
},
{
"msg_contents": "Tom Lane wrote:\n\n> Hiroshi Inoue <[email protected]> writes:\n> >> A more serious objection to SearchSysCacheTupleCopy is that once the\n> >> tuple is copied out of the syscache, there isn't any mechanism to\n> >> detect whether it's still valid. If an SI message arrives for a\n> >> recently-copied tuple, we have no way to know if we have a problem\n> >> or not.\n>\n> > Is it more serious than doing the wrong thing silently ?\n>\n> It'd still be doing the wrong thing silently, in my opinion.\n>\n> This class of bugs has been there since the beginning of Postgres,\n> so I do not feel that we need to panic about it.\n\nNot only SI overflow but also relation invalidatation necessarily\nresets catalog cache.\nI'm suspicious that the bugs caused by this fragility are rare.\nFor example I doubt that abnormal block numbers are due\nto this bug. If so we could hardly reproduce the error and\nit's only the waste of time to investigate the cause.\nIt would be really serious if the broken tuples are stored\ninto database.\n\nRegards.\nHiroshi Inoue\n\n",
"msg_date": "Wed, 15 Nov 2000 09:02:32 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: SearchSysCacheTuple(Copy)"
},
{
"msg_contents": "Tom Lane wrote:\n\n> I said:\n> > This class of bugs has been there since the beginning of Postgres,\n> > so I do not feel that we need to panic about it. Let's take the\n> > time to design and implement a proper solution, rather than expending\n> > effort on a stopgap solution that'll have to be undone later.\n>\n> I've reviewed the earlier threads on SearchSysCache and done some more\n> thinking. Here is a concrete proposal for doing it right:\n>\n> 1. Add a reference-count field and an already-dead boolean to each\n\n[snip]\n\nI agree with your proposal.\n\n>\n> Callers that want to be certain they have a completely-up-to-date copy\n> should acquire a suitable lock on the associated system relation before\n> calling SearchSysCache().\n\nI'm suspcious if it's practical.\nWhat is a suitable lock ?\nThe lock should conflict with RowExclusiveLock at least.\nIt must be one of the lock which is stronger than Row\nExclusiveLock or ShareLock(ShareLock is neither stronger\nnor weaker than RowExclusiveLock).\nRowExclusiveLock doesn't conflcit each other.\nThere seems to be few places where above locks for\nsystem relations are appropriate.\n\nRegards.\nHiroshi Inoue\n\n",
"msg_date": "Wed, 15 Nov 2000 10:12:22 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: SearchSysCacheTuple(Copy)"
},
{
"msg_contents": "Hiroshi Inoue <[email protected]> writes:\n>> Callers that want to be certain they have a completely-up-to-date copy\n>> should acquire a suitable lock on the associated system relation before\n>> calling SearchSysCache().\n\n> I'm suspcious if it's practical.\n> What is a suitable lock ?\n> The lock should conflict with RowExclusiveLock at least.\n> It must be one of the lock which is stronger than Row\n> ExclusiveLock or ShareLock(ShareLock is neither stronger\n> nor weaker than RowExclusiveLock).\n\nI think RowExclusiveLock is sufficient. The thing that we want a\ntable-level lock to do is to ensure that there are no *table level*\nreasons for not proceeding with the update. An obvious example is that\nwe don't want any VACUUM to be running on that table and perhaps moving\nour tuple around.\n\nI think you are concerned about whether there might be concurrent\nupdates to the particular tuple we want to update. You are right to\nbe concerned, but obtaining a table-level lock is a bad solution to\nthat because it doesn't allow for any concurrency --- if we do it\nthat way then we can have only one writer *per table*. Also the risks\nof deadlock from obtaining locks in different orders in different parts\nof the code become much higher than if we are locking individual tuples.\n\nMost of the places where we need to update multiple system-catalog\ntuples in a single command are schema updates to a single relation.\nFor that, I think a reasonable approach is to rely on locking the\nrelation being modified; we're going to want exclusive lock on that\nrelation anyway, and that should be enough to ensure no one else is\ndoing schema updates on that relation. Commands that alter just a\nsingle system-catalog tuple, like DROP TYPE or some such, don't\nreally need any more interlocking than will be supplied automatically\nby heap_update or heap_delete.\n\nIn short I don't think there's a big problem here.\n\n\t\t\tregards, tom lane\n\nPS: I'm working on the SearchSysCache changes I outlined, and hopefully\nwill be ready to commit tomorrow. One thing I've discovered already\nis that there is still a use for SearchSysCacheCopy: callers who intend\nto modify and update the tuple want to receive a modifiable copy, not\na cached tuple that they mustn't change.\n",
"msg_date": "Wed, 15 Nov 2000 00:10:54 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: SearchSysCacheTuple(Copy) "
},
{
"msg_contents": "> 4. SearchSysCacheTupleCopy() goes away, since we may as well use\n> SearchSysCacheTuple() and ReleaseSysCache() instead of\n> SearchSysCacheTupleCopy() and heap_freetuple().\n\nAgreed. The rest sounds good too.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 15 Nov 2000 23:49:47 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: SearchSysCacheTuple(Copy)"
}
]
|
[
{
"msg_contents": "when trying to do \n> get -R RedHat-6.x RedHat-7.0 Mandrake-7.x\n\nI got\n\nget RedHat-7.0: server said: Permission denied on server. (Transfer\nlimits exceeded)\n\naftre all of RedHat-6.x was retrieved\n\nis there any reason for this ?\n\n------------\nHannu\n",
"msg_date": "Tue, 14 Nov 2000 13:30:00 +0200",
"msg_from": "Hannu Krosing <[email protected]>",
"msg_from_op": true,
"msg_subject": "why transfer limits on ftp.postgresql.org ?"
},
{
"msg_contents": "On Tue, 14 Nov 2000, Hannu Krosing wrote:\n\n> when trying to do \n> > get -R RedHat-6.x RedHat-7.0 Mandrake-7.x\n> \n> I got\n> \n> get RedHat-7.0: server said: Permission denied on server. (Transfer\n> limits exceeded)\n> \n> aftre all of RedHat-6.x was retrieved\n> \n> is there any reason for this ?\n\nYes, we don't want ppl to \"mirror\" off the central server using FTP ... we\nhave rsync setup that all the mirror sites use to update their code, and\ndon't even allow them any special access for doing bulk transfers ...\n\n\n",
"msg_date": "Tue, 14 Nov 2000 15:04:40 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: why transfer limits on ftp.postgresql.org ?"
}
]
|
[
{
"msg_contents": "> You can do that in a more stylish and safer manner by using the\n> unix_socket_permissions and unix_socket_group options.\n\nMoving the socket file is also necessary for running in\na chrooted environment. And I'm not sure whether it's relevant,\nbut the 7.0 method of computing the socket file name (based\nonly on the port number) doesn't work for multiple instances\nlistening on the same port on different IP addresses.\n",
"msg_date": "Tue, 14 Nov 2000 13:16:50 -0500 (EST)",
"msg_from": "[email protected] (David J. MacKenzie)",
"msg_from_op": true,
"msg_subject": "Re: Re: [PATCHES] PostgreSQL virtual hosting support"
},
{
"msg_contents": "[email protected] (David J. MacKenzie) writes:\n> but the 7.0 method of computing the socket file name (based\n> only on the port number) doesn't work for multiple instances\n> listening on the same port on different IP addresses.\n\nI was afraid you were planning to run that way. Did you absorb the\npoint about shared memory keys being based (only) on the port number?\nUnless something's done about that, the above configuration will NOT\nwork, because the different instances will try to use the same\nshared memory and semaphore sets.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 13:49:24 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [PATCHES] PostgreSQL virtual hosting support "
}
]
|
[
{
"msg_contents": "> I was afraid you were planning to run that way. Did you absorb the\n> point about shared memory keys being based (only) on the port number?\n> Unless something's done about that, the above configuration will NOT\n> work, because the different instances will try to use the same\n> shared memory and semaphore sets.\n\nYes, my patch addresses that issue, as well as I could figure out to do.\nHere's part of the code I submitted in postmaster.c:\n\n /*\n+ * get_host_port -- return a pseudo port number (16 bits)\n+ * derived from the primary IP address of HostName.\n+ */\n+ static unsigned short\n+ get_host_port(void)\n+ {\n+ static unsigned short hostPort = 0;\n+ \n+ if (hostPort == 0)\n+ {\n+ SockAddr saddr;\n+ struct hostent *hp;\n+ \n+ hp = gethostbyname(HostName);\n+ if ((hp == NULL) || (hp->h_addrtype != AF_INET))\n+ {\n+ char msg[1024];\n+ snprintf(msg, sizeof(msg),\n+ \"FATAL: get_host_port: gethostbyname(%s) failed: %s\\n\",\n+ HostName, hstrerror(h_errno));\n+ fputs(msg, stderr);\n+ pqdebug(\"%s\", msg);\n+ exit(1);\n+ }\n+ memmove((char *) &(saddr.in.sin_addr),\n+ (char *) hp->h_addr,\n+ hp->h_length);\n+ hostPort = ntohl(saddr.in.sin_addr.s_addr) & 0xFFFF;\n+ }\n+ \n+ return hostPort;\n+ }\n+ \n+ /*\n * reset_shared -- reset shared memory and semaphores\n */\n static void\n reset_shared(unsigned short port)\n {\n+ /*\n+ * A typical ipc_key is 5432001, which is port 5432, sequence\n+ * number 0, and 01 as the index in IPCKeyGetBufferMemoryKey().\n+ * The 32-bit INT_MAX is 2147483 6 47.\n+ *\n+ * The default algorithm for calculating the IPC keys assumes that all\n+ * instances of postmaster on a given host are listening on different\n+ * ports. In order to work (prevent shared memory collisions) if you\n+ * run multiple PostgreSQL instances on the same port and different IP\n+ * addresses on a host, we change the algorithm if you give postmaster\n+ * the -h option, or set PGHOST, to a value other than the internal\n+ * default of \"any\".\n+ *\n+ * If HostName is not \"any\", then we generate the IPC keys using the\n+ * last two octets of the IP address instead of the port number.\n+ * This algorithm assumes that no one will run multiple PostgreSQL\n+ * instances on one host using two IP addresses that have the same two\n+ * last octets in different class C networks. If anyone does, it\n+ * would be rare.\n+ *\n+ * So, if you use -h or PGHOST, don't try to run two instances of\n+ * PostgreSQL on the same IP address but different ports. If you\n+ * don't use them, then you must use different ports (via -p or\n+ * PGPORT). And, of course, don't try to use both approaches on one\n+ * host.\n+ */\n+ \n+ if (strcmp(HostName, \"any\"))\n+ port = get_host_port();\n+ \n ipc_key = port * 1000 + shmem_seq * 100;\n CreateSharedMemoryAndSemaphores(ipc_key, MaxBackends);\n\n",
"msg_date": "Tue, 14 Nov 2000 14:52:07 -0500 (EST)",
"msg_from": "[email protected] (David J. MacKenzie)",
"msg_from_op": true,
"msg_subject": "Re: Re: [PATCHES] PostgreSQL virtual hosting support"
},
{
"msg_contents": "[email protected] (David J. MacKenzie) writes:\n>> I was afraid you were planning to run that way. Did you absorb the\n>> point about shared memory keys being based (only) on the port number?\n\n> + * So, if you use -h or PGHOST, don't try to run two instances of\n> + * PostgreSQL on the same IP address but different ports. If you\n> + * don't use them, then you must use different ports (via -p or\n> + * PGPORT). And, of course, don't try to use both approaches on one\n> + * host.\n\nSo it's still eminently breakable if the dbadmin does the wrong thing,\nand it still doesn't detect that the dbadmin has done the wrong thing.\nThis doesn't calm my fears very much.\n\nI think that in the last discussion of shared memory key assignment,\nwe had come up with a plan for detecting key collisions directly instead\nof hoping they wouldn't happen. I don't have time to pursue this right\nnow, but according to my todo list there was a pghackers thread about it\naround 4/30/00.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 15:05:04 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [PATCHES] PostgreSQL virtual hosting support "
},
{
"msg_contents": "On Tue, Nov 14, 2000 at 03:05:04PM -0500, Tom Lane wrote:\n> \n> I think that in the last discussion of shared memory key assignment,\n> we had come up with a plan for detecting key collisions directly instead\n> of hoping they wouldn't happen. I don't have time to pursue this right\n> now, but according to my todo list there was a pghackers thread about it\n> around 4/30/00.\n> \n\nTom's TODO list as index into pghackers archive: seems so appropriate ;-)\n\nRoss\n-- \nOpen source code is like a natural resource, it's the result of providing\nfood and sunshine to programmers, and then staying out of their way.\n[...] [It] is not going away because it has utility for both the developers \nand users independent of economic motivations. Jim Flynn, Sunnyvale, Calif.\n",
"msg_date": "Tue, 14 Nov 2000 14:19:32 -0600",
"msg_from": "\"Ross J. Reedstrom\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [PATCHES] PostgreSQL virtual hosting support"
}
]
|
[
{
"msg_contents": "\n\n Hi,\n i have a problem with REFERENCES (foreign keys). i have this table:\n\ndrop table paragraph;\ncreate table paragraph (\n id int4 PRIMARY KEY,\n label varchar(512),\n paragraph_next int4 CONSTRAINT paragraph_fk_next REFERENCES paragraph DEFERRABLE INITIALLY DEFERRED,\n paragraph_priv int4 CONSTRAINT paragraph_fk_priv REFERENCES paragraph DEFERRABLE INITIALLY DEFERRED\n);\n\n if a excute this statements a recive a CONSTRAINT probleme:\n\n\n\nbegin;\ninsert into paragraph values (1,'par1',null,null);\ninsert into paragraph values (2,'par2',null,1);\nupdate paragraph set paragraph_next = 2 where id = 1;\nend;\n\nand then:\n\nbegin; \ndelete from paragraph;\ninsert into paragraph values (1,'par11',null,null);\ninsert into paragraph values (2,'par22',null,1);\nupdate paragraph set paragraph_next = 2 where id = 1;\nend; \n\ni recive:\nERROR: paragraph_fk_next referential integrity violation - key in paragraph still referenced from paragraph\n\n\n Regards,\n\n----\nMalek Shabou\t\t\t\t E-mail: [email protected]\nAFNIC France\t\t\t\t Tel: +33 1 39 63 50 15\nc/o INRIA-Rocquencourt Domaine de Voluceau Fax: +33 1 39 63 55 34 \nB.P.105 78153 Le Chesnay Cedex\n",
"msg_date": "Tue, 14 Nov 2000 21:04:54 +0100",
"msg_from": "Malek Shabou <[email protected]>",
"msg_from_op": true,
"msg_subject": "problem with foreign keys"
}
]
|
[
{
"msg_contents": "Trying to get my FreeBSD box (lerbsd.lerctr.org, 4.2-BETA) up on \ncurrent sources. Got this error:\nmake[3]: Entering directory `/home/ler/pg-dev/src/backend/parser'\ncc -O2 -m486 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations\n-Wno-error\n-I/usr/local/include -I../../../src/include -c -o keywords.o\nkeywords.c\nkeywords.c:250: `TEMPLATE' undeclared here (not in a function)\nkeywords.c:250: initializer element is not constant\nkeywords.c:250: (near initialization for `ScanKeywords[217].value')\ngmake[3]: *** [keywords.o] Error 1\ngmake[3]: Leaving directory `/home/ler/pg-dev/src/backend/parser'\ngmake[2]: *** [parser-recursive] Error 2\ngmake[2]: Leaving directory `/home/ler/pg-dev/src/backend'\ngmake[1]: *** [all] Error 2\ngmake[1]: Leaving directory `/home/ler/pg-dev/src'\ngmake: *** [all] Error 2\n$\n\nTom,\n Is the template0/1 stuff all in? \n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:00:02 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Commit finished?"
},
{
"msg_contents": "Is your copy of gram.y up to date?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 16:07:31 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Commit finished? "
},
{
"msg_contents": "* Tom Lane <[email protected]> [001114 15:07]:\n> Is your copy of gram.y up to date?\n$ find . -name gram.y\n./src/backend/parser/gram.y\n./src/pl/plpgsql/src/gram.y\n$ more src/backend/parser/gram.y\n\nsrc/backend/parser/gram.y 0%\n%{\n\n/*#define YYDEBUG 1*/\n/*-------------------------------------------------------------------------\n *\n * gram.y\n * POSTGRES SQL YACC rules/actions\n *\n * Portions Copyright (c) 1996-2000, PostgreSQL, Inc\n * Portions Copyright (c) 1994, Regents of the University of\n * California\n *\n *\n * IDENTIFICATION\n * $Header:\n * /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,\nv 2.209 2000/11/14 18:37:49 tgl Exp $\n *\n * HISTORY\n * AUTHOR DATE MAJOR\n * EVENT\n * Andrew Yu Sept, 1994\n * POSTQUEL to SQL\nconversion\n * Andrew Yu Oct, 1994 lispy\n * code conve\nrsion\n *\n$\n\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:09:49 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Commit finished?"
},
{
"msg_contents": "Larry Rosenman <[email protected]> writes:\n> * Tom Lane <[email protected]> [001114 15:07]:\n>> Is your copy of gram.y up to date?\n\n> * $Header:\n> * /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,\n> v 2.209 2000/11/14 18:37:49 tgl Exp $\n\nHm. Looks up-to-date to me. I wonder why the derived header files\ndidn't get rebuilt? How did you start the make, anyway?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 16:16:05 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Commit finished? "
},
{
"msg_contents": "* Tom Lane <[email protected]> [001114 15:16]:\n> Larry Rosenman <[email protected]> writes:\n> > * Tom Lane <[email protected]> [001114 15:07]:\n> >> Is your copy of gram.y up to date?\n> \n> > * $Header:\n> > * /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,\n> > v 2.209 2000/11/14 18:37:49 tgl Exp $\n> \n> Hm. Looks up-to-date to me. I wonder why the derived header files\n> didn't get rebuilt? How did you start the make, anyway?\nIt may be my screw up. I did a scp from lerami to lerbsd. I'll \ntry reseting the timestamps. THanks.\n\nLER\n\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:18:17 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Commit finished?"
},
{
"msg_contents": "* Tom Lane <[email protected]> [001114 15:16]:\n> Larry Rosenman <[email protected]> writes:\n> > * Tom Lane <[email protected]> [001114 15:07]:\n> >> Is your copy of gram.y up to date?\n> \n> > * $Header:\n> > * /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,\n> > v 2.209 2000/11/14 18:37:49 tgl Exp $\n> \n> Hm. Looks up-to-date to me. I wonder why the derived header files\n> didn't get rebuilt? How did you start the make, anyway?\nLooks, to me, like gmake distclean should remove gram.c and it's\nheader. I removed gram.c, and restarted, and it went to completion. \n\nLarry \n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:24:08 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Commit finished?"
},
{
"msg_contents": "Larry Rosenman <[email protected]> writes:\n> Looks, to me, like gmake distclean should remove gram.c and it's\n> header. I removed gram.c, and restarted, and it went to completion. \n\ndistclean does not remove gram.c because we include gram.c in the\ndistribution. Perhaps there should be another target that gets rid\nof *all* the derived files (maintainer-clean might be the GNU-approved\nname for that, not sure). Peter, any comment here?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 18:14:07 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Commit finished? "
},
{
"msg_contents": "Tom Lane writes:\n\n> distclean does not remove gram.c because we include gram.c in the\n> distribution. Perhaps there should be another target that gets rid\n> of *all* the derived files (maintainer-clean might be the GNU-approved\n> name for that, not sure). Peter, any comment here?\n\nNot only that, but we've had it for several months... :-)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 15 Nov 2000 18:45:46 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Commit finished? "
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Tom Lane writes:\n>> distclean does not remove gram.c because we include gram.c in the\n>> distribution. Perhaps there should be another target that gets rid\n>> of *all* the derived files (maintainer-clean might be the GNU-approved\n>> name for that, not sure). Peter, any comment here?\n\n> Not only that, but we've had it for several months... :-)\n\nAh, my mistake. I looked in backend/parser/Makefile and didn't see\nany rule for maintainer-clean, so assumed it wasn't there yet :-(\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 12:57:27 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Commit finished? "
}
]
|
[
{
"msg_contents": "Anyone care if I build a patch to kill the -m486 type options in the\nfollowing files:\n\n$ grep -i -- 486 *\nbsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\nfreebsd:CFLAGS='-O2 -m486 -pipe'\nunivel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n$ pwd\n/home/ler/pg-dev/pgsql/src/template\n$\n\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:41:15 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "486 Optimizations..."
},
{
"msg_contents": "Larry Rosenman <[email protected]> writes:\n\n> Anyone care if I build a patch to kill the -m486 type options in the\n> following files:\n> \n> $ grep -i -- 486 *\n> bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> freebsd:CFLAGS='-O2 -m486 -pipe'\n> univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n\nWhy would you want to? Not all gccs support -mpentium/mpentiumpro etc.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "14 Nov 2000 16:43:20 -0500",
"msg_from": "[email protected] (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Trond Eivind Glomsr?d <[email protected]> [001114 15:43]:\n> Larry Rosenman <[email protected]> writes:\n> \n> > Anyone care if I build a patch to kill the -m486 type options in the\n> > following files:\n> > \n> > $ grep -i -- 486 *\n> > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> \n> Why would you want to? Not all gccs support -mpentium/mpentiumpro etc.\nI would remove it entirely. \n\nWhy should a package FORCE 486 or any other processor optimizations?\n\nLarry\n> \n> -- \n> Trond Eivind Glomsr�d\n> Red Hat, Inc.\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:44:43 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001114 13:42] wrote:\n> Anyone care if I build a patch to kill the -m486 type options in the\n> following files:\n> \n> $ grep -i -- 486 *\n> bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> freebsd:CFLAGS='-O2 -m486 -pipe'\n> univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> $ pwd\n> /home/ler/pg-dev/pgsql/src/template\n> $\n\nI have a patch pending for FreeBSD to support alpha builds that\nalso disables -m486 so if you left the freebsd template alone it\nwould be ok.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Tue, 14 Nov 2000 13:46:10 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Trond Eivind Glomsr�d <[email protected]> [001114 13:45] wrote:\n> Larry Rosenman <[email protected]> writes:\n> \n> > Anyone care if I build a patch to kill the -m486 type options in the\n> > following files:\n> > \n> > $ grep -i -- 486 *\n> > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> \n> Why would you want to? Not all gccs support -mpentium/mpentiumpro etc.\n\nThe idea is to remove it entirely (I hope) not add even more arch\nspecific compile flags.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Tue, 14 Nov 2000 13:47:09 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Alfred Perlstein <[email protected]> [001114 15:46]:\n> * Larry Rosenman <[email protected]> [001114 13:42] wrote:\n> > Anyone care if I build a patch to kill the -m486 type options in the\n> > following files:\n> > \n> > $ grep -i -- 486 *\n> > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> > $ pwd\n> > /home/ler/pg-dev/pgsql/src/template\n> > $\n> \n> I have a patch pending for FreeBSD to support alpha builds that\n> also disables -m486 so if you left the freebsd template alone it\n> would be ok.\nI have a P-III, I don't want the template to specify it *AT ALL*. \n(this is on FreeBSD 4.2-BETA). \n\nIt seems like GCC does the right (or mostly right) thing without \nthe -m option....\n\n\n> \n> -- \n> -Alfred Perlstein - [[email protected]|[email protected]]\n> \"I have the heart of a child; I keep it in a jar on my desk.\"\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:47:51 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "Larry Rosenman <[email protected]> writes:\n\n> * Trond Eivind Glomsr?d <[email protected]> [001114 15:43]:\n> > Larry Rosenman <[email protected]> writes:\n> > \n> > > Anyone care if I build a patch to kill the -m486 type options in the\n> > > following files:\n> > > \n> > > $ grep -i -- 486 *\n> > > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> > \n> > Why would you want to? Not all gccs support -mpentium/mpentiumpro etc.\n> I would remove it entirely. \n> \n> Why should a package FORCE 486 or any other processor optimizations?\n\nIt doesn't force, it only uses those if you don't specify any yourself\nAFAIK (at least, that's the normal way to do it)\n\nFWIW, this was what Red Hat Linux used up to and including 6.2 - it\nincreases performance on almost every chip, it runs everywhere, it\ngoes with any gcc.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "14 Nov 2000 16:48:17 -0500",
"msg_from": "[email protected] (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Alfred Perlstein <[email protected]> [001114 15:47]:\n> * Trond Eivind Glomsr�d <[email protected]> [001114 13:45] wrote:\n> > Larry Rosenman <[email protected]> writes:\n> > \n> > > Anyone care if I build a patch to kill the -m486 type options in the\n> > > following files:\n> > > \n> > > $ grep -i -- 486 *\n> > > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> > \n> > Why would you want to? Not all gccs support -mpentium/mpentiumpro etc.\n> \n> The idea is to remove it entirely (I hope) not add even more arch\n> specific compile flags.\nBingo... I want the USER to be able to specify it, not our template.\n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Tue, 14 Nov 2000 15:48:55 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001114 13:47] wrote:\n> * Alfred Perlstein <[email protected]> [001114 15:46]:\n> > * Larry Rosenman <[email protected]> [001114 13:42] wrote:\n> > > Anyone care if I build a patch to kill the -m486 type options in the\n> > > following files:\n> > > \n> > > $ grep -i -- 486 *\n> > > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> > > $ pwd\n> > > /home/ler/pg-dev/pgsql/src/template\n> > > $\n> > \n> > I have a patch pending for FreeBSD to support alpha builds that\n> > also disables -m486 so if you left the freebsd template alone it\n> > would be ok.\n> I have a P-III, I don't want the template to specify it *AT ALL*. \n> (this is on FreeBSD 4.2-BETA). \n\nMy patches set i386-FreeBSD to -O2 and alpha-FreeBSD to -O, no\nworries.\n\n> It seems like GCC does the right (or mostly right) thing without \n> the -m option....\n\nheh. :)\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Tue, 14 Nov 2000 13:50:13 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "[email protected] (Trond Eivind Glomsr�d) writes:\n\n> Larry Rosenman <[email protected]> writes:\n> \n> > * Trond Eivind Glomsr?d <[email protected]> [001114 15:43]:\n> > > Larry Rosenman <[email protected]> writes:\n> > > \n> > > > Anyone care if I build a patch to kill the -m486 type options in the\n> > > > following files:\n> > > > \n> > > > $ grep -i -- 486 *\n> > > > bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> > > > freebsd:CFLAGS='-O2 -m486 -pipe'\n> > > > univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n> > > \n> > > Why would you want to? Not all gccs support -mpentium/mpentiumpro etc.\n> > I would remove it entirely. \n> > \n> > Why should a package FORCE 486 or any other processor optimizations?\n> \n> It doesn't force, it only uses those if you don't specify any yourself\n> AFAIK (at least, that's the normal way to do it)\n> \n> FWIW, this was what Red Hat Linux used up to and including 6.2 - it\n> increases performance on almost every chip, it runs everywhere, it\n> goes with any gcc.\n\nTo clarify - this is on IA32 only, of course. OSes know running on\nmore chips should get separate entries, like Linux does.\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "14 Nov 2000 16:56:23 -0500",
"msg_from": "[email protected] (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "Hi ,\n\nI would like to increase perfomance of PG 7.02 on i486,\nwhere can I read about this ? May be there is any flags for\npostgres ?\n\nThanks.\n\nIgor\n\n\n",
"msg_date": "Wed, 15 Nov 2000 07:42:04 +0300",
"msg_from": "igor <[email protected]>",
"msg_from_op": false,
"msg_subject": "One more 486 Optimizations..."
},
{
"msg_contents": "* igor <[email protected]> [001114 20:46] wrote:\n> Hi ,\n> \n> I would like to increase perfomance of PG 7.02 on i486,\n> where can I read about this ? May be there is any flags for\n> postgres ?\n\nCheck your C compiler's manpage for the relevant optimization\nflags, be aware that some compilers can emit broken code when\npushed to thier highest optimization levels.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Tue, 14 Nov 2000 22:02:52 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: One more 486 Optimizations..."
},
{
"msg_contents": "Larry Rosenman writes:\n\n> Anyone care if I build a patch to kill the -m486 type options in the\n> following files:\n> \n> $ grep -i -- 486 *\n> bsdi: i?86) CFLAGS=\"$CFLAGS -m486\";;\n> freebsd:CFLAGS='-O2 -m486 -pipe'\n> univel:CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'\n\nI couldn't say I like these options, because they seem arbitrary, but\ngiven that it only affects the 0 univel users and the 3 bsdi users left\n(freebsd will be fixed), I wouldn't make a fuzz.\n\nI do feel more strongly about removing '-pipe', but it's not something I'm\ngoing to pursue.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Wed, 15 Nov 2000 17:19:02 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "* Peter Eisentraut <[email protected]> [001115 08:15] wrote:\n> \n> I couldn't say I like these options, because they seem arbitrary, but\n> given that it only affects the 0 univel users and the 3 bsdi users left\n> (freebsd will be fixed), I wouldn't make a fuzz.\n\nBSDi still has a market niche, and they are actively porting to\nmore platforms.\n\n> \n> I do feel more strongly about removing '-pipe', but it's not something I'm\n> going to pursue.\n\nWhy?\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Wed, 15 Nov 2000 09:04:42 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
},
{
"msg_contents": "> * Peter Eisentraut <[email protected]> [001115 08:15] wrote:\n> > \n> > I couldn't say I like these options, because they seem arbitrary, but\n> > given that it only affects the 0 univel users and the 3 bsdi users left\n> > (freebsd will be fixed), I wouldn't make a fuzz.\n> \n> BSDi still has a market niche, and they are actively porting to\n> more platforms.\n\nThe template/bsdi file has:\n\t\n\tcase $host_cpu in\n\t i?86) CFLAGS=\"$CFLAGS -m486\";;\n\tesac\n\nLeave to BSDI to do it right. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 00:28:21 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: 486 Optimizations..."
}
]
|
[
{
"msg_contents": "After a long day out of the office for my day job, I'm going ahead and\nannouncing the release of the 7.0.3-1 RPMset for PostgreSQL, which were\ncompleted and passed regression testing yesterday.\n\nftp://ftp.postgresql.org/pub/binary/v7.0.3/RPMS/*\n\nBinary RPM's are currently available for i386 and PowerPC. \nDistributions supported are RedHat 6.x, RedHat 7.0, TurboLinux 6.0.4,\nSuSE 7.0, SuSE 6.4, Caldera OpenLinux eServer 2.3 (NOT eDesktop 2.4 --\nthere are differences!), and LinuxPPC-2000. Source RPMS for\nRedHat-style systems are in SRPMS, SuSE-style source RPMS are in\nSuSE-7.0, and Caldera source RPMS (works on most older RPM versions --\npre-3.0 RPM considered old) in OpenLinux-eServer-2.3.\n\nMany thanks to Great Bridge for making possible multi-distribution\nbinary builds using their build farm, otherwise we would only have\nRedHat-6.x and LinuxPPC-2000 (courtesy of Tom Lane).\n\nOnce the RPM's are downloaded, please read the changelog to see what has\nchanged (rpm -qp --changelog postgresql-7.0.3-1.i386.rpm as an example),\nthen install as usual.\n\nSeveral bugs in the older RPM dist have been fixed, most notably an\nembarrassing dependency bug that required the -devel subpackage to be\ninstalled for anything to work. See the changelog for other bugfixes,\nand the included README.rpm-dist text file for further RPM-specific\ndocumentation.\n\nCurrently this RPMset doesn't build on ia64 -- work is in progress to\ncorrect that issue, as well as to provide more binaries.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 14 Nov 2000 18:30:10 -0500",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": true,
"msg_subject": "PostgreSQL 7.0.3-1 RPMset available."
}
]
|
[
{
"msg_contents": "I remeber a few developers used to gather on efnet irc,\nthere was a lot of instability recently that seems to have\ncleared up even more recently.\n\nAre you guys planning on coming back? Or have you all\nmoved to a different network?\n\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Tue, 14 Nov 2000 15:51:33 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "IRC?"
},
{
"msg_contents": "\nI'm at Comdex right now, but when I'm around, I'm on channel ...\n\n\nOn Tue, 14 Nov 2000, Alfred Perlstein wrote:\n\n> I remeber a few developers used to gather on efnet irc,\n> there was a lot of instability recently that seems to have\n> cleared up even more recently.\n> \n> Are you guys planning on coming back? Or have you all\n> moved to a different network?\n> \n> \n> -- \n> -Alfred Perlstein - [[email protected]|[email protected]]\n> \"I have the heart of a child; I keep it in a jar on my desk.\"\n> \n> \n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n",
"msg_date": "Tue, 14 Nov 2000 23:56:47 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: IRC?"
}
]
|
[
{
"msg_contents": "At 13:39 14/11/00 -0500, Tom Lane wrote:\n>I've committed the template0/template1 changes we were discussing\n>earlier. Plain pg_dump and pg_dumpall are changed to behave properly,\n>but I didn't touch pg_backup or pg_restore; can you deal with those?\n\nI still think that pg_dump needs to use the lastoid in template0 - did you\nfail to implement this because you disagree, or because you think it should\nuse the current db lastsysoid?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Wed, 15 Nov 2000 13:54:21 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> I still think that pg_dump needs to use the lastoid in template0 - did you\n> fail to implement this because you disagree, or because you think it should\n> use the current db lastsysoid?\n\nI think it should use the current DB's lastsysoid, which is how I\nleft the code.\n\nGiven the present backend coding, all the DBs in an installation will\nhave the same lastsysoid as template0 anyway, barring manual\nintervention. The only reason they'd be different is if the dbadmin\ndeliberately changed one in order to prevent pg_dump from dumping part\nof that database. Now offhand I don't see a good *reason* for someone\nto do that, but I don't see any reason to make it impossible to do it,\neither.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 23:20:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "At 23:20 14/11/00 -0500, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> I still think that pg_dump needs to use the lastoid in template0 - did you\n>> fail to implement this because you disagree, or because you think it should\n>> use the current db lastsysoid?\n>\n>I think it should use the current DB's lastsysoid, which is how I\n>left the code.\n>\n>Given the present backend coding, all the DBs in an installation will\n>have the same lastsysoid as template0 anyway, barring manual\n>intervention.\n\nNot the way the current 'CREATE DATABASE' code works - remember the changes\nto set the OID at create time? AFAICT, that's still there.\n\nIf we want dump files to be portable, then we can not do anything other\nthan backup & restore relative to template0. If we *do* backup relative to\nthe template database used to create the DB, then we should be recording\nthe template name in the backups as well, but this makes things even less\nportable.\n\nYou never addressed the scenario I described in an earlier mail:\n\n- create function template1.foo\n- create db mydb from template1\n- drop mydb.foo\n- create a new mydb.foo\n\nBoth pg_dump & pg_dumpall will now dump the foo function, which means that\nthey both have to be restored against template0, not 1. If the function\nwere never dropped, then they would both need to be restored against\ntemplate1. I really don't think this is ideal.\n\nThere are only two solutions I can think of:\n\n- Set datlastsysoid to the same value as in template1 for all databases\n\n- Always dump (perhaps unless asked otherwise) using datlastsysoid of\ntemplate1.\n\nPersonally I would prefer the second.\n\n\n>The only reason they'd be different is if the dbadmin\n>deliberately changed one in order to prevent pg_dump from dumping part\n>of that database. Now offhand I don't see a good *reason* for someone\n>to do that, but I don't see any reason to make it impossible to do it,\n>either.\n\nThe second solution above does allow this, but I am not even sure the\noption should be there. It is likely to cause more confusion & trouble than\nit's worth. It will probably never function the way people expect\n(especially in the absence of ALTER FUNCTION), and pg_dump/restore already\nprovides a cleaner method to remove specific items at restore time.\n\nGoing for what looks like a solution that will never work properly, when we\nalready have a potential better solution in mind (the 'I am a system\nobject' flag), seems ill-advised.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Wed, 15 Nov 2000 15:45:57 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n>> Given the present backend coding, all the DBs in an installation will\n>> have the same lastsysoid as template0 anyway, barring manual\n>> intervention.\n\n> Not the way the current 'CREATE DATABASE' code works - remember the changes\n> to set the OID at create time? AFAICT, that's still there.\n\nLook again. lastsysoid is now inherited from the database being cloned.\n\nAFAICT all your subsequent comments are based on that\nmisunderstanding...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 14 Nov 2000 23:48:34 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "At 23:48 14/11/00 -0500, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>>> Given the present backend coding, all the DBs in an installation will\n>>> have the same lastsysoid as template0 anyway, barring manual\n>>> intervention.\n>\n>> Not the way the current 'CREATE DATABASE' code works - remember the changes\n>> to set the OID at create time? AFAICT, that's still there.\n>\n>Look again. lastsysoid is now inherited from the database being cloned.\n\nIt looks to me like that was the intent of the code; but there is still:\n\n tuple = heap_formtuple(pg_database_dsc, new_record, new_record_nulls);\n\n tuple->t_data->t_oid = dboid; /* override heap_insert's OID\nselection */\n\n heap_insert(pg_database_rel, tuple);\n\nwhich I think stuffs up everything, since dboid was allocated earlier in\nthe same call. But I agree, the code looks like it tries to do what you said.\n\nI could have missed something, though.\n\n\n>AFAICT all your subsequent comments are based on that\n>misunderstanding...\n\nPretty much. Sorry. Is there a smiley for embarrasment?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Wed, 15 Nov 2000 15:59:38 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
},
{
"msg_contents": "At 15:59 15/11/00 +1100, Philip Warner wrote:\n>\n>It looks to me like that was the intent of the code; but there is still:\n>\n...\n>\n>Pretty much. Sorry. Is there a smiley for embarrasment?\n>\n\nI really need that smiley now. Just saw my mistake.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Wed, 15 Nov 2000 16:03:05 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Details for planned template0/template1 change "
}
]
|
[
{
"msg_contents": "\nI just installed v7.0.3 release on a FreeBSD 4.x system. (Problem still happened in 7.0.2 too).\n\nThis is the problem I noticed:\n\n# select * from mailredirs;\n username | destination | start | stop | reason\n----------+--------------------+------------------------+------------------------+---------------\n als | [email protected] | 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11 | Just because.\n(1 row)\n\n# select * from mailredirs where start < CURRENT_TIMESTAMP and stop > CURRENT_TIMESTAMP;\nERROR: Bad timestamp external representation 'Just because.'\n\nWhy is it even looking at the 'reason' field??\n\n\n\nUnfortunately it gets more complicated here, as I am going to dump you with a load of table\nand view definitions. \n\nCREATE VIEW MailRedirs AS\n SELECT u.Name AS Username, v1.Value AS Destination, v2.Value::timestamp AS Start,\n v3.Value::timestamp AS Stop, v4.Value AS Reason\n FROM Values v1, Values v2, Values v3, Values v4, Users u\n WHERE v1.AttributeID = get_attributeid('MailRedir', 'Dest')\n AND v2.AttributeID = get_attributeid('MailRedir','Start')\n AND v3.AttributeID = get_attributeid('MailRedir','End')\n AND v4.AttributeID = get_attributeid('MailRedir','Reason')\n AND u.ID=v1.ThingID AND u.ID=v2.ThingID AND u.ID=v3.ThingID AND u.ID=v4.ThingID;\n\nThe table \"Values\" joins an Attribute to a Thing with a text value. \"Users\" is a\nview on \"Things\", pulling out only \"Things\" of type User...\n\nCREATE TABLE Values (\n ID serial PRIMARY KEY,\n AttributeID int4 NOT NULL REFERENCES Attributes,\n ThingID int4 NOT NULL REFERENCES Things ON DELETE CASCADE,\n Value text NOT NULL\n);\nCREATE TABLE Attributes (\n ID serial PRIMARY KEY,\n Name text NOT NULL,\n Subname text NOT NULL,\n Format text NOT NULL,\n UNIQUE(Name, Subname)\n);\nCREATE TABLE Things (\n ID serial PRIMARY KEY,\n Name text NOT NULL,\n TypeID int4 NOT NULL REFERENCES Types,\n ParentID int4 REFERENCES Things DEFAULT NULL\n);\nCREATE VIEW Users AS\n SELECT th.ID, th.Name, th2.Name AS ParentName, th2.ID AS ParentID\n FROM Things th, Things th2\n WHERE th2.ID=th.ParentID AND Types.Name='User' AND th.TypeID=Types.ID;\nCREATE FUNCTION get_attributeid(text, text) returns int4 AS 'SELECT ID FROM Attributes WHERE (Name,Subname)=($1,$2)'\n LANGUAGE 'sql' WITH (iscachable);\n\n\n\n\n\n\n\n",
"msg_date": "Wed, 15 Nov 2000 16:42:47 +1100 (EST)",
"msg_from": "Andrew Snow <[email protected]>",
"msg_from_op": true,
"msg_subject": "Problem with BETWEEN and a view."
},
{
"msg_contents": "\nFurther to this, I wish you to note the following works correctly:\n\n# select start, stop from mailredirs where start < CURRENT_TIMESTAMP;\n start | stop\n------------------------+------------------------\n 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11\n(1 row)\n\n# select start, stop from mailredirs where stop > CURRENT_TIMESTAMP;\n start | stop\n------------------------+------------------------\n 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11\n(1 row)\n\n\nAlso, there is definitely only one row in the entire \"Values\" table that\ncontains a value of \"Just because.\"\n\n# select * from values where value LIKE 'Just because.';\n id | attributeid | thingid | value\n-------+-------------+---------+---------------\n 13525 | 46 | 1246 | Just because.\n(1 row)\n\n\nRegards,\nAndrew.\n\nOn Wed, 15 Nov 2000, I wrote:\n\n> \n> I just installed v7.0.3 release on a FreeBSD 4.x system. (Problem still happened in 7.0.2 too).\n> \n> This is the problem I noticed:\n> \n> # select * from mailredirs;\n> username | destination | start | stop | reason\n> ----------+--------------------+------------------------+------------------------+---------------\n> als | [email protected] | 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11 | Just because.\n> (1 row)\n> \n> # select * from mailredirs where start < CURRENT_TIMESTAMP and stop > CURRENT_TIMESTAMP;\n> ERROR: Bad timestamp external representation 'Just because.'\n> \n> Why is it even looking at the 'reason' field??\n\n\n\n",
"msg_date": "Wed, 15 Nov 2000 16:48:32 +1100 (EST)",
"msg_from": "Andrew Snow <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Problem with BETWEEN and a view."
},
{
"msg_contents": "Andrew Snow <[email protected]> writes:\n> # select * from mailredirs where start < CURRENT_TIMESTAMP and stop > CURRENT_TIMESTAMP;\n> ERROR: Bad timestamp external representation 'Just because.'\n\n> Why is it even looking at the 'reason' field??\n\nLooks like a bug to me, but I'd like not to have to reverse-engineer the\ntest case before I can look at it. Could you provide some sample data,\nas well as the missing \"Types\" table declaration? Ideally a psql script\nfile to load everything up from scratch and trigger the error ;-)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 01:07:06 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problem with BETWEEN and a view. "
},
{
"msg_contents": "\n> Looks like a bug to me, but I'd like not to have to reverse-engineer the\n> test case before I can look at it. Could you provide some sample data,\n> as well as the missing \"Types\" table declaration? Ideally a psql script\n> file to load everything up from scratch and trigger the error ;-)\n\nWell, I dont blame you!! I am going insane with this database over here...\narguably the 'bug' is that I'm doing something which shouldn't be done by a\nnormal sane person ;-)\n\n\nHere's a simpler script which reproduces the bug:\n\n\nCREATE TABLE Happy (\n x int4 PRIMARY KEY,\n y text\n);\nCREATE FUNCTION get_happyx(text) RETURNS int4 AS\n 'SELECT x FROM Happy WHERE y = $1' LANGUAGE 'sql' WITH (iscachable);\n\nCREATE TABLE Joy (\n happyx int4 REFERENCES Happy,\n z text\n);\n\nINSERT INTO Happy (x,y) VALUES (1, 'One');\nINSERT INTO Happy (x,y) VALUES (2, 'Two');\nINSERT INTO Happy (x,y) VALUES (3, 'Three');\nINSERT INTO Happy (x,y) VALUES (4, 'Four');\n\nINSERT INTO Joy (happyx,z) VALUES (1, 'i love postgresql');\nINSERT INTO Joy (happyx,z) VALUES (2, CURRENT_TIMESTAMP - '5 days'::interval);\nINSERT INTO Joy (happyx,z) VALUES (3, CURRENT_TIMESTAMP + '5 days'::interval);\nINSERT INTO Joy (happyx,z) VALUES (4, 'Tom Lane r0x0rs');\n\n\n-- This view is the centre of the problem:\n\nCREATE VIEW Depressed AS\n SELECT j1.z AS Text1, j2.z::timestamp AS Start,\n j3.z::timestamp AS Stop, j4.z AS Text2\n FROM Joy j1, Joy j2, Joy j3, Joy j4\n WHERE j1.happyx = get_happyx('One')\n AND j2.happyx = get_happyx('Two')\n AND j3.happyx = get_happyx('Three')\n AND j4.happyx = get_happyx('Four');\n\n----------------------------------------------------------------------------------------\n\n\nNow to test it:\n\nfoo=# SELECT * FROM Depressed;\n text1 | start | stop | text2\n-------------------+------------------------+------------------------+-----------------\n i love postgresql | 2000-11-10 17:25:45+11 | 2000-11-20 17:25:45+11 | Tom Lane r0x0rs\n(1 row)\n\nfoo=# SELECT * FROM Depressed WHERE Start < CURRENT_TIMESTAMP AND Stop > CURRENT_TIMESTAMP;\nERROR: Bad timestamp external representation 'i love postgresql'\n\n\nBingo!\n\n\nHope that helps,\nAndrew.\n\n\n\n\n",
"msg_date": "Wed, 15 Nov 2000 17:35:45 +1100 (EST)",
"msg_from": "Andrew Snow <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Problem with BETWEEN and a view. "
},
{
"msg_contents": "Andrew Snow <[email protected]> writes:\n> Here's a simpler script which reproduces the bug:\n\nOK, I can reproduce the bug in 7.0.2 and 7.0.3, but not in current\ndevelopment sources. More tomorrow ... I'm about out of steam\nfor tonight ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 01:47:47 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problem with BETWEEN and a view. "
},
{
"msg_contents": "Andrew Snow <[email protected]> writes:\n> Here's a simpler script which reproduces the bug:\n\nWell, after looking at this some more, I'm not convinced it's a bug;\nor at least, if it's a bug it's one that can't be fixed without a\nfundamental redefinition of rules/views. Boiled down, here's what\nyou are doing:\n\nCREATE TABLE Joy (x int4, z text);\n\nINSERT INTO Joy VALUES (1, 'i love postgresql');\nINSERT INTO Joy VALUES (2, CURRENT_TIMESTAMP - '5 days'::interval);\nINSERT INTO Joy VALUES (3, CURRENT_TIMESTAMP + '5 days'::interval);\n\nCREATE VIEW foo AS SELECT z::timestamp AS Start FROM Joy WHERE x = 2;\n\nSELECT * FROM foo;\n start\n------------------------\n 2000-11-10 01:45:09-05\n(1 row)\n\nSELECT * FROM foo WHERE Start < CURRENT_TIMESTAMP;\nERROR: Bad timestamp external representation 'i love postgresql'\n\nNow the first select is OK because the WHERE clause filters out the\nrows that don't have timestamp-looking values of z before the SELECT's\noutput values get evaluated. But the second SELECT gets expanded\nby the rule rewriter into\n\nSELECT z::timestamp AS Start FROM Joy\n\tWHERE x = 2 AND z::timestamp < CURRENT_TIMESTAMP;\n\nThen it's all a matter of what order the WHERE clauses happen to get\napplied in --- if the timestamp check gets applied first, the query\nfails with exactly the result you see. There is no guarantee that the\nclauses that came from inside the view will be applied before those that\ncame from outside. Indeed, the planner would be very foolish to make\nsuch a guarantee, since the clauses coming from outside the view might\nbe far more selective and/or might enable use of an index.\n\nIn 7.1 it would be possible to force the view to be evaluated as an\nindependently-planned subplan, and have the outer WHERE clauses be\napplied only as filters on the result. However, the performance\nimplications of doing that are painful enough that I don't really\nwant to do it. Essentially, we'd be lobotomizing the planner so that\nit would not be able to make any choices about when to evaluate WHERE\nclauses. This would cause it to miss a lot of good plans for queries\ninvolving views and sub-selects.\n\nThe relevant part of SQL92 seems to be section 3.3.4.4 \"Rule evaluation\norder\". As far as I can tell, this leaves implementations a great deal\nof freedom to determine evaluation order of elements of a WHERE\nexpression. Does anyone want to argue that the spec requires us to\nbe stupid about evaluation order?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 12:45:08 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "WHERE-clause evaluation order (was Problem with BETWEEN and a view)"
}
]
|
[
{
"msg_contents": ">perhaps why, even at 5 clients, the page views he shows never went \n>significantly above 10/sec?\n\nI think alot of it has to do with the web server/db setup not pg. They are \nusing Apache/PHP and looking at their code every page has the additional \noverhead of making the db connection. Now if they had used AOLserver with \nits persistent db connecction pooling scheme they may have faired better ;)\n\n_________________________________________________________________________\nGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.\n\nShare information about yourself, create your own public profile at \nhttp://profiles.msn.com.\n\n",
"msg_date": "Wed, 15 Nov 2000 08:40:28 EST",
"msg_from": "\"carl garland\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "carl garland wrote:\n> \n> >perhaps why, even at 5 clients, the page views he shows never went\n> >significantly above 10/sec?\n> \n> I think alot of it has to do with the web server/db setup not pg. They are\n> using Apache/PHP and looking at their code every page has the additional\n> overhead of making the db connection. Now if they had used AOLserver with\n> its persistent db connecction pooling scheme they may have faired better ;)\n\nPHP has a persistent PostgreSQL open pg_pConnect(....) and it does make\na difference. \n\nI use postgres as a music database back-end for a PHP web server.\n(Actually it is a web farm, with many instances of the database, one per\nweb server)\n\nThe one problem I have had with Postgres is its stubborn refusal to use\nan index. I understand the reasons why it won't, but it is wrong, so I\nsped it up by starting the backends with -fs.\n\nThat may be the issue.\n\nOn a side note:\nI'm not sure of the current workings of the vacuum and statistics vs\nindexing issue, I am new to this list, but I do have a 7.0.2 relevant\nobservation:\n\nMy music database has 50,000 arises and 210,000 albums. Many artists\nhave only one or 2 entries in the albums table (for the youngsters, CD\ntable ;-). About 34,000 have the integer key for \"Various Artists\" as\ntheir artist entry, and another few thousand have things like \"Movie\nSoundtrack\" and so on.\n\nWhen the statistics are computed, these relatively few records with a\nhuge number of relations distort the statistics and make it impossible\nto get postgres to use an index on that table without the -fs switch.\n\nThis is bad because it always forces use of an index, even when postgres\nwould legitimately ignore it.\n\n\n\n\n\n\n-- \nhttp://www.mohawksoft.com\n",
"msg_date": "Wed, 15 Nov 2000 09:05:19 -0500",
"msg_from": "mlw <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "\nOn Wed, 15 Nov 2000, carl garland wrote:\n\n> >perhaps why, even at 5 clients, the page views he shows never went \n> >significantly above 10/sec?\n> \n> I think alot of it has to do with the web server/db setup not pg. They are \n> using Apache/PHP and looking at their code every page has the additional \n> overhead of making the db connection. Now if they had used AOLserver with \n> its persistent db connecction pooling scheme they may have faired better ;)\n\n I doubt it. PostgreSQL has a higher connection startup overhead than\nMySQL, so if every view required a new database connection, it would been\nquite a detriment to the PostgreSQL scores.\n\n PHP can maintain persisitant connections. Unfortunately, this means\nthat you end up with a database connection per httpd process. That really\nisn't a problem for PostgreSQL though, it just requires sufficent memory. \nNo doubt that is what was being done.\n\n AOLServer isn't the only system that can pool database connections, so\ncan servlets/JSP, ColdFusion, ASP, etc. No doubt AOLServer would be more\nwidely accepted if it used something other than TCL.\n\nTom\n\n",
"msg_date": "Wed, 15 Nov 2000 09:27:48 -0800 (PST)",
"msg_from": "Tom Samplonius <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "\nOn Wed, 15 Nov 2000, carl garland wrote:\n\n# >perhaps why, even at 5 clients, the page views he shows never went \n# >significantly above 10/sec?\n# \n# I think alot of it has to do with the web server/db setup not pg. They are \n# using Apache/PHP and looking at their code every page has the additional \n# overhead of making the db connection. Now if they had used AOLserver with \n# its persistent db connecction pooling scheme they may have faired better ;)\n\n\tI haven't actually looked at their code they used to test with to\nsee if they are actually using it, but Apache/PHP has the ability to do\npersistent db connections. I would be surprised that someone like Tim (\nwho seems to have done a fair bit of php with db stuff) would not make use\nof such a feature.\n\n\tIf you can point out an example of where they are not using this\nfeature I will gladly stand corrected.\n\n--------------------------------------------------------------------\n| Joseph Scott The Office Of Water Programs |\n| [email protected] [email protected] |\n--------------------------------------------------------------------\n\n",
"msg_date": "Wed, 15 Nov 2000 09:28:43 -0800 (PST)",
"msg_from": "[email protected]",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "PHP 4 was having problems with persistent connections (not sure if with just\npgsql or all dbs). Maybe that is why they didn't use it.\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\n----- Original Message -----\nFrom: <[email protected]>\nTo: \"carl garland\" <[email protected]>\nCc: <[email protected]>; <[email protected]>;\n<[email protected]>; <[email protected]>; <[email protected]>;\n<[email protected]>; <[email protected]>\nSent: Wednesday, November 15, 2000 12:28 PM\nSubject: Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n\n\n>\n> On Wed, 15 Nov 2000, carl garland wrote:\n>\n> # >perhaps why, even at 5 clients, the page views he shows never went\n> # >significantly above 10/sec?\n> #\n> # I think alot of it has to do with the web server/db setup not pg. They\nare\n> # using Apache/PHP and looking at their code every page has the additional\n> # overhead of making the db connection. Now if they had used AOLserver\nwith\n> # its persistent db connecction pooling scheme they may have faired better\n;)\n>\n> I haven't actually looked at their code they used to test with to\n> see if they are actually using it, but Apache/PHP has the ability to do\n> persistent db connections. I would be surprised that someone like Tim (\n> who seems to have done a fair bit of php with db stuff) would not make use\n> of such a feature.\n>\n> If you can point out an example of where they are not using this\n> feature I will gladly stand corrected.\n>\n> --------------------------------------------------------------------\n> | Joseph Scott The Office Of Water Programs |\n> | [email protected] [email protected] |\n> --------------------------------------------------------------------\n\n",
"msg_date": "Wed, 15 Nov 2000 13:05:40 -0500",
"msg_from": "\"Adam Lang\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "At 09:27 AM 11/15/00 -0800, Tom Samplonius wrote:\n\n> AOLServer isn't the only system that can pool database connections, so\n>can servlets/JSP, ColdFusion, ASP, etc. No doubt AOLServer would be more\n>widely accepted if it used something other than TCL.\n\nThere are two separate modules that support Java in AOLserver: ns_tomcat\nwhich provides an identical interface as Apache tomcat (and no real\nadvantages) and ns_java, which is coming out of the OpenACS project. ns_java\nexposes AOLserver's pooled, persistent database API to java.\n\nThere's also support available for Python, though there's still a lot of\nwork to be done to support the full AOLserver API (same's true of ns_java,\nactually).\n\nIf you use ADP pages, your use of Tcl is typically restricted to snippets of\ncode anyway, so I've never really understood the complaints about Tcl...\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Wed, 15 Nov 2000 10:25:10 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "Andrew McMillan wrote:\n\n> mlw wrote:\n> >\n> > My music database has 50,000 arises and 210,000 albums. Many artists\n> > have only one or 2 entries in the albums table (for the youngsters, CD\n> > table ;-). About 34,000 have the integer key for \"Various Artists\" as\n> > their artist entry, and another few thousand have things like \"Movie\n> > Soundtrack\" and so on.\n> >\n> > When the statistics are computed, these relatively few records with a\n> > huge number of relations distort the statistics and make it impossible\n> > to get postgres to use an index on that table without the -fs switch.\n> >\n> > This is bad because it always forces use of an index, even when postgres\n> > would legitimately ignore it.\n>\n> What about doing:\n> SET enable_seqscan TO 'Off';\n> Just before the query in question?\n>\n> That way you'd only affect the single query. Possibly you could even\n> code to spot the two aberrant situations and not do it in those ones.\n\nI'd rather not pollute the application's SQL with postgres-isms. Not that I\ndon't love postgres, but there are always critics looking for a reason to use\nOracle or (gasp) MS-SQL.\n\nAs for \"code to spot..\" I am fairly new to hacking postgres. (Though, I have\nbeen using it in various projects since ~1995), but I am excellent C/C++ guy,\ngive me a pointer to where (a) statistics are calculated, and (b) where they\nare interpreted, and I would do that.\n\nJust a question, however, what is the feeling about the way statistics are\ncurrently being calculated? My feeling is that some sort of windowing\nalgorithm be used to normalize the statistics to the majority of the entries\nin a table. It could be as simple as discarding the upper and lower 10% of\nthe record stats, and use the remaining 80% for statistics. That would\ncertainly take care of my problem (and others I am sure), and I'd be glad to\nwrite it. ;-)\n\n>\n>\n> Regards,\n> Andrew.\n> --\n> _____________________________________________________________________\n> Andrew McMillan, e-mail: [email protected]\n> Catalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington\n> Me: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267\n\n",
"msg_date": "Wed, 15 Nov 2000 13:53:34 -0500",
"msg_from": "markw <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "At 01:53 PM 11/15/00 -0500, markw wrote:\n\n>I'd rather not pollute the application's SQL with postgres-isms. Not that I\n>don't love postgres, but there are always critics looking for a reason to use\n>Oracle or (gasp) MS-SQL.\n\nDefine some global variable with the name of the database being run (currently\nonly Postgres) and guard the SET statement with a conditional...\n\nIn the OpenACS project we've got little functions that return query snippets\ncalled things like \"db_nextval\" that return either \"sequence_name.nextval\"\nor \"nextval('sequence_name')\" depending on whether the code's running\nunder Oracle or Postgres. That helps us minimize differences in the source.\n\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Wed, 15 Nov 2000 11:09:06 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "markw <[email protected]> writes:\n> Just a question, however, what is the feeling about the way statistics are\n> currently being calculated?\n\nThey suck, no question about it ;-)\n\n> My feeling is that some sort of windowing\n> algorithm be used to normalize the statistics to the majority of the entries\n> in a table. It could be as simple as discarding the upper and lower 10% of\n> the record stats, and use the remaining 80% for statistics.\n\nI think what most of the discussion has focused on is building\nhistograms. The current upper-and-lower-bounds-only approach just\nplain isn't enough data, even if you discard outliers so that the\ndata isn't actively misleading.\n\nAs far as the most-common-value issue goes, if you have one value that\nis vastly more common than any other, I think it would be a real mistake\nto throw away that information --- that would mean the planner would do\nthe wrong thing for queries that do involve that value. What we need\nis to save info about several top-frequency values, maybe three or so,\nnot just one. Also the finding of those values needs to be much more\nrobust than it is currently.\n\nSee past discussions in pghackers --- there have been plenty...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 14:15:59 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL "
},
{
"msg_contents": "Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a \nmonth in a couple sites, and haven't experienced any problems with \npersistent connections. Problem might have been fixed in one of the point \nreleases, or maybe I just don't have enough different db connections to \ntrigger it.\n\n\nAt 02:05 PM 11/15/00, Adam Lang wrote:\n>PHP 4 was having problems with persistent connections (not sure if with just\n>pgsql or all dbs). Maybe that is why they didn't use it.\n>\n>Adam Lang\n>Systems Engineer\n>Rutgers Casualty Insurance Company\n>----- Original Message -----\n>From: <[email protected]>\n>To: \"carl garland\" <[email protected]>\n>Cc: <[email protected]>; <[email protected]>;\n><[email protected]>; <[email protected]>; <[email protected]>;\n><[email protected]>; <[email protected]>\n>Sent: Wednesday, November 15, 2000 12:28 PM\n>Subject: Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n>\n>\n> >\n> > On Wed, 15 Nov 2000, carl garland wrote:\n> >\n> > # >perhaps why, even at 5 clients, the page views he shows never went\n> > # >significantly above 10/sec?\n> > #\n> > # I think alot of it has to do with the web server/db setup not pg. They\n>are\n> > # using Apache/PHP and looking at their code every page has the additional\n> > # overhead of making the db connection. Now if they had used AOLserver\n>with\n> > # its persistent db connecction pooling scheme they may have faired better\n>;)\n> >\n> > I haven't actually looked at their code they used to test with to\n> > see if they are actually using it, but Apache/PHP has the ability to do\n> > persistent db connections. I would be surprised that someone like Tim (\n> > who seems to have done a fair bit of php with db stuff) would not make use\n> > of such a feature.\n> >\n> > If you can point out an example of where they are not using this\n> > feature I will gladly stand corrected.\n> >\n> > --------------------------------------------------------------------\n> > | Joseph Scott The Office Of Water Programs |\n> > | [email protected] [email protected] |\n> > --------------------------------------------------------------------\n\n",
"msg_date": "Wed, 15 Nov 2000 17:54:41 -0400",
"msg_from": "Charles Tassell <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "It is possible. I think the problems were arising before the currentpatch.\nProblems involved not properly releasing conenctions and they were\neventually filling up as used.\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\n----- Original Message -----\nFrom: \"Charles Tassell\" <[email protected]>\nTo: \"Adam Lang\" <[email protected]>\nCc: <[email protected]>\nSent: Wednesday, November 15, 2000 4:54 PM\nSubject: Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n\n\n> Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about\na\n> month in a couple sites, and haven't experienced any problems with\n> persistent connections. Problem might have been fixed in one of the point\n> releases, or maybe I just don't have enough different db connections to\n> trigger it.\n>\n>\n> At 02:05 PM 11/15/00, Adam Lang wrote:\n> >PHP 4 was having problems with persistent connections (not sure if with\njust\n> >pgsql or all dbs). Maybe that is why they didn't use it.\n> >\n> >Adam Lang\n> >Systems Engineer\n> >Rutgers Casualty Insurance Company\n> >----- Original Message -----\n> >From: <[email protected]>\n> >To: \"carl garland\" <[email protected]>\n> >Cc: <[email protected]>; <[email protected]>;\n> ><[email protected]>; <[email protected]>; <[email protected]>;\n> ><[email protected]>; <[email protected]>\n> >Sent: Wednesday, November 15, 2000 12:28 PM\n> >Subject: Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs\nMySQL\n> >\n> >\n> > >\n> > > On Wed, 15 Nov 2000, carl garland wrote:\n> > >\n> > > # >perhaps why, even at 5 clients, the page views he shows never went\n> > > # >significantly above 10/sec?\n> > > #\n> > > # I think alot of it has to do with the web server/db setup not pg.\nThey\n> >are\n> > > # using Apache/PHP and looking at their code every page has the\nadditional\n> > > # overhead of making the db connection. Now if they had used\nAOLserver\n> >with\n> > > # its persistent db connecction pooling scheme they may have faired\nbetter\n> >;)\n> > >\n> > > I haven't actually looked at their code they used to test with to\n> > > see if they are actually using it, but Apache/PHP has the ability to\ndo\n> > > persistent db connections. I would be surprised that someone like Tim\n(\n> > > who seems to have done a fair bit of php with db stuff) would not make\nuse\n> > > of such a feature.\n> > >\n> > > If you can point out an example of where they are not using this\n> > > feature I will gladly stand corrected.\n> > >\n> > > --------------------------------------------------------------------\n> > > | Joseph Scott The Office Of Water Programs |\n> > > | [email protected] [email protected] |\n> > > --------------------------------------------------------------------\n\n",
"msg_date": "Thu, 16 Nov 2000 08:47:42 -0500",
"msg_from": "\"Adam Lang\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "On Wed, 15 Nov 2000, Charles Tassell wrote:\n\n> Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a \n> month in a couple sites, and haven't experienced any problems with \n> persistent connections. Problem might have been fixed in one of the point \n> releases, or maybe I just don't have enough different db connections to \n> trigger it.\n\nI run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\nthe useof pg_pconnect() since it is broken. Broken how, you might\nask? Well, I ran on a standalone machine, no other web users but myself,\nto test, and each tim eI hit the database with IMP,. it opened a new\nbackend, but it never reused old, idle ones ... eventually, you run out of\nthe ability to connect since you've locked up all connections ...\n\n\n\n > > \n> At 02:05 PM 11/15/00, Adam Lang wrote:\n> >PHP 4 was having problems with persistent connections (not sure if with just\n> >pgsql or all dbs). Maybe that is why they didn't use it.\n> >\n> >Adam Lang\n> >Systems Engineer\n> >Rutgers Casualty Insurance Company\n> >----- Original Message -----\n> >From: <[email protected]>\n> >To: \"carl garland\" <[email protected]>\n> >Cc: <[email protected]>; <[email protected]>;\n> ><[email protected]>; <[email protected]>; <[email protected]>;\n> ><[email protected]>; <[email protected]>\n> >Sent: Wednesday, November 15, 2000 12:28 PM\n> >Subject: Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n> >\n> >\n> > >\n> > > On Wed, 15 Nov 2000, carl garland wrote:\n> > >\n> > > # >perhaps why, even at 5 clients, the page views he shows never went\n> > > # >significantly above 10/sec?\n> > > #\n> > > # I think alot of it has to do with the web server/db setup not pg. They\n> >are\n> > > # using Apache/PHP and looking at their code every page has the additional\n> > > # overhead of making the db connection. Now if they had used AOLserver\n> >with\n> > > # its persistent db connecction pooling scheme they may have faired better\n> >;)\n> > >\n> > > I haven't actually looked at their code they used to test with to\n> > > see if they are actually using it, but Apache/PHP has the ability to do\n> > > persistent db connections. I would be surprised that someone like Tim (\n> > > who seems to have done a fair bit of php with db stuff) would not make use\n> > > of such a feature.\n> > >\n> > > If you can point out an example of where they are not using this\n> > > feature I will gladly stand corrected.\n> > >\n> > > --------------------------------------------------------------------\n> > > | Joseph Scott The Office Of Water Programs |\n> > > | [email protected] [email protected] |\n> > > --------------------------------------------------------------------\n> \n> \n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n\n",
"msg_date": "Thu, 16 Nov 2000 13:33:08 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "The Hermit Hacker wrote:\n> \n> On Wed, 15 Nov 2000, Charles Tassell wrote:\n> \n> > Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a\n> > month in a couple sites, and haven't experienced any problems with\n> > persistent connections. Problem might have been fixed in one of the point\n> > releases, or maybe I just don't have enough different db connections to\n> > trigger it.\n> \n> I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\n> the useof pg_pconnect() since it is broken. Broken how, you might\n> ask? Well, I ran on a standalone machine, no other web users but myself,\n> to test, and each tim eI hit the database with IMP,. it opened a new\n> backend, but it never reused old, idle ones ... eventually, you run out of\n> the ability to connect since you've locked up all connections ...\n\nThat sounds pretty evil. Have you also tested PHP3 by any chance? Has this been posted to\nphp-general? If this is a general issue, it would have to be considered a _very_ nasty bug\nindeed. Can you describe how you made the test, i.e. how you saw that it wouldn't reuse\nidle ones and keeps opening new ones? How would you monitor this?\n\n- Frank\n",
"msg_date": "Thu, 16 Nov 2000 19:08:40 +0100",
"msg_from": "Frank Joerdens <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "Basically, after so many people connect and disconnect, the PHP doesn't\nreuse/drop old connections so you maximum amount is reached. You'd get to\nthe point where no one is connected, but one another person would try to and\nit would come back with an error saying no connections available.\n\nI am unaware if anything has been posted to PHP about it.\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\n----- Original Message -----\nFrom: \"Frank Joerdens\" <[email protected]>\nTo: \"The Hermit Hacker\" <[email protected]>\nCc: \"Charles Tassell\" <[email protected]>; \"Adam Lang\"\n<[email protected]>; <[email protected]>;\n<[email protected]>\nSent: Thursday, November 16, 2000 1:08 PM\nSubject: Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL\n\n\n> The Hermit Hacker wrote:\n> >\n> > On Wed, 15 Nov 2000, Charles Tassell wrote:\n> >\n> > > Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for\nabout a\n> > > month in a couple sites, and haven't experienced any problems with\n> > > persistent connections. Problem might have been fixed in one of the\npoint\n> > > releases, or maybe I just don't have enough different db connections\nto\n> > > trigger it.\n> >\n> > I run PHP4 and IMP (http://www.horde.org) and we've gotten then to\nremove\n> > the useof pg_pconnect() since it is broken. Broken how, you might\n> > ask? Well, I ran on a standalone machine, no other web users but\nmyself,\n> > to test, and each tim eI hit the database with IMP,. it opened a new\n> > backend, but it never reused old, idle ones ... eventually, you run out\nof\n> > the ability to connect since you've locked up all connections ...\n>\n> That sounds pretty evil. Have you also tested PHP3 by any chance? Has this\nbeen posted to\n> php-general? If this is a general issue, it would have to be considered a\n_very_ nasty bug\n> indeed. Can you describe how you made the test, i.e. how you saw that it\nwouldn't reuse\n> idle ones and keeps opening new ones? How would you monitor this?\n>\n> - Frank\n\n",
"msg_date": "Thu, 16 Nov 2000 13:29:39 -0500",
"msg_from": "\"Adam Lang\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "Frank Joerdens wrote:\n> \n> The Hermit Hacker wrote:\n> >\n> > On Wed, 15 Nov 2000, Charles Tassell wrote:\n> >\n> > > Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a\n> > > month in a couple sites, and haven't experienced any problems with\n> > > persistent connections. Problem might have been fixed in one of the point\n> > > releases, or maybe I just don't have enough different db connections to\n> > > trigger it.\n> >\n> > I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\n> > the useof pg_pconnect() since it is broken. Broken how, you might\n> > ask? Well, I ran on a standalone machine, no other web users but myself,\n> > to test, and each tim eI hit the database with IMP,. it opened a new\n> > backend, but it never reused old, idle ones ... eventually, you run out of\n> > the ability to connect since you've locked up all connections ...\n> \n> That sounds pretty evil. Have you also tested PHP3 by any chance? Has this been posted to\n> php-general? If this is a general issue, it would have to be considered a _very_ nasty bug\n> indeed. Can you describe how you made the test, i.e. how you saw that it wouldn't reuse\n> idle ones and keeps opening new ones? How would you monitor this?\n\nWe have looked into the issue. Our conclusion was that persistent \nconnections are allocated by httpd process. They are persistent, \nbut not shared. Thus, if you have hundredes of httpd processes, \nyou have issues (fewer if you don't tune postgres max allowable \nbackends). Or if there is more than one user or DB\nper httpd process.\n\nWe have seen the same behavior on PHP3 and on PHP4.\n\nMaybe our diagnosis is wrong. I would love to be able to\nuse persistent connections. But I don't think it is a bug \nper say. The docs talk about persistence. They say nothing\nabout pooling. (maybe phplib will do this -- I have not \nlooked).\nuse persistent\n\n-- \nKarl DeBisschop [email protected]\nLearning Network Reference http://www.infoplease.com\nNetsaint Plugin Developer [email protected]\n",
"msg_date": "Thu, 16 Nov 2000 13:45:36 -0500",
"msg_from": "Karl DeBisschop <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "On Thu, Nov 16, 2000 at 01:33:08PM -0400, The Hermit Hacker wrote:\n> On Wed, 15 Nov 2000, Charles Tassell wrote:\n> \n> > Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a \n> > month in a couple sites, and haven't experienced any problems with \n> > persistent connections. Problem might have been fixed in one of the point \n> > releases, or maybe I just don't have enough different db connections to \n> > trigger it.\n> \n> I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\n> the useof pg_pconnect() since it is broken. Broken how, you might\n> ask? Well, I ran on a standalone machine, no other web users but myself,\n> to test, and each tim eI hit the database with IMP,. it opened a new\n> backend, but it never reused old, idle ones ... eventually, you run out of\n> the ability to connect since you've locked up all connections ...\n\nMaybe you have the apache maxspareservers set too high? I run\nPHP4/apache (debian-woody) and it works ok. If this is only IMP\nsite maybe you are better off\n\n apache.MaxClients = postgres.backendcount \n\nJust a thought.\n\n-- \nmarko\n\n",
"msg_date": "Fri, 17 Nov 2000 03:54:12 +0200",
"msg_from": "Marko Kreen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "\nInstall PgSQL, install PHP4, install IMP ... do it on a standalone machine\nthat you would never get an external connection on ... open connection to\nIMP several times and watch number of postgres backends start and never\ndie ...\n\n\n On Thu, 16 Nov 2000, Frank Joerdens wrote:\n\n> The Hermit Hacker wrote:\n> > \n> > On Wed, 15 Nov 2000, Charles Tassell wrote:\n> > \n> > > Just a note, I've been using Postgres 7.02 and PHP 4.02 or 4.03 for about a\n> > > month in a couple sites, and haven't experienced any problems with\n> > > persistent connections. Problem might have been fixed in one of the point\n> > > releases, or maybe I just don't have enough different db connections to\n> > > trigger it.\n> > \n> > I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\n> > the useof pg_pconnect() since it is broken. Broken how, you might\n> > ask? Well, I ran on a standalone machine, no other web users but myself,\n> > to test, and each tim eI hit the database with IMP,. it opened a new\n> > backend, but it never reused old, idle ones ... eventually, you run out of\n> > the ability to connect since you've locked up all connections ...\n> \n> That sounds pretty evil. Have you also tested PHP3 by any chance? Has this been posted to\n> php-general? If this is a general issue, it would have to be considered a _very_ nasty bug\n> indeed. Can you describe how you made the test, i.e. how you saw that it wouldn't reuse\n> idle ones and keeps opening new ones? How would you monitor this?\n> \n> - Frank\n> \n> \n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n",
"msg_date": "Fri, 17 Nov 2000 02:33:06 -0400 (AST)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "Greetings, The Hermit Hacker!\n\n Well, there's a problem with PHP's [mis]documentation. First of all,\nit counts open DB connections not on per-webserver, but on\nper-process/thread basis.\n The default PHP config file has the limits of persistent and\nnon-persistent connections set to -1 (no limit)... Setting it to\nsome (supposedly) reasonable value (like, 50) accomplishes nothing: you\nshould multiply 50 by the number of webserver processes/threads. There\ncan be lots of them... :[\n And then there comes PHP's \"logic\": if I can just open the new\nconnection, why bother reusing the old one? And thus Postgres backends\nstart multiplying like rabbits, eventually reaching the limit... :[\n You should set a reasonable limit on number of open persistent\nconnections (like 1, maybe 2 or 3), only then PHP will actually reuse\nthem. My webserver now works with such setup and there are no more\nproblems with pg_pconnect().\n\n\nHell, I never thought I'll give advice to one of PgGurus. ;]\n\nAt 16.11.2000, 11:21, you wrote:\nTHH> I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\nTHH> the useof pg_pconnect() since it is broken. Broken how, you might\nTHH> ask? Well, I ran on a standalone machine, no other web users but myself,\nTHH> to test, and each tim eI hit the database with IMP,. it opened a new\nTHH> backend, but it never reused old, idle ones ... eventually, you run out of\nTHH> the ability to connect since you've locked up all connections ...\n-- \nYours, Alexey V. Borzov, Webmaster of RDW\n\n\n",
"msg_date": "Fri, 17 Nov 2000 11:36:01 +0300",
"msg_from": "Alexey Borzov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re[2]: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "On Jue 16 Nov 2000 22:54, Marko Kreen wrote:\n> On Thu, Nov 16, 2000 at 01:33:08PM -0400, The Hermit Hacker wrote:\n> >\n> > I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\n> > the useof pg_pconnect() since it is broken. Broken how, you might\n> > ask? Well, I ran on a standalone machine, no other web users but myself,\n> > to test, and each tim eI hit the database with IMP,. it opened a new\n> > backend, but it never reused old, idle ones ... eventually, you run out\n> > of the ability to connect since you've locked up all connections ...\n>\n> Maybe you have the apache maxspareservers set too high? I run\n> PHP4/apache (debian-woody) and it works ok. If this is only IMP\n> site maybe you are better off\n>\n> apache.MaxClients = postgres.backendcount\n\nWhat I can say on my behave is that (as the only user of PHP and Postgres on \nthe computer) when I login to IMP webmail, quite a lot of postmasters appear, \nand don't dissapear after logging off.\nbut I have no problem. I can be all day with IMP fooling around and the \nbackend postmaster would stay around the 20 live conections.\n\nAny comments?\n\nSaludos.. :-)\n\n\n-- \n\"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n-----------------------------------------------------------------\nMart���n Marqu���s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n",
"msg_date": "Fri, 17 Nov 2000 16:08:26 -0300",
"msg_from": "\"Martin A. Marques\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "> On Jue 16 Nov 2000 22:54, Marko Kreen wrote:\n> > On Thu, Nov 16, 2000 at 01:33:08PM -0400, The Hermit Hacker wrote:\n> > >\n> > > I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove\n> > > the useof pg_pconnect() since it is broken. Broken how, you might\n> > > ask? Well, I ran on a standalone machine, no other web users but myself,\n> > > to test, and each tim eI hit the database with IMP,. it opened a new\n> > > backend, but it never reused old, idle ones ... eventually, you run out\n> > > of the ability to connect since you've locked up all connections ...\n> >\n> > Maybe you have the apache maxspareservers set too high? I run\n> > PHP4/apache (debian-woody) and it works ok. If this is only IMP\n> > site maybe you are better off\n> >\n> > apache.MaxClients = postgres.backendcount\n> \n> What I can say on my behave is that (as the only user of PHP and Postgres on \n> the computer) when I login to IMP webmail, quite a lot of postmasters appear, \n> and don't dissapear after logging off.\n> but I have no problem. I can be all day with IMP fooling around and the \n> backend postmaster would stay around the 20 live conections.\n> \n> Any comments?\n\nWhat is the value for MinSpareServers in your apache's conf? If that's\nset to 20, then even if you only hit your site 20 times (one for each),\nthat many apache processes will continue to live and therefore keep a db\nconnection open..??\n\nWhat would be interesting to know is after your down how many postmaster\nprocesses are running and how many httpd processes are running...\n\n-philip\n\n",
"msg_date": "Fri, 17 Nov 2000 13:15:20 -0800 (PST)",
"msg_from": "Philip Hallstrom <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "On Fri, 17 Nov 2000, Philip Hallstrom wrote:\n\n> What is the value for MinSpareServers in your apache's conf? If that's\n> set to 20, then even if you only hit your site 20 times (one for each),\n> that many apache processes will continue to live and therefore keep a db\n> connection open..??\n> \n> What would be interesting to know is after your down how many postmaster\n> processes are running and how many httpd processes are running...\n\npostamaster - 19\nhttpd - 11\n\nSaludos... ;-)\n\n\n\"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n\n",
"msg_date": "Fri, 17 Nov 2000 18:48:17 -0300 (ART)",
"msg_from": "\"Martin A. Marques\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "On Friday 17 November 2000 18:15, Philip Hallstrom wrote:\n>\n> What is the value for MinSpareServers in your apache's conf? If that's\n> set to 20, then even if you only hit your site 20 times (one for each),\n> that many apache processes will continue to live and therefore keep a db\n> connection open..??\n\nI have 10 as MaxSpareServers and 5 as MinSpareServers.\n\n> What would be interesting to know is after your down how many postmaster\n> processes are running and how many httpd processes are running...\n\nMy question would be, when do those connections die?\n\nSaludos... :-)\n\n\n-- \n\"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n-----------------------------------------------------------------\nMart���n Marqu���s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n",
"msg_date": "Mon, 20 Nov 2000 15:43:27 -0300",
"msg_from": "\"Martin A. Marques\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "My understanding is that with your configs below you will always have 10\nhttpd proccesses running as long as your machine is up... ie... they will\nnever die.\n\nOn Mon, 20 Nov 2000, Martin A. Marques wrote:\n\n> On Friday 17 November 2000 18:15, Philip Hallstrom wrote:\n> >\n> > What is the value for MinSpareServers in your apache's conf? If that's\n> > set to 20, then even if you only hit your site 20 times (one for each),\n> > that many apache processes will continue to live and therefore keep a db\n> > connection open..??\n> \n> I have 10 as MaxSpareServers and 5 as MinSpareServers.\n> \n> > What would be interesting to know is after your down how many postmaster\n> > processes are running and how many httpd processes are running...\n> \n> My question would be, when do those connections die?\n> \n> Saludos... :-)\n> \n> \n> -- \n> \"And I'm happy, because you make me feel good, about me.\" - Melvin Udall\n> -----------------------------------------------------------------\n> Mart�n Marqu�s\t\t\temail: \[email protected]\n> Santa Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\n> Administrador de sistemas en math.unl.edu.ar\n> -----------------------------------------------------------------\n> \n\n",
"msg_date": "Tue, 21 Nov 2000 08:41:04 -0800 (PST)",
"msg_from": "Philip Hallstrom <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "\n>\n> > AOLServer isn't the only system that can pool database connections, so\n> >can servlets/JSP, ColdFusion, ASP, etc. No doubt AOLServer would be more\n> >widely accepted if it used something other than TCL.\n>\n>There's also support available for Python, though there's still a lot of\n>work to be done to support the full AOLserver API (same's true of ns_java,\n>actually).\n>\n>If you use ADP pages, your use of Tcl is typically restricted to snippets of\n>code anyway, so I've never really understood the complaints about Tcl...\n\nWhat about the php module? Does it take advantage of API?\nIt seems to me your choice of web/application server is kind of dependent \non the language you like. If you like perl/php use apache if you like tcl \nuse aolserver, if you like java use tomcat,enhydra,orion (or whatever), if \nyou like python use zope. I guess for the few people who like VB there is \nIIS/ASP.\n\n:wq\nTim Uckun\nDue Diligence Inc. http://www.diligence.com/ Americas Background \nInvestigation Expert.\nIf your company isn't doing background checks, maybe you haven't considered \nthe risks of a bad hire.\n\n",
"msg_date": "Tue, 21 Nov 2000 09:44:47 -0700",
"msg_from": "Tim Uckun <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "At 09:44 AM 11/21/00 -0700, Tim Uckun wrote:\n\n>What about the php module? Does it take advantage of API?\n\nI don't know. If not, though, there wouldn't be much point in using\nAOLserver, since the simple and efficient database API is the main\nattraction. So I think there's a pretty good chance it does.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 23 Nov 2000 07:58:29 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "On Thu, Nov 23, 2000 at 07:58:29AM -0800, some SMTP stream spewed forth: \n> At 09:44 AM 11/21/00 -0700, Tim Uckun wrote:\n> \n> >What about the php module? Does it take advantage of API?\n> \n> I don't know. If not, though, there wouldn't be much point in using\n> AOLserver, since the simple and efficient database API is the main\n> attraction. So I think there's a pretty good chance it does.\n> \n\nThrough the course of another thread on the lists we have concluded that\nPHP does not support the AOLServer (or any other similar) database API.\nThe \"blockage\" is that PHP includes its own database functions, albeit\nthey are based on the Postgres, MySQL, etc. APIs individually. \n\nI am considering looking into urging an integration of PHP and\nAOLServer's connection pooling (for lack of a better word) stuff.\n\n*shrug*\n\ngh\n\n> \n> \n> - Don Baccus, Portland OR <[email protected]>\n> Nature photos, on-line guides, Pacific Northwest\n> Rare Bird Alert Service and other goodies at\n> http://donb.photo.net.\n",
"msg_date": "Thu, 30 Nov 2000 19:50:26 -0600",
"msg_from": "GH <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL"
},
{
"msg_contents": "At 07:50 PM 11/30/00 -0600, GH wrote:\n>On Thu, Nov 23, 2000 at 07:58:29AM -0800, some SMTP stream spewed forth: \n>> At 09:44 AM 11/21/00 -0700, Tim Uckun wrote:\n>> \n>> >What about the php module? Does it take advantage of API?\n>> \n>> I don't know. If not, though, there wouldn't be much point in using\n>> AOLserver, since the simple and efficient database API is the main\n>> attraction. So I think there's a pretty good chance it does.\n>> \n>\n>Through the course of another thread on the lists we have concluded that\n>PHP does not support the AOLServer (or any other similar) database API.\n>The \"blockage\" is that PHP includes its own database functions, albeit\n>they are based on the Postgres, MySQL, etc. APIs individually. \n>\n>I am considering looking into urging an integration of PHP and\n>AOLServer's connection pooling (for lack of a better word) stuff.\n\nWell, meanwhile I've gotten confirmation from folks in the PHP world \n(via an openacs forum) that it still isn't threadsafe, though there's\nan effort underway to track down the problems. I don't know how close\nto solving this they are.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 30 Nov 2000 17:57:44 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vs\n MySQL"
},
{
"msg_contents": "Don Baccus wrote:\n> \n[ . . . ]\n> Well, meanwhile I've gotten confirmation from folks in the PHP world\n> (via an openacs forum) \n\nWhich forum is that? I'm asking because I am currently trying to migrate\nfrom PHP to Openacs, or integrate the two somehow (lurking on this list\nhas convinced me that openacs deserves a hard look indeed), and thus I'd\nlike to find a forum where relevant stuff is being discussed.\n\nTa,\nFrank\n",
"msg_date": "Fri, 01 Dec 2000 12:39:50 +0100",
"msg_from": "Frank Joerdens <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vsMySQL"
},
{
"msg_contents": ">>>>> \"Frank\" == Frank Joerdens <[email protected]> writes:\n\n Frank> Which forum is that? I'm asking because I am currently\n Frank> trying to migrate from PHP to Openacs, or integrate the two\n Frank> somehow (lurking on this list has convinced me that openacs\n Frank> deserves a hard look indeed), and thus I'd like to find a\n Frank> forum where relevant stuff is being discussed.\n\n\nCheck out the bboard forums at http://openacs.org/\n\n-Dan\n",
"msg_date": "Fri, 1 Dec 2000 09:53:01 -0500 (EST)",
"msg_from": "Daniel Wickstrom <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres vsMySQL"
},
{
"msg_contents": "At 12:39 PM 12/1/00 +0100, Frank Joerdens wrote:\n>Don Baccus wrote:\n>> \n>[ . . . ]\n>> Well, meanwhile I've gotten confirmation from folks in the PHP world\n>> (via an openacs forum) \n>\n>Which forum is that? I'm asking because I am currently trying to migrate\n>from PHP to Openacs, or integrate the two somehow (lurking on this list\n>has convinced me that openacs deserves a hard look indeed), and thus I'd\n>like to find a forum where relevant stuff is being discussed.\n\nHere's the URL to the thread discussion PHP and AOLserver (and other\nstuff, as naturally happens to threads!)\n\nhttp://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0000lY&topic_id=11&topic=OpenACS\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Fri, 01 Dec 2000 06:57:45 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: PHPBuilder article -- Postgres\n vsMySQL"
}
]
|
[
{
"msg_contents": "\n> > We need the 7.0 style for compatibility with other DB's. Postgres was \n> > \"the\" pioneer in this area, but similar functionality is now available in other DB's.\n> \n> Could you explain? PostgreSQL cant be compatible in C level, why\n> the SQL compatibility? (I mean the LANGUAGE 'C' specifically)\n\nC code compatible with Informix:\n\nint32 intadd (int32 a, int32 b)\n{\n\treturn a + b;\n}\n\nThis is the same code that was standard in PostgreSQL 7.0\n\nAndreas\n",
"msg_date": "Wed, 15 Nov 2000 14:42:24 +0100",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "On Wed, Nov 15, 2000 at 02:42:24PM +0100, Zeugswetter Andreas SB wrote:\n> \n> > > We need the 7.0 style for compatibility with other DB's. Postgres was \n> > > \"the\" pioneer in this area, but similar functionality is now available in other DB's.\n> > \n> > Could you explain? PostgreSQL cant be compatible in C level, why\n> > the SQL compatibility? (I mean the LANGUAGE 'C' specifically)\n> \n> C code compatible with Informix:\n> \n> int32 intadd (int32 a, int32 b)\n> {\n> \treturn a + b;\n> }\n> \n> This is the same code that was standard in PostgreSQL 7.0\n\nHmm, I have not actually researched if 7.1 supports 7.0 'C' code\nor not. Butthe 'newC' is anyway incompatible with 'C'. So:\n\n* CREATE FUNCTION .. AS 'foo.so', .. LANGUAGE 'C';\n\n creates the old� 'C', 7.0 and ifnormix compatible funtion.\n\n And it is documented as deprecated, for-compatibility.\n\n* CREATE FUNCTION .. FROM LIBRARY 'foo.so.2' ..{name in .so}\n [WITH VERSION abi_ver]\n {the actual syntax needs polishing}\n\n creates by default the newC style fn's\n but WITH VERSION 0 (e.g.) you can create the old style\n functions too.\n\nComments?\n\n-- \nmarko\n\n",
"msg_date": "Wed, 15 Nov 2000 16:03:26 +0200",
"msg_from": "\"'Marko Kreen'\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "'Marko Kreen' wrote:\n> \n> On Wed, Nov 15, 2000 at 02:42:24PM +0100, Zeugswetter Andreas SB wrote:\n> >\n> > > > We need the 7.0 style for compatibility with other DB's. Postgres was\n> > > > \"the\" pioneer in this area, but similar functionality is now available in other DB's.\n> > >\n> > > Could you explain? PostgreSQL cant be compatible in C level, why\n> > > the SQL compatibility? (I mean the LANGUAGE 'C' specifically)\n> >\n> > C code compatible with Informix:\n> >\n> > int32 intadd (int32 a, int32 b)\n> > {\n> > return a + b;\n> > }\n> >\n> > This is the same code that was standard in PostgreSQL 7.0\n> \n> Hmm, I have not actually researched if 7.1 supports 7.0 'C' code\n> or not. Butthe 'newC' is anyway incompatible with 'C'. So:\n> \n> * CREATE FUNCTION .. AS 'foo.so', .. LANGUAGE 'C';\n> \n> creates the old� 'C', 7.0 and ifnormix compatible funtion.\n> \n> And it is documented as deprecated, for-compatibility.\n> \n> * CREATE FUNCTION .. FROM LIBRARY 'foo.so.2' ..{name in .so}\n> [WITH VERSION abi_ver]\n> {the actual syntax needs polishing}\n> \n> creates by default the newC style fn's\n> but WITH VERSION 0 (e.g.) you can create the old style\n> functions too.\n> \n> Comments?\n\nI generally like the idea, but I am working on a text index/search\nproject that will rely heavily on C interfacing with Postgres.\n\nI'm not sure what \"NewC\" is, nor do I understand what problem it is\nattempting to fix.\n\n\n-- \nhttp://www.mohawksoft.com\n",
"msg_date": "Wed, 15 Nov 2000 09:09:27 -0500",
"msg_from": "mlw <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names"
},
{
"msg_contents": "mlw <[email protected]> writes:\n> I'm not sure what \"NewC\" is, nor do I understand what problem it is\n> attempting to fix.\n\nI haven't gotten around to updating the main documentation yet (my bad)\nbut the design document about the fmgr rewrite is in current sources\nas src/backend/utils/fmgr/README --- you can read it on the web at\nhttp://www.postgresql.org/cgi/cvsweb.cgi/pgsql/src/backend/utils/fmgr/README\nif you don't have a local copy.\n\nThe key issues are summarized in that document as:\n\n: We know that the existing mechanism for calling Postgres functions needs\n: to be redesigned. It has portability problems because it makes\n: assumptions about parameter passing that violate ANSI C; it fails to\n: handle NULL arguments and results cleanly; and \"function handlers\" that\n: support a class of functions (such as fmgr_pl) can only be done via a\n: really ugly, non-reentrant kluge. (Global variable set during every\n: function call, forsooth.) Here is a proposal for fixing these problems.\n\nTo answer another misconception that I saw in this thread:\n\n: The old language names \"internal\" and \"C\" will continue to refer to\n: functions with the old calling convention. We should deprecate\n: old-style functions because of their portability problems, but the\n: support for them will only be one small function handler routine,\n: so we can leave them in place for as long as necessary.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 15 Nov 2000 11:13:39 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language names "
},
{
"msg_contents": "> To answer another misconception that I saw in this thread:\n> \n> : The old language names \"internal\" and \"C\" will continue to refer to\n> : functions with the old calling convention. We should deprecate\n> : old-style functions because of their portability problems, but the\n> : support for them will only be one small function handler routine,\n> : so we can leave them in place for as long as necessary.\n\nMy question is can we drop newC and use just plain C in 7.2 or 7.3?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 15 Nov 2000 23:42:05 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language namesh"
},
{
"msg_contents": "At 23:42 15/11/00 -0500, Bruce Momjian wrote:\n>> To answer another misconception that I saw in this thread:\n>> \n>> : The old language names \"internal\" and \"C\" will continue to refer to\n>> : functions with the old calling convention. We should deprecate\n>> : old-style functions because of their portability problems, but the\n>> : support for them will only be one small function handler routine,\n>> : so we can leave them in place for as long as necessary.\n>\n>My question is can we drop newC and use just plain C in 7.2 or 7.3?\n\nI plan to work on a a proposal for a (hopefully) version independant\nfunction manager interface; the idea behind the proposal is to allow PGSQL\nto query the modules for information about the functions, but calling a\nsingle known entry point. The information stored in the database relation\nwould be substantially reduced, and the backends would load the module then\nenquire about the functions, storing the results in memory. The kind of SQL\nrequired would be:\n\n Create Function foo(int4, int4) from library 'path-to-lib';\n\nand possibly,\n\n Create Module foo_mod from library 'path-to-lib';\n\nThe idea being to only store whe function signature and enough details to\nget to the info-function. If 'Create Module' were allowed, then it would\nautomatically create appropriate function definitions when the statement\nwas executed.\n\nThe info-function would return data in a struct passed from the backend,\nand part of the struct would include version information. The backend would\nthen be responsible for handling new & old protocols.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n",
"msg_date": "Thu, 16 Nov 2000 16:16:26 +1100",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language\n namesh"
},
{
"msg_contents": "On Thu, Nov 16, 2000 at 04:16:26PM +1100, Philip Warner wrote:\n> \n> and possibly,\n> \n> Create Module foo_mod from library 'path-to-lib';\n> \n> The idea being to only store whe function signature and enough details to\n> get to the info-function. If 'Create Module' were allowed, then it would\n> automatically create appropriate function definitions when the statement\n> was executed.\n> \n\nPhil - be careful with the nomenclature. We've got another naming collision,\nhere. SQL9[29] talk about modules, which may or may not be related to what\nyour suggesting here.\n\nRoss\n-- \nOpen source code is like a natural resource, it's the result of providing\nfood and sunshine to programmers, and then staying out of their way.\n[...] [It] is not going away because it has utility for both the developers \nand users independent of economic motivations. Jim Flynn, Sunnyvale, Calif.\n",
"msg_date": "Thu, 16 Nov 2000 09:32:43 -0600",
"msg_from": "\"Ross J. Reedstrom\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language namesh"
},
{
"msg_contents": "On Thu, Nov 16, 2000 at 09:32:43AM -0600, Ross J. Reedstrom wrote:\n> On Thu, Nov 16, 2000 at 04:16:26PM +1100, Philip Warner wrote:\n> > Create Module foo_mod from library 'path-to-lib';\n> \n> Phil - be careful with the nomenclature. We've got another naming collision,\n> here. SQL9[29] talk about modules, which may or may not be related to what\n> your suggesting here.\n\nDo you know any url's where the SQL* standards could be looked\nup?\n\nMark Hollomon's idea was to use 'package' not 'module', but\nofcourse it would be nice to be SQL* conforming.\n\n-- \nmarko\n\n",
"msg_date": "Thu, 16 Nov 2000 17:51:07 +0200",
"msg_from": "\"'Marko Kreen'\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language namesh"
},
{
"msg_contents": "At 05:51 PM 11/16/00 +0200, 'Marko Kreen' wrote:\n>On Thu, Nov 16, 2000 at 09:32:43AM -0600, Ross J. Reedstrom wrote:\n>> On Thu, Nov 16, 2000 at 04:16:26PM +1100, Philip Warner wrote:\n>> > Create Module foo_mod from library 'path-to-lib';\n>> \n>> Phil - be careful with the nomenclature. We've got another naming\ncollision,\n>> here. SQL9[29] talk about modules, which may or may not be related to what\n>> your suggesting here.\n>\n>Do you know any url's where the SQL* standards could be looked\n>up?\n\nI have a copy of the SQL92 draft (the one that's circulated among this\ngroup in\nthe past) at dsl-dhogaza.pacifier.net. Just use anonymous ftp, it's in the\npub\ndirectory with an obvious name (sql1992.txt???)\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 16 Nov 2000 07:53:41 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language\n namesh"
},
{
"msg_contents": "On Thu, Nov 16, 2000 at 05:51:07PM +0200, 'Marko Kreen' wrote:\n> On Thu, Nov 16, 2000 at 09:32:43AM -0600, Ross J. Reedstrom wrote:\n> > On Thu, Nov 16, 2000 at 04:16:26PM +1100, Philip Warner wrote:\n> > > Create Module foo_mod from library 'path-to-lib';\n> > \n> > Phil - be careful with the nomenclature. We've got another naming collision,\n> > here. SQL9[29] talk about modules, which may or may not be related to what\n> > your suggesting here.\n> \n> Do you know any url's where the SQL* standards could be looked\n> up?\n> \n> Mark Hollomon's idea was to use 'package' not 'module', but\n> ofcourse it would be nice to be SQL* conforming.\n\nWell, the 1999 standards seem to live at:\n\nftp://jerry.ece.umassd.edu/isowg3/x3h2/Standards/\n\nWhich is the working repository for the ANSI database committee (x3h2)\n\nRoss\n-- \nOpen source code is like a natural resource, it's the result of providing\nfood and sunshine to programmers, and then staying out of their way.\n[...] [It] is not going away because it has utility for both the developers \nand users independent of economic motivations. Jim Flynn, Sunnyvale, Calif.\n",
"msg_date": "Thu, 16 Nov 2000 09:59:26 -0600",
"msg_from": "\"Ross J. Reedstrom\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Coping with 'C' vs 'newC' function language namesh"
}
]
|
[
{
"msg_contents": "Hello,\n\nI posted this message on pgsql-general, but didn't get a lot of feedback. I am\nrunning into problems using PL/Perl on Solaris 2.5.1.\n\nI have PostgreSQL v7.0.2, Perl v 5.005_03 (built as a shared library), and am\nusing gcc v2.7.2.2 to compile all of the source.\n\nI include the paths to libperl.so and plperl.so in my LD_LIBRARY_PATH\nenvironment variable. \n\nI can create the plperl language and create functions that are defined as using\nplperl. When I attempt to execute the fundtion the postgres server crashes with \na status of 11.\n\nIf anybody has any clues, hints, previous experiences about this scenario, your\nhelp would be greatly appreciated.\n\nWade Oberpriller\nStorageTek\[email protected]\n\n",
"msg_date": "Wed, 15 Nov 2000 10:30:01 -0600 (CST)",
"msg_from": "[email protected] (Wade D. Oberpriller)",
"msg_from_op": true,
"msg_subject": "PL/Perl on Solaris"
}
]
|
[
{
"msg_contents": "> Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> log file across transactions (after writing your commit record to the\n> log, sleep a few milliseconds to see if anyone else fsyncs before you\n> do; if not, issue the fsync yourself). That would offer less-than-\n> one-fsync-per-transaction performance without giving up any \n> guarantees.\n> If people feel a compulsion to have a tunable parameter, let 'em tune\n> the length of the pre-fsync sleep ...\n\nAlready implemented (without ability to tune this parameter - \nxact.c:CommitDelay, - yet). Currently CommitDelay is 5, so\nbackend sleeps 1/200 sec before checking/forcing log fsync.\n\nVadim\n",
"msg_date": "Wed, 15 Nov 2000 10:50:56 -0800",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> > Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> > log file across transactions (after writing your commit record to the\n> > log, sleep a few milliseconds to see if anyone else fsyncs before you\n> > do; if not, issue the fsync yourself). That would offer less-than-\n> > one-fsync-per-transaction performance without giving up any \n> > guarantees.\n> > If people feel a compulsion to have a tunable parameter, let 'em tune\n> > the length of the pre-fsync sleep ...\n> \n> Already implemented (without ability to tune this parameter - \n> xact.c:CommitDelay, - yet). Currently CommitDelay is 5, so\n> backend sleeps 1/200 sec before checking/forcing log fsync.\n\nBut it returns _completed_ to the client before sleeping, right?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 00:31:03 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "> > > Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> > > log file across transactions (after writing your commit record to the\n> > > log, sleep a few milliseconds to see if anyone else fsyncs before you\n> > > do; if not, issue the fsync yourself). That would offer less-than-\n> > > one-fsync-per-transaction performance without giving up any \n> > > guarantees.\n> > > If people feel a compulsion to have a tunable parameter, let 'em tune\n> > > the length of the pre-fsync sleep ...\n> > \n> > Already implemented (without ability to tune this parameter - \n> > xact.c:CommitDelay, - yet). Currently CommitDelay is 5, so\n> > backend sleeps 1/200 sec before checking/forcing log fsync.\n> \n> But it returns _completed_ to the client before sleeping, right?\n\nNo.\n\nVadim\n\n\n",
"msg_date": "Thu, 16 Nov 2000 00:03:32 -0800",
"msg_from": "\"Vadim Mikheev\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> > > > Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> > > > log file across transactions (after writing your commit record to the\n> > > > log, sleep a few milliseconds to see if anyone else fsyncs before you\n> > > > do; if not, issue the fsync yourself). That would offer less-than-\n> > > > one-fsync-per-transaction performance without giving up any \n> > > > guarantees.\n> > > > If people feel a compulsion to have a tunable parameter, let 'em tune\n> > > > the length of the pre-fsync sleep ...\n> > > \n> > > Already implemented (without ability to tune this parameter - \n> > > xact.c:CommitDelay, - yet). Currently CommitDelay is 5, so\n> > > backend sleeps 1/200 sec before checking/forcing log fsync.\n> > \n> > But it returns _completed_ to the client before sleeping, right?\n> \n> No.\n\nEwe, so we have this 1/200 second delay for every transaction. Seems\nbad to me.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 11:59:08 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001116 08:59] wrote:\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > > > > Earlier, Vadim was talking about arranging to share fsyncs of the WAL\n> > > > > log file across transactions (after writing your commit record to the\n> > > > > log, sleep a few milliseconds to see if anyone else fsyncs before you\n> > > > > do; if not, issue the fsync yourself). That would offer less-than-\n> > > > > one-fsync-per-transaction performance without giving up any \n> > > > > guarantees.\n> > > > > If people feel a compulsion to have a tunable parameter, let 'em tune\n> > > > > the length of the pre-fsync sleep ...\n> > > > \n> > > > Already implemented (without ability to tune this parameter - \n> > > > xact.c:CommitDelay, - yet). Currently CommitDelay is 5, so\n> > > > backend sleeps 1/200 sec before checking/forcing log fsync.\n> > > \n> > > But it returns _completed_ to the client before sleeping, right?\n> > \n> > No.\n> \n> Ewe, so we have this 1/200 second delay for every transaction. Seems\n> bad to me.\n\nI think as long as it becomes a tunable this isn't a bad idea at\nall. Fixing it at 1/200 isn't so great because people not wrapping\nlarge amounts of inserts/updates with transaction blocks will\nsuffer.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 16 Nov 2000 09:32:10 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "At 09:32 AM 11/16/00 -0800, Alfred Perlstein wrote:\n>* Bruce Momjian <[email protected]> [001116 08:59] wrote:\n\n>> Ewe, so we have this 1/200 second delay for every transaction. Seems\n>> bad to me.\n>\n>I think as long as it becomes a tunable this isn't a bad idea at\n>all. Fixing it at 1/200 isn't so great because people not wrapping\n>large amounts of inserts/updates with transaction blocks will\n>suffer.\n\nI think the default should probably be no delay, and the documentation\non enabling this needs to be clear and obvious (i.e. hard to miss).\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 16 Nov 2000 09:58:53 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS]\n\tpgsql/src/backend/access/transam ( xact.c xlog.c)"
},
{
"msg_contents": "> At 09:32 AM 11/16/00 -0800, Alfred Perlstein wrote:\n> >* Bruce Momjian <[email protected]> [001116 08:59] wrote:\n> \n> >> Ewe, so we have this 1/200 second delay for every transaction. Seems\n> >> bad to me.\n> >\n> >I think as long as it becomes a tunable this isn't a bad idea at\n> >all. Fixing it at 1/200 isn't so great because people not wrapping\n> >large amounts of inserts/updates with transaction blocks will\n> >suffer.\n> \n> I think the default should probably be no delay, and the documentation\n> on enabling this needs to be clear and obvious (i.e. hard to miss).\n\nI just talked to Tom Lane about this. I think a sleep(0) just before\nthe flush would be the best. It would reliquish the cpu slice if\nanother process is ready to run. If no other backend is running, it\nprobably just returns. If there is another one, it gives it a chance to\ncomplete. On return from sleep(0), it can check if it still needs to\nflush. This would tend to bunch up flushers so they flush only once,\nwhile not delaying cases where only one backend is running.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 14:13:04 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
},
{
"msg_contents": "At 02:13 PM 11/16/00 -0500, Bruce Momjian wrote:\n\n>> I think the default should probably be no delay, and the documentation\n>> on enabling this needs to be clear and obvious (i.e. hard to miss).\n>\n>I just talked to Tom Lane about this. I think a sleep(0) just before\n>the flush would be the best. It would reliquish the cpu slice if\n>another process is ready to run. If no other backend is running, it\n>probably just returns. If there is another one, it gives it a chance to\n>complete. On return from sleep(0), it can check if it still needs to\n>flush. This would tend to bunch up flushers so they flush only once,\n>while not delaying cases where only one backend is running.\n\nThis sounds like an interesting approach, yes.\n\n\n\n- Don Baccus, Portland OR <[email protected]>\n Nature photos, on-line guides, Pacific Northwest\n Rare Bird Alert Service and other goodies at\n http://donb.photo.net.\n",
"msg_date": "Thu, 16 Nov 2000 11:36:34 -0800",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS]\n\tpgsql/src/backend/access/transam ( xact.c xlog.c)"
},
{
"msg_contents": "* Don Baccus <[email protected]> [001116 13:46]:\n> At 02:13 PM 11/16/00 -0500, Bruce Momjian wrote:\n> \n> >> I think the default should probably be no delay, and the documentation\n> >> on enabling this needs to be clear and obvious (i.e. hard to miss).\n> >\n> >I just talked to Tom Lane about this. I think a sleep(0) just before\n> >the flush would be the best. It would reliquish the cpu slice if\n> >another process is ready to run. If no other backend is running, it\n> >probably just returns. If there is another one, it gives it a chance to\n> >complete. On return from sleep(0), it can check if it still needs to\n> >flush. This would tend to bunch up flushers so they flush only once,\n> >while not delaying cases where only one backend is running.\n> \n> This sounds like an interesting approach, yes.\nQuestion: Is sleep(0) guaranteed to at least give up control? \n\nThe way I read my UnixWare 7's man page, it might not, since alarm(0)\njust cancels the alarm...\n\nLarry\n> \n> \n> \n> - Don Baccus, Portland OR <[email protected]>\n> Nature photos, on-line guides, Pacific Northwest\n> Rare Bird Alert Service and other goodies at\n> http://donb.photo.net.\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Thu, 16 Nov 2000 13:49:40 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> At 02:13 PM 11/16/00 -0500, Bruce Momjian wrote:\n> \n> >> I think the default should probably be no delay, and the documentation\n> >> on enabling this needs to be clear and obvious (i.e. hard to miss).\n> >\n> >I just talked to Tom Lane about this. I think a sleep(0) just before\n> >the flush would be the best. It would reliquish the cpu slice if\n> >another process is ready to run. If no other backend is running, it\n> >probably just returns. If there is another one, it gives it a chance to\n> >complete. On return from sleep(0), it can check if it still needs to\n> >flush. This would tend to bunch up flushers so they flush only once,\n> >while not delaying cases where only one backend is running.\n> \n> This sounds like an interesting approach, yes.\n\nIn OS kernel design, you try to avoid process herding bottlenecks. \nHere, we want them herded, and giving up the CPU may be the best way to\ndo it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 14:53:07 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
},
{
"msg_contents": "> * Don Baccus <[email protected]> [001116 13:46]:\n> > At 02:13 PM 11/16/00 -0500, Bruce Momjian wrote:\n> > \n> > >> I think the default should probably be no delay, and the documentation\n> > >> on enabling this needs to be clear and obvious (i.e. hard to miss).\n> > >\n> > >I just talked to Tom Lane about this. I think a sleep(0) just before\n> > >the flush would be the best. It would reliquish the cpu slice if\n> > >another process is ready to run. If no other backend is running, it\n> > >probably just returns. If there is another one, it gives it a chance to\n> > >complete. On return from sleep(0), it can check if it still needs to\n> > >flush. This would tend to bunch up flushers so they flush only once,\n> > >while not delaying cases where only one backend is running.\n> > \n> > This sounds like an interesting approach, yes.\n> Question: Is sleep(0) guaranteed to at least give up control? \n> \n> The way I read my UnixWare 7's man page, it might not, since alarm(0)\n> just cancels the alarm...\n\nWell, it certainly is a kernel call, and most OS's re-evaluate on kernel\ncall return.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 15:02:22 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001116 14:02]:\n> > > This sounds like an interesting approach, yes.\n> > Question: Is sleep(0) guaranteed to at least give up control? \n> > \n> > The way I read my UnixWare 7's man page, it might not, since alarm(0)\n> > just cancels the alarm...\n> \n> Well, it certainly is a kernel call, and most OS's re-evaluate on kernel\n> call return.\nBUT, do we know for sure that sleep(0) is not optimized in the library\nto just return? \n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Thu, 16 Nov 2000 14:04:03 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001116 11:59] wrote:\n> > At 02:13 PM 11/16/00 -0500, Bruce Momjian wrote:\n> > \n> > >> I think the default should probably be no delay, and the documentation\n> > >> on enabling this needs to be clear and obvious (i.e. hard to miss).\n> > >\n> > >I just talked to Tom Lane about this. I think a sleep(0) just before\n> > >the flush would be the best. It would reliquish the cpu slice if\n> > >another process is ready to run. If no other backend is running, it\n> > >probably just returns. If there is another one, it gives it a chance to\n> > >complete. On return from sleep(0), it can check if it still needs to\n> > >flush. This would tend to bunch up flushers so they flush only once,\n> > >while not delaying cases where only one backend is running.\n> > \n> > This sounds like an interesting approach, yes.\n> \n> In OS kernel design, you try to avoid process herding bottlenecks. \n> Here, we want them herded, and giving up the CPU may be the best way to\n> do it.\n\nYes, but if everyone yeilds you're back where you started, and with\n128 or more backends do you really want to cause possibly that many\ncontext switches per fsync?\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 16 Nov 2000 12:05:41 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> > In OS kernel design, you try to avoid process herding bottlenecks. \n> > Here, we want them herded, and giving up the CPU may be the best way to\n> > do it.\n> \n> Yes, but if everyone yeilds you're back where you started, and with\n> 128 or more backends do you really want to cause possibly that many\n> context switches per fsync?\n\nYou are going to kernel call/yield anyway to fsync, so why not try and\nif someone does the fsync, we don't need to do it. I am suggesting\nre-checking the need for fsync after the return from sleep(0).\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 15:11:50 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
},
{
"msg_contents": "* Larry Rosenman <[email protected]> [001116 12:09] wrote:\n> * Bruce Momjian <[email protected]> [001116 14:02]:\n> > > > This sounds like an interesting approach, yes.\n> > > Question: Is sleep(0) guaranteed to at least give up control? \n> > > \n> > > The way I read my UnixWare 7's man page, it might not, since alarm(0)\n> > > just cancels the alarm...\n> > \n> > Well, it certainly is a kernel call, and most OS's re-evaluate on kernel\n> > call return.\n> BUT, do we know for sure that sleep(0) is not optimized in the library\n> to just return? \n\nsleep(3) should conform to POSIX specification, if anyone has the\nreference they can check it to see what the effect of sleep(0)\nshould be.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 16 Nov 2000 12:12:58 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> * Bruce Momjian <[email protected]> [001116 14:02]:\n> > > > This sounds like an interesting approach, yes.\n> > > Question: Is sleep(0) guaranteed to at least give up control? \n> > > \n> > > The way I read my UnixWare 7's man page, it might not, since alarm(0)\n> > > just cancels the alarm...\n> > \n> > Well, it certainly is a kernel call, and most OS's re-evaluate on kernel\n> > call return.\n> BUT, do we know for sure that sleep(0) is not optimized in the library\n> to just return? \n\nWe can only do our best here. I think guessing whether other backends\nare _about_ to commit is pretty shaky, and sleeping every time is a\nwaste. This seems the cleanest.\n\nFunny you should mention the optimization. I just checked BSDI and saw:\n\t\n\tu_int\n\tsleep(secs)\n\t u_int secs;\n\t{\n\t struct timeval nt, ot;\n\t long diff;\n\t int rc;\n\t\n\t if (secs == 0)\n\t return (0);\n\nSo maybe we need another _fake_ kernel call, or a select/usleep with a\nvery small value.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Thu, 16 Nov 2000 15:27:29 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "Bruce Momjian writes:\n\n> > The way I read my UnixWare 7's man page, it might not, since alarm(0)\n> > just cancels the alarm...\n> \n> Well, it certainly is a kernel call, and most OS's re-evaluate on kernel\n> call return.\n\nIn glibc, sleep(0) just does \"return 0;\", so if the compiler has a good\nday the call will disappear completely.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Thu, 16 Nov 2000 21:57:57 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001116 12:31] wrote:\n> > > In OS kernel design, you try to avoid process herding bottlenecks. \n> > > Here, we want them herded, and giving up the CPU may be the best way to\n> > > do it.\n> > \n> > Yes, but if everyone yeilds you're back where you started, and with\n> > 128 or more backends do you really want to cause possibly that many\n> > context switches per fsync?\n> \n> You are going to kernel call/yield anyway to fsync, so why not try and\n> if someone does the fsync, we don't need to do it. I am suggesting\n> re-checking the need for fsync after the return from sleep(0).\n\nIt might make more sense to keep a private copy of the last time\nthe file was modified per-backend by that particular backend and\na timestamp of the last fsync shared globally so one can forgo the\nfsync if \"it hasn't been dirtied by me since the last fsync\"\n\nThis would provide a rendevous point for the fsync call although\ncost more as one would need to periodically call gettimeofday to\nset the modified by me timestamp as well as the post-fsync shared\ntimestamp.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n",
"msg_date": "Thu, 16 Nov 2000 13:27:54 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "Alfred Perlstein <[email protected]> writes:\n> It might make more sense to keep a private copy of the last time\n> the file was modified per-backend by that particular backend and\n> a timestamp of the last fsync shared globally so one can forgo the\n> fsync if \"it hasn't been dirtied by me since the last fsync\"\n> This would provide a rendevous point for the fsync call although\n> cost more as one would need to periodically call gettimeofday to\n> set the modified by me timestamp as well as the post-fsync shared\n> timestamp.\n\nThat's the hard way to do it. We just need to keep track of the\nendpoint of the log as of the last fsync. You need to fsync (after\nreturning from sleep()) iff your commit record position > fsync\nendpoint. No need to ask the kernel for time-of-day.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 16 Nov 2000 16:31:37 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "* Tom Lane <[email protected]> [001116 13:31] wrote:\n> Alfred Perlstein <[email protected]> writes:\n> > It might make more sense to keep a private copy of the last time\n> > the file was modified per-backend by that particular backend and\n> > a timestamp of the last fsync shared globally so one can forgo the\n> > fsync if \"it hasn't been dirtied by me since the last fsync\"\n> > This would provide a rendevous point for the fsync call although\n> > cost more as one would need to periodically call gettimeofday to\n> > set the modified by me timestamp as well as the post-fsync shared\n> > timestamp.\n> \n> That's the hard way to do it. We just need to keep track of the\n> endpoint of the log as of the last fsync. You need to fsync (after\n> returning from sleep()) iff your commit record position > fsync\n> endpoint. No need to ask the kernel for time-of-day.\n\nWell that breaks when you move to a overwriting storage manager,\nhowever if you use oid instead that optimization would survive\nthe change to a overwriting storage manager. ?\n\n-Alfred\n",
"msg_date": "Thu, 16 Nov 2000 13:36:30 -0800",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "Alfred Perlstein <[email protected]> writes:\n>> That's the hard way to do it. We just need to keep track of the\n>> endpoint of the log as of the last fsync.\n\n> Well that breaks when you move to a overwriting storage manager,\n\nNo, because the log is just a series of records written sequentially ---\nit has nothing to do with storage management in data files.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 16 Nov 2000 16:53:43 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "\nOn Thu, 16 Nov 2000, Alfred Perlstein wrote:\n\n> * Larry Rosenman <[email protected]> [001116 12:09] wrote:\n> > * Bruce Momjian <[email protected]> [001116 14:02]:\n> > > > > This sounds like an interesting approach, yes.\n> > > > Question: Is sleep(0) guaranteed to at least give up control? \n> > > > \n> > > > The way I read my UnixWare 7's man page, it might not, since alarm(0)\n> > > > just cancels the alarm...\n> > > \n> > > Well, it certainly is a kernel call, and most OS's re-evaluate on kernel\n> > > call return.\n> > BUT, do we know for sure that sleep(0) is not optimized in the library\n> > to just return? \n> \n> sleep(3) should conform to POSIX specification, if anyone has the\n> reference they can check it to see what the effect of sleep(0)\n> should be.\n\n Yes, but Posix also specifies sched_yield() which rather explicitly\nallows a process to yield its timeslice. No idea how well that is\nsupported.\n\n> -- \n> -Alfred Perlstein - [[email protected]|[email protected]]\n> \"I have the heart of a child; I keep it in a jar on my desk.\"\n\nTom\n\n",
"msg_date": "Thu, 16 Nov 2000 21:00:53 -0800 (PST)",
"msg_from": "Tom Samplonius <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam (\n\txact.c xlog.c)"
},
{
"msg_contents": "> > sleep(3) should conform to POSIX specification, if anyone has the\n> > reference they can check it to see what the effect of sleep(0)\n> > should be.\n> \n> Yes, but Posix also specifies sched_yield() which rather explicitly\n> allows a process to yield its timeslice. No idea how well that is\n> supported.\n\nI have it on BSDI. We could add a configure check, and use it if it is\nthere. Another idea is to add a shared memory flag when someone enters\nthe 'commit' section of the transaction code. That way, a backend could\ncheck to see if another process is _about_ to commit, and wait.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 12:16:06 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001117 11:23]:\n> > > sleep(3) should conform to POSIX specification, if anyone has the\n> > > reference they can check it to see what the effect of sleep(0)\n> > > should be.\n> > \n> > Yes, but Posix also specifies sched_yield() which rather explicitly\n> > allows a process to yield its timeslice. No idea how well that is\n> > supported.\n> \n> I have it on BSDI. We could add a configure check, and use it if it is\n> there. Another idea is to add a shared memory flag when someone enters\n> the 'commit' section of the transaction code. That way, a backend could\n> check to see if another process is _about_ to commit, and wait.\nOn UnixWare, it requires the -Kthread or -Kpthread command, which then\nlinks in the threads library...\n\nI'm not sure that this is a good thing or not....\n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Fri, 17 Nov 2000 11:26:22 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> * Bruce Momjian <[email protected]> [001117 11:23]:\n> > > > sleep(3) should conform to POSIX specification, if anyone has the\n> > > > reference they can check it to see what the effect of sleep(0)\n> > > > should be.\n> > > \n> > > Yes, but Posix also specifies sched_yield() which rather explicitly\n> > > allows a process to yield its timeslice. No idea how well that is\n> > > supported.\n> > \n> > I have it on BSDI. We could add a configure check, and use it if it is\n> > there. Another idea is to add a shared memory flag when someone enters\n> > the 'commit' section of the transaction code. That way, a backend could\n> > check to see if another process is _about_ to commit, and wait.\n> On UnixWare, it requires the -Kthread or -Kpthread command, which then\n> links in the threads library...\n> \n> I'm not sure that this is a good thing or not....\n\nI would hope it just calls the function, and does not bring in thread\nstartup stuff.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 12:35:44 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n\txlog.c)"
},
{
"msg_contents": "* Bruce Momjian <[email protected]> [001117 11:39]:\n> > * Bruce Momjian <[email protected]> [001117 11:23]:\n> > > > > sleep(3) should conform to POSIX specification, if anyone has the\n> > > > > reference they can check it to see what the effect of sleep(0)\n> > > > > should be.\n> > > > \n> > > > Yes, but Posix also specifies sched_yield() which rather explicitly\n> > > > allows a process to yield its timeslice. No idea how well that is\n> > > > supported.\n> > > \n> > > I have it on BSDI. We could add a configure check, and use it if it is\n> > > there. Another idea is to add a shared memory flag when someone enters\n> > > the 'commit' section of the transaction code. That way, a backend could\n> > > check to see if another process is _about_ to commit, and wait.\n> > On UnixWare, it requires the -Kthread or -Kpthread command, which then\n> > links in the threads library...\n> > \n> > I'm not sure that this is a good thing or not....\n> \n> I would hope it just calls the function, and does not bring in thread\n> startup stuff.\nI suspect it DOES bring in the thread startup and all that implies...\n\nTread lightly. The good news is UnixWare Threads are LWP's and the\nkernel is multithreaded...\n\nLER\n\n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Fri, 17 Nov 2000 11:42:01 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
},
{
"msg_contents": "> > sleep(3) should conform to POSIX specification, if anyone has the\n> > reference they can check it to see what the effect of sleep(0)\n> > should be.\n> \n> Yes, but Posix also specifies sched_yield() which rather explicitly\n> allows a process to yield its timeslice. No idea how well that is\n> supported.\n\nOK, I have a new idea.\n\nThere are two parts to transaction commit. The first is writing all\ndirty buffers or log changes to the kernel, and second is fsync of the\nlog file.\n\nI suggest having a per-backend shared memory byte that has the following\nvalues:\n\n\tSTART_LOG_WRITE\n\tWAIT_ON_FSYNC\n\tNOT_IN_COMMIT\n\tbackend_number_doing_fsync\n\nI suggest that when each backend starts a commit, it sets its byte to\nSTART_LOG_WRITE. When it gets ready to fsync, it checks all backends. \nIf all are NOT_IN_COMMIT, it does fsync and continues.\n\nIf one or more are in START_LOG_WRITE, it waits until no one is in\nSTART_LOG_WRITE. It then checks all WAIT_ON_FSYNC, and if it is the\nlowest backend in WAIT_ON_FSYNC, marks all others with its backend\nnumber, and does fsync. It then clears all backends with its number to\nNOT_IN_COMMIT. Other backend will see they are not the lowest\nWAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\nso they can then continue, knowing their data was synced.\n\nThis allows a single backend not to sleep, and allows multiple backends\nto bunch up only when they are all about to commit.\n\nThe reason backend numbers are written is so other backends entering the\ncommit code will not interfere with the backends performing fsync.\n\nComments?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Fri, 17 Nov 2000 23:59:06 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "WAL fsync scheduling"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> Other backend will see they are not the lowest\n> WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> so they can then continue, knowing their data was synced.\n\nHow will they wait? Without a semaphore involved, your answer must\nbe either \"timed sleep\" or \"busy-wait loop\", neither of which is\nattractive ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Nov 2000 00:15:38 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > Other backend will see they are not the lowest\n> > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> > so they can then continue, knowing their data was synced.\n> \n> How will they wait? Without a semaphore involved, your answer must\n> be either \"timed sleep\" or \"busy-wait loop\", neither of which is\n> attractive ...\n\nYes, either timed sleep or busy-wait. One nifty trick would be for each\nbackend that is not going to do the fsync to just sleep with signals\nenabled, and for the fsyncing backend to signal the other backends to\nexit their sleep. That way, only one backend does the checking.\n\nThis sleep thing was going to be a problem anyway with the old system. \nAt least this way, they sleep/check only in cases where it is valuable.\n\nCan we use a semaphore for this system?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Nov 2000 00:58:54 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "> > Bruce Momjian <[email protected]> writes:\n> > > Other backend will see they are not the lowest\n> > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> > > so they can then continue, knowing their data was synced.\n> > \n> > How will they wait? Without a semaphore involved, your answer must\n> > be either \"timed sleep\" or \"busy-wait loop\", neither of which is\n> > attractive ...\n> \n> Yes, either timed sleep or busy-wait. One nifty trick would be for each\n> backend that is not going to do the fsync to just sleep with signals\n> enabled, and for the fsyncing backend to signal the other backends to\n> exit their sleep. That way, only one backend does the checking.\n> \n> This sleep thing was going to be a problem anyway with the old system. \n> At least this way, they sleep/check only in cases where it is valuable.\n\nI have another idea. If a backend gets to the point that it needs\nfsync, and there is another backend in START_LOG_WRITE, it can go to an\ninteruptable sleep, knowing another backend will perform the fsync and\nwake it up. Therefore, there is no busy-wait or timed sleep.\n\nOf course, a backend must set its status to WAIT_ON_FSYNC to avoid a\nrace condition.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Nov 2000 09:30:10 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "* Tom Lane <[email protected]> [001117 23:21]:\n> Bruce Momjian <[email protected]> writes:\n> > Other backend will see they are not the lowest\n> > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> > so they can then continue, knowing their data was synced.\n> \n> How will they wait? Without a semaphore involved, your answer must\n> be either \"timed sleep\" or \"busy-wait loop\", neither of which is\n> attractive ...\nhow about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n",
"msg_date": "Sat, 18 Nov 2000 09:36:49 -0600",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "> * Tom Lane <[email protected]> [001117 23:21]:\n> > Bruce Momjian <[email protected]> writes:\n> > > Other backend will see they are not the lowest\n> > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> > > so they can then continue, knowing their data was synced.\n> > \n> > How will they wait? Without a semaphore involved, your answer must\n> > be either \"timed sleep\" or \"busy-wait loop\", neither of which is\n> > attractive ...\n> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n\nLooks like a winner.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Nov 2000 12:43:40 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n> \n> > Looks like a winner.\n> \n> sigpause() is a BSD-ism, and not part of any recognized standard\n> according to my HP man pages. How portable do you think it is?\n\nGood point. I get on BSDI:\n\n The sigpause function call appeared in 4.2BSD and has been deprecated.\n\nThe standard is sigsuspend:\n\n The sigsuspend function call conforms to IEEE Std1003.1-1988 (``POSIX'').\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Nov 2000 13:07:00 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n\n> Looks like a winner.\n\nsigpause() is a BSD-ism, and not part of any recognized standard\naccording to my HP man pages. How portable do you think it is?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Nov 2000 13:08:30 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling "
},
{
"msg_contents": "> Bruce Momjian <[email protected]> writes:\n> >>>>> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n> \n> > The standard is sigsuspend:\n> \n> OK, we can probably assume that at least one of sigsuspend or sigpause\n> is available everywhere. Now all you need is a free signal number.\n> Unfortunately we're already using both SIGUSR1 and SIGUSR2.\n\nOh, I didn't want to hear that one.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Nov 2000 13:16:02 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n>>>>> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n\n> The standard is sigsuspend:\n\nOK, we can probably assume that at least one of sigsuspend or sigpause\nis available everywhere. Now all you need is a free signal number.\nUnfortunately we're already using both SIGUSR1 and SIGUSR2.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Nov 2000 13:19:32 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling "
},
{
"msg_contents": "Larry Rosenman writes:\n\n> how about sigpause, and using SIGUSR1/SIGUSR2 to wake them up ? \n\nBoth of these signals are already used.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Sat, 18 Nov 2000 19:26:09 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "Tom Lane writes:\n\n> OK, we can probably assume that at least one of sigsuspend or sigpause\n> is available everywhere.\n\n#ifdef HAVE_POSIX_SIGNALS should tell you.\n\n> Now all you need is a free signal number. Unfortunately we're already\n> using both SIGUSR1 and SIGUSR2.\n\nMaybe you could dump the old meaning SIGQUIT (externally invoked error),\nmove quickdie() to SIGQUIT, and you got SIGUSR1 free.\n\n(That would even make sense in two ways: 1) SIGQUIT would actually cause\nthe guy to quit; 2) there is a correspondence between postmaster and\npostgres signals.)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n",
"msg_date": "Sat, 18 Nov 2000 19:51:02 +0100 (CET)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling "
},
{
"msg_contents": "> Tom Lane writes:\n> \n> > OK, we can probably assume that at least one of sigsuspend or sigpause\n> > is available everywhere.\n> \n> #ifdef HAVE_POSIX_SIGNALS should tell you.\n> \n> > Now all you need is a free signal number. Unfortunately we're already\n> > using both SIGUSR1 and SIGUSR2.\n> \n> Maybe you could dump the old meaning SIGQUIT (externally invoked error),\n> move quickdie() to SIGQUIT, and you got SIGUSR1 free.\n> \n> (That would even make sense in two ways: 1) SIGQUIT would actually cause\n> the guy to quit; 2) there is a correspondence between postmaster and\n> postgres signals.)\n\nGood idea.\n\nOf course, this assumes my idea was valid. Was it?\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sat, 18 Nov 2000 13:52:03 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n>> Now all you need is a free signal number. Unfortunately we're already\n>> using both SIGUSR1 and SIGUSR2.\n\n> Maybe you could dump the old meaning SIGQUIT (externally invoked error),\n> move quickdie() to SIGQUIT, and you got SIGUSR1 free.\n\n> (That would even make sense in two ways: 1) SIGQUIT would actually cause\n> the guy to quit; 2) there is a correspondence between postmaster and\n> postgres signals.)\n\nSeems like a plan. The current definition of backend SIGQUIT is really\nstupid anyway --- what's the value of forcing an error asynchronously?\n\nAlso, it always bothered me that the postmaster and backend signals\nweren't consistent, so I'd be inclined to make this change even if we\nend up not using SIGUSR1 for Bruce's idea ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 18 Nov 2000 14:21:04 -0500",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling "
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> > There are two parts to transaction commit. The first is writing all\n> > dirty buffers or log changes to the kernel, and second is fsync of the\n> ^^^^^^^^^^^^\n> Backend doesn't write any dirty buffer to the kernel at commit time.\n\nYes, I suspected that.\n\n> \n> > log file.\n> \n> The first part is writing commit record into WAL buffers in shmem.\n> This is what XLogInsert does. After that XLogFlush is called to ensure\n> that entire commit record is on disk. XLogFlush does *both* write() and\n> fsync() (single slock is used for both writing and fsyncing) if it needs to\n> do it at all.\n\nYes, I realize there are new steps in WAL.\n\n> \n> > I suggest having a per-backend shared memory byte that has the following\n> > values:\n> > \n> > START_LOG_WRITE\n> > WAIT_ON_FSYNC\n> > NOT_IN_COMMIT\n> > backend_number_doing_fsync\n> > \n> > I suggest that when each backend starts a commit, it sets its byte to\n> > START_LOG_WRITE. \n> ^^^^^^^^^^^^^^^^^^^^^^^\n> Isn't START_COMMIT more meaningful?\n\nYes.\n\n> \n> > When it gets ready to fsync, it checks all backends. \n> ^^^^^^^^^^^^^^^^^^^^^^^^^^\n> What do you mean by this? The moment just after XLogInsert?\n\nJust before it calls fsync().\n\n> \n> > If all are NOT_IN_COMMIT, it does fsync and continues.\n> \n> 1st edition:\n> > If one or more are in START_LOG_WRITE, it waits until no one is in\n> > START_LOG_WRITE. It then checks all WAIT_ON_FSYNC, and if it is the\n> > lowest backend in WAIT_ON_FSYNC, marks all others with its backend\n> > number, and does fsync. It then clears all backends with its number to\n> > NOT_IN_COMMIT. Other backend will see they are not the lowest\n> > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> > so they can then continue, knowing their data was synced.\n> \n> 2nd edition:\n> > I have another idea. If a backend gets to the point that it needs\n> > fsync, and there is another backend in START_LOG_WRITE, it can go to an\n> > interuptable sleep, knowing another backend will perform the fsync and\n> > wake it up. Therefore, there is no busy-wait or timed sleep.\n> > \n> > Of course, a backend must set its status to WAIT_ON_FSYNC to avoid a\n> > race condition.\n> \n> The 2nd edition is much better. But I'm not sure do we really need in\n> these per-backend bytes in shmem. Why not just have some counters?\n> We can use a semaphore to wake-up all waiters at once.\n\nYes, that is much better and clearer. My idea was just to say, \"if no\none is entering commit phase, do the commit. If someone else is coming,\nsleep and wait for them to do the fsync and wake me up with a singal.\" \n\n> \n> > This allows a single backend not to sleep, and allows multiple backends\n> > to bunch up only when they are all about to commit.\n> > \n> > The reason backend numbers are written is so other backends entering the\n> > commit code will not interfere with the backends performing fsync.\n> \n> Being waked-up backend can check what's written/fsynced by calling XLogFlush.\n\nSeems that may not be needed anymore with a counter. The only issue is\nthat other backends may enter commit while fsync() is happening. The\nprocess that did the fsync must be sure to wake up only the backends\nthat were waiting for it, and not other backends that may be also be\ndoing fsync as a group while the first fsync was happening. I leave\nthose details to people more experienced. :-)\n\nI am just glad people liked my idea.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Sun, 19 Nov 2000 14:23:06 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "> There are two parts to transaction commit. The first is writing all\n> dirty buffers or log changes to the kernel, and second is fsync of the\n ^^^^^^^^^^^^\nBackend doesn't write any dirty buffer to the kernel at commit time.\n\n> log file.\n\nThe first part is writing commit record into WAL buffers in shmem.\nThis is what XLogInsert does. After that XLogFlush is called to ensure\nthat entire commit record is on disk. XLogFlush does *both* write() and\nfsync() (single slock is used for both writing and fsyncing) if it needs to\ndo it at all.\n\n> I suggest having a per-backend shared memory byte that has the following\n> values:\n> \n> START_LOG_WRITE\n> WAIT_ON_FSYNC\n> NOT_IN_COMMIT\n> backend_number_doing_fsync\n> \n> I suggest that when each backend starts a commit, it sets its byte to\n> START_LOG_WRITE. \n ^^^^^^^^^^^^^^^^^^^^^^^\nIsn't START_COMMIT more meaningful?\n\n> When it gets ready to fsync, it checks all backends. \n ^^^^^^^^^^^^^^^^^^^^^^^^^^\nWhat do you mean by this? The moment just after XLogInsert?\n\n> If all are NOT_IN_COMMIT, it does fsync and continues.\n\n1st edition:\n> If one or more are in START_LOG_WRITE, it waits until no one is in\n> START_LOG_WRITE. It then checks all WAIT_ON_FSYNC, and if it is the\n> lowest backend in WAIT_ON_FSYNC, marks all others with its backend\n> number, and does fsync. It then clears all backends with its number to\n> NOT_IN_COMMIT. Other backend will see they are not the lowest\n> WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> so they can then continue, knowing their data was synced.\n\n2nd edition:\n> I have another idea. If a backend gets to the point that it needs\n> fsync, and there is another backend in START_LOG_WRITE, it can go to an\n> interuptable sleep, knowing another backend will perform the fsync and\n> wake it up. Therefore, there is no busy-wait or timed sleep.\n> \n> Of course, a backend must set its status to WAIT_ON_FSYNC to avoid a\n> race condition.\n\nThe 2nd edition is much better. But I'm not sure do we really need in\nthese per-backend bytes in shmem. Why not just have some counters?\nWe can use a semaphore to wake-up all waiters at once.\n\n> This allows a single backend not to sleep, and allows multiple backends\n> to bunch up only when they are all about to commit.\n> \n> The reason backend numbers are written is so other backends entering the\n> commit code will not interfere with the backends performing fsync.\n\nBeing waked-up backend can check what's written/fsynced by calling XLogFlush.\n\nVadim\n\n\n",
"msg_date": "Sun, 19 Nov 2000 11:23:19 -0800",
"msg_from": "\"Vadim Mikheev\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
},
{
"msg_contents": "\nAdded to TODO.detail and TODO list.\n\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > > There are two parts to transaction commit. The first is writing all\n> > > dirty buffers or log changes to the kernel, and second is fsync of the\n> > ^^^^^^^^^^^^\n> > Backend doesn't write any dirty buffer to the kernel at commit time.\n> \n> Yes, I suspected that.\n> \n> > \n> > > log file.\n> > \n> > The first part is writing commit record into WAL buffers in shmem.\n> > This is what XLogInsert does. After that XLogFlush is called to ensure\n> > that entire commit record is on disk. XLogFlush does *both* write() and\n> > fsync() (single slock is used for both writing and fsyncing) if it needs to\n> > do it at all.\n> \n> Yes, I realize there are new steps in WAL.\n> \n> > \n> > > I suggest having a per-backend shared memory byte that has the following\n> > > values:\n> > > \n> > > START_LOG_WRITE\n> > > WAIT_ON_FSYNC\n> > > NOT_IN_COMMIT\n> > > backend_number_doing_fsync\n> > > \n> > > I suggest that when each backend starts a commit, it sets its byte to\n> > > START_LOG_WRITE. \n> > ^^^^^^^^^^^^^^^^^^^^^^^\n> > Isn't START_COMMIT more meaningful?\n> \n> Yes.\n> \n> > \n> > > When it gets ready to fsync, it checks all backends. \n> > ^^^^^^^^^^^^^^^^^^^^^^^^^^\n> > What do you mean by this? The moment just after XLogInsert?\n> \n> Just before it calls fsync().\n> \n> > \n> > > If all are NOT_IN_COMMIT, it does fsync and continues.\n> > \n> > 1st edition:\n> > > If one or more are in START_LOG_WRITE, it waits until no one is in\n> > > START_LOG_WRITE. It then checks all WAIT_ON_FSYNC, and if it is the\n> > > lowest backend in WAIT_ON_FSYNC, marks all others with its backend\n> > > number, and does fsync. It then clears all backends with its number to\n> > > NOT_IN_COMMIT. Other backend will see they are not the lowest\n> > > WAIT_ON_FSYNC and will wait for their byte to be set to NOT_IN_COMMIT\n> > > so they can then continue, knowing their data was synced.\n> > \n> > 2nd edition:\n> > > I have another idea. If a backend gets to the point that it needs\n> > > fsync, and there is another backend in START_LOG_WRITE, it can go to an\n> > > interuptable sleep, knowing another backend will perform the fsync and\n> > > wake it up. Therefore, there is no busy-wait or timed sleep.\n> > > \n> > > Of course, a backend must set its status to WAIT_ON_FSYNC to avoid a\n> > > race condition.\n> > \n> > The 2nd edition is much better. But I'm not sure do we really need in\n> > these per-backend bytes in shmem. Why not just have some counters?\n> > We can use a semaphore to wake-up all waiters at once.\n> \n> Yes, that is much better and clearer. My idea was just to say, \"if no\n> one is entering commit phase, do the commit. If someone else is coming,\n> sleep and wait for them to do the fsync and wake me up with a singal.\" \n> \n> > \n> > > This allows a single backend not to sleep, and allows multiple backends\n> > > to bunch up only when they are all about to commit.\n> > > \n> > > The reason backend numbers are written is so other backends entering the\n> > > commit code will not interfere with the backends performing fsync.\n> > \n> > Being waked-up backend can check what's written/fsynced by calling XLogFlush.\n> \n> Seems that may not be needed anymore with a counter. The only issue is\n> that other backends may enter commit while fsync() is happening. The\n> process that did the fsync must be sure to wake up only the backends\n> that were waiting for it, and not other backends that may be also be\n> doing fsync as a group while the first fsync was happening. I leave\n> those details to people more experienced. :-)\n> \n> I am just glad people liked my idea.\n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n",
"msg_date": "Wed, 24 Jan 2001 09:24:48 -0500 (EST)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: WAL fsync scheduling"
}
]
|
[
{
"msg_contents": "> > I am just suggesting that instead of flushing the log on every\n> > transaction end, just do it every X seconds.\n> \n> Or maybe more practical is, when the log buffer fills. \n> And of course during checkpoints.\n\nAlso before backend's going to write dirty buffer from pool\nto system cache - changes must be logged before reflected\nin data files.\n\nVadim\n",
"msg_date": "Wed, 15 Nov 2000 11:01:49 -0800",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c\n xlog.c)"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.