threads
listlengths 1
2.99k
|
---|
[
{
"msg_contents": "> I believe that the equal-key performance problem largely \n> comes from the bogus way we've been handling duplicates, in particular\n\nIt comes from the way we look for page for new tuple - _bt_insertonpg tries\nto avoid duplicate page splitting, i.e. if there is no space for new tuple\non the leftmost page, it reads next right page... etc...\n\n> the fact that findsplitloc has to worry about choosing a \"legal split\n> point\" for a series of duplicates. Once we get rid of that, I think\n> findsplitloc can use a binary search.\n\nVadim\n",
"msg_date": "Thu, 20 Jul 2000 14:30:35 -0700",
"msg_from": "\"Mikheev, Vadim\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: btree split logic is fragile in the presence of lar\n\tge index items"
}
] |
[
{
"msg_contents": "Can anyone suggest how I can regain access to some PGSQL files\nthat are in a directory below /usr/local/pgsql/data/base\nbut aren't in the catalog due to an errant initdb?\n\nThanks!\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": "Thu, 20 Jul 2000 18:40:53 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "my stupidity"
},
{
"msg_contents": "On Thu, 20 Jul 2000, Larry Rosenman wrote:\n\n> Can anyone suggest how I can regain access to some PGSQL files\n> that are in a directory below /usr/local/pgsql/data/base\n> but aren't in the catalog due to an errant initdb?\n\nWell, I don't know if it will work, but what I'd try is something like the\nfollowing:\n\n1) logon as root\n2) cd /usr/local/pgsql/data/base\n3) mv database-name database-name-old\n4) logon as the normal database user\n5) createdb database-name\n6) logon as root\n7) cd /usr/local/pgsql/data/base\n8) mv database-name database-name-new\n9) mv database-name-old database-name\n10) test\n\nSince you have everything still around, I don't see where this can cause\nyou any more hurt than you are already in.\n\nJohn\n\n",
"msg_date": "Fri, 21 Jul 2000 00:01:13 -0500 (CDT)",
"msg_from": "John McKown <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: my stupidity"
},
{
"msg_contents": "Nope. get \"database ler, OID=18754\" has disappeared.\n\nLER\n\n> On Thu, 20 Jul 2000, Larry Rosenman wrote:\n> \n> > Can anyone suggest how I can regain access to some PGSQL files\n> > that are in a directory below /usr/local/pgsql/data/base\n> > but aren't in the catalog due to an errant initdb?\n> \n> Well, I don't know if it will work, but what I'd try is something like the\n> following:\n> \n> 1) logon as root\n> 2) cd /usr/local/pgsql/data/base\n> 3) mv database-name database-name-old\n> 4) logon as the normal database user\n> 5) createdb database-name\n> 6) logon as root\n> 7) cd /usr/local/pgsql/data/base\n> 8) mv database-name database-name-new\n> 9) mv database-name-old database-name\n> 10) test\n> \n> Since you have everything still around, I don't see where this can cause\n> you any more hurt than you are already in.\n> \n> John\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, 21 Jul 2000 00:10:42 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: my stupidity"
}
] |
[
{
"msg_contents": "FYI,\n\n TOAST is now vacuum-safe. When needed, the toaster creates a\n second heap tuple, containing only plain or compressed\n values. This one is then returned by the heap access methods\n to the caller, so indices will never contain external\n references.\n\n The changes are covered by #ifdef TOAST_INDICES, so can\n easily be disabled at the time we have file versioning and\n can recreate indices during vacuum.\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": "Fri, 21 Jul 2000 12:30:36 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "TOAST & vacuum"
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> TOAST is now vacuum-safe. When needed, the toaster creates a\n> second heap tuple, containing only plain or compressed\n> values. This one is then returned by the heap access methods\n> to the caller, so indices will never contain external\n> references.\n\nThat should be sufficient for insertions into existing indexes,\nbut what about CREATE INDEX on a column that already contains\ntoasted values? That works with fetched tuples, not ones formed\nduring insert/update.\n\nI think a cleaner and more reliable short-term hack would be to twiddle\nindex_formtuple() to detoast any externally-stored attributes. AFAIK,\nin current sources all paths for creating an index tuple go through that\nroutine, and it has a tupdesc handy so it knows which attributes are of\nvarlena type.\n\nThis way you wouldn't need to hack up the tuptoaster itself.\n\nAlso, this would work for functional indexes whereas the way you are\ndoing it will not (a function could return a toasted Datum extracted\nfrom some other table, no?).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 21 Jul 2000 14:29:50 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TOAST & vacuum "
},
{
"msg_contents": "Tom Lane wrote:\n> [email protected] (Jan Wieck) writes:\n> > TOAST is now vacuum-safe. When needed, the toaster creates a\n> > second heap tuple, containing only plain or compressed\n> > values. This one is then returned by the heap access methods\n> > to the caller, so indices will never contain external\n> > references.\n>\n> That should be sufficient for insertions into existing indexes,\n> but what about CREATE INDEX on a column that already contains\n> toasted values? That works with fetched tuples, not ones formed\n> during insert/update.\n>\n> I think a cleaner and more reliable short-term hack would be to twiddle\n> index_formtuple() to detoast any externally-stored attributes. AFAIK,\n> in current sources all paths for creating an index tuple go through that\n> routine, and it has a tupdesc handy so it knows which attributes are of\n> varlena type.\n>\n> This way you wouldn't need to hack up the tuptoaster itself.\n\n You're right. Will do it that way.\n\n> Also, this would work for functional indexes whereas the way you are\n> doing it will not (a function could return a toasted Datum extracted\n> from some other table, no?).\n\n Don't know of a function that does it that way right now. But\n that doesn't mean no such exists - you're right again. 2\n donut's for U.\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": "Sat, 22 Jul 2000 11:28:25 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: TOAST & vacuum"
},
{
"msg_contents": "> FYI,\n> \n> TOAST is now vacuum-safe. When needed, the toaster creates a\n> second heap tuple, containing only plain or compressed\n> values. This one is then returned by the heap access methods\n> to the caller, so indices will never contain external\n> references.\n> \n> The changes are covered by #ifdef TOAST_INDICES, so can\n> easily be disabled at the time we have file versioning and\n> can recreate indices during vacuum.\n\nSeems this has some performance advantages. Un-toasting to traverse a\nbtree index would be pretty slow. This way, it is all in the index.\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, 26 Jul 2000 22:10:05 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TOAST & vacuum"
}
] |
[
{
"msg_contents": "FYI,\n\n PATH seems to be an SQL3 reserved keyword (someone added it\n to the parser as such).\n\n But there is a geometric function path(), which cannot be\n used any more, thus breaking the regression test. Neither\n could path be used as identifier for tables/attributes any\n more.\n\n Shouldn't it be allowed as identifier?\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": "Fri, 21 Jul 2000 13:11:32 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Geometry test broken"
},
{
"msg_contents": "> PATH seems to be an SQL3 reserved keyword (someone added it\n> to the parser as such).\n\nI introduced this recently, and have patches to fix it. The patches\nslightly alter the allowed argument space for some other constructs, but\nall of the regression tests pass. Will commit asap (as I claimed I would\ndo a few days ago; sorry for the delay).\n\n - Thomas\n",
"msg_date": "Sat, 22 Jul 2000 01:43:37 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Geometry test broken"
}
] |
[
{
"msg_contents": "\nExecutive summary: \n\nI have discarded the idea of (partially) implementing Info Schemas as part\nof a pg_dump/psql enhancement, and returned to my original plan. You can\nnow skip to 'Questions', below.\n\n----------- Discussion --------\nHaving now waded through the SQL standards rather more than is good for my\nsanity, I have concluded that even if I could implement the entire info\nschema system in PG, I would still have to write SQL dumping code that\nwould look quite similar to the SQL dumping code in pg_dump. What is more,\nit would not support rules, or any non-standard features of PG (at least I\nthink the latter are true).\n\nBeing therefore forced to look at the intersection of the info schemas and\nPG, I would probably end up just supporting COLUMNS, VIEWS, & TABLES. And\neven with this work complete, I would have to revise pg_dump to use it, by\nwhich time I would have sucessfully implemented the current functionality\nof pg_dump.\n\nAs a result I am inclined back to the more modest goal of making the code\nto dump individual database items more generally available. Perhaps then at\nsome later stage we can modify the internals to use info schemas, when they\nare implemented. The way I see it at the moment, what I plan to implement\nis still a layer above either info schemas or the pg_* tables.\n\nAs to pgaccess, if an API layer is needed for ease of update & portability,\nI would be interested to know if anyone had considered the practicality of\nusing the ODBC interface? ODBC allows interrogation of metadata, execution\nof DDL statements, execution of queries etc. It seems to me that if\npgaccess were implemented on top of ODBC, the authors would have a very\nuseful general purpose tool. But I have not looked at what special features\nit has, so I have no idea how practical the suggestion is.\n\n----------- Questions --------\n\n1. Can anyone think of an existing utility or library in PG that would\nprofit from a more convenient interface for querying metadata than is\navailable from ODBC or the pg_* tables? If so, can you give some details &\npointers. [This will be useful in modifying any resulting API].\n\n2. Can anybody suggest the most appropriate (polite) location for any SQL\nextraction code (library? backend? external function?). Some people have\ncommented on it being a bad idea that it goes into the backend, and I have\nobserved that it would be nice to extract valid SQL definitions via SQL,\nthus making the code available to most users with minimal effort. Currently\nI would expect to implement an API and (ideally) an SQL interface. The SQL\nside of things would probably just call the API, but the details need to be\nworked out.\n\n3. My current plan/idea/suggestion is to implement an API that, given an\nobject type (eg. 'table'), will return the most basic definition for the\nobject and a list of related objects. This API could be used by both psql\nand pg_dump to create SQL for display & backup purposes.\n\n4. Even if I achieve nothing more than breaking 'libdump' out of pg_dump,\nand adding a \\D command to psql, does anybody object to this as an objective? \n\n\nAny comments and suggestions would be greatly appreciated...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 22 Jul 2000 01:08:14 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "Philip Warner writes:\n\n> 1. Can anyone think of an existing utility or library in PG that would\n> profit from a more convenient interface for querying metadata than is\n> available from ODBC or the pg_* tables?\n\nPeople do ask all the time how they can reproduce psql's, say, \"\\d\" output\nfor themselves. Notice that they don't ask how to reproduce pg_dump's\noutput, pg_dump does that just fine, but people want to get at the\nmetadata and process it for themselves. I imagine people have web tools\nfor modelling their databases, etc. or change tables on the fly. I'd say\nthere is a big market for this sort of thing, and the current state of\naffairs that every system catalog change is in some way liable to break\nall these applications is a non-negligible problem.\n\nIt is therefore my opinion that making SQL dumps widely available is,\nwhile certainly useful, not the real core of the problem. Getting to the\ndata that underlies the dump is. Anything that does that would be a step\nahead.\n\nSome things to consider:\n\n* A backend-side implementation: we already have a couple of views to that\neffect (pg_rules, pg_views). You can always add more.\n\n* A C API: How many people do use C? How to propagate this to other\ninterfaces? Are we really up to creating and maintaining another\nhand-crafted API?\n\n\n> 4. Even if I achieve nothing more than breaking 'libdump' out of pg_dump,\n> and adding a \\D command to psql, does anybody object to this as an objective? \n\nIf that's your concern that you can just link a couple of pg_dump's object\nfiles into psql. You could perhaps create a de facto API within pg_dump,\nwhich would also go a long way in cleaning up pg_dump's source code.\n\n\n(When I was wheeling and dealing in psql last fall I was faced with the\nsame questions regarding the table printing facilities. People are not\nreally interested in getting pretty printed ASCII versions of their query\nresults; their web browser or widget set can do that much better. And even\nthose that do wouldn't like the particular formatting choices anyway. So I\nwithdrew psql's printing functions from the public. You can still link in\nprint.o into your program if you want to, but please don't complain if I\nchange the spacing and your application breaks.)\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Sat, 22 Jul 2000 03:47:57 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "At 03:47 22/07/00 +0200, Peter Eisentraut wrote:\n>Philip Warner writes:\n>\n>> 1. Can anyone think of an existing utility or library in PG that would\n>> profit from a more convenient interface for querying metadata than is\n>> available from ODBC or the pg_* tables?\n>\n>People do ask all the time how they can reproduce psql's, say, \"\\d\" output\n>for themselves. Notice that they don't ask how to reproduce pg_dump's\n>output, pg_dump does that just fine, but people want to get at the\n>metadata and process it for themselves. I imagine people have web tools\n>for modelling their databases, etc. or change tables on the fly. I'd say\n>there is a big market for this sort of thing, and the current state of\n>affairs that every system catalog change is in some way liable to break\n>all these applications is a non-negligible problem.\n\nThis is very true; and to satisfy this issue, I think you are right in\nsuggesting using (a subset of) the Info schemas. It's possibly even\nworthwhile creating something like:\n\n Create View TABLES(TABLE_NAME) as Select whatever...\n (this can be identical to pg_tables, for example)\n\nand\n\n Create View COLUMNS(TABLE_NAME, COLUMN_NAME, DATA_TYPE,...) as\nSelect...whatever\n\nto satisfy some of these needs; ie. we don't even need to provide all the\nstandard columns, so long as we only provide ones that are in the standard,\nand we also obey the visibility rules from the standard.\n\nJust these two would, I think, provide the \\d function in psql. Not that\nI'm volunteering; pg_dump and 'insert/update...returning' are going to take\nup enough time right now...\n\n\n>It is therefore my opinion that making SQL dumps widely available is,\n>while certainly useful, not the real core of the problem. Getting to the\n>data that underlies the dump is. Anything that does that would be a step\n>ahead.\n\nYes & no. There are two quite different problems, and the solution to one\ndoes not provide a solution to the other, it just provides a layer on which\nthe other can be built:\n\n1. How can we provide a stable interface for examining DB definitions that\nworks across releases.\n\nYou have answered this (to some extent) by suggesting Info schemas. Note\nthat these will still not work for non-standard features, but we could use\npg_* views for pg-specific structures. Perhaps whoever works on pgaccess\nmight have a good definition of the minimum requirements from an initial\nimplementation of info schemas?\n\nIt *might* be worth naming the guaranteed public views differently from the\nnormal pg_* tables; maybe pg_std_rules, then we can tell users that any\ntable/view that starts with pg_std_* will exist across versions, and always\nat least have the columns present in the current release.\n\n\n2. How can we provide a function in psql that displays definitions of all\nthings that a user can create with SQL?\n\nThis is the problem I set out to address, which is why I looked at using\npg_dump code. Which then led me to the philosophical question of what\nshould be responsible for 'decompiling' the internal representation of the\nmetadata. My feeling is that the backend 'compiles' SQL into metadata, so\nit should also decompile it.\n\n\n>Some things to consider:\n>\n>* A backend-side implementation: we already have a couple of views to that\n>effect (pg_rules, pg_views). You can always add more.\n\nI'll have a look at implementing something using views & functions as per\npg_views.\n\n\n>* A C API: How many people do use C? How to propagate this to other\n>interfaces? Are we really up to creating and maintaining another\n>hand-crafted API?\n\nI don't really want to be left maintaining such a thing and I'm sure nobody\nelse does, but as someone (Tom?) suggested, I'll have to develop a private\nAPI to do the work, so making it public might be a good idea...maybe.\n\n\n>\n>> 4. Even if I achieve nothing more than breaking 'libdump' out of pg_dump,\n>> and adding a \\D command to psql, does anybody object to this as an\nobjective? \n>\n>If that's your concern that you can just link a couple of pg_dump's object\n>files into psql. You could perhaps create a de facto API within pg_dump,\n>which would also go a long way in cleaning up pg_dump's source code.\n\nThis is what I want to do as a minimum. I don't really want to create\npg_get_tablesql, pg_get_constraintsql, pg_get_typesql, pg_get_viewsql etc,\nbut maybe that's the best option after all. Maybe to avoid conflicts with\npg_get_ruledef etc, I should use names formatted as pg_dump_sql_*, but the\nidea is the same.\n\n\n>(When I was wheeling and dealing in psql last fall I was faced with the\n>same questions regarding the table printing facilities. People are not\n>really interested in getting pretty printed ASCII versions of their query\n>results; their web browser or widget set can do that much better. And even\n>those that do wouldn't like the particular formatting choices anyway. So I\n>withdrew psql's printing functions from the public. You can still link in\n>print.o into your program if you want to, but please don't complain if I\n>change the spacing and your application breaks.)\n\nIt's a bit different with definitions; AFAICT there is no way of (simply)\ngetting the definition of a constraint while in psql. *I* want to be able\nto do this, and personal need is a pretty good motivator...\n\nSo, perhaps I need to implement the metadata dumping code from pg_dump as a\nset of functions that can be added to the backend and which are called in\none or more view definitions which pg_dump can use.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 23 Jul 2000 22:54:00 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "\nOn Sat, 22 Jul 2000, Philip Warner wrote:\n> \n> 3. My current plan/idea/suggestion is to implement an API that, given an\n> object type (eg. 'table'), will return the most basic definition for the\n> object and a list of related objects. This API could be used by both psql\n> and pg_dump to create SQL for display & backup purposes.\n\n It's sounds good for me. If your API will good it is usable for more\nprograms than for psql and pg_dump. And a \"C\" API is included-able to\nmore langs (Python, PHP..)\n\n A question is, what will returns from this API, full SQL statements in \nstrings only or some structs too? If will here some common mechanism how \nobtain definition for tables (etc.) not is a problem start development \non advanced client programs like Oracle Designer or make programs for \nSQL DB to XML conversion and DB schema visualization (for example in the \nnice program dia)... (don't care I know pgaccess).\n\n IMHO all OpenSource SQL are behind in clients part. \n\n\t\t\t\t\t\tKarel\n\n",
"msg_date": "Mon, 24 Jul 2000 09:48:14 +0200 (CEST)",
"msg_from": "Karel Zak <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "Philip Warner writes:\n\n> 2. How can we provide a function in psql that displays definitions of all\n> things that a user can create with SQL?\n> \n> This is the problem I set out to address, which is why I looked at using\n> pg_dump code. Which then led me to the philosophical question of what\n> should be responsible for 'decompiling' the internal representation of the\n> metadata. My feeling is that the backend 'compiles' SQL into metadata, so\n> it should also decompile it.\n\nThere is certainly an intellectual merit in making the backend spit out\nthe SQL it took in. But, just for kicks, there is also an intellectual\nmerit in *not* doing it: Whatever you dump represents the state of a\ndatabase, but SQL only provides a method for modifying the state, not for\nrepresenting it. The backend has, by and large, no idea how it got to the\ncurrent state. Which is the philosophical counter-argument to the notion\nthat the backend should also provide the inverse operation to its query\nparser -- there is no inverse.\n\nGetting of that high horse, the practical problems I see is that there are\nabout a thousand parameters which would affect how you dump the SQL:\n\n* indentation\n* capitalization\n* quotes\n* standards compliance (to migrate to a different RDBMS)\n* order\n* view as view, view as rule?\n* with/without psql specific stuff (\\connect ...)\n* How to resolve circular dependencies?\n\nThese kinds of decisions are better off with a client application, ISTM.\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Mon, 24 Jul 2000 18:06:51 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "At 18:06 24/07/00 +0200, Peter Eisentraut wrote:\n>Philip Warner writes:\n>\n>> 2. How can we provide a function in psql that displays definitions of all\n>> things that a user can create with SQL?\n>> \n>> This is the problem I set out to address, which is why I looked at using\n>> pg_dump code. Which then led me to the philosophical question of what\n>> should be responsible for 'decompiling' the internal representation of the\n>> metadata. My feeling is that the backend 'compiles' SQL into metadata, so\n>> it should also decompile it.\n>\n>There is certainly an intellectual merit in making the backend spit out\n>the SQL it took in. But, just for kicks, there is also an intellectual\n>merit in *not* doing it: Whatever you dump represents the state of a\n>database, but SQL only provides a method for modifying the state, not for\n>representing it. The backend has, by and large, no idea how it got to the\n>current state. Which is the philosophical counter-argument to the notion\n>that the backend should also provide the inverse operation to its query\n>parser -- there is no inverse.\n\nNo, but any DB state must be representable, and the DB may be the best\narbiter of how to represent it. If psql is used to transform the database\nfrom state 'A' to state 'B', then the database should be able to describe\nstate 'B', ISTM.\n\nI don't know if PG allows table columns to depend on columns in other\ntables, but if they can then dumping a valid schema becomes almost\nimpossible. [Dec/Rdb allows 'computed by' columns which can contain\narithmetic operations on columns in the current table, or even 'select..'\nstatements. This means that defining a pair of cross-referenced tables can\nbe a multi-step process]. \n\nHowever, the fact the problem is hard/impossible, is not really an argument\nfor placing it in a FE or BE, AFAICT...\n\n\n>Getting of that high horse, the practical problems I see is that there are\n>about a thousand parameters which would affect how you dump the SQL:\n>\n>* indentation\n\nThis would be picked arbitrarily.\n\n\n>* capitalization\n>* quotes\n\nThese are related. pg_dump already has to handle this, and the client\nshould be able to specify how quotes are handled (needs to be in the\nAPI/SQL/View).\n\n\n>* standards compliance (to migrate to a different RDBMS)\n\nThis is currently a problem in pg_dump, and could be left out, I think. To\ndump valid SQL-nn format output, we probably want to wqait for info\nschemas. Also, we *can't* produce standard SQL for some PG features, I think.\n\n\n>* order\n\nThis is an issue for the client. I am not proposing a\n'Dump_The_Entire_Datbase' call; just a\n'Dump_One_Thing_And_A_List_Of_Dependencies' call.\n\n\n>* view as view, view as rule?\n\nAlso an issue with pg_dump currently; I'd prefer to see it as a view.\n\n\n>* with/without psql specific stuff (\\connect ...)\n\nAnother issue for the client.\n\n\n>* How to resolve circular dependencies?\n\nIssue for the client.\n\n>These kinds of decisions are better off with a client application, ISTM.\n\nMost of them would be; the only things handled at the backend would be\n'formatting', quotes (based on client request), and SQL generation. The\nclient has to put the SQL together in a meaningful way including \\connect\nstatements and handling dependencies.\n\nI agree that this does not sit well with the \"DB must be able to dump it's\nstate\" argument; perhaps I need to just clean up pg_dump a little, link it\ninto psql, then get on with something I actually want to do...(ie.\ninsert/update...returning).\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 25 Jul 2000 03:04:13 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "Philip Warner writes:\n\n> >* order\n> \n> This is an issue for the client. I am not proposing a\n> 'Dump_The_Entire_Datbase' call; just a\n> 'Dump_One_Thing_And_A_List_Of_Dependencies' call.\n\nHow? Functions can only return one value reliably.\n\n> >* How to resolve circular dependencies?\n> \n> Issue for the client.\n\nNot really. If you have a circular dependency `table --(column default)-->\nfunction --(reads)--> table' then you need to dump the table differently\n(perhaps leave out the constraint and add it after the function is\ncreated).\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Tue, 25 Jul 2000 22:41:09 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
},
{
"msg_contents": "At 22:41 25/07/00 +0200, Peter Eisentraut wrote:\n>Philip Warner writes:\n>\n>> >* order\n>> \n>> This is an issue for the client. I am not proposing a\n>> 'Dump_The_Entire_Datbase' call; just a\n>> 'Dump_One_Thing_And_A_List_Of_Dependencies' call.\n>\n>How? Functions can only return one value reliably.\n\nThe API is easy, and in the case of the database, it would take the form of\nmultiple rows in a result set, or possibly two querues - one returning a\nsingle value (the definition), and the oter returning the dependants in\nmultiple rows. I guess another option would be to return an array.\n\n\n>> >* How to resolve circular dependencies?\n>> \n>> Issue for the client.\n>\n>Not really. If you have a circular dependency `table --(column default)-->\n>function --(reads)--> table' then you need to dump the table differently\n>(perhaps leave out the constraint and add it after the function is\n>created).\n\nI would expect ALL constraints would be left off the table definition - it\nwould dump the most basic definition possible, with references to the\nconstraints appearing in the dependency list. That is why I say it's a\nproblem for the client. For the purpose of displaying the deinition in\npsql, circularity does not matter, and in the case of pg_dump, it actually\nwants to separate constraints and the table definition.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 26 Jul 2000 10:54:19 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump, libdump, dump API, & backend again"
}
] |
[
{
"msg_contents": "I could have sworn I saw a post where you (Tom Lane) figured out how\nto get tables to be read-only while performing a vaccuum rather than\nbeing completely locked.\n\nIs this true? Is it in the -PATCHES branch?\n\nthanks,\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, 21 Jul 2000 11:52:37 -0700",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "Vaccuum allows read access?"
},
{
"msg_contents": "On Fri, 21 Jul 2000, Alfred Perlstein wrote:\n\n> I could have sworn I saw a post where you (Tom Lane) figured out how\n> to get tables to be read-only while performing a vaccuum rather than\n> being completely locked.\n> \n> Is this true? Is it in the -PATCHES branch?\n\nthe last change that I recall was by Bruce ... he got it so that it only\nlock'd one table at a time and only held that lock for as long as was\nrequired instead of for the duration of the vacuum ...\n\n\n",
"msg_date": "Fri, 21 Jul 2000 15:56:33 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Vaccuum allows read access?"
},
{
"msg_contents": "> I could have sworn I saw a post where you (Tom Lane) figured out how\n> to get tables to be read-only while performing a vaccuum rather than\n> being completely locked.\n> \n> Is this true? Is it in the -PATCHES branch?\n\nIn the current sources, analyze allows read-access. I don't think\nvacuum allows any other access because the rows are moving in the file.\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, 21 Jul 2000 14:58:01 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Vaccuum allows read access?"
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> In the current sources, analyze allows read-access. I don't think\n> vacuum allows any other access because the rows are moving in the file.\n\nVACUUM *must* have exclusive lock.\n\nANALYZE actually is only a reader (AccessShareLock) and does not lock\nout either reading or writing in current sources.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 21 Jul 2000 15:15:27 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Vaccuum allows read access? "
},
{
"msg_contents": "Tom Lane wrote:\n> Bruce Momjian <[email protected]> writes:\n> > In the current sources, analyze allows read-access. I don't think\n> > vacuum allows any other access because the rows are moving in the file.\n>\n> VACUUM *must* have exclusive lock.\n>\n> ANALYZE actually is only a reader (AccessShareLock) and does not lock\n> out either reading or writing in current sources.\n\n Some related issue though.\n\n On the phone we discussed about the btree splitpage problems\n and you said that the current btree implementation is\n optimized for concurrent read and insert access, not so for\n concurrent deletes.\n\n This might get to be a problem with the overwriting storage\n manager. If it wants to reuse space of outdated tuples in\n the main heap, it needs to delete index tuples as well. Isn't\n that in conflict with the btree design?\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": "Sat, 22 Jul 2000 13:20:32 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Vaccuum allows read access?"
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> On the phone we discussed about the btree splitpage problems\n> and you said that the current btree implementation is\n> optimized for concurrent read and insert access, not so for\n> concurrent deletes.\n\n> This might get to be a problem with the overwriting storage\n> manager. If it wants to reuse space of outdated tuples in\n> the main heap, it needs to delete index tuples as well. Isn't\n> that in conflict with the btree design?\n\nYes, it's going to be an issue. nbtscan.c only handles deletions\nissued by the current backend, and thus is basically useful only\nfor VACUUM. We could change bt_restscan so that it tries scanning\nleft as well as right for the current item (it need only look as far\nleft as the start of the current page). But that doesn't help if\nsomeone's deleted the index item that was your current item.\n\nA simple solution is to hold onto a read lock for the current page\nof a scan throughout the scan, rather than releasing and regrabbing\nit as we do now. That might reduce the available concurrency quite\na bit, however. The worst case would be something like a CURSOR\nthat's been left sitting open --- it could keep the page locked for\na long time.\n\nAnother way is to change indexscans so that they fetch the referenced\nmain tuple directly, rather than simply handing back a TID for it,\nand apply the HeapTupleSatisfies test immediately. Then we could\navoid having a scan stop on a tuple that might be a candidate to be\ndeleted. Would save some call overhead and lock/unlock overhead too.\n\nA bigger problem is that this is all just for btrees. What about\nrtrees and hash indexes? (Not to mention GIST, although I suspect\nthat's dead code...)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 22 Jul 2000 12:09:27 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Vaccuum allows read access? "
}
] |
[
{
"msg_contents": "Ah, the reason I couldn't see the problem is I was using the wrong\nquery. I happened to look at the 'test' file you had sitting there\nand saw that it was a join against one more table than I was using;\nthere wasn't anything about the 'stock' table in the query you'd sent\nby mail.\n\nOnce I had the right query I was able to replicate the problem here.\nIt's a planning bug. A simplified version is:\n\ncreate table t1 (f1 int, f2 int);\ncreate table t2 (f3 int, f4 int);\ninsert into t1 values(1,10);\ninsert into t1 values(2,9);\ninsert into t1 values(3,8);\ninsert into t1 values(4,7);\ninsert into t1 values(3,3);\ninsert into t1 values(3,0);\ninsert into t1 values(10,0);\ninsert into t1 values(10,-1);\ninsert into t2 values(1,1);\ninsert into t2 values(3,3);\ninsert into t2 values(2,2);\nselect * from t1,t2 where f2 = f3 and f1 = f3;\n\nThis should produce one row (of 3's), but will not unless you set\nenable_mergejoin to OFF. The problem is that the produced plan\nis basically\n\nMerge Join using \"f3 = f1 and f3 = f2\"\n -> Sort by f3\n -> Seq Scan on t2\n -> Sort by f2\n -> Seq Scan on t1\n\nThe system knows enough to realize that all the valid output rows\nwill have f1 = f2 by transitivity, but unfortunately it's then\nconcluding that it's OK to sort t1 by f2 instead of f1, which is\nNOT OK in terms of the ordering the merge needs --- the merge expects\nmajor order by f1 and will miss records if that's not correct.\n\nI think the proper fix is to gin up an actual WHERE clause \"f1 = f2\"\nand apply it to restrict the output of the seqscan on t1. Then the\noutput of the sort will indeed have the expected ordering, ie, f1 or f2\ninterchangeably. (Actually, the extra WHERE clause might well cause\na different plan to be chosen, because it will give the\nrestriction-selectivity code information it didn't have before.\nBut assuming the same plan structure it will work rather than fail.)\n\nThis is a new bug in 7.0.* --- earlier versions didn't have it because\nthey had no concept of transitive closure of sort keys. Oh well, live\nand learn.\n\nI will work on fixing this in current sources and then see if it's\npractical to back-patch it into 7.0.*. In the meantime, I recommend\npatching your queries by hand such that all the implied equalities\nare mentioned explicitly. That is, instead of\n\n part_info.item_num = po_line_item.item_num and \n parts.item_num = po_line_item.item_num and \n stock.item_num = parts.item_num and\n\nyou'd need something like\n\n part_info.item_num = po_line_item.item_num and \n part_info.item_num = parts.item_num and\n part_info.item_num = stock.item_num and\n parts.item_num = po_line_item.item_num and \n stock.item_num = parts.item_num and\n stock.item_num = po_line_item.item_num and\n\nUgh :-(. Another possibility is \"set enable_mergejoin to off\" ...\nas far as I know, only mergejoin is sufficiently dependent on input\nordering to be bitten by this problem.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 22 Jul 2000 20:09:23 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: lost records --- problem identified!"
},
{
"msg_contents": "> Ah, the reason I couldn't see the problem is I was using the wrong\n> query. I happened to look at the 'test' file you had sitting there\n> and saw that it was a join against one more table than I was using;\n> there wasn't anything about the 'stock' table in the query you'd sent\n> by mail.\n> \n> Once I had the right query I was able to replicate the problem here.\n> It's a planning bug. A simplified version is:\n> \n> create table t1 (f1 int, f2 int);\n> create table t2 (f3 int, f4 int);\n> insert into t1 values(1,10);\n> insert into t1 values(2,9);\n> insert into t1 values(3,8);\n> insert into t1 values(4,7);\n> insert into t1 values(3,3);\n> insert into t1 values(3,0);\n> insert into t1 values(10,0);\n> insert into t1 values(10,-1);\n> insert into t2 values(1,1);\n> insert into t2 values(3,3);\n> insert into t2 values(2,2);\n> select * from t1,t2 where f2 = f3 and f1 = f3;\n> \n> This should produce one row (of 3's), but will not unless you set\n> enable_mergejoin to OFF. The problem is that the produced plan\n> is basically\n> \n> Merge Join using \"f3 = f1 and f3 = f2\"\n> -> Sort by f3\n> -> Seq Scan on t2\n> -> Sort by f2\n> -> Seq Scan on t1\n> \n> The system knows enough to realize that all the valid output rows\n> will have f1 = f2 by transitivity, but unfortunately it's then\n> concluding that it's OK to sort t1 by f2 instead of f1, which is\n> NOT OK in terms of the ordering the merge needs --- the merge expects\n> major order by f1 and will miss records if that's not correct.\n> \n> I think the proper fix is to gin up an actual WHERE clause \"f1 = f2\"\n> and apply it to restrict the output of the seqscan on t1. Then the\n> output of the sort will indeed have the expected ordering, ie, f1 or f2\n> interchangeably. (Actually, the extra WHERE clause might well cause\n> a different plan to be chosen, because it will give the\n> restriction-selectivity code information it didn't have before.\n> But assuming the same plan structure it will work rather than fail.)\n> \n> This is a new bug in 7.0.* --- earlier versions didn't have it because\n> they had no concept of transitive closure of sort keys. Oh well, live\n> and learn.\n> \n> I will work on fixing this in current sources and then see if it's\n> practical to back-patch it into 7.0.*. In the meantime, I recommend\n> patching your queries by hand such that all the implied equalities\n> are mentioned explicitly. That is, instead of\n> \n> part_info.item_num = po_line_item.item_num and \n> parts.item_num = po_line_item.item_num and \n> stock.item_num = parts.item_num and\n> \n> you'd need something like\n> \n> part_info.item_num = po_line_item.item_num and \n> part_info.item_num = parts.item_num and\n> part_info.item_num = stock.item_num and\n> parts.item_num = po_line_item.item_num and \n> stock.item_num = parts.item_num and\n> stock.item_num = po_line_item.item_num and\n> \n> Ugh :-(. Another possibility is \"set enable_mergejoin to off\" ...\n> as far as I know, only mergejoin is sufficiently dependent on input\n> ordering to be bitten by this problem.\n> \n> \t\t\tregards, tom lane\n\nHave you fixed this in current? If so, are you going to make the\nback-patch for 7.0.*?\n\nIt seems the problem is critical...\n--\nTatsuo Ishii\n\n",
"msg_date": "Tue, 22 Aug 2000 21:57:22 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: lost records --- problem identified!"
},
{
"msg_contents": "Tatsuo Ishii <[email protected]> writes:\n> Have you fixed this in current? If so, are you going to make the\n> back-patch for 7.0.*?\n\nYes, and no. I think the patch would be too risky to drop into 7.0.*\nwith no beta testing...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 22 Aug 2000 10:04:41 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Re: lost records --- problem identified! "
},
{
"msg_contents": "> Tatsuo Ishii <[email protected]> writes:\n> > Have you fixed this in current? If so, are you going to make the\n> > back-patch for 7.0.*?\n> \n> Yes, and no. I think the patch would be too risky to drop into 7.0.*\n> with no beta testing...\n\nI think we need beta testing then. Otherwise we would have to tell\npeople to disable merge join until 7.1 gets released, I guess.\n--\nTatsuo Ishii\n",
"msg_date": "Wed, 23 Aug 2000 10:01:25 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: lost records --- problem identified! "
},
{
"msg_contents": "Tatsuo Ishii <[email protected]> writes:\n>> Yes, and no. I think the patch would be too risky to drop into 7.0.*\n>> with no beta testing...\n\n> I think we need beta testing then. Otherwise we would have to tell\n> people to disable merge join until 7.1 gets released, I guess.\n\nWell ... mumble ... as far as I've heard, you and Frank are the only\nones to get bit by it so far. So I'm not sure it deserves a fire-drill\nresponse. There is at least one other \"fatal\" bug in 7.0 mergejoin\n(planner will accept an inner plan of a type that doesn't support mark/\nrestore; this is still not fixed in current sources) not to mention a\nfatal bug in hashjoin (hash table portal may get released before cursor\nportal; this is fixed in current sources but I see no practical way to\nfix it under 7.0 memory management). Is it worth trying to beta-test\nour way to a 7.0.3 release? I'd vote for pushing up the 7.1 release\nschedule instead, if we are sufficiently worried about these issues.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 23 Aug 2000 00:16:15 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Re: lost records --- problem identified! "
}
] |
[
{
"msg_contents": "I'm going to be on vacation for essentially the next month. So if there's\nanything that you'd like fixed before that, now's a good time to tell.\n\n\nMeanwhile a few TODO updates:\n\n* Creating index of TIMESTAMP & RELTIME fails, or rename to DATETIME(Thomas)\n\nLooks obsolete to me. (Reltime indexes still don't work, but I doubt\nsomeone needs them.)\n\n* -More access control over who can create tables and use locks(Karal)\n\nNot done, and it's \"Karel\".\n\n* Test syslog functionality\n* Unify configuration into one configuration file (Peter E)\n* use setproctitle() if it exists for 'ps' display of status\n\nAll done\n\n* Add hash for int8\n\nSeems to work (Tom Lane?)\n\n* BSD/OS does not support locale because there is no LC_MESSAGES\n\nDone\n\n* Add ALTER TABLE DROP/ALTER COLUMN feature(Peter E) [drop]\n\n`ALTER TABLE ALTER COLUMN' was implemented for 7.0. I am not working on\nthe DROP COLUMN part, so you might want to remove my name.\n\n* Allow DELETE and UPDATE to use inheritance using tablename*\n\nChris Bitmead's contributions accomplish that (though not how it's written\nhere).\n\n\nThere seem to be some duplicate items:\n\n* Some database schema's are not dumpable; do dumps in oid order\n* make pg_dump dump in oid order, so dependencies are resolved\n\n* Allow nulls in arrays\n* Allow arrays to hold NULL elements\n\n\nSee y'all in beta... :-)\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Sun, 23 Jul 2000 14:58:39 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": true,
"msg_subject": "TODO updates"
},
{
"msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Meanwhile a few TODO updates:\n\n> * Creating index of TIMESTAMP & RELTIME fails, or rename to DATETIME(Thomas)\n\n> Looks obsolete to me. (Reltime indexes still don't work, but I doubt\n> someone needs them.)\n\nHm. It looks like the following standard types are not indexable\n(or at least don't have default opclass entries) in current sources:\n\n aclitem\n bit\n bytea\n cid\n filename\n int2vector\n line\n lseg\n money\n path\n point\n regproc\n reltime\n smgr\n tid\n tinterval\n varbit\n xid\n\nThere are three more that are indexable but not by btree (we only\nhave rtree support, which I guess makes sense here):\n\n box\n circle\n polygon\n\nIt surprises me that we don't have index support for reltime and\ntinterval (I think only a 3-way comparison proc and a few table entries\nare missing). regproc is even closer, it just needs table entries.\nbit/varbit are of course just Not There Yet (but I see comparison\nfunctions exist --- just the AM table entries don't.)\n\nAnother notable omission is that there should be rtree support for all\nthe geometric types (what happened to line, lseg, path, point?)\n\nLack of indexability of these other types doesn't bother me much.\n\nSo I guess an up-to-date version of this TODO item should read\n\n* Add btree index support for reltime, tinterval, regproc, bit, varbit\n* Add rtree index support for line, lseg, path, point\n\n> * Add hash for int8\n>\n> Seems to work (Tom Lane?)\n\nYeah, I fixed that a month ago.\n\n\n> See y'all in beta... :-)\n\nHave a good one...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 23 Jul 2000 13:18:39 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "> \n> * -More access control over who can create tables and use locks(Karal)\n> \n> Not done, and it's \"Karel\".\n\n My old patch for this is usable, but as we already discussed about it,\n more \"systematic\" solution is overwrite a ACL. In this context I not sure\n if my name is right here. I can help with this because I need this features\n for some my private projects, but now I don't want work on more projects if \n the query cache is still open (and still is a quiet about it! (look at \n anyone my first snapshot?)).\n\n Plan anyone (Peter?) ACL at eyeshot time?\n\n\t\t\t\t\t\tKarel\n\nPS. \"Karel\" = \"Charles\" in Eng. :-) \n\n",
"msg_date": "Mon, 24 Jul 2000 09:23:15 +0200 (CEST)",
"msg_from": "Karel Zak <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> I'm going to be on vacation for essentially the next month. So if there's\n> anything that you'd like fixed before that, now's a good time to tell.\n> \n> \n> Meanwhile a few TODO updates:\n> \n> * Creating index of TIMESTAMP & RELTIME fails, or rename to DATETIME(Thomas)\n> \n> Looks obsolete to me. (Reltime indexes still don't work, but I doubt\n> someone needs them.)\n\nMarked as done.\n\n> \n> * -More access control over who can create tables and use locks(Karal)\n> \n> Not done, and it's \"Karel\".\n\nSorry, fixed.\n\n> \n> * Test syslog functionality\n> * Unify configuration into one configuration file (Peter E)\n> * use setproctitle() if it exists for 'ps' display of status\n> \n> All done\n\nYes.\n\n> \n> * Add hash for int8\n> \n> Seems to work (Tom Lane?)\n\nYes.\n\n> \n> * BSD/OS does not support locale because there is no LC_MESSAGES\n> \n> Done\n\nYes.\n\n> \n> * Add ALTER TABLE DROP/ALTER COLUMN feature(Peter E) [drop]\n> \n> `ALTER TABLE ALTER COLUMN' was implemented for 7.0. I am not working on\n> the DROP COLUMN part, so you might want to remove my name.\n\nEntry split into two lines and updated.\n> \n> * Allow DELETE and UPDATE to use inheritance using tablename*\n> \n> Chris Bitmead's contributions accomplish that (though not how it's written\n> here).\n\nFixed, with tablename* removed.\n\n> \n> \n> There seem to be some duplicate items:\n> \n> * Some database schema's are not dumpable; do dumps in oid order\n> * make pg_dump dump in oid order, so dependencies are resolved\n> \n> * Allow nulls in arrays\n> * Allow arrays to hold NULL elements\n\nDuplicates removed.\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, 27 Jul 2000 14:48:02 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates"
},
{
"msg_contents": "> Lack of indexability of these other types doesn't bother me much.\n> \n> So I guess an up-to-date version of this TODO item should read\n> \n> * Add btree index support for reltime, tinterval, regproc, bit, varbit\n> * Add rtree index support for line, lseg, path, point\n\nTODO updated.\n\n> \n> > * Add hash for int8\n> >\n> > Seems to work (Tom Lane?)\n> \n> Yeah, I fixed that a month ago.\n\nTODO updated.\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, 27 Jul 2000 14:51:31 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates"
}
] |
[
{
"msg_contents": "At 14:58 23/07/00 +0200, Peter Eisentraut wrote:\n>\n>* Some database schema's are not dumpable; do dumps in oid order\n>* make pg_dump dump in oid order, so dependencies are resolved\n>\n\nAs of the latest pg_dump, it dumps in modified oid order: rules, triggers,\nviews and indexes always go at end, but the rest is in oid order. If people\nwant a strict oid order, then it's a matter of commenting out 4 or 5 lines...\n\nDoes this mean I've actually done a ToDo item? I was trying to limit myself\nto useless features that noone wants...\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 23 Jul 2000 23:11:12 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: TODO updates"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> As of the latest pg_dump, it dumps in modified oid order: rules, triggers,\n> views and indexes always go at end, but the rest is in oid order.\n\nHmm, I think you need to dump views in OID order just as though they\nwere tables. What if an SQL function refers to a view?\n\nThose other categories seem safe to handle this way, though.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 23 Jul 2000 12:36:25 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "At 12:36 23/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> As of the latest pg_dump, it dumps in modified oid order: rules, triggers,\n>> views and indexes always go at end, but the rest is in oid order.\n>\n>Hmm, I think you need to dump views in OID order just as though they\n>were tables. What if an SQL function refers to a view?\n\nThe actual list of things it moves to the end is: TABLE DATA, BLOBS, INDEX,\nTRIGGER, RULE and ACL. The underlying table for a view is created in OID\norder, so I would guess that referencing it in an SQL function would still\nbe OK. Is that OK?\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Mon, 24 Jul 2000 10:50:07 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": ">> Philip Warner <[email protected]> writes:\n>>> As of the latest pg_dump, it dumps in modified oid order: rules, triggers,\n>>> views and indexes always go at end, but the rest is in oid order.\n>> \n>> Hmm, I think you need to dump views in OID order just as though they\n>> were tables. What if an SQL function refers to a view?\n\n> The actual list of things it moves to the end is: TABLE DATA, BLOBS, INDEX,\n> TRIGGER, RULE and ACL. The underlying table for a view is created in OID\n> order, so I would guess that referencing it in an SQL function would still\n> be OK. Is that OK?\n\nOh, I see, you're emitting the underlying table and the rule separately.\nYeah, I think that will probably work.\n\nIs it safe to postpone ACL setting? Less sure about that ... I think\nthe rule parser checks ACLs at parse time instead of execution, for\nexample.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 23 Jul 2000 23:27:59 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "At 23:27 23/07/00 -0400, Tom Lane wrote:\n>\n>> The actual list of things it moves to the end is: TABLE DATA, BLOBS, INDEX,\n>> TRIGGER, RULE and ACL. The underlying table for a view is created in OID\n>> order, so I would guess that referencing it in an SQL function would still\n>> be OK. Is that OK?\n>\n>Oh, I see, you're emitting the underlying table and the rule separately.\n>Yeah, I think that will probably work.\n\nThis one bothers me a little actually; I would prefer if it output a valid\n'Create View' statement, in which case it would have to go in OID order.\nWhere possible, I want the output to be vanilla SQL, but I probably won't\ndo it yet.\n\n\n>Is it safe to postpone ACL setting? Less sure about that ... I think\n>the rule parser checks ACLs at parse time instead of execution, for\n>example.\n\nWell, the theory I was working on was that it was possible that the ACLs\nwould deny the current user access to parts of the database, so I put them\nat the end. \n\nDo you mean that by putting the ACLs at the end I may be allowing access\n(via the rule parser) that is inappropriate?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Mon, 24 Jul 2000 13:35:13 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> Do you mean that by putting the ACLs at the end I may be allowing access\n> (via the rule parser) that is inappropriate?\n\nI'm more worried about failing to allow access that's necessary to do\nthe restore. What about\n\n\\connect - user1\n\ncreate table t1;\n\n\\connect - user2\n\ncreate rule .... (refers to t1)\n\nI think the create rule will fail if you haven't yet granted user2\naccess rights for t1.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 23 Jul 2000 23:50:13 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "At 23:50 23/07/00 -0400, Tom Lane wrote:\n>\n>I'm more worried about failing to allow access that's necessary to do\n>the restore. What about\n>\n>\\connect - user1\n>\n>create table t1;\n>\n>\\connect - user2\n>\n>create rule .... (refers to t1)\n>\n>I think the create rule will fail if you haven't yet granted user2\n>access rights for t1.\n>\n\nYou are right; and I just noticed two bugs in pg_dump - (1) it does not\ndump the owner of a view (which means the ACLs still might fail), and (2)\nit does not reconnect to DB when using a direct DB connection, so\neverything is created by one user.\n\nSo, I'll put the ACLs in OID order and fix the dump & restore code...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Mon, 24 Jul 2000 14:05:37 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "At 14:05 24/07/00 +1000, Philip Warner wrote:\n>At 23:50 23/07/00 -0400, Tom Lane wrote:\n>>\n>>I'm more worried about failing to allow access that's necessary to do\n>>the restore. What about\n>>\n>>\\connect - user1\n>>\n>>create table t1;\n>>\n>>\\connect - user2\n>>\n>>create rule .... (refers to t1)\n>>\n>>I think the create rule will fail if you haven't yet granted user2\n>>access rights for t1.\n>>\n>\n>You are right; and I just noticed two bugs in pg_dump - (1) it does not\n>dump the owner of a view (which means the ACLs still might fail), and (2)\n>it does not reconnect to DB when using a direct DB connection, so\n>everything is created by one user.\n>\n>So, I'll put the ACLs in OID order and fix the dump & restore code...\n>\n\nDone, tested & applied.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Mon, 24 Jul 2000 16:33:26 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: TODO updates "
},
{
"msg_contents": "> At 14:58 23/07/00 +0200, Peter Eisentraut wrote:\n> >\n> >* Some database schema's are not dumpable; do dumps in oid order\n> >* make pg_dump dump in oid order, so dependencies are resolved\n> >\n> \n> As of the latest pg_dump, it dumps in modified oid order: rules, triggers,\n> views and indexes always go at end, but the rest is in oid order. If people\n> want a strict oid order, then it's a matter of commenting out 4 or 5 lines...\n\nTODO updated, and you are listed in there now.\n\n> \n> Does this mean I've actually done a ToDo item? I was trying to limit myself\n> to useless features that noone wants...\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, 27 Jul 2000 14:49:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: TODO updates"
}
] |
[
{
"msg_contents": "I noticed a discussion on this list about a re-do of the INET/CIDR\ntypes. I was wondering if there was ANY way at all to add\nan output function that ALWAYS returns all 4 octets of an INET or CIDR\ntype with and without the /netmask?\n\nI'm writing a IP Allocation/Tracking app for the ISP I work for, and\nfind the current output format causes confusion for the less\ntechnical types. \n\nLarry Rosenman\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, 23 Jul 2000 09:00:57 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "INET/CIDR types"
},
{
"msg_contents": "Thus spake Larry Rosenman\n> I noticed a discussion on this list about a re-do of the INET/CIDR\n> types. I was wondering if there was ANY way at all to add\n> an output function that ALWAYS returns all 4 octets of an INET or CIDR\n> type with and without the /netmask?\n> \n> I'm writing a IP Allocation/Tracking app for the ISP I work for, and\n> find the current output format causes confusion for the less\n> technical types. \n\nThe host() function does this for the INET type. It doesn't work for\nthe CIDR type (it throws an error) because CIDR doesn't have a host\npart per se.\n\ndarcy=> select '1.2.0.0/23'::inet;\n?column?\n--------\n1.2.0/23\n(1 row)\n\ndarcy=> select host('1.2.0.0/23'::inet);\n host\n-------\n1.2.0.0\n(1 row)\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Mon, 24 Jul 2000 10:33:14 -0400 (EDT)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "The bad news is that I'm tracking CIDR blocks. \n\nIf I could get a network() function to return essentially\nhost()::inet for CIDR's that would work. \n\nLarry\n> Thus spake Larry Rosenman\n> > I noticed a discussion on this list about a re-do of the INET/CIDR\n> > types. I was wondering if there was ANY way at all to add\n> > an output function that ALWAYS returns all 4 octets of an INET or CIDR\n> > type with and without the /netmask?\n> > \n> > I'm writing a IP Allocation/Tracking app for the ISP I work for, and\n> > find the current output format causes confusion for the less\n> > technical types. \n> \n> The host() function does this for the INET type. It doesn't work for\n> the CIDR type (it throws an error) because CIDR doesn't have a host\n> part per se.\n> \n> darcy=> select '1.2.0.0/23'::inet;\n> ?column?\n> --------\n> 1.2.0/23\n> (1 row)\n> \n> darcy=> select host('1.2.0.0/23'::inet);\n> host\n> -------\n> 1.2.0.0\n> (1 row)\n> \n> -- \n> D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\n> http://www.druid.net/darcy/ | and a sheep voting on\n> +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\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": "Mon, 24 Jul 2000 09:41:05 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "Thus spake Larry Rosenman\n> The bad news is that I'm tracking CIDR blocks. \n\nThen there is no host part. I would argue that if someone is getting\nconfused with the current output then perhaps they shouldn't be dealing\nwith client networks.\n\n> If I could get a network() function to return essentially\n> host()::inet for CIDR's that would work. \n\nThere is a network function. It returns the network.\n\ndarcy=> select network('1.2.0.0/23'::cidr);\nnetwork \n--------\n1.2.0/23\n(1 row)\n\nA lot of work went into these types to make them correct. I don't think\nwe should be undermining that to allow people to work with incorrect\nassumptions. If you want Micro$oft you know where to find it.\n\nIf you really must do this then store your blocks in the INET type. It\npretty much does what you want but doesn't try to pretend to be a CIDR.\n\n\nHmmm. I just noticed this.\n\ndarcy=> select '1.2.0.1/23'::cidr;\n?column?\n--------\n1.2.0/23\n(1 row)\n\nShouldn't that throw an error?\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Mon, 24 Jul 2000 15:15:01 -0400 (EDT)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "The problem is NON-TECHNICAL people will be getting the output,\nand they expect 4 octet output. \n\nI really think that we should have a way to coerce a CIDR to\nan INET, and then allow host(). \n\nRemember that I am dealing with $10/hour clerks. \n\nI really don't get the hostility to changing the OUTPUT format...\n\nLarry Rosenman\n\n-----Original Message-----\nFrom: D'Arcy J.M. Cain [mailto:[email protected]]\nSent: Monday, July 24, 2000 2:15 PM\nTo: Larry Rosenman\nCc: [email protected]\nSubject: Re: [HACKERS] INET/CIDR types\n\n\nThus spake Larry Rosenman\n> The bad news is that I'm tracking CIDR blocks. \n\nThen there is no host part. I would argue that if someone is getting\nconfused with the current output then perhaps they shouldn't be dealing\nwith client networks.\n\n> If I could get a network() function to return essentially\n> host()::inet for CIDR's that would work. \n\nThere is a network function. It returns the network.\n\ndarcy=> select network('1.2.0.0/23'::cidr);\nnetwork \n--------\n1.2.0/23\n(1 row)\n\nA lot of work went into these types to make them correct. I don't think\nwe should be undermining that to allow people to work with incorrect\nassumptions. If you want Micro$oft you know where to find it.\n\nIf you really must do this then store your blocks in the INET type. It\npretty much does what you want but doesn't try to pretend to be a CIDR.\n\n\nHmmm. I just noticed this.\n\ndarcy=> select '1.2.0.1/23'::cidr;\n?column?\n--------\n1.2.0/23\n(1 row)\n\nShouldn't that throw an error?\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Mon, 24 Jul 2000 14:26:37 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "At 02:26 PM 7/24/00 -0500, Larry Rosenman wrote:\n>The problem is NON-TECHNICAL people will be getting the output,\n>and they expect 4 octet output. \n>\n>I really think that we should have a way to coerce a CIDR to\n>an INET, and then allow host(). \n>\n>Remember that I am dealing with $10/hour clerks. \n>\n>I really don't get the hostility to changing the OUTPUT format...\n\nAre these $10/hour clerks typing in SQL to psql? Strange ...\n\nIf not, formatting issues like this can easily be broken (or fixed,\naccording to your POV) by your application client.\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, 24 Jul 2000 12:30:08 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "I was hoping to have some niceties out of the SQL retrieve to print directly\nin PHP, and not have to massage it. \n\nWhy is there such animosity to printing out all 4 octets in some function\nsomewhere for a CIDR block?\n\nLarry \n\n-----Original Message-----\nFrom: Don Baccus [mailto:[email protected]]\nSent: Monday, July 24, 2000 2:30 PM\nTo: Larry Rosenman; [email protected]; Larry Rosenman\nSubject: RE: [HACKERS] INET/CIDR types\n\n\nAt 02:26 PM 7/24/00 -0500, Larry Rosenman wrote:\n>The problem is NON-TECHNICAL people will be getting the output,\n>and they expect 4 octet output. \n>\n>I really think that we should have a way to coerce a CIDR to\n>an INET, and then allow host(). \n>\n>Remember that I am dealing with $10/hour clerks. \n>\n>I really don't get the hostility to changing the OUTPUT format...\n\nAre these $10/hour clerks typing in SQL to psql? Strange ...\n\nIf not, formatting issues like this can easily be broken (or fixed,\naccording to your POV) by your application client.\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, 24 Jul 2000 14:36:44 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "Thus spake Larry Rosenman\n> I was hoping to have some niceties out of the SQL retrieve to print directly\n> in PHP, and not have to massage it. \n> \n> Why is there such animosity to printing out all 4 octets in some function\n> somewhere for a CIDR block?\n\nYou keep saying \"hostility\" as if we are ganging up against you. Believe\nme, I have no animosity towards you and I am sure no one else has either.\nWe are resisting the change you want simply because it would violate the\nRFC which we agreed to follow when we created the types.\n\nIf you think this is hostile, you will probably think that the original\ndiscussions in the archives are nuclear war :-). If you would like to\nlook it over make sure to set aside a lot of time. We spent a long time\nhashing this out.\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Mon, 24 Jul 2000 16:17:36 -0400 (EDT)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "What RFC says you can't print all 4 octets of a CIDR Netnumber?\n\nWhy does network(cidr) return the whole cidr output just like\nselect cidr?\n\nI'm just trying to figure out the logic here.\n\nHere is what my Cisco Router that speaks BGP says:\nbig-bro#term ip netmask-format bit-count\nbig-bro#sh ip bg 206.66.0.0/20\nBGP routing table entry for 206.66.0.0/20, version 150832\nPaths: (5 available, best #4)\n Advertised to non peer-group peers:\n 157.130.140.109 166.63.135.33 206.66.12.3 206.66.12.4 206.66.12.7\n206.66.12.\n8\n Local, (aggregated by 4278 206.66.12.3), (received & used)\n 206.66.12.3 from 206.66.12.3 (206.66.12.3)\n Origin IGP, localpref 0, valid, internal, atomic-aggregate\n Local, (aggregated by 4278 206.66.12.7), (received & used)\n 206.66.12.7 from 206.66.12.7 (206.66.12.7)\n Origin IGP, localpref 0, valid, internal, atomic-aggregate\n Local, (aggregated by 4278 206.66.12.8), (received & used)\n 206.66.12.8 from 206.66.12.8 (206.66.12.8)\n Origin IGP, localpref 0, valid, internal, atomic-aggregate\n Local, (aggregated by 4278 206.66.12.1)\n 0.0.0.0 from 0.0.0.0 (206.66.12.1)\n Origin IGP, localpref 100, weight 32768, valid, aggregated, local,\natomic-\naggregate, best\n Local, (received & used)\n 206.66.12.4 from 206.66.12.4 (206.66.12.4)\n Origin IGP, metric 0, localpref 100, valid, internal\nbig-bro#\n\nI am just asking for the same type output.\n\nWhy is this so hard?\n\nThe info is in the type, and the print routine wouldn't be so hard.\n\nI can probably write the function in less than 1 hour, but getting it\nintegrated is\nmy stumbling block.\n\n\n\n-----Original Message-----\nFrom: D'Arcy J.M. Cain [mailto:[email protected]]\nSent: Monday, July 24, 2000 3:18 PM\nTo: Larry Rosenman\nCc: Don Baccus; [email protected]\nSubject: Re: [HACKERS] INET/CIDR types\n\n\nThus spake Larry Rosenman\n> I was hoping to have some niceties out of the SQL retrieve to print\ndirectly\n> in PHP, and not have to massage it.\n>\n> Why is there such animosity to printing out all 4 octets in some function\n> somewhere for a CIDR block?\n\nYou keep saying \"hostility\" as if we are ganging up against you. Believe\nme, I have no animosity towards you and I am sure no one else has either.\nWe are resisting the change you want simply because it would violate the\nRFC which we agreed to follow when we created the types.\n\nIf you think this is hostile, you will probably think that the original\ndiscussions in the archives are nuclear war :-). If you would like to\nlook it over make sure to set aside a lot of time. We spent a long time\nhashing this out.\n\n--\nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n\n",
"msg_date": "Mon, 24 Jul 2000 15:27:24 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "Thus spake Larry Rosenman\n> What RFC says you can't print all 4 octets of a CIDR Netnumber?\n\nCan't recall. It was Paul Vixie who made the claim and since he was\nprobably the one who wrote it I tend to believe him.\n\nIn fact it may be that it suggested rather than required but someone\nwould have to dig out the RFC before we considered changing it I think.\n\n> Why does network(cidr) return the whole cidr output just like\n> select cidr?\n\nYah, it's redundant. \"network(cidr)\" is just a long way to say \"cidr.\"\nThe only reason it is there is because of the way the code was written\nfor the two types. Not having it would have required a special test to\nlook for it and technically it is correct so we didn't bother.\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Mon, 24 Jul 2000 16:53:24 -0400 (EDT)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "Can we dig up the RFC?\n\nLarry\n\n-----Original Message-----\nFrom: [email protected] [mailto:[email protected]]On\nBehalf Of D'Arcy J.M. Cain\nSent: Monday, July 24, 2000 3:53 PM\nTo: Larry Rosenman\nCc: [email protected]; Don Baccus\nSubject: Re: [HACKERS] INET/CIDR types\n\n\nThus spake Larry Rosenman\n> What RFC says you can't print all 4 octets of a CIDR Netnumber?\n\nCan't recall. It was Paul Vixie who made the claim and since he was\nprobably the one who wrote it I tend to believe him.\n\nIn fact it may be that it suggested rather than required but someone\nwould have to dig out the RFC before we considered changing it I think.\n\n> Why does network(cidr) return the whole cidr output just like\n> select cidr?\n\nYah, it's redundant. \"network(cidr)\" is just a long way to say \"cidr.\"\nThe only reason it is there is because of the way the code was written\nfor the two types. Not having it would have required a special test to\nlook for it and technically it is correct so we didn't bother.\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Mon, 24 Jul 2000 16:11:34 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "Larry Rosenman wrote:\n> \n> The problem is NON-TECHNICAL people will be getting the output,\n> and they expect 4 octet output.\n\nWell, but what are they going to do if they see, say, that 196.100.0.0\nis already allocated? Any CIDR net starting off on the .0 will have\nexactly the same 4 octet notation. That is, the above entry would only\ntell that there is some indeterminable number of addresses starting off\n196.100.0.0 allocated, which could be anything between a measly /31 and\na whopping big /16. To repeat: CIDR having no implicit netmask encoded\nin the class, there is no way of figuring out your allocation if you\nlose the explicit mask. Which presumably will cause considerable\nproblems in a network allocation and tracking application!\n \n> I really think that we should have a way to coerce a CIDR to\n> an INET, and then allow host().\n\nThere is no unique mapping of a CIDR network to a INET host address,\nexcept for the special case of /32. \n \n> Remember that I am dealing with $10/hour clerks.\n\nThen given them a interface which makes the concept of CIDR obvious to\nthem. Faking a classed notation is no way to go! IP v.4 being what it\nis, and registries being on the move to enforce CIDR more and more, they\nwill inevitably encounter CIDR sooner or later, probably in a business\ncritical way. \n \n> I really don't get the hostility to changing the OUTPUT format...\n\nAnything broken that is added will sooner or later be used by somebody.\nWhich means that it can't be fixed without breaking some applications.\nThat alone should be a good enough reason not to introduce any broken\nnotions intentionally.\n\nSevo\n\n-- \nSevo Stille\[email protected]\n",
"msg_date": "Tue, 25 Jul 2000 00:29:42 +0200",
"msg_from": "Sevo Stille <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "On Mon, 24 Jul 2000, Larry Rosenman wrote:\n\n> Can we dig up the RFC?\n\nFeel free. You can start your research with RFC1467 and look back at\nwhat it touches on, then on to 1517, 1518 and 1519 then to 1817 and \nthen to 2317. If, after reading these, you don't understand why and/or\nwhy not you can check with Paul himself at www.vix.com, 'cuze if you\ndon't understand then he's your only hope.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Mon, 24 Jul 2000 18:30:59 -0400 (EDT)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "Larry Rosenman wrote:\n> \n> What RFC says you can't print all 4 octets of a CIDR Netnumber?\n\nImplicitly in 1518, for example:\n---------8<----------------------8<----------------------8<------------\nFor the purposes of this paper, an IP prefix is an IP address and\n some indication of the leftmost contiguous significant bits within\n this address. \n---------8<----------------------8<----------------------8<------------\n\nAs I already explained, the use of variable-length masks implies that\nthey have to be explicitly stated. This was not neccessary in classed\nnetworks, as the MSB's encoded the class (mask).\n\n> Why does network(cidr) return the whole cidr output just like\n> select cidr?\n\nBecause a cast to network is a cast to CIDR - casting to the same type\nobviously won't change a thing. \n \n> I'm just trying to figure out the logic here.\n\nAs a matter of fact, it is the side effect of the current\nimplementations shortcomings - we have common code for INET and CIDR,\notherwise, network would not have to be a valid operator for CIDR.\n \n> Here is what my Cisco Router that speaks BGP says:\n> big-bro#term ip netmask-format bit-count\n> big-bro#sh ip bg 206.66.0.0/20\n> BGP routing table entry for 206.66.0.0/20, version 150832\n> Paths: (5 available, best #4)\n> Advertised to non peer-group peers:\n> 157.130.140.109 166.63.135.33 206.66.12.3 206.66.12.4 206.66.12.7\n> 206.66.12.\n> ...\n> I am just asking for the same type output.\n\nHuh? The only *network* I see in there IS in /bits notation.\n \nSevo\n\n-- \nSevo Stille\[email protected]\n",
"msg_date": "Tue, 25 Jul 2000 00:52:30 +0200",
"msg_from": "Sevo Stille <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "At 06:30 PM 7/24/00 -0400, Vince Vielhaber wrote:\n>On Mon, 24 Jul 2000, Larry Rosenman wrote:\n>\n>> Can we dig up the RFC?\n>\n>Feel free. You can start your research with RFC1467 and look back at\n>what it touches on, then on to 1517, 1518 and 1519 then to 1817 and \n>then to 2317. If, after reading these, you don't understand why and/or\n>why not you can check with Paul himself at www.vix.com, 'cuze if you\n>don't understand then he's your only hope.\n\nI bet just hacking your PHP script to format it in the way you want\nwould involve a heck of a lot less effort ...\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, 24 Jul 2000 16:00:16 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: INET/CIDR types"
},
{
"msg_contents": "> Larry Rosenman wrote:\n> > \n> > What RFC says you can't print all 4 octets of a CIDR Netnumber?\n> \n> Implicitly in 1518, for example:\n> ---------8<----------------------8<----------------------8<------------\n> For the purposes of this paper, an IP prefix is an IP address and\n> some indication of the leftmost contiguous significant bits within\n> this address. \n> ---------8<----------------------8<----------------------8<------------\nThis doesn't prohibit listing all 4 octets, which is my argument...\n> \n> As I already explained, the use of variable-length masks implies that\n> they have to be explicitly stated. This was not neccessary in classed\n> networks, as the MSB's encoded the class (mask).\nI know this...\n> \n> > Why does network(cidr) return the whole cidr output just like\n> > select cidr?\n> \n> Because a cast to network is a cast to CIDR - casting to the same type\n> obviously won't change a thing. \n> \n> > I'm just trying to figure out the logic here.\n> \n> As a matter of fact, it is the side effect of the current\n> implementations shortcomings - we have common code for INET and CIDR,\n> otherwise, network would not have to be a valid operator for CIDR.\n\nI just want something equivalent to host(inet) that\nprints all 4 octets of a CIDR type with no mask. \n\nIs that hard?\n> \n> > Here is what my Cisco Router that speaks BGP says:\n> > big-bro#term ip netmask-format bit-count\n> > big-bro#sh ip bg 206.66.0.0/20\n> > BGP routing table entry for 206.66.0.0/20, version 150832\n> > Paths: (5 available, best #4)\n> > Advertised to non peer-group peers:\n> > 157.130.140.109 166.63.135.33 206.66.12.3 206.66.12.4 206.66.12.7\n> > 206.66.12.\n> > ...\n> > I am just asking for the same type output.\n> \n> Huh? The only *network* I see in there IS in /bits notation.\nYes, but with all 4 octets, which is all I'm looking for....\n\n\n> \n> Sevo\n> \n> -- \n> Sevo Stille\n> [email protected]\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": "Mon, 24 Jul 2000 18:00:46 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "This whole discussion is quite silly guys.\n\nIt is quite reasonable to have ability to split CIDR net into two pieces:\nthe network and the bitshift. Second one is already possible, the first\none can be accomplished by having functions to convert a cidr/inet to int8\n(not int4 because of sign thing), and back.\n\nIts also very easy to implement ;)\n\nThis will actually come very useful for many applications. Something I'm\nworking on now (allocation of 'most appropriate' block) requires ability\nto split a netblock into two, which could be most easily accomplished\nusing int8 math. (net::int8+2^(netmask(net)-1)).\n\nNow, patch anyone? :)\n-alex\nOn Tue, 25 Jul 2000, Sevo Stille wrote:\n\n> Larry Rosenman wrote:\n> > \n> > The problem is NON-TECHNICAL people will be getting the output,\n> > and they expect 4 octet output.\n> \n> Well, but what are they going to do if they see, say, that 196.100.0.0\n> is already allocated? Any CIDR net starting off on the .0 will have\n> exactly the same 4 octet notation. That is, the above entry would only\n> tell that there is some indeterminable number of addresses starting off\n> 196.100.0.0 allocated, which could be anything between a measly /31 and\n> a whopping big /16. To repeat: CIDR having no implicit netmask encoded\n> in the class, there is no way of figuring out your allocation if you\n> lose the explicit mask. Which presumably will cause considerable\n> problems in a network allocation and tracking application!\n> \n> > I really think that we should have a way to coerce a CIDR to\n> > an INET, and then allow host().\n> \n> There is no unique mapping of a CIDR network to a INET host address,\n> except for the special case of /32. \n> \n> > Remember that I am dealing with $10/hour clerks.\n> \n> Then given them a interface which makes the concept of CIDR obvious to\n> them. Faking a classed notation is no way to go! IP v.4 being what it\n> is, and registries being on the move to enforce CIDR more and more, they\n> will inevitably encounter CIDR sooner or later, probably in a business\n> critical way. \n> \n> > I really don't get the hostility to changing the OUTPUT format...\n> \n> Anything broken that is added will sooner or later be used by somebody.\n> Which means that it can't be fixed without breaking some applications.\n> That alone should be a good enough reason not to introduce any broken\n> notions intentionally.\n> \n> Sevo\n> \n> \n\n",
"msg_date": "Mon, 24 Jul 2000 22:13:57 -0400 (EDT)",
"msg_from": "Alex Pilosov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "> This whole discussion is quite silly guys.\n> \n> It is quite reasonable to have ability to split CIDR net into two pieces:\n> the network and the bitshift. Second one is already possible, the first\n> one can be accomplished by having functions to convert a cidr/inet to int8\n> (not int4 because of sign thing), and back.\n> \n> Its also very easy to implement ;)\n> \n> This will actually come very useful for many applications. Something I'm\n> working on now (allocation of 'most appropriate' block) requires ability\n> to split a netblock into two, which could be most easily accomplished\n> using int8 math. (net::int8+2^(netmask(net)-1)).\nAll I'm looking for is to be able to print all 4 octets of an IP address\nout so that joe user can take the 4 numbers and type it into the \n4 boxes on a Windows 98 box, and use them. \n\nIs that really that abhorrent?\n\nThey also need the 4 octet netmask which I can get now. \n\nAll we are missing is a way to print ALL 4 NUMBERS ALL THE TIME\nfor the output. It's not asking for classful, and for sure\nwe use CIDR all over the place, but for the final output that my\nusers see, why can't I have the database just print all 4 octets?\n\nWhy is this discussion so hard?\n\nLarry\n> \n> Now, patch anyone? :)\n> -alex\n> On Tue, 25 Jul 2000, Sevo Stille wrote:\n> \n> > Larry Rosenman wrote:\n> > > \n> > > The problem is NON-TECHNICAL people will be getting the output,\n> > > and they expect 4 octet output.\n> > \n> > Well, but what are they going to do if they see, say, that 196.100.0.0\n> > is already allocated? Any CIDR net starting off on the .0 will have\n> > exactly the same 4 octet notation. That is, the above entry would only\n> > tell that there is some indeterminable number of addresses starting off\n> > 196.100.0.0 allocated, which could be anything between a measly /31 and\n> > a whopping big /16. To repeat: CIDR having no implicit netmask encoded\n> > in the class, there is no way of figuring out your allocation if you\n> > lose the explicit mask. Which presumably will cause considerable\n> > problems in a network allocation and tracking application!\n> > \n> > > I really think that we should have a way to coerce a CIDR to\n> > > an INET, and then allow host().\n> > \n> > There is no unique mapping of a CIDR network to a INET host address,\n> > except for the special case of /32. \n> > \n> > > Remember that I am dealing with $10/hour clerks.\n> > \n> > Then given them a interface which makes the concept of CIDR obvious to\n> > them. Faking a classed notation is no way to go! IP v.4 being what it\n> > is, and registries being on the move to enforce CIDR more and more, they\n> > will inevitably encounter CIDR sooner or later, probably in a business\n> > critical way. \n> > \n> > > I really don't get the hostility to changing the OUTPUT format...\n> > \n> > Anything broken that is added will sooner or later be used by somebody.\n> > Which means that it can't be fixed without breaking some applications.\n> > That alone should be a good enough reason not to introduce any broken\n> > notions intentionally.\n> > \n> > Sevo\n> > \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": "Mon, 24 Jul 2000 21:40:31 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "On Mon, 24 Jul 2000, Larry Rosenman wrote:\n\n> > This whole discussion is quite silly guys.\n> > \n> > It is quite reasonable to have ability to split CIDR net into two pieces:\n> > the network and the bitshift. Second one is already possible, the first\n> > one can be accomplished by having functions to convert a cidr/inet to int8\n> > (not int4 because of sign thing), and back.\n> > \n> > Its also very easy to implement ;)\n> > \n> > This will actually come very useful for many applications. Something I'm\n> > working on now (allocation of 'most appropriate' block) requires ability\n> > to split a netblock into two, which could be most easily accomplished\n> > using int8 math. (net::int8+2^(netmask(net)-1)).\n> All I'm looking for is to be able to print all 4 octets of an IP address\n> out so that joe user can take the 4 numbers and type it into the \n> 4 boxes on a Windows 98 box, and use them. \n> \n> Is that really that abhorrent?\n> \n> They also need the 4 octet netmask which I can get now. \n> \n> All we are missing is a way to print ALL 4 NUMBERS ALL THE TIME\n> for the output. It's not asking for classful, and for sure\n> we use CIDR all over the place, but for the final output that my\n> users see, why can't I have the database just print all 4 octets?\n\nLarry, \nWith my suggestion, you can do it as follows:\n\nnet::int8::inet\n\n(net being of cidr type)\n-alex\n\n",
"msg_date": "Mon, 24 Jul 2000 22:53:20 -0400 (EDT)",
"msg_from": "Alex Pilosov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "The bad news is it doesn't work now...\n\n\nler=# select host(netblock::int8::inet) from networks;\nERROR: Cannot cast type 'cidr' to 'int8'\nler=# \\d networks\n Table \"networks\"\n\t Attribute | Type | Modifier \n\t ---------------+--------------+----------\n\t netblock | cidr | \n\t\t router | integer | \n\t\t interface | varchar(64) | \n\t\t dest_ip | inet | \n\t\t net_name | varchar(64) | \n\t\t owner | integer | \n\t\t origin | varchar(256) | \n\t\t assigned_date | date | \n\t\t assigned_by | varchar(64) | \n\t\t\t asn | smallint | \n\n\t\t\t ler=# \n\n> On Mon, 24 Jul 2000, Larry Rosenman wrote:\n> \n> > > This whole discussion is quite silly guys.\n> > > \n> > > It is quite reasonable to have ability to split CIDR net into two pieces:\n> > > the network and the bitshift. Second one is already possible, the first\n> > > one can be accomplished by having functions to convert a cidr/inet to int8\n> > > (not int4 because of sign thing), and back.\n> > > \n> > > Its also very easy to implement ;)\n> > > \n> > > This will actually come very useful for many applications. Something I'm\n> > > working on now (allocation of 'most appropriate' block) requires ability\n> > > to split a netblock into two, which could be most easily accomplished\n> > > using int8 math. (net::int8+2^(netmask(net)-1)).\n> > All I'm looking for is to be able to print all 4 octets of an IP address\n> > out so that joe user can take the 4 numbers and type it into the \n> > 4 boxes on a Windows 98 box, and use them. \n> > \n> > Is that really that abhorrent?\n> > \n> > They also need the 4 octet netmask which I can get now. \n> > \n> > All we are missing is a way to print ALL 4 NUMBERS ALL THE TIME\n> > for the output. It's not asking for classful, and for sure\n> > we use CIDR all over the place, but for the final output that my\n> > users see, why can't I have the database just print all 4 octets?\n> \n> Larry, \n> With my suggestion, you can do it as follows:\n> \n> net::int8::inet\n> \n> (net being of cidr type)\n> -alex\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": "Mon, 24 Jul 2000 22:10:01 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "Yes, I know. \nI didn't say it existed, I proposed to create a simple conversion function\nthat would do that, which is why I asked for a patch.\n\nI'd do it myself but it'll take some time. Should be really simple,\nsomething to the effect of return a.s_addr (where a is struct in_addr),\nhowever, I'm not sure what's POSIXly correct way to do that.\n\n\n\nOn Mon, 24 Jul 2000, Larry Rosenman wrote:\n\n> The bad news is it doesn't work now...\n> \n> \n> ler=# select host(netblock::int8::inet) from networks;\n> ERROR: Cannot cast type 'cidr' to 'int8'\n> ler=# \\d networks\n> Table \"networks\"\n> \t Attribute | Type | Modifier \n> \t ---------------+--------------+----------\n> \t netblock | cidr | \n> \t\t router | integer | \n> \t\t interface | varchar(64) | \n> \t\t dest_ip | inet | \n> \t\t net_name | varchar(64) | \n> \t\t owner | integer | \n> \t\t origin | varchar(256) | \n> \t\t assigned_date | date | \n> \t\t assigned_by | varchar(64) | \n> \t\t\t asn | smallint | \n> \n> \t\t\t ler=# \n> \n> > On Mon, 24 Jul 2000, Larry Rosenman wrote:\n> > \n> > > > This whole discussion is quite silly guys.\n> > > > \n> > > > It is quite reasonable to have ability to split CIDR net into two pieces:\n> > > > the network and the bitshift. Second one is already possible, the first\n> > > > one can be accomplished by having functions to convert a cidr/inet to int8\n> > > > (not int4 because of sign thing), and back.\n> > > > \n> > > > Its also very easy to implement ;)\n> > > > \n> > > > This will actually come very useful for many applications. Something I'm\n> > > > working on now (allocation of 'most appropriate' block) requires ability\n> > > > to split a netblock into two, which could be most easily accomplished\n> > > > using int8 math. (net::int8+2^(netmask(net)-1)).\n> > > All I'm looking for is to be able to print all 4 octets of an IP address\n> > > out so that joe user can take the 4 numbers and type it into the \n> > > 4 boxes on a Windows 98 box, and use them. \n> > > \n> > > Is that really that abhorrent?\n> > > \n> > > They also need the 4 octet netmask which I can get now. \n> > > \n> > > All we are missing is a way to print ALL 4 NUMBERS ALL THE TIME\n> > > for the output. It's not asking for classful, and for sure\n> > > we use CIDR all over the place, but for the final output that my\n> > > users see, why can't I have the database just print all 4 octets?\n> > \n> > Larry, \n> > With my suggestion, you can do it as follows:\n> > \n> > net::int8::inet\n> > \n> > (net being of cidr type)\n> > -alex\n> > \n> \n> \n> \n\n",
"msg_date": "Mon, 24 Jul 2000 23:25:41 -0400 (EDT)",
"msg_from": "Alex Pilosov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "At 09:40 PM 7/24/00 -0500, Larry Rosenman wrote:\n\n>Why is this discussion so hard?\n\nBecause it's an output format you could easily solve yourself. Could've\nsolved yourself long ago.\n\nIf you care so much, change the sources and run your own custom version.\nThe beauty of open source, you get to break it in whatever manner you\nchoose.\n\nOr hack your PHP script.\n\nIf you need help hacking your script you can probably get help, here. I'm\nsure people are tired enough of this thread to write it for you, if that's\nnecessary.\n\nNext I suppose you'll ask that Unix \"ls\" output switch \"/\" to\n\"\\\" so your $10 clerks can understand the output?\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, 24 Jul 2000 22:12:04 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "D'Arcy J.M. Cain writes:\n\n> Hmmm. I just noticed this.\n> \n> darcy=> select '1.2.0.1/23'::cidr;\n> ?column?\n> --------\n> 1.2.0/23\n> (1 row)\n> \n> Shouldn't that throw an error?\n\nIsn't that what I've been saying all along?\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Tue, 25 Jul 2000 22:41:21 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "Thus spake Peter Eisentraut\n> > Hmmm. I just noticed this.\n> > \n> > darcy=> select '1.2.0.1/23'::cidr;\n> > ?column?\n> > --------\n> > 1.2.0/23\n> > (1 row)\n> > \n> > Shouldn't that throw an error?\n> \n> Isn't that what I've been saying all along?\n\nWell, yes but I thought that it was now and that you were arguing to keep\nthat behaviour. This seems to be the behaviour that I was suggesting\nalthough you have half convinced me that this should throw an error.\n\nSo, it looks like the status quo is for inet::cidr to be a different\nspelling for network(inet). Is this the way we want to keep it?\n\n-- \nD'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves\nhttp://www.druid.net/darcy/ | and a sheep voting on\n+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.\n",
"msg_date": "Thu, 27 Jul 2000 06:16:54 -0400 (EDT)",
"msg_from": "[email protected] (D'Arcy J.M. Cain)",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
},
{
"msg_contents": "I have packaged up all the CIDR/INET discussion and put it in\ndoc/TODO.detail/cidr.\n\nAlso added to TODO:\n\n* Fix improper masking of some inet/cidr types [cidr]\n\n\n> I noticed a discussion on this list about a re-do of the INET/CIDR\n> types. I was wondering if there was ANY way at all to add\n> an output function that ALWAYS returns all 4 octets of an INET or CIDR\n> type with and without the /netmask?\n> \n> I'm writing a IP Allocation/Tracking app for the ISP I work for, and\n> find the current output format causes confusion for the less\n> technical types. \n> \n> Larry Rosenman\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, 27 Jul 2000 15:11:09 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: INET/CIDR types"
}
] |
[
{
"msg_contents": "What can I do to help get this resolved?\n\nI've gotten some suggestions, but I'm still at a loss to \nget the functionality (and I sure as heck don't want to break\nthe backend...).\n\nI think what we've come up with is to store the manufacturer information\nin a table (my ouiparse.awk script can be hacked to create the table). \n\nMy concern is what do we use to store the first 3 octets of the \nmacaddr into the table or how to do the partial match on an existing\nmacaddr type.\n\nLarry Rosenman\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, 23 Jul 2000 09:03:25 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "mac.c"
},
{
"msg_contents": "> My concern is what do we use to store the first 3 octets of the\n> macaddr into the table or how to do the partial match on an existing\n> macaddr type.\n\nI had tried to respond to this earlier. For some reason, my new dial-in\ndrop \"can not find\" some, but not all, mail addresses. Yours is\napparently on the \"can't find\" list, as is Jan's (yahoo.com *is* pretty\nobscure :/\n\nAnyway, tables are good, and we can make a function/operator pair which\ncompares mac addresses on manufacturer only. Should be pretty easy.\nShall we get started?\n\n - Thomas\n",
"msg_date": "Sun, 23 Jul 2000 20:23:03 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> > My concern is what do we use to store the first 3 octets of the\n> > macaddr into the table or how to do the partial match on an existing\n> > macaddr type.\n> \n> I had tried to respond to this earlier. For some reason, my new dial-in\n> drop \"can not find\" some, but not all, mail addresses. Yours is\n> apparently on the \"can't find\" list, as is Jan's (yahoo.com *is* pretty\n> obscure :/\nHmm. What ISP? (I work for mine, and may be able to help them...). \n\n\n> \n> Anyway, tables are good, and we can make a function/operator pair which\n> compares mac addresses on manufacturer only. Should be pretty easy.\n> Shall we get started?\nOK, but what do we put into the table as the key? just a \n3 octet version of the OUI, or a full 6 octet, and use the function?\n\nThanks for the help. \n\n> \n> - Thomas\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, 23 Jul 2000 15:49:25 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> > Anyway, tables are good, and we can make a function/operator pair which\n> > compares mac addresses on manufacturer only. Should be pretty easy.\n> > Shall we get started?\n>\n> OK, but what do we put into the table as the key? just a \n> 3 octet version of the OUI, or a full 6 octet, and use the function?\n> \n> Thanks for the help. \n\nI hate to pour cold water on this, but it seems the whole idea of\nhaving a database function to find the manufacturer from an ethernet\naddress is of questionable value.\n\nNot that it can't be done in /contrib, but it is really important enough\nto do? I recommend just removing the function. I doubt anyone would\nmiss it.\n\nI have added a TODO item:\n\n* Update macaddr manufacturer numbers, or remove the function macaddr_manuf()\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, 26 Jul 2000 21:13:41 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "All I want to do now (given the size stuff), is to have a function and\npossibly a type to compare the 24-bit OUI's, and give the tools\nin /contrib to load a table using these from the IEEE's list.\n\nNo more hardcoded stuff in the db. \n\nDoes this make more sense?\n\nIt's definately extensible, and frees code space.\n\nLarry\n> > > Anyway, tables are good, and we can make a function/operator pair which\n> > > compares mac addresses on manufacturer only. Should be pretty easy.\n> > > Shall we get started?\n> >\n> > OK, but what do we put into the table as the key? just a \n> > 3 octet version of the OUI, or a full 6 octet, and use the function?\n> > \n> > Thanks for the help. \n> \n> I hate to pour cold water on this, but it seems the whole idea of\n> having a database function to find the manufacturer from an ethernet\n> address is of questionable value.\n> \n> Not that it can't be done in /contrib, but it is really important enough\n> to do? I recommend just removing the function. I doubt anyone would\n> miss it.\n> \n> I have added a TODO item:\n> \n> * Update macaddr manufacturer numbers, or remove the function macaddr_manuf()\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-- \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, 26 Jul 2000 21:31:08 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> All I want to do now (given the size stuff), is to have a function and\n> possibly a type to compare the 24-bit OUI's, and give the tools\n> in /contrib to load a table using these from the IEEE's list.\n> \n> No more hardcoded stuff in the db. \n> \n> Does this make more sense?\n> \n> It's definately extensible, and frees code space.\n\nI was just wondering if there was any real demand for this feature.\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, 26 Jul 2000 23:54:31 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "It'd be nice (tm). I am using mac address types now, and certainly going\nto be upset if they just disappear in next postgres version :P)\n\nHowever, this is definitely a contrib feature, not a core postgres item.\n\nProbably the macaddr type should be also moved to that contrib directory.\n\nI suggest that the contrib would include a query that creates mac_manuf\ntable and a 'macaddr_manuf(macaddr) returns varchar' function which would\ndo a 'select name from mac_manuf m where m.mac=mac_trunc(macaddr)' and a\n'mac_trunc(macaddr) returns macaddr' which would set the 3 lowest-order\nnibbles to 0.\n\n(I don't think macmanufacturer deserves a separate type).\n\n-alex\n\nOn Wed, 26 Jul 2000, Bruce Momjian wrote:\n\n> > All I want to do now (given the size stuff), is to have a function and\n> > possibly a type to compare the 24-bit OUI's, and give the tools\n> > in /contrib to load a table using these from the IEEE's list.\n> > \n> > No more hardcoded stuff in the db. \n> > \n> > Does this make more sense?\n> > \n> > It's definately extensible, and frees code space.\n> \n> I was just wondering if there was any real demand for this feature.\n> \n\n",
"msg_date": "Thu, 27 Jul 2000 00:11:21 -0400 (EDT)",
"msg_from": "Alex Pilosov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> It'd be nice (tm). I am using mac address types now, and certainly going\n> to be upset if they just disappear in next postgres version :P)\n\nNo, I don't recommend removing the macaddr type. It is fine in the main\ntree. It is just the function that maps ethernet address to\nmanufacturer that I am questioning.\n\n> \n> However, this is definitely a contrib feature, not a core postgres item.\n> \n> Probably the macaddr type should be also moved to that contrib directory.\n> \n> I suggest that the contrib would include a query that creates mac_manuf\n> table and a 'macaddr_manuf(macaddr) returns varchar' function which would\n> do a 'select name from mac_manuf m where m.mac=mac_trunc(macaddr)' and a\n> 'mac_trunc(macaddr) returns macaddr' which would set the 3 lowest-order\n> nibbles to 0.\n> \n> (I don't think macmanufacturer deserves a separate type).\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, 27 Jul 2000 09:00:25 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "On Thu, 27 Jul 2000, Bruce Momjian wrote:\n\n> > It'd be nice (tm). I am using mac address types now, and certainly going\n> > to be upset if they just disappear in next postgres version :P)\n> \n> No, I don't recommend removing the macaddr type. It is fine in the main\n> tree. It is just the function that maps ethernet address to\n> manufacturer that I am questioning.\n\nsounds to me like a contrib item too ... \n\n> > However, this is definitely a contrib feature, not a core postgres item.\n> > \n> > Probably the macaddr type should be also moved to that contrib directory.\n> > \n> > I suggest that the contrib would include a query that creates mac_manuf\n> > table and a 'macaddr_manuf(macaddr) returns varchar' function which would\n> > do a 'select name from mac_manuf m where m.mac=mac_trunc(macaddr)' and a\n> > 'mac_trunc(macaddr) returns macaddr' which would set the 3 lowest-order\n> > nibbles to 0.\n> > \n> > (I don't think macmanufacturer deserves a separate type).\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\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org \nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org \n\n",
"msg_date": "Thu, 27 Jul 2000 12:40:41 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "At 11:54 PM -0400 7/26/00, Bruce Momjian wrote:\n> > All I want to do now (given the size stuff), is to have a function and\n> > possibly a type to compare the 24-bit OUI's, and give the tools\n> > in /contrib to load a table using these from the IEEE's list.\n> >\n> > No more hardcoded stuff in the db.\n> >\n> > Does this make more sense?\n> >\n> > It's definately extensible, and frees code space.\n>\n>I was just wondering if there was any real demand for this feature.\n\nSeems to me that code to deal with 24/48 bit integers is core, and \neverything else is contrib. The actual list of manufacturers is not \neven Postgres, but IEEE and should have a URL or cross reference in \ncontrib.\n\nJust my opinion.\n\n\nSignature failed Preliminary Design Review.\nFeasibility of a new signature is currently being evaluated.\[email protected], or [email protected]\n",
"msg_date": "Fri, 28 Jul 2000 11:39:27 -0700",
"msg_from": "\"Henry B. Hotz\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
}
] |
[
{
"msg_contents": "Lamar et al: what is the current state of the posted (and upcoming)\nRPMs? Did the Mandrake stuff get integrated into The One True SpecFile\n(modulo the .bz input files)?\n\nI've got Mandrake-7.1 up on my home system (after an\nupgrade/hosed/install cycle :( and would like to build some fresh RPMs\nto try out.\n\n - Thomas\n",
"msg_date": "Sun, 23 Jul 2000 23:18:07 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "State of RPMs"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n\n> Lamar et al: what is the current state of the posted (and upcoming)\n> RPMs? Did the Mandrake stuff get integrated into The One True SpecFile\n> (modulo the .bz input files)?\n\nThey claim they are compatible with Red Hat Linux, so there shouldn't\nbe any problems.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "23 Jul 2000 19:34:11 -0400",
"msg_from": "[email protected] (Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "> > Lamar et al: what is the current state of the posted (and upcoming)\n> > RPMs? Did the Mandrake stuff get integrated into The One True SpecFile\n> > (modulo the .bz input files)?\n> They claim they are compatible with Red Hat Linux, so there shouldn't\n> be any problems.\n\nHi Trond. There were a few issues on .bz2 vs .gz vs ?? for man pages and\ninput files which afaicr Lamar was resolving using vendor-specific\nsupport in rpm. There certainly shouldn't be any show-stoppers...\n\n - Thomas\n",
"msg_date": "Sun, 23 Jul 2000 23:44:51 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n\n> > > Lamar et al: what is the current state of the posted (and upcoming)\n> > > RPMs? Did the Mandrake stuff get integrated into The One True SpecFile\n> > > (modulo the .bz input files)?\n> > They claim they are compatible with Red Hat Linux, so there shouldn't\n> > be any problems.\n> \n> Hi Trond. There were a few issues on .bz2 vs .gz vs ?? for man pages and\n> input files \n\nNo reason to touch those: If no tar.bz2 sources are available from\npostgresql.org, it shouldn't be used. Simple enough. If tar.bz2\nsources show up, we would be happy to use them.\n\nBzipping of man pages is useless - and the way to handle it would be\nby not compressing at all in the specfile, as you can then handle it\nwith an RPM build policy.\n \n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "23 Jul 2000 19:51:07 -0400",
"msg_from": "[email protected] (Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "> Bzipping of man pages is useless - and the way to handle it would be\n> by not compressing at all in the specfile, as you can then handle it\n> with an RPM build policy.\n\nYeah, that's it. Lamar already knows about it; I just wanted to get the\nlatest spec file which has (or will have) this stuff in it.\n\nThanks.\n\n - Thomas\n",
"msg_date": "Mon, 24 Jul 2000 00:04:29 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "Trond Eivind Glomsr�d wrote:\n> Thomas Lockhart <[email protected]> writes:\n> > > They claim they are compatible with Red Hat Linux, so there shouldn't\n> > > be any problems.\n\n> > Hi Trond. There were a few issues on .bz2 vs .gz vs ?? for man pages and\n> > input files\n \n> No reason to touch those: If no tar.bz2 sources are available from\n> postgresql.org, it shouldn't be used. Simple enough. If tar.bz2\n> sources show up, we would be happy to use them.\n \n> Bzipping of man pages is useless - and the way to handle it would be\n> by not compressing at all in the specfile, as you can then handle it\n> with an RPM build policy.\n\n<RANT>\nThe RPM buildrootpolicy stuff is currently not available in Mandrake 7,\naccording to tars of the Mandrake RPM config. Nor is --buildpolicy\nsufficiently documented to be able to use in a production third-party\nRPM -- so, currently, at least, Mandrake RPM's either have no\ncompression or the specfile needs to specify the compression.\n\nPLEASE -- LET'S GET THIS IMPORTANT FEATURE DOCUMENTED (and, if it IS\ndocumented somewhere, a pointer to that documentation is NEEDED)!\n\nAnd don't say that Mandrake needs to get with the program -- it's awful\nhard to get with an _undocumented_ program. It's hard to use a feature\nyou don't know about. Just look at the confusion on rpm-list of rpm v4.\n\n</RANT>\n\nSorry for the rant, but this issue is about to upset me... :-) I want\nto be able to make the RPM's work well with more than RedHat without\nspecial hacks that are not likely to be included in the RedHat\ndistribution RPM -- making my effort for One True Spec File vain.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 24 Jul 2000 09:55:48 -0400",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "> And don't say that Mandrake needs to get with the program -- it's awful\n> hard to get with an _undocumented_ program. It's hard to use a feature\n> you don't know about. Just look at the confusion on rpm-list of rpm v4.\n\nHmm. I had purchased the RPM book quite some time ago, but have found no\nsource of info for rpm-3 features. afaict the program (or at least its\nmore recent features) has been undocumented for a while. But I haven't\nlooked recently...\n\nOr, let's rephrase this in a positive way: Trond, where would be the\nbest places to look for these newer features? I recall looking at other\nspec files to stumble across stuff that wasn't in the book.\n\n - Thomas\n",
"msg_date": "Mon, 24 Jul 2000 15:05:57 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n\n> > And don't say that Mandrake needs to get with the program -- it's awful\n> > hard to get with an _undocumented_ program. It's hard to use a feature\n> > you don't know about. Just look at the confusion on rpm-list of rpm v4.\n> \n> Hmm. I had purchased the RPM book quite some time ago, but have found no\n> source of info for rpm-3 features. afaict the program (or at least its\n> more recent features) has been undocumented for a while. But I haven't\n> looked recently...\n> \n> Or, let's rephrase this in a positive way: Trond, where would be the\n> best places to look for these newer features? I recall looking at other\n> spec files to stumble across stuff that wasn't in the book.\n\nThe doc directory of rpm and the macros file - 3.0.5 has been\nreleased(with much stuff from 4.0-series) , 4.0 is due soon. After\nthat, the current plan is for the author to spend a couple of\nhours/day creating more documentation.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "24 Jul 2000 12:33:43 -0400",
"msg_from": "[email protected] (Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "Trond Eivind Glomsr�d wrote:\n> Thomas Lockhart <[email protected]> writes:\n> > > And don't say that Mandrake needs to get with the program -- it's awful\n> > > hard to get with an _undocumented_ program. It's hard to use a feature\n> > > you don't know about. Just look at the confusion on rpm-list of rpm v4.\n\n> > Hmm. I had purchased the RPM book quite some time ago, but have found no\n> > source of info for rpm-3 features. afaict the program (or at least its\n> > more recent features) has been undocumented for a while. But I haven't\n> > looked recently...\n\nThere is a RPM-HOWTO -- but it helps little. There is a overview of RPM\n3 written by Jeff Johnson -- but it isn't really detailed enough. It\nreminds me of the old \"Impress your friends with RPM\" section of the\nRedHat 4.x documentation....\n\n> > Or, let's rephrase this in a positive way: Trond, where would be the\n> > best places to look for these newer features? I recall looking at other\n> > spec files to stumble across stuff that wasn't in the book.\n \n> The doc directory of rpm and the macros file - 3.0.5 has been\n> released(with much stuff from 4.0-series) , 4.0 is due soon. After\n> that, the current plan is for the author to spend a couple of\n> hours/day creating more documentation.\n\nThat is _good_ news. The doc directory had _some_ information -- but\nnothing on --buildpolicy. Just a simple \"--buildpolicy does this...\"\nnote in the man page, even, would be nice.\n\nA new \"Maximum RPM\" would be nicer, though. (I am aware of the current\nproject for the updation of Maximum RPM online....and I'm also aware\nthat it really hasn't gone anywhere as of the last time I checked.)\n\nSorry to sound so negative -- but I've been banging my head against that\nfor a little while -- the --buildpolicy sounds like such a good feature\n-- but I even went to the source -- and it told me very little. I am\nchomping at the bit, so to speak, to start using this amazing\nportability feature -- but I am frustrated by lack of concise docs to\nshow me just what I need to do to use it to its full effect.\n\nAnd, Trond, you have been very helpful, as you _are_ in the know about\nthese features that I am not aware of.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 24 Jul 2000 22:14:14 -0400",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: State of RPMs"
},
{
"msg_contents": "Lamar Owen <[email protected]> writes:\n\n> > > Or, let's rephrase this in a positive way: Trond, where would be the\n> > > best places to look for these newer features? I recall looking at other\n> > > spec files to stumble across stuff that wasn't in the book.\n> \n> > The doc directory of rpm and the macros file - 3.0.5 has been\n> > released(with much stuff from 4.0-series) , 4.0 is due soon. After\n> > that, the current plan is for the author to spend a couple of\n> > hours/day creating more documentation.\n> \n> That is _good_ news. The doc directory had _some_ information -- but\n> nothing on --buildpolicy. Just a simple \"--buildpolicy does this...\"\n> note in the man page, even, would be nice.\n\n--buildpolicy is just a (now standard) macro:\n\n./rpmpopt-4.0:rpm alias --buildpolicy --define '__os_install_post /usr/lib/rpm/brp-!#:+'\n\nos_install_post is another macro, this is the second script:\n\n[teg@hoser rpm]$ cat /usr/lib/rpm/brp-redhat \n#!/bin/sh\n\n# These are the build root policies that Red Hat invokes at the end\n# of the %install scriptlet.\n\n# Compress man pages (Red Hat uses GNU gzip)\n/usr/lib/rpm/brp-compress\n\n# Strip ELF binaries (Red Hat uses GNU binutils).\n/usr/lib/rpm/brp-strip\n\n# Strip even more sections (Red Hat uses GNU binutils).\n/usr/lib/rpm/brp-strip-comment-note\n[teg@hoser rpm]$ \n\n> A new \"Maximum RPM\" would be nicer, though. (I am aware of the current\n> project for the updation of Maximum RPM online....and I'm also aware\n> that it really hasn't gone anywhere as of the last time I checked.)\n\nIf someone has time to contribute, that would be greeeat. I don't know\nwhat parts of the documentation Jeff is planning to improve.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "24 Jul 2000 22:54:12 -0400",
"msg_from": "[email protected] (Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: State of RPMs"
}
] |
[
{
"msg_contents": "\n> > WAL can solve the versioned relations problem.\n> > Remember that a sure new step in postmaster startup will be a\n> > rollforward of the WAL,\n> > since that will have the only sync write of our last txn's. \n> > Thus in this step it can also\n> > do any pending rename or delete of files.\n> \n> Hmm,don't you allow DDL commands inside transaction block ?\n> \n> If we allow DDL commands inside transaction block,WAL couldn't\n> postpone all rename/unlink operations until the end of transaction\n> without a resolution of the conflict of table file name.\n\nIt does not postpone anything. WAL only logs what it does:\n\n1. log i now start to rename file\n2. rename file\n3. log rename successful or abort txn\n\n> the old table file of t must vanish(using unlink() etc) \n> before 'create table t'\n> unless new file name is different from old one(OID file name would\n> resolve the conflict in this case).\n\nI was basing my statement on OID filenames being a factum.\nI am only arguing against the extra version in the filename.\n\n> To unlink/rename the table file immediately isn't a problem for the\n> rollforward functionality. It seems a problem of rollback \n> functionality.\n\nonly unlink cannot be done immediately a rename can be undone\nand thus be executed immediately.\n\n> \n> > If a rename or delete fails we\n> > bail out, since we don't want postmaster running under such \n> circumstances\n> > anyway.\n> \n> No there's a significant difference between the failure of 'delete'\n> and that of 'rename'. We would have no consistency problem even\n> though 'delete' fails and wouldn't have to stop postmaster. But we\n> wouldn't be able to see the renamed relation in case of 'rename'\n> failure and an excellent(??) dba would have to recover the \n> inconsistency.\n\nThe dba only fixes the underlying problem, like filesystem mounted readonly \nor wrong permissions on directory. He then simply starts the postmaster\nagain,\nthe rollforward with rename will then succeed.\n\nAndreas\n",
"msg_date": "Mon, 24 Jul 2000 12:29:02 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Vacuum only with 20% old tuples "
},
{
"msg_contents": "> -----Original Message-----\n> From: Zeugswetter Andreas SB\n> \n> > > WAL can solve the versioned relations problem.\n> > > Remember that a sure new step in postmaster startup will be a\n> > > rollforward of the WAL,\n> > > since that will have the only sync write of our last txn's. \n> > > Thus in this step it can also\n> > > do any pending rename or delete of files.\n> > \n> > If we allow DDL commands inside transaction block,WAL couldn't\n> > postpone all rename/unlink operations until the end of transaction\n> > without a resolution of the conflict of table file name.\n> \n> It does not postpone anything. WAL only logs what it does:\n> \n> 1. log i now start to rename file\n> 2. rename file\n\nHow do we log *rename* ?\nWhat I've meant by *rename* is to replace an existent table\nfile by a (e.g. work temp) file. So the old table file would\nvanish by renaming. How to save the content for rollback ?\nIs it preferable to save the content entirely to WAL log file ?\nIf *rename* is possible,are OID filenames necessary in the\nfirst place ? \n\n> 3. log rename successful or abort txn\n>\n \n> > \n> > No there's a significant difference between the failure of 'delete'\n> > and that of 'rename'. We would have no consistency problem even\n> > though 'delete' fails and wouldn't have to stop postmaster. But we\n> > wouldn't be able to see the renamed relation in case of 'rename'\n> > failure and an excellent(??) dba would have to recover the \n> > inconsistency.\n> \n> The dba only fixes the underlying problem, like filesystem \n> mounted readonly \n> or wrong permissions on directory. He then simply starts the postmaster\n> again,\n> the rollforward with rename will then succeed.\n>\n\nMustn't a dba be there to restart the postmaster when *rename*\nfails ? We don't need a dba even when *delete* fails after commit.\n\nHiroshi Inoue\[email protected] \n",
"msg_date": "Tue, 25 Jul 2000 08:55:32 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Vacuum only with 20% old tuples "
}
] |
[
{
"msg_contents": "Looks like your postgres binary is not the correct one.\nThat is: the make step for the target postgres.imp failed or went into the\nwrong directory, and you thus have a postgres binary that is not converted \nto export all symbols.\n \nThis is one point that bugs me in the aix port. Maybe we should do it \nlike other ports do it, first create a postgres.a then postgres.imp\nand finally postgres from postgres.a and postgres.imp.\n \nComments ?\nAndreas\n \nPS: I do not think that you can successfully run all regression tests\nwith your current installation. Can you confirm ? \n\n\n \nSo when I try \"load libpgtcl.so\", I get the following error:\n \n \nError: couldn't load file \"./libpgtcl.so\": 0509-130 Symbol resolution\nfaile\nd for ./libpgtcl.so because:\n 0509-136 Symbol __start (number 0) is not exported from\n dependent module /home/postgres/postgresql/bin/postgres.\n 0509-192 Examine .loader section symbols with the\n 'dump -Tv' command. \n \n \nI did the dump command on the postgres executable and found:\n \n[177] 0x20022eb0 .data ENTpt DS SECdef [noIMid] __start\n\n\n\n\n\n\n\n\nLooks like your postgres binary is not the correct \none.\nThat is: the make step for the target postgres.imp \nfailed or went into the\nwrong directory, and you thus have a postgres binary that is not converted \n\nto export all symbols.\n \nThis is one point that bugs me in the aix port. \nMaybe we should do it \nlike other ports do it, first create a postgres.a then \npostgres.imp\nand finally postgres from postgres.a and \npostgres.imp.\n \nComments ?\nAndreas\n \nPS: I do not think that you can successfully \nrun all regression tests\nwith your current installation. Can you confirm \n? \n\n\n \nSo when I try \"load libpgtcl.so\", I get the \n following error:\n \n \nError: couldn't load file \n \"./libpgtcl.so\": 0509-130 Symbol resolution \n failed for ./libpgtcl.so \n because: 0509-136 \n Symbol __start (number 0) is not exported \n from \n dependent module \n /home/postgres/postgresql/bin/postgres. \n 0509-192 Examine .loader section symbols with \n the \n 'dump -Tv' command. \n \n \nI did the dump command on the postgres executable \n and found:\n \n[177] 0x20022eb0 \n .data ENTpt DS \n SECdef [noIMid] \n __start",
"msg_date": "Mon, 24 Jul 2000 16:22:39 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: libpgtcl on aix"
}
] |
[
{
"msg_contents": "With the TEXT form of COPY IN, is it possible to specify which columns?\n\nIf not, it would be nice to be able to do this:\n\nCOPY tablename (row1, row2, row3) from stdin;\n\nAbout binary copy...\n\nMaybe this is new, but the COPY IN with 'binary format', would this\nwork via a libpq connection?\n\nAbout 'binary' COPY, even though the specifcation is there, I'm\nnot sure it's very clear:\n\nAt the start of the file\n uint32 number of tuples\n For each tuple\n uint32 total length of tuple data\n uint32 oid (if specified)\n uint32 number of null attributes\n [uint32,...,uint32] attribute numbers of attributes, counting from 0\n - <tuple data>\n\nI'm not sure I understand this, what is \"number of null attributes\"?\n\ndoes \"attribute numbers of attributes, counting from 0\" mean that\nif I have a table like so:\n\ncreate table foo ( f1 int4, f2 int4 );\n\nthat 'f1' would be 0 and 'f2' would be 1? (The example seems to suggest\nthat 'f1' is 1 and 'f2' is 2)\n\nHow does one delimit the tuple data? It says:\n \"Notice how the char(2) field is padded with nulls to four bytes\n and the text field is preceded by its length\"\n\nI'm not sure what that means, does it mean, that if\nsizeof(feild) < sizeof(uint32) then? which way do I pad? Are there\nany macros in libpq to assist in making this compact data?\n\nthanks,\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": "Mon, 24 Jul 2000 16:16:34 -0700",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": true,
"msg_subject": "COPY extended?"
}
] |
[
{
"msg_contents": "\n> > It does not postpone anything. WAL only logs what it does:\n> > \n> > 1. log i now start to rename file\n> > 2. rename file\n> \n> How do we log *rename* ?\n\nNo, step 2 was meant to do the actual rename.\nYou log before and after the actual rename.\n\n> What I've meant by *rename* is to replace an existent table\n> file by a (e.g. work temp) file. So the old table file would\n> vanish by renaming. \n\nyou need to rename the old file first then the new file\n\n> How to save the content for rollback ?\n\nwith rename of old file\n\n> Is it preferable to save the content entirely to WAL log file ?\n\nno, unless you have log space to spare, but not enough data space,\nwhich is imho unlikely (or to be considered later).\n\n> If *rename* is possible,are OID filenames necessary in the\n> first place ? \n\nno\n\n> \n> > 3. log rename successful or abort txn\n> >\n> \n> > > \n> > > No there's a significant difference between the failure \n> of 'delete'\n> > > and that of 'rename'. We would have no consistency problem even\n> > > though 'delete' fails and wouldn't have to stop postmaster. But we\n> > > wouldn't be able to see the renamed relation in case of 'rename'\n> > > failure and an excellent(??) dba would have to recover the \n> > > inconsistency.\n> > \n> > The dba only fixes the underlying problem, like filesystem \n> > mounted readonly \n> > or wrong permissions on directory. He then simply starts \n> the postmaster\n> > again,\n> > the rollforward with rename will then succeed.\n> >\n> \n> Mustn't a dba be there to restart the postmaster when *rename*\n> fails ? We don't need a dba even when *delete* fails after commit.\n\nThe dba needs to clean up unused file space later, \nwhich leaves the problem for the dba to decide which file is needed \nand what not (quite difficult with an oid filename).\n\nBut, rename is only supposed to fail if something is wrong with the\nfilesystem or directory. There will be a lot of other problems,\nlike creating sort files etc if that is the case. \nIf a rename fails under normal operation the current transaction is aborted,\nbut you are correct that there is a problem if previous renames in the same \ntransaction succeeded, but all further renames (for rollback) fail (is this\nlikely ?).\nIn that unlikely case I would bail out, let the dba fix the problem and fix\nthe db\nstate at startup rollforward (which can now rename and thus abort the txn). \n\nAndreas\n",
"msg_date": "Tue, 25 Jul 2000 10:47:39 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Vacuum only with 20% old tuples "
},
{
"msg_contents": "> -----Original Message-----\n> From: Zeugswetter Andreas SB [mailto:[email protected]]\n> \n> > > It does not postpone anything. WAL only logs what it does:\n> > > \n> > > 1. log i now start to rename file\n> > > 2. rename file\n> > \n> > How do we log *rename* ?\n> \n> No, step 2 was meant to do the actual rename.\n> You log before and after the actual rename.\n> \n> > What I've meant by *rename* is to replace an existent table\n> > file by a (e.g. work temp) file. So the old table file would\n> > vanish by renaming. \n> \n> you need to rename the old file first then the new file\n> \n> > How to save the content for rollback ?\n> \n> with rename of old file\n>\n\nOK,I see. Your idea seems to be close to Vadim's *relink*. \nHowever it isn't clear if *relink* has no problem.\nIn my test case on cygwin port ,*relink* doesn't work well.\n*relink* caused an error if concurrent backends open the\n*relink*ing table.\n \n> > \n> > > > \n> > > > No there's a significant difference between the failure \n> > of 'delete'\n> > > > and that of 'rename'. We would have no consistency problem even\n> > > > though 'delete' fails and wouldn't have to stop postmaster. But we\n> > > > wouldn't be able to see the renamed relation in case of 'rename'\n> > > > failure and an excellent(??) dba would have to recover the \n> > > > inconsistency.\n> > > \n> > > The dba only fixes the underlying problem, like filesystem \n> > > mounted readonly \n> > > or wrong permissions on directory. He then simply starts \n> > the postmaster\n> > > again,\n> > > the rollforward with rename will then succeed.\n> > >\n> > \n> > Mustn't a dba be there to restart the postmaster when *rename*\n> > fails ? We don't need a dba even when *delete* fails after commit.\n> \n> The dba needs to clean up unused file space later,\n> which leaves the problem for the dba to decide which file is needed \n> and what not (quite difficult with an oid filename).\n>\n\nYes,I don't want a dba to deal with such an unrelible recovery.\nProbably vacuum must be wise enough to remove unremoved\ntable files before removing dead pg_class tuples.\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Tue, 25 Jul 2000 19:16:01 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Vacuum only with 20% old tuples "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>>>> It does not postpone anything. WAL only logs what it does:\n>>>> \n>>>> 1. log i now start to rename file\n>>>> 2. rename file\n>> \n>> How do we log *rename* ?\n\n> No, step 2 was meant to do the actual rename.\n> You log before and after the actual rename.\n\nThe trouble with depending on WAL to handle undo of external operations\n(ie, filesystem calls as opposed to DB record updates) is that you don't\nknow all the facts if you have to recover/undo the operation. Consider\nthe following not-too-implausible example:\n\n\tbegin transaction;\n\talter table foo rename to bar;\n\tcreate table foo ...;\n\tdelete table bar;\n\t<crash>\n\nIf we try to implement this by log entries, we will have log entries\nfor rename, create, delete. We scan the log and come upon the rename.\nHmm, there's a file foo and no file bar ... looks like the rename didn't\nget done, so do it. Ooops.\n\nRelated nasty scenarios arise when there's a file there of the right\nname but the wrong contents, created by non-database operations.\n(Consider the risks involved with a table named \"core\", for example.)\n\nAn even more serious problem is that you can't guarantee to be able\nto either repeat or undo an external operation, because there are\nfactors not under your control (kernel permission checks, existing\nfiles getting in the way, etc). Sure, failures like that are not\nvery likely, but that'll be cold comfort to someone whose database\ngets corrupted because a file rename needs to be undone and can't be.\n\n>> If *rename* is possible,are OID filenames necessary in the\n>> first place ? \n\n> no\n\nI think that OID filenames will be a far more reliable solution to\nthe alter-table-rename problem than anything that involves trying\nto actually rename the files. There are other benefits too, like\nnot being tied to filesystem-based naming restrictions for tables.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 25 Jul 2000 11:02:15 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Vacuum only with 20% old tuples "
}
] |
[
{
"msg_contents": "\nWho here is very familiar with pg_shadow?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n",
"msg_date": "Tue, 25 Jul 2000 06:05:49 -0400 (EDT)",
"msg_from": "Vince Vielhaber <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_shadow"
}
] |
[
{
"msg_contents": "\n> OK,I see. Your idea seems to be close to Vadim's *relink*. \n> However it isn't clear if *relink* has no problem.\n> In my test case on cygwin port ,*relink* doesn't work well.\n> *relink* caused an error if concurrent backends open the\n> *relink*ing table.\n\nAll actions involving a rename of a file imho involve exclusive access \nto the table, thus no concurrent access is allowed/possible.\n\nAndreas\n",
"msg_date": "Tue, 25 Jul 2000 12:16:50 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: Vacuum only with 20% old tuples "
},
{
"msg_contents": "Zeugswetter Andreas SB wrote:\n\n> > OK,I see. Your idea seems to be close to Vadim's *relink*.\n> > However it isn't clear if *relink* has no problem.\n> > In my test case on cygwin port ,*relink* doesn't work well.\n> > *relink* caused an error if concurrent backends open the\n> > *relink*ing table.\n>\n> All actions involving a rename of a file imho involve exclusive access\n> to the table, thus no concurrent access is allowed/possible.\n>\n\nOnce a table file was opened,it is not closed until the end of the\nbackend process except due to the shortage of file descriptors.\n\nEven now,cygwin port has a flaw that we have no guarantee to\nrecreate a table safely after dropping the table. Unfortunately\nwe couldn't recreate the same named file until all processes\nclose the file in cygwin.\n\nRegards.\n\nHiroshi Inoue\n\n",
"msg_date": "Tue, 25 Jul 2000 19:41:12 +0900",
"msg_from": "Hiroshi Inoue <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: Vacuum only with 20% old tuples"
}
] |
[
{
"msg_contents": "\n> > All actions involving a rename of a file imho involve exclusive access\n> > to the table, thus no concurrent access is allowed/possible.\n> >\n> \n> Once a table file was opened,it is not closed until the end of the\n> backend process except due to the shortage of file descriptors.\n\nAn open file only references the inode, thus the name can safely \nchange underneath, no? \nOf course on next real access to a renamed file it would \nneed to be closed and opened anew, since it has the wrong file open.\nLooks like it would be good to close files as soon as possible\nonce they do not correspond to a valid db object anymore.\n\n> Even now,cygwin port has a flaw that we have no guarantee to\n> recreate a table safely after dropping the table. Unfortunately\n> we couldn't recreate the same named file until all processes\n> close the file in cygwin.\n\nEven if you rename the old file before creating a new one ?\nOr is a rename not possible when another process has the file open ?\n\nAndreas\n",
"msg_date": "Tue, 25 Jul 2000 14:35:28 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Vacuum only with 20% old tuples"
},
{
"msg_contents": "> -----Original Message-----\n> From: Zeugswetter Andreas SB [mailto:[email protected]]\n>\n> > > All actions involving a rename of a file imho involve exclusive access\n> > > to the table, thus no concurrent access is allowed/possible.\n> > >\n> >\n> > Once a table file was opened,it is not closed until the end of the\n> > backend process except due to the shortage of file descriptors.\n>\n> An open file only references the inode, thus the name can safely\n> change underneath, no?\n\nIt seems too delicate for me to reply your question correctly.\nI don't know the internals of cygwin unfortunately.\n\nHere's a Vadim's *relink* test case in cygwin.\n\n[*relink* to replace a table file by a tmp file]\n\n\tlink(table file, tmp2 file);\n\tfsync(tmp2 file);\n\tunlink(table file);\n\n doesn't fail here even though other processes open the table\n file. However any access to the table file seems to be inhibited\n while the file is open and\n\n\tlink(tmp file, table file);\n\n fails with the message\t: Permission denied\n\n\tfsync(table file);\n\tunlink(tmp file).\n\n\nHowever simple *rename* seems to work.\n\n\trename(table file,tmp2 file);\n\trename(tmp file,table file);\n\n seems to cause no error.\n\n> Of course on next real access to a renamed file it would\n> need to be closed and opened anew, since it has the wrong file open.\n> Looks like it would be good to close files as soon as possible\n> once they do not correspond to a valid db object anymore.\n>\n\nSorry I missed this case. Yes this was changed to be handled\ncorrectly before 7.0. Other backends receive relcache invaldation\nmessages and close the old table files. However other backends\ndon't receive the message immediately. Backend processes\nwould never receive the message and keep the table file open\nwhile they are idle. It has been serious for cygwin port.\n\nRegards.\n\nHiroshi Inoue\[email protected]\n\n",
"msg_date": "Thu, 27 Jul 2000 19:30:08 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: AW: Vacuum only with 20% old tuples"
}
] |
[
{
"msg_contents": "Here it is:\n\n Proposal for a new\n PostgreSQL Privilege System\n\n July 2000, Jan Wieck\n\n Introduction\n\n The existing permission checking system, implemented in\n the PostgreSQL database, has alot of missing\n capabilities. Users complained about it in the past. With\n some new features (referential integrity for example),\n this system isn't flexible enough any more and need to be\n expanded or replaced soon.\n\n This document is a draft for implementing a completely\n new, object/functionality based permission concept. It\n defines a fine grained, expandable, general purpose\n permission checking functionality. It should cover DML-\n and DDL-statements all at once.\n\n Object Privileges\n\n Object Privileges can be GRANTed or REVOKEed to a\n particular user or group. The possible Privileges are:\n\n ALL [PRIVILEGES] Synonym for any of the privileges,\n applicaple to the object in question.\n\n ALTER Permission to alter the schema WRT\n the object in question.\n\n INSERT Permission to INSERT rows into the\n named relation.\n\n UPDATE Permission to UPDATE rows in the\n named relation.\n\n DELETE Permission to DELETE rows from the\n named relation.\n\n SELECT Permission to SELECT rows from the\n named relation or sequence.\n\n EXECUTE Permission to call the named function\n or procedure.\n\n LOCK Permission to exclusively lock the\n named relation.\n\n REFERENCES Permission to create a foreign key\n reference to the named relation.\n\n TRUNCATE Permission to truncate the named\n relation.\n\n System Privileges\n\n System Privileges are to grant permission to execute DDL-\n statements or for database wide Object permissions (valid\n for all objects of a particular kind).\n\n SUPERUSER A special System Privilege,\n superseding any other rights. What\n the holder of this right want's to\n do, he does. It is the same as now,\n usesuper in pg_shadow.\n\n ----------\n\n CREATE SESSION Permission to login. Checked after\n general hba.conf access had been\n granted. Not having this right will\n cause the new backend to immediately\n terminate.\n\n ALTER SESSION Permission to change session specific\n attributes like character set\n localization.\n\n ----------\n\n CREATE TABLE Permission to create new table in a\n database.\n\n ALTER ANY TABLE Permission to alter any table of the\n database. Includes rights to create\n or drop rules, triggers, references\n etc.\n\n DROP ANY TABLE Permission to drop any table of the\n database.\n\n INSERT ANY TABLE Permission to INSERT rows into any\n table of the database.\n\n UPDATE ANY TABLE Permission to UPDATE rows in any\n table of the database.\n\n DELETE ANY TABLE Permission to DELETE rows from any\n table of the database.\n\n SELECT ANY TABLE Permission to SELECT rows from any\n relation of the database.\n\n LOCK ANY TABLE Permission to explicitly LOCK any\n relation of the database.\n\n REFERENCE ANY TABLE Permission to use any table of the\n database in referential integrity\n constraints.\n ----------\n\n CREATE SEQUENCE Permission to create a new sequence.\n\n ALTER ANY SEQUENCE Permission to readjust all sequences.\n\n DROP ANY SEQUENCE Permission to drop any sequence in\n the database.\n\n ----------\n\n CREATE VIEW Permission to create views in the\n database.\n\n ALTER ANY VIEW Permission to alter any view of the\n database.\n\n DROP ANY VIEW Permission to drop any view of the\n database.\n\n ----------\n\n CREATE FUNCTION Permission to create new functions in\n the database.\n\n ALTER ANY FUNCTION Permission to alter any function of\n the database.\n\n DROP ANY FUNCTION Permission to drop any function of\n the database.\n\n ----------\n\n CREATE TYPE Permission to create a new type.\n\n ALTER ANY TYPE Permission to alter any type of the\n database.\n\n DROP ANY TYPE Permission to drop any type of the\n database.\n\n ----------\n\n CREATE OPERATOR Permission to create a new operator.\n\n ALTER ANY OPERATOR Permission to alter any operator of\n the database.\n\n DROP ANY OPERATOR Permission to drop any operator of\n the database.\n\n ----------\n\n CREATE AGGREGATE Permission to create a new aggregate.\n\n ALTER ANY AGGREGATE Permission to alter any aggregate of\n the database.\n\n DROP ANY AGGREGATE Permission to drop any aggregate of\n the database.\n\n ----------\n\n CREATE OBJECT Permission to create a new table,\n sequence, type, operator or\n aggregate.\n\n ALTER ANY OBJECT Permission to alter any table,\n sequence, type, operator or aggregate\n of the database.\n\n DROP ANY OBJECT Permission to drop any table,\n sequence, type, operator or aggregate\n of the database.\n\n ----------\n\n TRUNCATE ANY Permission to truncate any relation\n of the database.\n\n Implementation\n\n New privilege check funciton\n\n A new function\n\n bool pg_check_priv(\n int32 privtype,\n Oid privobject,\n int32 privobjowner);\n\n will be called in the appropriate places. The\n privtype is a #define constant from a new\n \"utils/privileges.h\" header file. Privobject is the\n OID of the object (relation, function, aggregate\n etc.) to check for. Privobjowner is the owner of the\n object (relowner, proowner, aggowner etc).\n\n The function will know about privilege relationships.\n So only one call like\n\n pg_check_priv(PRIV_ALTER_TABLE,\n Relation->rd_id,\n Relation->rd_rel->relowner);\n\n pg_check_priv(PRIV_EXEC_FUNCTION,\n finfo->fn_oid,\n finfo->fn_owner);\n\n would be sufficient to check whether the actual\n caller is permitted to do that.\n\n System catalog changes\n\n Pg_proc is extended by two new bool fields. Prosetuid\n and procheckperm. These two and the proowner are\n held in the fmgr_info struct.\n\n If a function is called through the fmgr (any user\n defined function is), the function manager honours\n these flags. Prosetuid will cause the function\n manager to switch to another effective user id, used\n during pg_check_perms() for the time of the function\n invocation. Procheckperm causes the function manager\n to check whether the actual (effective) user is\n allowed to execute the function (by calling\n pg_check_perms()).\n\n Pg_shadow is extended with an array, holding all the\n groups the user belongs to. So after looking up the\n user, all group relationships are known.\n\n Two new system catalogs, pg_userprivilege and\n pg_groupprivilege are created to hold the actual\n privileges. They are members of the system cache for\n fast lookup.\n\n Pg_class will loose it's relacl attribute.\n\n All the (security relevant) information in pg_shadow,\n pg_group, pg_userprivilege and pg_groupprivilege is\n only modified during GRANT, REVOKE or\n CREATE/DROP/ALTER statements. So it's IMHO not an\n issue to performance questions.\n\n Related details\n\n The system will manage a stack, remembering nested\n states of the effective user id. Calls through the\n function manager can switch for- and backward to\n another one, so prosetuid functions will inherit the\n effective permissions of the function (trigger)\n owner. The stack is reinitialized at transaction\n aborts.\n\n For special purposes, there will be another function\n pg_check_realperms() checking against the real user\n id allways (don't know what it'll be good for, but in\n case...).\n\n\nComments?\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",
"msg_date": "Tue, 25 Jul 2000 15:27:11 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "New Privilege model purposal"
},
{
"msg_contents": "\n I not sure, but if I good remember nobody said somethig bad about \nPetreE proposal for this, why you prepare new? IMHO Peter's proposal\nwas good. \n\n And small suggestion, we need the \"GRANT ... WITH ADMIN OPTION\" or \nsomething like this.\n\n\t\t\t\t\tKarel\n\n",
"msg_date": "Tue, 25 Jul 2000 16:09:03 +0200 (CEST)",
"msg_from": "Karel Zak <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "At 15:27 25/07/00 +0200, Jan Wieck wrote:\n>\n> Object Privileges\n>\n> Object Privileges can be GRANTed or REVOKEed to a\n> particular user or group. The possible Privileges are:\n\nThis sounds great, and you may want to consider extending it to the COLUMN\nlevel in tables & views.\n\n\n>\n...\n>\n> LOCK Permission to exclusively lock the\n> named relation.\n\nThis one worries me a little. I think I can see where you are coming from,\nbut you might be better off defining it as the ability to 'use the LOCK\nstatement to lock the object exclusively'. The reason I say this is that a\nperson altering a table's metadata and/or name, may well need an exclusive\nlock, and it seems cumbersome to have to grant two privileges.\n\n...etc...\n\nYou may also want to consider:\n\n SHOW Permission to view the definition of the named\nobject.\n (this is from Dec/Rdb)\n\n RENAME Permission to rename the named relation \n (gets past my objection above, but probably \n best left as part of ALTER)\n\n INHERIT Do you need this?\n\n DBA/OPERATOR/ADMIN Permission to access the database when it is\n'closed'\n (Dec/Rdb call it DBADMIN, I think)\n\nI know we don't have the concept of a 'closed' database yet, but it is very\nuseful for performing tasks like renaming storage files, restoring backups\netc etc. The idea being that a DBA can close a database, then only DBA\nusers can connect to it.\n\n\n> System Privileges\n>\n> System Privileges are to grant permission to execute DDL-\n> statements or for database wide Object permissions (valid\n> for all objects of a particular kind).\n>\n> SUPERUSER A special System Privilege,\n> superseding any other rights. What\n> the holder of this right want's to\n> do, he does. It is the same as now,\n> usesuper in pg_shadow.\n\nI suspect this is good grounds for a religious war, but I like a priv\nsystem where I have to 'turn on' a super privilege before I get it. If I am\na superuser, I don't want my cape flapping in the breeze *all* the time.\nCan you add some kind of 'CLARK_KENT' priv (ie. 'can become superuser')?\nAnd have SUPERUSER off at the beginning of all sessions? \n\nThere are two reasons I think this is important: 1) I am accident prone,\nand 2) it's good to live like a mortal most of the time - you get to see\nproblems before a user complains.\n\n\n> CREATE TABLE\n> ALTER ANY TABLE\n> DROP ANY TABLE\n> INSERT ANY TABLE\n> UPDATE ANY TABLE\n> DELETE ANY TABLE\n> SELECT ANY TABLE\n> LOCK ANY TABLE\n> REFERENCE ANY TABLE\n> CREATE SEQUENCE\n> ALTER ANY SEQUENCE\n> DROP ANY SEQUENCE\n\nThis seems like overkill; you will need a new priv for every object type.\nIt is also not clear how 'ALTER ANY TABLE' should interact with 'ALTER\nTABLE (specific table)', but I assume the more specific priv rules.\n\nIt seems that this is just a way of defining 'default' privs for an object\nthat does not have an ACL, and if that is the case, why not define a\ndefault protection at both the database level and the object-type level\n(perhaps in the relevant pg_* table?). Certainly it seems that 'CREATE\nTABLE' could be represented as 'INSERT' priv on the pg_class table etc.\n\n\n>\n> CREATE OBJECT\n> ALTER ANY OBJECT\n> DROP ANY OBJECT\n\nBack to my previous comments - these seem to be more proerly defined as\n'defaults' at the database level, but perhaps I am missing something.\n\n\n>\n> System catalog changes\n>\n> Pg_proc is extended by two new bool fields. Prosetuid\n> and procheckperm. These two and the proowner are\n> held in the fmgr_info struct.\n>\n> If a function is called through the fmgr (any user\n> defined function is), the function manager honours\n> these flags. Prosetuid will cause the function\n> manager to switch to another effective user id, used\n> during pg_check_perms() for the time of the function\n> invocation.\n\nWonderful! I've been hoping for this for a while.\n\n\n> Related details\n>\n> The system will manage a stack, remembering nested\n> states of the effective user id. Calls through the\n> function manager can switch for- and backward to\n> another one, so prosetuid functions will inherit the\n> effective permissions of the function (trigger)\n> owner. The stack is reinitialized at transaction\n> aborts.\n\nI assume this means that if function f1 running under uid 'fred' calls\nfunction f2 (with no uid specified), then f2 will also still run as 'fred'?\n\n\n> For special purposes, there will be another function\n> pg_check_realperms() checking against the real user\n> id allways (don't know what it'll be good for, but in\n> case...).\n\nWe'll also need to implement another kind of CURRENT_USER (I *think* SQL\ndefines one). You need to get the 'real' user as well as the 'effective'\nuser from within SQL.\n\n\nI hope this is helpful, and I really look forward to this being implemented!\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 26 Jul 2000 00:20:47 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "Karel Zak wrote:\n>\n> I not sure, but if I good remember nobody said somethig bad about\n> PetreE proposal for this, why you prepare new? IMHO Peter's proposal\n> was good.\n\n Seems I missed that discussion. Sometimes I start to drop\n incoming eMails by subject. If then the discussion moves to\n something different without changing the subject, you won't\n see me on that.\n\n Anyway, I haven't found a complete proposal in the ML\n archive. Consider my proposal \"derived work\" from his one,\n if it is similar and let's combine all the ideas into one\n complete thing.\n\n Peter, have you done anything into that direction already?\n\n> And small suggestion, we need the \"GRANT ... WITH ADMIN OPTION\" or\n> something like this.\n\n What should that do?\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"msg_date": "Tue, 25 Jul 2000 19:53:13 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "Philip Warner wrote:\n> At 15:27 25/07/00 +0200, Jan Wieck wrote:\n> >\n> > Object Privileges\n> >\n> > Object Privileges can be GRANTed or REVOKEed to a\n> > particular user or group. The possible Privileges are:\n>\n> This sounds great, and you may want to consider extending it to the COLUMN\n> level in tables & views.\n\n So someone could prevent a user from overriding a DEFAULT\n column value by revoking the INSERT and UPDATE rights to the\n column. Good idea.\n\n>\n>\n> >\n> ...\n> >\n> > LOCK Permission to exclusively lock the\n> > named relation.\n>\n> This one worries me a little. I think I can see where you are coming from,\n> but you might be better off defining it as the ability to 'use the LOCK\n> statement to lock the object exclusively'. The reason I say this is that a\n> person altering a table's metadata and/or name, may well need an exclusive\n> lock, and it seems cumbersome to have to grant two privileges.\n\n Of course.\n\n> You may also want to consider:\n>\n> SHOW Permission to view the definition of the named\n> object.\n> (this is from Dec/Rdb)\n\n As you say it, I see it. The default for all system catalogs\n would be, that a normal user cannot SELECT from them. So we\n would need some kind of DESCRIBE command since psql wouldn't\n be able to grab these definitions any more.\n\n I see, this project is becoming bigger the more people really\n think about the side effects.\n\n> RENAME Permission to rename the named relation\n> (gets past my objection above, but probably\n> best left as part of ALTER)\n\n Let's leave it as part of ALTER TABLE.\n\n> INHERIT Do you need this?\n\n What other rights must a user have on the inherited relations\n to work properly with them?\n\n>\n> DBA/OPERATOR/ADMIN Permission to access the database when it is\n> 'closed'\n> (Dec/Rdb call it DBADMIN, I think)\n>\n> I know we don't have the concept of a 'closed' database yet, but it is very\n> useful for performing tasks like renaming storage files, restoring backups\n> etc etc. The idea being that a DBA can close a database, then only DBA\n> users can connect to it.\n\n I like that. And the concept of 'closed' databases should be\n added to this project.\n\n> > System Privileges\n> >\n> > System Privileges are to grant permission to execute DDL-\n> > statements or for database wide Object permissions (valid\n> > for all objects of a particular kind).\n> >\n> > SUPERUSER A special System Privilege,\n> > superseding any other rights. What\n> > the holder of this right want's to\n> > do, he does. It is the same as now,\n> > usesuper in pg_shadow.\n>\n> I suspect this is good grounds for a religious war, but I like a priv\n> system where I have to 'turn on' a super privilege before I get it. If I am\n> a superuser, I don't want my cape flapping in the breeze *all* the time.\n> Can you add some kind of 'CLARK_KENT' priv (ie. 'can become superuser')?\n> And have SUPERUSER off at the beginning of all sessions?\n>\n> There are two reasons I think this is important: 1) I am accident prone,\n> and 2) it's good to live like a mortal most of the time - you get to see\n> problems before a user complains.\n\n If you don't need DBA privileges, don't log on as a DBA. Have\n a separate account for that (IMHO).\n\n> > CREATE TABLE\n> > ALTER ANY TABLE\n> > DROP ANY TABLE\n> > INSERT ANY TABLE\n> > UPDATE ANY TABLE\n> > DELETE ANY TABLE\n> > SELECT ANY TABLE\n> > LOCK ANY TABLE\n> > REFERENCE ANY TABLE\n> > CREATE SEQUENCE\n> > ALTER ANY SEQUENCE\n> > DROP ANY SEQUENCE\n>\n> This seems like overkill; you will need a new priv for every object type.\n> It is also not clear how 'ALTER ANY TABLE' should interact with 'ALTER\n> TABLE (specific table)', but I assume the more specific priv rules.\n\n As I said, it should be fine grained. If a DBA wants some\n user to be able to create views, but not his own tables,\n functions etc., how could he if there aren't separate\n privileges for the single actions?\n\n The interactions will be hardwired in the pg_check_priv()\n function. Since the requested privilege is a #define'd\n constant, it'll be more or less a big switch statement,\n calling a single privilege lookup helper once in a while.\n\n> It seems that this is just a way of defining 'default' privs for an object\n> that does not have an ACL, and if that is the case, why not define a\n> default protection at both the database level and the object-type level\n> (perhaps in the relevant pg_* table?). Certainly it seems that 'CREATE\n> TABLE' could be represented as 'INSERT' priv on the pg_class table etc.\n\n No. They are meant as user or group specific privileges.\n\n By default, only the owner has access to his tables. He (or a\n superuser) must explicitly GRANT other users or groups access\n to it. But a user with SELECT ANY TABLE can do so from the\n start, because the DBA decided that this user act's like a\n superuser if issuing some SELECT database wide.\n\n> > CREATE OBJECT\n> > ALTER ANY OBJECT\n> > DROP ANY OBJECT\n>\n> Back to my previous comments - these seem to be more proerly defined as\n> 'defaults' at the database level, but perhaps I am missing something.\n\n These aren't separate privileges. CREATE OBJECT is the same\n as CREATE TABLE and CREATE VIEW and CREATE FUNCTION and ...\n\n> > System catalog changes\n> >\n> > Pg_proc is extended by two new bool fields. Prosetuid\n> > and procheckperm. These two and the proowner are\n> > held in the fmgr_info struct.\n> >\n> > If a function is called through the fmgr (any user\n> > defined function is), the function manager honours\n> > these flags. Prosetuid will cause the function\n> > manager to switch to another effective user id, used\n> > during pg_check_perms() for the time of the function\n> > invocation.\n>\n> Wonderful! I've been hoping for this for a while.\n\n You never walk alone.\n\n> > Related details\n> >\n> > The system will manage a stack, remembering nested\n> > states of the effective user id. Calls through the\n> > function manager can switch for- and backward to\n> > another one, so prosetuid functions will inherit the\n> > effective permissions of the function (trigger)\n> > owner. The stack is reinitialized at transaction\n> > aborts.\n>\n> I assume this means that if function f1 running under uid 'fred' calls\n> function f2 (with no uid specified), then f2 will also still run as 'fred'?\n\n Right. The euid switching will only be done at entering and\n leaving a prosetuid function or trigger. Anything done inside\n of that uses the new euid until a (however deeply nested)\n call to another setuid function happens.\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"msg_date": "Tue, 25 Jul 2000 20:41:53 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "Something is seriously broken with your mailer or the listserv,\nyour messages have about 10,000 blank lines at the end of them.\n",
"msg_date": "Tue, 25 Jul 2000 12:05:00 -0700",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "Hmm, I thunk I was working on that. I put out a proposal on May 22, and we\ncame to a pretty good understanding about the details and I was working on\na new specification.\n\nYour approach seems to be missing column-level privileges and grant\noptions, and is in general not very close to SQL.\n\n> With\n> some new features (referential integrity for example),\n> this system isn't flexible enough any more and need to be\n> expanded or replaced soon.\n\nI think the RI snafu at least is not the fault of the privilege system at\nall. I could blame the implementation, but short of that it's actually the\nfault of the function manager in that it cannot execute functions with the\npermissions of the creator, as mandated by SQL. That's the thing that\nneeds to be fixed (but it reaches throughout the code of course).\n\n> ALTER SESSION Permission to change session specific\n> attributes like character set\n> localization.\n\nGRANT USAGE ON CHARACTER SET\n\n> CREATE TABLE Permission to create new table in a\n> database.\n\nThis needs to be tied in with schemas.\n\n\n> Pg_shadow is extended with an array, holding all the\n> groups the user belongs to. So after looking up the\n> user, all group relationships are known.\n\nWe ought to think in terms of SQL roles. Those are nestable, so arrays\nneed to be out of the picture.\n\n\n> The system will manage a stack, remembering nested\n> states of the effective user id. Calls through the\n> function manager can switch for- and backward to\n> another one, so prosetuid functions will inherit the\n> effective permissions of the function (trigger)\n> owner. The stack is reinitialized at transaction\n> aborts.\n\nThis is definitely necessary, but it needs to be more general. There is a\ncommand SET SESSION AUTHORIZATION, which is essentially `su', that could\nmake use of this also.\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Tue, 25 Jul 2000 22:40:03 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "Peter Eisentraut wrote:\n> Hmm, I thunk I was working on that. I put out a proposal on May 22, and we\n> came to a pretty good understanding about the details and I was working on\n> a new specification.\n\n I apologize. Karel already told me so and it seems I missed\n that discussion somehow.\n\n Anyway, it's good to hear you're still on it. What's the\n estimated time you think it'll be ready to get patched in?\n\n> > The system will manage a stack, remembering nested\n> > states of the effective user id. Calls through the\n> > function manager can switch for- and backward to\n> > another one, so prosetuid functions will inherit the\n> > effective permissions of the function (trigger)\n> > owner. The stack is reinitialized at transaction\n> > aborts.\n>\n> This is definitely necessary, but it needs to be more general. There is a\n> command SET SESSION AUTHORIZATION, which is essentially `su', that could\n> make use of this also.\n\n I see - a session level userid switch. Should this one affect\n the setting of realuid as well or not? And must it be\n possible from inside a function (or whatever) and then get\n rolled back if the function returns? Should it stay permanent\n otherwise if issued from inside a function?\n\n The thing users actually complain about is the requirement of\n UPDATE permissions to REFERENCE a table. This could be fixed\n with making RI triggers setuid functions for 7.1 and check\n that the user at least has SELECT permission on the\n referenced table during constraint creation. This would also\n remove the actual DOS problem, that a user could potentiall\n create a referencing table and not giving anyone who can\n update the referenced one update permissions on it too.\n\n I think it's worth doing it now, and couple it later with\n your general access control things.\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": "Tue, 25 Jul 2000 23:30:34 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "At 20:41 25/07/00 +0200, Jan Wieck wrote:\n>Philip Warner wrote:\n>> At 15:27 25/07/00 +0200, Jan Wieck wrote:\n>>\n>\n>> INHERIT Do you need this?\n>\n> What other rights must a user have on the inherited relations\n> to work properly with them?\n>\n\nI have no idea, I only suggested this because it's a feature that is easily\noverlooked, and not part of most DBs, so we may need to thin about it...\n\nThe SQL standard also has a 'GRANT...WITH HIERARCHY' option that grants\naccess on all subtables.\n\nFWIW, the SQL standard also defines a 'USAGE' priv that grants access to\ndomains, character sets, UDTs etc.\n\n\n>> > System Privileges\n>> >\n>> > System Privileges are to grant permission to execute DDL-\n>> > statements or for database wide Object permissions (valid\n>> > for all objects of a particular kind).\n>> >\n>> > SUPERUSER A special System Privilege,\n>> > superseding any other rights. What\n>> > the holder of this right want's to\n>> > do, he does. It is the same as now,\n>> > usesuper in pg_shadow.\n>>\n>> I suspect this is good grounds for a religious war, but I like a priv\n>> system where I have to 'turn on' a super privilege before I get it. If I am\n>> a superuser, I don't want my cape flapping in the breeze *all* the time.\n>> Can you add some kind of 'CLARK_KENT' priv (ie. 'can become superuser')?\n>> And have SUPERUSER off at the beginning of all sessions?\n>>\n>> There are two reasons I think this is important: 1) I am accident prone,\n>> and 2) it's good to live like a mortal most of the time - you get to see\n>> problems before a user complains.\n>\n> If you don't need DBA privileges, don't log on as a DBA. Have\n> a separate account for that (IMHO).\n\nI guess if there is an 'ALTER SESSION SET AUTHORIZATION <superuser-name>'\nor alternatively, 'SET ROLE <rolename>', then I'll be happy, since I could\ndefine a 'superuser/dba' role.\n\nI think there is a need for one or more users to have superuser-like access\nto a single DB, but have little or no access to other ones. The suggestion\nabove would allow a normal user to be superuser for single database,\nwithout having to set up (potentially) a separate DBA account for each\ndatabase.\n\n\n>> > CREATE TABLE\n>> > ALTER ANY TABLE\n>> > DROP ANY TABLE\n>> > INSERT ANY TABLE\n>> > UPDATE ANY TABLE\n>> > DELETE ANY TABLE\n>> > SELECT ANY TABLE\n>> > LOCK ANY TABLE\n>> > REFERENCE ANY TABLE\n>> > CREATE SEQUENCE\n>> > ALTER ANY SEQUENCE\n>> > DROP ANY SEQUENCE\n>>\n>> This seems like overkill; you will need a new priv for every object type.\n>> It is also not clear how 'ALTER ANY TABLE' should interact with 'ALTER\n>> TABLE (specific table)', but I assume the more specific priv rules.\n>\n> As I said, it should be fine grained. If a DBA wants some\n> user to be able to create views, but not his own tables,\n> functions etc., how could he if there aren't separate\n> privileges for the single actions?\n>\n> The interactions will be hardwired in the pg_check_priv()\n> function. Since the requested privilege is a #define'd\n> constant, it'll be more or less a big switch statement,\n> calling a single privilege lookup helper once in a while.\n\nMaybe I was confusing implementation with interface, but what I was\nsuggesting (in a confused sort of way) was that you could define 'objects':\nTABLE, TRIGGER, SEQUENCE, COLUMN..., and 'privileges': ALTER, DROP, CREATE,\nUPDATE, DELETE, SELECT etc etc.\n\nThen privs can be granted on objects, so the number of #defines only equals\nthe number of separate privs, not the number of privs times the number of\nobject types. Maybe I just misunderstood your plans? Did you mean that\n'LOCK ANY TABLE' would be a priv granted at the database level, schema\nlevel, or really at the system level?\n\n\n>> It seems that this is just a way of defining 'default' privs for an object\n>> that does not have an ACL, and if that is the case, why not define a\n>> default protection at both the database level and the object-type level\n>> (perhaps in the relevant pg_* table?). Certainly it seems that 'CREATE\n>> TABLE' could be represented as 'INSERT' priv on the pg_class table etc.\n>\n> No. They are meant as user or group specific privileges.\n>\n> By default, only the owner has access to his tables. He (or a\n> superuser) must explicitly GRANT other users or groups access\n> to it. But a user with SELECT ANY TABLE can do so from the\n> start, because the DBA decided that this user act's like a\n> superuser if issuing some SELECT database wide.\n\nSo to use the above object/priv model, 'GRANT \"CREATE ANY TABLE\" on\ndatabase <dbname> to fred' might be equivalent to 'GRANT \"INSERT\" on OBJECT\nTABLES to fred'.\n\nI'm not particularly attached to my suggestion, but you can achieve\ngranularity without lots of priv named to remember.\n\n\n>> >\n>> > If a function is called through the fmgr (any user\n>> > defined function is), the function manager honours\n>> > these flags. Prosetuid will cause the function\n>> > manager to switch to another effective user id, used\n>> > during pg_check_perms() for the time of the function\n>> > invocation.\n>>\n>> Wonderful! I've been hoping for this for a while.\n>\n> You never walk alone.\n\nThat's what I tell my dog.\n\n\nBye for now,\n\nPhilip.\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 26 Jul 2000 09:54:32 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "This is an alpha version of NetBSD 1.5.\n\nSystem is a fairly stock PowerMac 7500 with a 604 CPU upgrade, \noriginal disk drive. The Perl is from the NetBSD package system, \nversion 5.004_04. egcs-1.1.2 (as modified by BSD).\n\npostgresql 7.0.2\n./configure --prefix=/usr/local --with perl --with-x\n\nFirst problem: ODBC doesn't compile. |-(\n\nSecond problem: with elf binaries the location of shared libraries \nis supposed to be compiled in so each program can reference its own \nset of shared objects without conflict. This doesn't seem to jibe \nwith how the build/install makefiles do things. I get missing shared \nlibraries when I try to access the DB as a normal user, and the \nmechanism I would have used to fix this on an xcoff system is \ndeleted, or at least deprecated, on an elf system.\n\nThere is a package for postgres and it seems to do something \ndifferent w.r.t. shared libraries. OTOH I can't get the regression \ntests to run with the package even though psql works fine. (The \nerror is 'installing PL/pgSQL .. createlang: cannot find the file \n/usr/pkg/share/postgresql/plpgsql.so'.)\n\n\nThird problem: well actually the regression tests seem to work, mostly. ;-)\n\nRegression results:\n\tgeometry failed with a number of roundoff differences and a \n-0 difference.\n\topr_sanity, type_sanity, oidjoins, and rules all failed with \nthe build having error messages where some kind of results were \nexpected.\n\tAll other tests passed (including random?!?!).\n\nIf Tom L. wants to beat on this I can give him an account on the \nmachine. I've used up the time I have to devote to it. I'm pretty \nmuch stuck with 6.4.0 on Solaris 2.5 for real work.\n\nSignature failed Preliminary Design Review.\nFeasibility of a new signature is currently being evaluated.\[email protected], or [email protected]\n",
"msg_date": "Tue, 25 Jul 2000 17:58:09 -0700",
"msg_from": "\"Henry B. Hotz\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "> This is an alpha version of NetBSD 1.5.\n> System is a fairly stock PowerMac 7500 with a 604 CPU upgrade,\n> original disk drive. The Perl is from the NetBSD package system,\n> version 5.004_04. egcs-1.1.2 (as modified by BSD).\n> postgresql 7.0.2\n> ./configure --prefix=/usr/local --with perl --with-x\n> First problem: ODBC doesn't compile. |-(\n\nWhat is the symptom?\n\n> Second problem: with elf binaries the location of shared libraries\n> is supposed to be compiled in so each program can reference its own\n> set of shared objects without conflict. This doesn't seem to jibe\n> with how the build/install makefiles do things. I get missing shared\n> libraries when I try to access the DB as a normal user, and the\n> mechanism I would have used to fix this on an xcoff system is\n> deleted, or at least deprecated, on an elf system.\n\nThere was some discussion recently about whether -rpath is A Good Thing,\nwith Debian voting that it is One Step From Hell. I've always just\nmodified my ld.config and/or my LD_LIBRARY_PATH environment to get to\nthe libraries.\n\nEither of these should solve your regression test problem.\n\n> Third problem: well actually the regression tests seem to work, mostly. ;-)\n> If Tom L. wants to beat on this I can give him an account on the\n> machine. I've used up the time I have to devote to it. I'm pretty\n> much stuck with 6.4.0 on Solaris 2.5 for real work.\n\nWell, 7.0.x *will* run on Solaris, but afaik it should do fine on your\nNetBSD box too. Try the above fixups and let me know if you need more.\n\n - Thomas\n",
"msg_date": "Wed, 26 Jul 2000 04:02:33 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": ">> If Tom L. wants to beat on this I can give him an account on the\n>> machine. I've used up the time I have to devote to it. I'm pretty\n>> much stuck with 6.4.0 on Solaris 2.5 for real work.\n\n> Well, 7.0.x *will* run on Solaris, but afaik it should do fine on your\n> NetBSD box too. Try the above fixups and let me know if you need more.\n\nI don't claim to be either a Solaris or NetBSD guru --- I run HPUX\nmyself and have access to bog-standard Sun BSD systems. But if you\nwant some help I'll see what I can do.\n\nThe details of the regress differences would help, to start with...\n\n\t\t\tregards, tom lane\n\nPS: Lockhart might be more nearly on-site for you, though. JPL is\na long way from Pittsburgh.\n",
"msg_date": "Wed, 26 Jul 2000 00:13:32 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5 "
},
{
"msg_contents": "> PS: Lockhart might be more nearly on-site for you, though. JPL is\n> a long way from Pittsburgh.\n\n*rolf*\n\nHenry and I work at the same place, as you probably noticed. I had\nhelped a bit with another machine of his some time ago (he seems to have\na fondness for old Macs; it reminded me that a Centris/Quadra machine is\n*really slow* by today's standards, and that it would be best to leave\nmine in the closet). \n\nAnd he has been around Postgres long enough to think that \"Tom L.\" is\nsomeone other than Tom Lane. I had been tempted to mention this in my\nprevious reply, but thought it might make it past unnoticed :)\n\n - Thomas\n",
"msg_date": "Wed, 26 Jul 2000 05:12:30 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> And he has been around Postgres long enough to think that \"Tom L.\" is\n> someone other than Tom Lane.\n\nUm, good point. I've kind of internalized our Tom/Thomas convention\nbut I suppose not everybody has.\n\n(I had second thoughts about getting involved in this project when\nI realized there was already a \"tgl\" hanging about the premises ;-).\nConfusion is pretty much guaranteed...)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 26 Jul 2000 01:20:18 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5 "
},
{
"msg_contents": "\nOn Tue, 25 Jul 2000, Jan Wieck wrote:\n\n> Karel Zak wrote:\n> >\n> > I not sure, but if I good remember nobody said somethig bad about\n> > PetreE proposal for this, why you prepare new? IMHO Peter's proposal\n> > was good.\n> \n> Seems I missed that discussion. Sometimes I start to drop\n> incoming eMails by subject. If then the discussion moves to\n> something different without changing the subject, you won't\n> see me on that.\n> \n> Anyway, I haven't found a complete proposal in the ML\n\nI (mostly) have found nothing in PG's mail lists archive :-(\nbetter is use:\n\nhttp://www.deja.com/[ST_rn=fs]/group/mailing.database.pgsql-hackers\n\n> archive. Consider my proposal \"derived work\" from his one,\n> if it is similar and let's combine all the ideas into one\n> complete thing.\n\nI mean will good if Peter re-posts his proposal. IMHO is not a problem\nselect feature for GRANT, a problem is implement it and implement it \nlike SQL92.\n\n> > And small suggestion, we need the \"GRANT ... WITH ADMIN OPTION\" or\n> > something like this.\n> \n> What should that do?\n\n--- See the chapter \"11.36 <grant statement>\" in the SQL92 (and others\n parts of this standard). SQL92:\n\n <grant statement> ::=\n GRANT <privileges> ON <object name>\n TO <grantee> [ { <comma> <grantee> }... ]\n [ WITH GRANT OPTION ]\n\n\n--- \"WITH ADMIN OPTION\" is Oracle matter, and Oracle's manual say:\n\n\t\".. allows the grantee to grant the object privileges to the\n\t other user and role...\"\n \n other words you can create \"sub-admin\" for the object, and this user \ncan GRANT privilege to the other standard users.\n \n It is pretty well implement-able if all privilege will in one system \ntable (pg_privilege). I mean that is not good \"dirty\" other system \ntables.\n\n The other point --- we must keep open a door to others SQL administration\nfeatures like ROLE, PROFILE. IMHO final proposal should be contain some idea \nfor group/shadow rewriting and some idea about ROLE.\n\n Ops.. I forget, we *must* in new ACL have columns privilege. It is realy\nneedful in large multi-user applications. A crash point will seed :-)\n\n \t\t\t\t\t\tKarel\n\n",
"msg_date": "Wed, 26 Jul 2000 09:04:21 +0200 (CEST)",
"msg_from": "Karel Zak <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
},
{
"msg_contents": "I just had a go on NetBSD-1.5C/i386 with a fresh cvs - first time since the\nnew autoconf stuff..\n\nOn Wed, Jul 26, 2000 at 04:02:33AM +0000, Thomas Lockhart wrote:\n> > First problem: ODBC doesn't compile. |-(\n\nI didn't try to compile odbc..\n\n> > Second problem: with elf binaries the location of shared libraries\n> > is supposed to be compiled in so each program can reference its own\n> > set of shared objects without conflict. This doesn't seem to jibe\n> > with how the build/install makefiles do things. I get missing shared\n> > libraries when I try to access the DB as a normal user, and the\n> > mechanism I would have used to fix this on an xcoff system is\n> > deleted, or at least deprecated, on an elf system.\n> \n> There was some discussion recently about whether -rpath is A Good Thing,\n> with Debian voting that it is One Step From Hell. I've always just\n> modified my ld.config and/or my LD_LIBRARY_PATH environment to get to\n> the libraries.\n> \n> Either of these should solve your regression test problem.\n\nAs it happens my LD_LIBRARY_PATH is always empty and there is no ldconfig on\nmy system, the standard ld.so.conf file on i386 (elf) being\nlibm.so.0 machdep.fpu_present 1:libm387.so.0,libm.so.0\n\nSo, any chance of putting -rpath in? Without it you end up with:\n\n% ldd psql\npsql:\n -lpq.2 => not found\n -lz.0 => /usr/lib/libz.so.0\n -lcrypt.0 => /usr/lib/libcrypt.so.0\n -lm.0 => /usr/lib/libm387.so.0\n -lm.0 => /usr/lib/libm.so.0\n -lutil.5 => /usr/lib/libutil.so.5\n -ltermcap.0 => /usr/lib/libtermcap.so.0\n -lcurses.3 => /usr/lib/libcurses.so.3\n -lc.12 => /usr/lib/libc.so.12\n\nThen I need to relink psql with -Wl,-R/usr/local/pgsql/lib ...\n\n> > Third problem: well actually the regression tests seem to work, mostly. ;-)\n\nWhere they the parallel regression tests? Does \"unlimit maxproc\" help? (I\nusually forget to do this and maxproc=80 isn't enough for me)\nAll the tests bar geometry work for me, but the latter has:\n\n--- results/geometry.out Wed Jul 26 16:01:12 2000\n***************\n*** 294,307 ****\n (8 rows)\n \n SELECT '' AS four, path(f1) FROM POLYGON_TBL;\n! four | path \n! ------+---------------------\n! | ((2,0),(2,4),(0,0))\n! | ((3,1),(3,3),(1,0))\n! | ((0,0))\n! | ((0,1),(0,1))\n! (4 rows)\n! \n -- translation\n SELECT '' AS eight, p1.f1 + point '(10,10)' AS dist_add\n FROM PATH_TBL p1;\n--- 294,300 ----\n (8 rows)\n \n SELECT '' AS four, path(f1) FROM POLYGON_TBL;\n! ERROR: parser: parse error at or near \"(\"\n -- translation\n SELECT '' AS eight, p1.f1 + point '(10,10)' AS dist_add\n FROM PATH_TBL p1;\n***************\n\n\nin amongst the rounding errors..\n\nCheers,\n\nPatrick\n",
"msg_date": "Wed, 26 Jul 2000 16:25:09 +0100",
"msg_from": "Patrick Welche <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "> So, any chance of putting -rpath in?\n\nistm that it would be acceptable to have --enable-rpath or something\nsimilar available in ./configure.\n\nI recall one big problem with this on my Linux boxen: g++ (and\npresumably gcc) checks for the *existance* of the rpath directory during\nthe linking stage, and barfs if it does not exist. This is incompatible\nwith building in one place, then installing in another, which is\nprobably why package builders in particular conclude that it is The\nWrong Thing.\n\n> > > Third problem: well actually the regression tests seem to work, mostly. > SELECT '' AS four, path(f1) FROM POLYGON_TBL;\n> ! ERROR: parser: parse error at or near \"(\"\n\nAh, I've been wrestling with upgrading my home machine (note: Mandrake\nfalls down if you have a SCSI-only system and try *any* kind of upgrade\n:(( but I do have patches to fix this. Will commit asap.\n\n - Thomas\n",
"msg_date": "Wed, 26 Jul 2000 15:55:27 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "On Wed, Jul 26, 2000 at 03:55:27PM +0000, Thomas Lockhart wrote:\n> > So, any chance of putting -rpath in?\n> \n> istm that it would be acceptable to have --enable-rpath or something\n> similar available in ./configure.\n> \n> I recall one big problem with this on my Linux boxen: g++ (and\n> presumably gcc) checks for the *existance* of the rpath directory during\n> the linking stage, and barfs if it does not exist. This is incompatible\n> with building in one place, then installing in another, which is\n> probably why package builders in particular conclude that it is The\n> Wrong Thing.\n\n*existance* before installation! wow! I would have expected\n-Lnot_yet_installed_directory -Wl,-Rwhere_the_libs_will_end_up -lfoo\n\nAnyway, some sort of flag would be good..\n\nCheers,\n\nPatrick\n",
"msg_date": "Wed, 26 Jul 2000 17:03:08 +0100",
"msg_from": "Patrick Welche <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "At 4:25 PM +0100 7/26/00, Patrick Welche wrote:\n>I just had a go on NetBSD-1.5C/i386 with a fresh cvs - first time since the\n>new autoconf stuff..\n\nThey cut 1.5 alpha less than a month ago and they are already up to \n1.5C on the development branch? Geesh!\n\n>On Wed, Jul 26, 2000 at 04:02:33AM +0000, Thomas Lockhart wrote:\n> > > First problem: ODBC doesn't compile. |-(\n>\n>I didn't try to compile odbc..\n\nI'll redo this one and email Tom L., er, TGL, er, Thomas the compile log.\n\n> > > Second problem: with elf binaries the location of shared libraries\n> > > is supposed to be compiled in so each program can reference its own\n> > > set of shared objects without conflict. This doesn't seem to jibe\n> > > with how the build/install makefiles do things. I get missing shared\n> > > libraries when I try to access the DB as a normal user, and the\n> > > mechanism I would have used to fix this on an xcoff system is\n> > > deleted, or at least deprecated, on an elf system.\n> >\n> > There was some discussion recently about whether -rpath is A Good Thing,\n> > with Debian voting that it is One Step From Hell. I've always just\n> > modified my ld.config and/or my LD_LIBRARY_PATH environment to get to\n> > the libraries.\n> >\n> > Either of these should solve your regression test problem.\n>\n>As it happens my LD_LIBRARY_PATH is always empty and there is no ldconfig on\n>my system, the standard ld.so.conf file on i386 (elf) being\n>libm.so.0 machdep.fpu_present 1:libm387.so.0,libm.so.0\n\nOn port-macppc there is no ld.so.conf file. Maybe I should post this \nquestion on the NetBSD lists, though it seems more related to ELF \nthan to *BSD.\n\n>So, any chance of putting -rpath in? Without it you end up with:\n>\n>% ldd psql\n>psql:\n> -lpq.2 => not found\n> -lz.0 => /usr/lib/libz.so.0\n> -lcrypt.0 => /usr/lib/libcrypt.so.0\n> -lm.0 => /usr/lib/libm387.so.0\n> -lm.0 => /usr/lib/libm.so.0\n> -lutil.5 => /usr/lib/libutil.so.5\n> -ltermcap.0 => /usr/lib/libtermcap.so.0\n> -lcurses.3 => /usr/lib/libcurses.so.3\n> -lc.12 => /usr/lib/libc.so.12\n>\n>Then I need to relink psql with -Wl,-R/usr/local/pgsql/lib ...\n\nFWIW:\n\nmacbsd: {3} ldd /usr/pkg/bin/psql\n/usr/pkg/bin/psql:\n -lcrypt.0 => /usr/lib/libcrypt.so.0\n -lc.12 => /usr/lib/libc.so.12\n -lpq.2 => /usr/pkg/lib/libpq.so.2\n -lm.0 => /usr/lib/libm.so.0\n -lutil.5 => /usr/lib/libutil.so.5\n -lreadline.4 => /usr/pkg/lib/libreadline.so.4\n -ltermcap.0 => /usr/lib/libtermcap.so.0\nmacbsd: {4} ldd /usr/local/bin/psql\n/usr/local/bin/psql:\n -lpq.2 => not found\n -lcrypt.0 => /usr/lib/libcrypt.so.0\n -lm.0 => /usr/lib/libm.so.0\n -lutil.5 => /usr/lib/libutil.so.5\n -ltermcap.0 => /usr/lib/libtermcap.so.0\n -lcurses.3 => /usr/lib/libcurses.so.3\n -lc.12 => /usr/lib/libc.so.12\n\nWe could go through the package patches to see what they changed to \n\"fix\" the problem if necessary. When built directly into /usr/local \ngmake runcheck works and gmake runtest fails (as does initdb, etc). \nWhen built using the package system most normal operations seem OK, \nbut gmake runtest and runcheck both fail.\n\n=============== installing languages... =================\ninstalling PL/pgSQL .. createlang: missing required argument PGLIB directory\n(This is the directory where the interpreter for the procedural\nlanguage is stored. Traditionally, these are installed in whatever\n'lib' directory was specified at configure time.)\nfailed\n\n> > > Third problem: well actually the regression tests seem to \n>work, mostly. ;-)\n>\n>Where they the parallel regression tests? Does \"unlimit maxproc\" help? (I\n>usually forget to do this and maxproc=80 isn't enough for me)\n\nTried it. No change. I did have to stop the running postmaster to \ndo a gmake runcheck or it fails because it can't get enough shared \nmemory. I'm running an unoptimized generic kernel.\n\n>All the tests bar geometry work for me, but the latter has:\n>! ERROR: parser: parse error at or near \"(\"\n>in amongst the rounding errors..\n\nI don't get that error. I admit I didn't look exhaustively for \nnon-rounding errors in the diff.\n\n\nSignature failed Preliminary Design Review.\nFeasibility of a new signature is currently being evaluated.\[email protected], or [email protected]\n",
"msg_date": "Wed, 26 Jul 2000 14:20:11 -0700",
"msg_from": "\"Henry B. Hotz\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "On Wed, Jul 26, 2000 at 02:20:11PM -0700, Henry B. Hotz wrote:\n> At 4:25 PM +0100 7/26/00, Patrick Welche wrote:\n> \n> >As it happens my LD_LIBRARY_PATH is always empty and there is no ldconfig on\n> >my system, the standard ld.so.conf file on i386 (elf) being\n> >libm.so.0 machdep.fpu_present 1:libm387.so.0,libm.so.0\n> \n> On port-macppc there is no ld.so.conf file. Maybe I should post this \n> question on the NetBSD lists, though it seems more related to ELF \n> than to *BSD.\n> \n> >So, any chance of putting -rpath in? Without it you end up with:\n> >\n> >% ldd psql\n> > -lpq.2 => not found\n...\n> >Then I need to relink psql with -Wl,-R/usr/local/pgsql/lib ...\n... abridged\n> macbsd: {3} ldd /usr/pkg/bin/psql\n> /usr/pkg/bin/psql:\n> -lpq.2 => /usr/pkg/lib/libpq.so.2\n> /usr/local/bin/psql:\n> -lpq.2 => not found\n> \n> We could go through the package patches to see what they changed to \n> \"fix\" the problem if necessary. When built directly into /usr/local \n> gmake runcheck works and gmake runtest fails (as does initdb, etc). \n> When built using the package system most normal operations seem OK, \n> but gmake runtest and runcheck both fail.\n\nThe package probably slaps the -Wl,-R/usr/pkg/lib in. The point of the\nabove is \"use LD_LIBRARY_PATH or ldconfig\" isn't a solution for us lot,\nthe -Wl,-R (or -rpath) is needed (say configure --not-Debian or something ;)\n\n> > > > Third problem: well actually the regression tests seem to \n> >work, mostly. ;-)\n> >\n> >Where they the parallel regression tests? Does \"unlimit maxproc\" help? (I\n> >usually forget to do this and maxproc=80 isn't enough for me)\n> \n> Tried it. No change. I did have to stop the running postmaster to \n> do a gmake runcheck or it fails because it can't get enough shared \n> memory. I'm running an unoptimized generic kernel.\n\nFair enough - same here. The maxproc business for me would be that a new\nbackend can't be forked for a given test => it doesn't output anything\nother than an error message => the test fails. What sort of errors are\nyou getting?\n\nCheers,\n\nPatrick\n",
"msg_date": "Thu, 27 Jul 2000 10:46:46 +0100",
"msg_from": "Patrick Welche <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "At 10:46 AM +0100 7/27/00, Patrick Welche wrote:\n>The package probably slaps the -Wl,-R/usr/pkg/lib in. The point of the\n>above is \"use LD_LIBRARY_PATH or ldconfig\" isn't a solution for us lot,\n>the -Wl,-R (or -rpath) is needed (say configure --not-Debian or something ;)\n\nShouldn't there be an option to disable shared libraries altogether?\n\nI don't see that they buy us much in most real scenarios. Every copy \nof the postmaster already shares the same complete executable image \nby default. (Actually that bit of smarts was built into old Unix \nVersion 6 or earlier.) That's actually a bigger savings and you get \nit without the run-time overhead of shared libraries. If we have \nlarge numbers of clients on the same machine they probably share the \nsame executable image as well.\n\n> > > > > Third problem: well actually the regression tests seem to\n> > >work, mostly. ;-)\n> > >\n> > >Where they the parallel regression tests? Does \"unlimit maxproc\" help? (I\n> > >usually forget to do this and maxproc=80 isn't enough for me)\n> >\n> > Tried it. No change. I did have to stop the running postmaster to\n> > do a gmake runcheck or it fails because it can't get enough shared\n> > memory. I'm running an unoptimized generic kernel.\n>\n>Fair enough - same here. The maxproc business for me would be that a new\n>backend can't be forked for a given test => it doesn't output anything\n>other than an error message => the test fails. What sort of errors are\n>you getting?\n\nI emailed the results files for the failed tests to Thomas L. (but \nnot Tom L.). If anyone else wants copies just ask.\n\n\nSignature failed Preliminary Design Review.\nFeasibility of a new signature is currently being evaluated.\[email protected], or [email protected]\n",
"msg_date": "Thu, 27 Jul 2000 10:50:53 -0700",
"msg_from": "\"Henry B. Hotz\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "> Karel Zak wrote:\n> >\n> > I not sure, but if I good remember nobody said somethig bad about\n> > PetreE proposal for this, why you prepare new? IMHO Peter's proposal\n> > was good.\n> \n> Seems I missed that discussion. Sometimes I start to drop\n> incoming eMails by subject. If then the discussion moves to\n> something different without changing the subject, you won't\n> see me on that.\n> \n> \n> \n> \n>\n>\n\nYou know, I have started dropping e-mails with lots of blank lines on\nthe end. :-)\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, 27 Jul 2000 15:28:06 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: New Privilege model purposal"
}
] |
[
{
"msg_contents": "\nAn interesting problem has been brought to my attention in pg_dump\n(V7.0.2+, I think).\n\nIt uses the following code to disable triggers prior to a data load:\n\n UPDATE \"pg_class\" SET \"reltriggers\" = 0 WHERE \"relname\" !~ '^pg_';\n\nwhich works fine if it is currently connected as a superuser, or as the\ndatdba. However, if it is connected as anybody else, they will get the error:\n\n pg_class: Permission denied\n\nThe obvious solution is to reconnect as the datdba before running the code.\nBut that option may not be possible because passwords may be enabled and\nthe person restoring the database may not know the password for the datdba,\nbut might have a valid 'superuser' account which they could use instead.\n\nSo, how does this sound: add another arg to pg_restore, --superuser=name,\nwhich allows the person restoring the database to specify the superuser\naccount to use, and if none is specified, then use the account it finds in\nthe dba field of the database it is restoring to. I would also modify\npg_dump to dump the original datdba, in case a mythical future release does\nthe 'create database' part as well.\n\nAnother option would be to pop up a username prompt as well as the password\nprompt when it wants the superuser on a system that requires passwords.\n\nComments would definitely be appreciated...\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 25 Jul 2000 23:30:17 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Problem with disabling triggers in pg_dump"
},
{
"msg_contents": "Philip Warner wrote:\n>\n> An interesting problem has been brought to my attention in pg_dump\n> (V7.0.2+, I think).\n>\n> It uses the following code to disable triggers prior to a data load:\n>\n> UPDATE \"pg_class\" SET \"reltriggers\" = 0 WHERE \"relname\" !~ '^pg_';\n>\n> which works fine if it is currently connected as a superuser, or as the\n> datdba. However, if it is connected as anybody else, they will get the error:\n>\n> pg_class: Permission denied\n>\n> The obvious solution is to reconnect as the datdba before running the code.\n\n The above was a rude hack. Introduced because of the lack of\n time when we discovered the problem during 7.0 BETA cycle\n (IIRC). The ovious \"solution\" is to fix it.\n\n The clean solution would be to have something like\n\n ALTER SESSION DISABLE/ENABLE TRIGGERS\n\n A global variable (like those for other session settings)\n would cause the trigger manager to suppress their invocation\n at all.\n\n The new utility has to check if either the user has ALTER ALL\n TABLES privilege, or has ALTER TABLE privilege for any\n existing user table where triggers are defined for.\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"msg_date": "Tue, 25 Jul 2000 15:52:44 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Problem with disabling triggers in pg_dump"
},
{
"msg_contents": "At 15:52 25/07/00 +0200, Jan Wieck wrote:\n>Philip Warner wrote:\n>>\n>> An interesting problem has been brought to my attention in pg_dump\n>> (V7.0.2+, I think).\n>>\n>> It uses the following code to disable triggers prior to a data load:\n>>\n>> UPDATE \"pg_class\" SET \"reltriggers\" = 0 WHERE \"relname\" !~ '^pg_';\n>>\n>> which works fine if it is currently connected as a superuser, or as the\n>> datdba. However, if it is connected as anybody else, they will get the\nerror:\n>>\n>> pg_class: Permission denied\n>>\n>> The obvious solution is to reconnect as the datdba before running the code.\n>\n> The clean solution would be to have something like\n>\n> ALTER SESSION DISABLE/ENABLE TRIGGERS\n\nUnfortunately, I am trying to keep the new pg_dump working with 7.0.2 as\nwell, so I need a solution for the old hack as well as the new priv model...\n\n\nBut, as far as 7.1 goes, this sounds like the way to go. FWIW, we'd also\nwant to consider: \n\n ALTER SEESION DISABLE CONSTRAINTS etc etc.\n\nplus even,\n \n ALTER TRIGGER <name> on <table> DISABLE \nor ALTER TABLE <name> DISABLE TRIGGERS\nor (to avoid messing with valid DDL),\n ALTER SESSION DISABLE TRIGGER <trig-name>\n ALTER SESSION DISABLE TRIGGERS ON <rel-name>\n ALTER SESSION DISABLE ALL TRIGGERS\n\n> A global variable (like those for other session settings)\n> would cause the trigger manager to suppress their invocation\n> at all.\n\nMaybe it would be best stored on a per-trigger basis.\n\n\n> The new utility has to check if either the user has ALTER ALL\n> TABLES privilege, or has ALTER TABLE privilege for any\n> existing user table where triggers are defined for.\n\nOr maybe 'ALTER' priv on the individual 'TRIGGER' objects...since I would\nnot necessarily consider a trigger subject to the ALTER TABLE rules.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 26 Jul 2000 01:07:06 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Problem with disabling triggers in pg_dump"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> The obvious solution is to reconnect as the datdba before running the code.\n> But that option may not be possible because passwords may be enabled\n\npg_dump scripts that try to restore ownership have always been\nessentially unusable on systems with password authentication, because\nit's just not practical to keep entering the passwords for every\n\\connect (even assuming you know them all). This trigger hack is just\nthe tip of the iceberg.\n\nWe have talked about ways to solve the real problem. One way is to\nrun the entire restore script as superuser, doing something other than\n\\connect to set ownership of created objects. You could do that now\nwith something like\n\tcreate table newtable ...\n\tupdate pg_class set relowner = xxx where relname = 'newtable';\nalthough it'd be nicer to invent ALTER commands to handle this.\n\nAnother issue to think about is that it should be possible to run\nrestore scripts as a non-superuser, with the restriction that all the\ncreated objects end up being owned by you not by their original owners.\n(Compare the behavior of \"tar x\" when run as superuser or not.)\nThis has not worked in the past (because those \\connect commands can't\nbe ignored), but it would work with an ALTER-based approach, because\nthe ALTERs would simply fail. With a slightly smarter pg_restore,\nthere'd be an option not to emit the ALTERs in the first place, but\nthis is inessential.\n\nThe thing that really bothers me about this reltriggers hack is that\nit doesn't work if the script is being run as non-superuser. I don't\nsee why it's necessary anyway; shouldn't the order of operations be\n\tcreate table;\n\tload data;\n\tcreate triggers and indexes;\n?\n\n> So, how does this sound: add another arg to pg_restore, --superuser=name,\n> which allows the person restoring the database to specify the superuser\n> account to use, and if none is specified, then use the account it finds in\n> the dba field of the database it is restoring to.\n\nI think pg_restore ought to run under the same userid that would be\nestablished for a plain psql session --- ie, -u or $PGUSER or $USER.\n\n> I would also modify\n> pg_dump to dump the original datdba, in case a mythical future release does\n> the 'create database' part as well.\n\nUh, how does pg_dumpall enter into this?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 25 Jul 2000 11:17:53 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problem with disabling triggers in pg_dump "
},
{
"msg_contents": "At 11:17 25/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> The obvious solution is to reconnect as the datdba before running the code.\n>> But that option may not be possible because passwords may be enabled\n>\n>We have talked about ways to solve the real problem. One way is to\n>run the entire restore script as superuser, doing something other than\n>\\connect to set ownership of created objects. You could do that now\n>with something like\n>\tcreate table newtable ...\n>\tupdate pg_class set relowner = xxx where relname = 'newtable';\n\nI considered this, but lack of confidence as to the ramifications of\nupdating pg_class + the fact that it also requires superuser access, put me\noff. But maybe I should put an 'Ownersip' phase in pg_restore (at the end,\nobviosly).\n\n\n>although it'd be nicer to invent ALTER commands to handle this.\n\nI agree, but not for 7.0.2. Doing something as apparently simple might be a\ngood way for me to see how the process of dealing with a command works from\npsql->backend->psql, which is something I'll need for 'insert...returning'.\n\n\n>Another issue to think about is that it should be possible to run\n>restore scripts as a non-superuser, with the restriction that all the\n>created objects end up being owned by you not by their original owners.\n\nThis was part of the motivation; if a DBA creates a db and can set it's\nownership to the appropriate user, then the user should be able to restore\ninto it.\n\n\n>(Compare the behavior of \"tar x\" when run as superuser or not.)\n>This has not worked in the past (because those \\connect commands can't\n>be ignored), \n\nI don't follow...do you mean that psql barfs, or do you mean that there has\nbeen no way to prevent them being output?\n\n\n>but it would work with an ALTER-based approach, because\n>the ALTERs would simply fail. With a slightly smarter pg_restore,\n>there'd be an option not to emit the ALTERs in the first place, but\n>this is inessential.\n\n--ignore-ownership or similar on pg_restore is about 10 lines of code.\n\n\n>The thing that really bothers me about this reltriggers hack is that\n>it doesn't work if the script is being run as non-superuser. I don't\n>see why it's necessary anyway; shouldn't the order of operations be\n>\tcreate table;\n>\tload data;\n>\tcreate triggers and indexes;\n\nYes, for a full restore that is true. But for a partial restore (where I\nhave assumed triggers may exist), it's nice to disable the triggers...but\n(and this is a horrible idea), pg_restore could use pg_dump to dump the\ntriggers to a null archive, drop them, then restore them at the end of the\nrestore op...\n\n\n>> So, how does this sound: add another arg to pg_restore, --superuser=name,\n>> which allows the person restoring the database to specify the superuser\n>> account to use, and if none is specified, then use the account it finds in\n>> the dba field of the database it is restoring to.\n>\n>I think pg_restore ought to run under the same userid that would be\n>established for a plain psql session --- ie, -u or $PGUSER or $USER.\n\nIt does; but with a direct db connection it reconnects appropriately as\neach user (with password prompts if necessary). The idea was that for the\nreltriggers hack it knows it needs to connect as a superuser, so I could\nallow the user to specify a valid one with a known password.\n\n\n>> I would also modify\n>> pg_dump to dump the original datdba, in case a mythical future release does\n>> the 'create database' part as well.\n>\n>Uh, how does pg_dumpall enter into this?\n\nIt doesn't really; pg_dumpall inserts text into the output stream and\ncreates one huge script for restoring all databases. It also messes with\npg_* tables, so I can't really make the two work together. \n\nThe current version of pg_restore that I am working on has a --create (-C)\noption which will issue the appropriate 'create database' commands. But\npg_dumpall is unaffected. Sounds like I need to add --ignore-owner.\n\nAt *some* point in the future, I'll try to put together a pg_backupall &\npg_restoreall, but that's not really high on my priorities - I tend to\nbackup DBs individually.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 26 Jul 2000 01:43:01 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Problem with disabling triggers in pg_dump "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n>> (Compare the behavior of \"tar x\" when run as superuser or not.)\n>> This has not worked in the past (because those \\connect commands can't\n>> be ignored), \n\n> I don't follow...do you mean that psql barfs, or do you mean that there has\n> been no way to prevent them being output?\n\nNo, I mean that if they're in the script there is no way to have them\nbe ignored. There is a way to prevent them from being output (-z switch\nto pg_dump, or some such) but *that puts control at the wrong end of the\nprocess*. When you make a tarfile you don't have to specify whether it\nwill be restored with the same file ownerships or not; you determine\nthat when you do the restore. pg_dump scripts need the same flexibility.\n\nAn additional reason for getting rid of the \\connect's is performance;\neach one causes a fresh backend startup. You might also care to\ncontemplate the implications for per-session variables like the \"disable\ntriggers\" switch you were suggesting.\n\n>> The thing that really bothers me about this reltriggers hack is that\n>> it doesn't work if the script is being run as non-superuser. I don't\n>> see why it's necessary anyway; shouldn't the order of operations be\n>> create table;\n>> load data;\n>> create triggers and indexes;\n\n> Yes, for a full restore that is true. But for a partial restore (where I\n> have assumed triggers may exist), it's nice to disable the triggers...\n\nWhy is that nice? If you are loading more data into an existing table\nstructure, seems to me the *last* thing you'd want is to disable your\nconsistency checks. Too risky --- certainly not something I want\npg_dump doing automatically without my knowledge or consent.\n\nI've forgotten the exact details of the scenario that forced us to put\nin the reltriggers hack in the first place, but it may well be that\nthe problem has a better solution now that pg_dump is smart enough to\nreorder its output. I can see from the CVS logs that Jan put the\ntrigger change into pg_dump on 7-Feb-2000, but I didn't have much luck\nfinding any related discussion in the mail archives. Jan, do you recall\nthe reasoning for it?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 25 Jul 2000 12:23:26 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Problem with disabling triggers in pg_dump "
},
{
"msg_contents": "> >> The thing that really bothers me about this reltriggers hack is that\n> >> it doesn't work if the script is being run as non-superuser. I don't\n> >> see why it's necessary anyway; shouldn't the order of operations be\n> >> create table;\n> >> load data;\n> >> create triggers and indexes;\n>\n> > Yes, for a full restore that is true. But for a partial restore (where I\n> > have assumed triggers may exist), it's nice to disable the triggers...\n>\n> Why is that nice? If you are loading more data into an existing table\n> structure, seems to me the *last* thing you'd want is to disable your\n> consistency checks. Too risky --- certainly not something I want\n> pg_dump doing automatically without my knowledge or consent.\n>\n> I've forgotten the exact details of the scenario that forced us to put\n> in the reltriggers hack in the first place, but it may well be that\n> the problem has a better solution now that pg_dump is smart enough to\n> reorder its output. I can see from the CVS logs that Jan put the\n> trigger change into pg_dump on 7-Feb-2000, but I didn't have much luck\n> finding any related discussion in the mail archives. Jan, do you recall\n> the reasoning for it?\n\nFor constraints it's a circular dependency issue. Unless all of the restore\nis being done in a single transaction, you can't put data in a table set\nthat\nis something like table1 references table2 references table1. With\ndeferred triggers you can get data sets that cannot be created outside\nof a transaction.\nIf we had drop constraint, we could drop and re-add the constraints\nwhich would at least give an error message if the data failed the\nconstraint, but is still not a real solution.\n\nIn addition, if you're loading a data only dump into a created schema,\nyou're\nasking for trouble if you have triggers anyway, since how does the system\nknow whether or not a particular trigger's effects are already included in\nthe\ndata only dump or not (say, a logging trigger). Some triggers you want to\nrun theoretically because they aren't circular dependencies and do\nvalidation\nof data. Other triggers have effects like creating rows that are already in\nthe data dump and you wouldn't want to run again.\n\n\n",
"msg_date": "Tue, 25 Jul 2000 11:16:13 -0700",
"msg_from": "\"Stephan Szabo\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Problem with disabling triggers in pg_dump "
},
{
"msg_contents": "Tom Lane wrote:\n> >> The thing that really bothers me about this reltriggers hack is that\n> >> it doesn't work if the script is being run as non-superuser. I don't\n> >> see why it's necessary anyway; shouldn't the order of operations be\n> >> create table;\n> >> load data;\n> >> create triggers and indexes;\n>\n> > Yes, for a full restore that is true. But for a partial restore (where I\n> > have assumed triggers may exist), it's nice to disable the triggers...\n>\n> Why is that nice? If you are loading more data into an existing table\n> structure, seems to me the *last* thing you'd want is to disable your\n> consistency checks. Too risky --- certainly not something I want\n> pg_dump doing automatically without my knowledge or consent.\n>\n> I've forgotten the exact details of the scenario that forced us to put\n> in the reltriggers hack in the first place, but it may well be that\n> the problem has a better solution now that pg_dump is smart enough to\n> reorder its output. I can see from the CVS logs that Jan put the\n> trigger change into pg_dump on 7-Feb-2000, but I didn't have much luck\n> finding any related discussion in the mail archives. Jan, do you recall\n> the reasoning for it?\n\n It was for data-only dumps. Someone might have a schema, that\n doesn't dump well. So he keeps his schema creation in\n separate, hand maintained SQL scripts and takes data-only\n dumps.\n\n On a restore, his schema scripts would already create all the\n constraints, triggers and the like. Now the restore loads the\n data, table by table. But circular dependencies will fail\n all the way. And triggers might modify other tables (COPY\n invokes triggers), but these derived actions are already part\n of the dumped data. So it'll not do any good. At least it'll\n not restore the database to the same content it had at dump\n time.\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"msg_date": "Tue, 25 Jul 2000 20:57:49 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Re: Problem with disabling triggers in pg_dump"
},
{
"msg_contents": "Tom Lane writes:\n\n> We have talked about ways to solve the real problem. One way is to\n> run the entire restore script as superuser, doing something other than\n> \\connect to set ownership of created objects. You could do that now\n> with something like\n> \tcreate table newtable ...\n> \tupdate pg_class set relowner = xxx where relname = 'newtable';\n> although it'd be nicer to invent ALTER commands to handle this.\n\nAnd this is what good ol' SQL has in store for us:\n\nCREATE SCHEMA AUTHORIZATION \"username\"\n CREATE TABLE t1 (...)\n CREATE TABLE t2 (...)\n;\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Tue, 25 Jul 2000 22:40:25 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Problem with disabling triggers in pg_dump "
},
{
"msg_contents": "At 12:23 25/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>>> (Compare the behavior of \"tar x\" when run as superuser or not.)\n>>> This has not worked in the past (because those \\connect commands can't\n>>> be ignored), \n>\n>> I don't follow...do you mean that psql barfs, or do you mean that there has\n>> been no way to prevent them being output?\n>\n>No, I mean that if they're in the script there is no way to have them\n>be ignored. There is a way to prevent them from being output (-z switch\n>to pg_dump, or some such) but *that puts control at the wrong end of the\n>process*. When you make a tarfile you don't have to specify whether it\n>will be restored with the same file ownerships or not; you determine\n>that when you do the restore. pg_dump scripts need the same flexibility.\n\nOK, so adding '--no-owner, -O(?)' on pg_restore is probably worth doing.\n\n\n>An additional reason for getting rid of the \\connect's is performance;\n>each one causes a fresh backend startup. You might also care to\n>contemplate the implications for per-session variables like the \"disable\n>triggers\" switch you were suggesting.\n\nYes good point; per-session probably is better than updating reltriggers,\nbut I'd argue that a restore operation (even a partial one) should not be\ndone while the DB is online anyway.\n\n\n>>> The thing that really bothers me about this reltriggers hack is that\n>>> it doesn't work if the script is being run as non-superuser. I don't\n>>> see why it's necessary anyway; shouldn't the order of operations be\n>>> create table;\n>>> load data;\n>>> create triggers and indexes;\n>\n>> Yes, for a full restore that is true. But for a partial restore (where I\n>> have assumed triggers may exist), it's nice to disable the triggers...\n>\n>Why is that nice? If you are loading more data into an existing table\n>structure, seems to me the *last* thing you'd want is to disable your\n>consistency checks. Too risky --- certainly not something I want\n>pg_dump doing automatically without my knowledge or consent.\n\nBut, but, but...that's the default behaviour in 7.0.2. I can probably\nsafely change the default behaviour in pg_restore, but are you also\nsuggesting I do it for pg_dump as well.\n\n\n>I've forgotten the exact details of the scenario that forced us to put\n>in the reltriggers hack in the first place, but it may well be that\n>the problem has a better solution now that pg_dump is smart enough to\n>reorder its output. I can see from the CVS logs that Jan put the\n>trigger change into pg_dump on 7-Feb-2000, but I didn't have much luck\n>finding any related discussion in the mail archives. Jan, do you recall\n>the reasoning for it?\n\n From Jan's subsequent email, this is because of RI triggers. \n\nHow does this sound as a plan:\n\n1. Add --no-owner to pg_restore & pg_dump (both versions)\n\nThis will use the current uid to build the entire database. The will affect\npg_restore as well as plain text output from pg_dump.\n\n\n2. Add --superuser[=<name>], -S to pg_restore & pg_dump (both versions)\n\nIf restoring directly to a db, then pg_restore will check if the current\nuid has superuser, and if so, will run as though --superuser=<current-uid>\nwere specified (unless another name was already specified).\n\nWithout --superuser it will NOT DISABLE TRIGGERS, and will issue a warning\nto that effect (since it can't anyway).\n\nWith --superuser specified (or defaulted), it will issue '\\connect -\n<superuser>' before disabling triggers, then reconnect as the previous user\nafterwards.\n\nIf and when 'SET SESSION CONSTRAINTS DISABLED' & 'SET SESSION TRIGGERS\nDISABLED' comes along, the code for disabling triggers can be modified\nappropriately. \n\nI'm not too worried about the cost of reconnecting; it is not is any where\nnear as great as the cost of actually restoring the data for any big DB, I\nthink.\n\n\nDoes this sound like a reasonable approach?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 26 Jul 2000 10:43:43 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Re: Problem with disabling triggers in pg_dump "
}
] |
[
{
"msg_contents": "\t\nI know as far as 7.0.x and back you cannot delete/drop columns from a \ntable. Is this expected to be in the 7.x series?\n\n",
"msg_date": "Tue, 25 Jul 2000 11:05:15 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": true,
"msg_subject": "DELETE/DROP on Columns"
},
{
"msg_contents": "> -----Original Message-----\n> From: Thomas Swan\n> \t\n> I know as far as 7.0.x and back you cannot delete/drop columns from a \n> table. Is this expected to be in the 7.x series?\n>\n\nRecently there has been a discussion about this issue.\nTom proposed a soltution which uses 2(logical/physical)\nattribute numbers. It seems the most reasonable solution\nat present.\nIf there's no objection,I would try to implement it according\nto his proposal before 7.1. \n\nComments ?\n\nRegards.\n\nHiroshi Inoue\[email protected] \n",
"msg_date": "Wed, 26 Jul 2000 09:17:20 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: DELETE/DROP on Columns"
},
{
"msg_contents": "> -----Original Message-----\n> From: Hiroshi Inoue\n> \n> > -----Original Message-----\n> > From: Thomas Swan\n> > \t\n> > I know as far as 7.0.x and back you cannot delete/drop columns from a \n> > table. Is this expected to be in the 7.x series?\n> >\n> \n> Recently there has been a discussion about this issue.\n> Tom proposed a soltution which uses 2(logical/physical)\n> attribute numbers. It seems the most reasonable solution\n> at present.\n> If there's no objection,I would try to implement it according\n> to his proposal before 7.1. \n>\n\nOops,there remains some problems however.\nThey seems to be pretty serious.\n\n1) Which(logical or physical) attribute number should other\n system tables have ?\n e.g. pg_index,pg_relcheck,pg_attrdef etc ...\n For backend modules,physical attrbiute number is sufficeint\n but client programs which handle metadata would need \n logical attribute numbers. \n\n2) How do we handle logical/physical tuple format ?\n For example,there's a function in test/tegress/sql/\n create_function_2.sql which takes a table type input\n parameter and returns setof a table type.\n\n CREATE FUNCTION equipment(hobbies_r)\n RETURNS setof equipment_r\n AS 'select * from equipment_r where hobby = $1.name'\n LANGUAGE 'sql';\n\n This function returns equipment_r tuples of logical format\n which may be different from the physical format which\n is used to store heap tuples once a column is dropped.\n Should input hobbies_r be of logical format also ?\n\nAny comments & suggestions would be appreciated...\n \nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Thu, 27 Jul 2000 14:26:20 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: DELETE/DROP on Columns"
}
] |
[
{
"msg_contents": "And that was the problem!!! Each time I recompiled (and finally got \neverything to compile properly), I did a gmake install. What I didn't \nrealize was that, instead of overwriting the previous installation with the \nnew installation, it would simply skip it. Hence I was using a new \nlibpgtcl.so with a postgres not compiled for it.\n\nSoooo...when I deleted the existing postgres installation and did a gmake \ninstall, it worked fine.\n\nCould use a gmake uninstall...\n\nTim\n\n\nZeugswetter Andreas SB <[email protected]> said:\n\n> Looks like your postgres binary is not the correct one.\n> That is: the make step for the target postgres.imp failed or went into the\n> wrong directory, and you thus have a postgres binary that is not converted \n> to export all symbols.\n> \n> This is one point that bugs me in the aix port. Maybe we should do it \n> like other ports do it, first create a postgres.a then postgres.imp\n> and finally postgres from postgres.a and postgres.imp.\n> \n> Comments ?\n> Andreas\n> \n> PS: I do not think that you can successfully run all regression tests\n> with your current installation. Can you confirm ? \n> \n> \n> \n> So when I try \"load libpgtcl.so\", I get the following error:\n> \n> \n> Error: couldn't load file \"./libpgtcl.so\": 0509-130 Symbol resolution\n> faile\n> d for ./libpgtcl.so because:\n> 0509-136 Symbol __start (number 0) is not exported from\n> dependent module /home/postgres/postgresql/bin/postgres.\n> 0509-192 Examine .loader section symbols with the\n> 'dump -Tv' command. \n> \n> \n> I did the dump command on the postgres executable and found:\n> \n> [177] 0x20022eb0 .data ENTpt DS SECdef [noIMid] __start\n> \n> \n\n\n\n-- \nTim Dunnington\nSr. Integration Engineer\nHealthcare.com\n804-239-7650\n\n\n",
"msg_date": "Tue, 25 Jul 2000 17:15:48 -0000",
"msg_from": "Tim Dunnington <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: AW: libpgtcl on aix"
}
] |
[
{
"msg_contents": "Here is a good article about the mistakes Mozilla made:\n\n\thttp://www.osopinion.com/Opinions/MontyManley/MontyManley11.html\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, 25 Jul 2000 16:00:52 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": true,
"msg_subject": "Lessons from Mozilla"
}
] |
[
{
"msg_contents": "Bruce Momjian wrote:\n> Yo, Jan. Get that extra space removed.\n>\n\n Caused by some changes to the macro package I use to format\n my emails with groff(1).\n\n Sorry and thanks to ALL who noticed me.\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": "Tue, 25 Jul 2000 22:49:50 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "Re: [GENERAL] Comment #line after pre-processing"
}
] |
[
{
"msg_contents": "\nI have Postgres 6.5 running on a 4-cpu Linux server with 2GB RAM, however\nit does not seem to be taking full advantage of the available memory, even\nduring large queries. How do I tell Postgres that more memory is available?\n\nBrian\n\nP.S. Yes, I know we should upgrade to 7, but it looks like we're moving\nthis application to Oracle soon.\n--\nBrian Baquiran <[email protected]>\nhttp://www.baquiran.com/ AIM: bbaquiran \nWork: +63(2)7182222 Home: +63(2) 9227123\n",
"msg_date": "Wed, 26 Jul 2000 01:40:32 GMT",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Tuning: Taking advantage of 2GB RAM"
},
{
"msg_contents": "Hello;\n\nwe've been using Postgres for nearly 2 years now, and have\nfollowed updgrades, from 6.4.2 to 7.0.2. Our applications\nare mainly shell scripts, and CGI. All is done in perl.\nWe have long, heavy, and simultaneous transactions.\n\nWith 7.0.x versions, we've come across a problem, new for us:\nvery often (2 or 3 times a day), there are on our Pg machine\na dozen of 'update waiting', and our perl scripts are waiting\ntoo to begin a transaction. So many postgres are running, than\nno other one can be added; only SELECTs continue to be possible.\nWe finally have to restart Postgres; but even if we kill\npostmaster's process, there still are postgres processes runnings,\nand they have to be killed too! Definitely not working.\n\nWe've been looking for solutions for a few weeks, and even\ndecided to move Pg from a satured PIII 650 to a DEC Alpha 500mhz,\nwhere Postgres is the only application to run.\nSo far, we haven't found any workaround, and the hangings have\nbeen quite nasty for our project.\n\nYesterday, I moved back our DB to Pg 6.5.3, and yes, now\neverything works fine again (it's slower, but it works).\nAnd vacuums don't hang the postmaster any more.\n\nSo, I've got 2 questions:\n- Am I the only one here to have such problems with 7.0.2?\n- Is 7.0.2 broken?\n\nRegards\nFabrice Scemama\n",
"msg_date": "Wed, 26 Jul 2000 16:01:18 +0200",
"msg_from": "Fabrice Scemama <[email protected]>",
"msg_from_op": false,
"msg_subject": "Is Pg 7.0.x's Locking Mechanism BROKEN?"
},
{
"msg_contents": "Fabrice Scemama <[email protected]> writes:\n> With 7.0.x versions, we've come across a problem, new for us:\n> very often (2 or 3 times a day), there are on our Pg machine\n> a dozen of 'update waiting', and our perl scripts are waiting\n> too to begin a transaction.\n\nCan you list exactly what *all* the backends are doing when this\nhappens? It might help to run the postmaster with -d2 so that\nthe postmaster log contains a trace of all queries executed.\n\n> - Am I the only one here to have such problems with 7.0.2?\n\nHaven't seen any other such reports.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 26 Jul 2000 10:46:27 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Is Pg 7.0.x's Locking Mechanism BROKEN? "
},
{
"msg_contents": "frank wrote:\n> Thanks Fabrice, that will help a lot.\n>\n> In my applications the conflict was not a direct table conflict e.g.\n> USER1 locks Table1 record that references Table2 via foreign key with a\n> cascade update/delete enforced then\n> USER2 tried to lock Table2 for update on the referenced record - result both\n> users locked !\n>\n> Is this the same scenario in your case ?\n> perhaps a simple test db could used to resolve if this is the issue !\n\n Looks like a deadlock situation not seen by the deadlock\n detection code. Unfortunately I'm not able to reproduce a\n lockup with a simple test DB. Could you post a simple\n (trans1 does ..., trans2 does ...) sample so we coule\n reproduce such a lockup?\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, 26 Jul 2000 21:51:34 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Re: [GENERAL] Is Pg 7.0.x's Locking Mechanism BROKEN?"
},
{
"msg_contents": "Thanks Fabrice, that will help a lot.\n\nIn my applications the conflict was not a direct table conflict e.g.\nUSER1 locks Table1 record that references Table2 via foreign key with a\ncascade update/delete enforced then\nUSER2 tried to lock Table2 for update on the referenced record - result both\nusers locked !\n\nIs this the same scenario in your case ?\nperhaps a simple test db could used to resolve if this is the issue !\n\n\nRegards,\n Frank.\n\n\n",
"msg_date": "Thu, 27 Jul 2000 02:39:54 -0400",
"msg_from": "frank <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [GENERAL] Is Pg 7.0.x's Locking Mechanism BROKEN?"
},
{
"msg_contents": "Frank and Fabrice,\n\nIf you aren't having any luck generating a reproducible example of this\nproblem, you might try recompiling the backend with LOCK_DEBUG defined\nin src/include/config.h --- or just do\n\tgmake clean\n\tgmake PROFILE=-DLOCK_DEBUG all\nThis should produce pretty voluminous quantities of info in the\npostmaster's stdout/stderr log. Run the postmaster with -d2 so we\ncan see the related queries too, and then maybe the log will have enough\ninfo to tell something useful the next time you see it happen.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 27 Jul 2000 16:23:14 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Is Pg 7.0.x's Locking Mechanism BROKEN? "
},
{
"msg_contents": "Jan Wieck wrote:\n\n> frank wrote:\n> > Thanks Fabrice, that will help a lot.\n> >\n> > In my applications the conflict was not a direct table conflict e.g.\n> > USER1 locks Table1 record that references Table2 via foreign key with a\n> > cascade update/delete enforced then\n> > USER2 tried to lock Table2 for update on the referenced record - result both\n> > users locked !\n> >\n> > Is this the same scenario in your case ?\n> > perhaps a simple test db could used to resolve if this is the issue !\n>\n> Looks like a deadlock situation not seen by the deadlock\n> detection code. Unfortunately I'm not able to reproduce a\n> lockup with a simple test DB. Could you post a simple\n> (trans1 does ..., trans2 does ...) sample so we coule\n> reproduce such a lockup?\n\nHi Jan,\n\nI shall try to reproduce the lockup with -d2 debug level but, I am not sure this\nis the only\nlockup problem as it seems far to frequent twice today already and thats in only\n4 hours of use :(\n\nQ1. When a system task on a client gets killed how long is it before the database\nreleases it's record locks ?\n\nQ2. When the Postgres server is shutdown and re started shouldn't all the record\nlocks have been removed ?\n\nThis situation seems to be getting worse, now I am scared to leave the building.\n\nRegards,\n Frank.\n\n\n",
"msg_date": "Thu, 27 Jul 2000 22:10:43 -0400",
"msg_from": "frank <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Is Pg 7.0.x's Locking Mechanism BROKEN?"
}
] |
[
{
"msg_contents": "> SUPERUSER A special System Privilege,\n\nThis priv is usually called DBA\n\n> CREATE SESSION Permission to login. Checked after\n\nusually called CONNECT\n\nThe several CREATE privs are usually all granted with one grant \nRESOURCE statement\n\n> Pg_shadow is extended with an array, holding all the\n> groups the user belongs to. So after looking up the\n> user, all group relationships are known.\n\nImho it would be nice to have hierarchical groups.\nThat is a group can consist of users and/or other groups.\n\n> Two new system catalogs, pg_userprivilege and\n> pg_groupprivilege are created to hold the actual\n> privileges. They are members of the system cache for\n> fast lookup.\n\nI would probably stick to one table to hold the privs (e.g. pg_auth)\nthen you can get all privs for one object with one select.\nThere has been some previous discussion about the layout for such a \ntable.\n\n> The system will manage a stack, remembering nested\n> states of the effective user id. Calls through the\n> function manager can switch for- and backward to\n> another one, so prosetuid functions will inherit the\n> effective permissions of the function (trigger)\n> owner. The stack is reinitialized at transaction\n> aborts.\n\nSince we have such powerful extensibility I would also keep the \nOS user in mind. Imho the fmgr should also be capable of switching\nto another effective uid on the os level to call certain functions\nthat do something on the os level. (just keep in mind not implement now)\n\nAndreas\n",
"msg_date": "Wed, 26 Jul 2000 10:20:56 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: New Privilege model purposal"
}
] |
[
{
"msg_contents": "\n> The trouble with depending on WAL to handle undo of external \n> operations\n> (ie, filesystem calls as opposed to DB record updates) is \n> that you don't\n> know all the facts if you have to recover/undo the operation. \n> Consider\n> the following not-too-implausible example:\n> \n> \tbegin transaction;\n> \talter table foo rename to bar;\n> \tcreate table foo ...;\n> \tdelete table bar;\n> \t<crash>\n> \n> If we try to implement this by log entries, we will have log entries\n> for rename, create, delete.\n\nNo, you have to have two for each. One before and one after each execution.\n\n> We scan the log and come upon the rename.\n> Hmm, there's a file foo and no file bar ... looks like the \n> rename didn't get done, so do it. Ooops.\n\nNo again. You come upon \"starting rename operation\" and then either \n\tno more log records (backend abort)\nor \n\tlog record \"rename succeeded\"\nor\n\tlog record \"rename failed\" --> transaction abort\n\nIn this scenario you can decide what to do without second guessing.\n\n> Related nasty scenarios arise when there's a file there of the right\n> name but the wrong contents, created by non-database operations.\n> (Consider the risks involved with a table named \"core\", for example.)\n\nI have always been asking for an extension for different object files\nlike .dat .idx .tmp ... , but this problem is imho present with any filename\nbe it oid's or named files.\n\n> An even more serious problem is that you can't guarantee to be able\n> to either repeat or undo an external operation, because there are\n> factors not under your control (kernel permission checks, existing\n> files getting in the way, etc). Sure, failures like that are not\n> very likely, but that'll be cold comfort to someone whose database\n> gets corrupted because a file rename needs to be undone and can't be.\n\nImho in such an event I rather have my db bail out (or switch to readonly\nmode). \nAny further modifications would give me the shivers in such an unstable \nenvironment.\nThe dba then fixes the environment and restarts the postmaster.\n\n> \n> >> If *rename* is possible,are OID filenames necessary in the\n> >> first place ? \n> \n> > no\n\nthis was only an answer to the question, not a suggestion.\n\n> I think that OID filenames will be a far more reliable solution to\n> the alter-table-rename problem than anything that involves trying\n> to actually rename the files. There are other benefits too, like\n> not being tied to filesystem-based naming restrictions for tables.\n\nI was not arguing against oid filenames in this thread, only against \nthe addition of a version number in the filename.\n\nAndreas\n",
"msg_date": "Wed, 26 Jul 2000 10:44:22 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: Vacuum only with 20% old tuples "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> We scan the log and come upon the rename.\n>> Hmm, there's a file foo and no file bar ... looks like the \n>> rename didn't get done, so do it. Ooops.\n\n> No again. You come upon \"starting rename operation\" and then either \n> \tno more log records (backend abort)\n> or \n> \tlog record \"rename succeeded\"\n> or\n> \tlog record \"rename failed\" --> transaction abort\n\n> In this scenario you can decide what to do without second guessing.\n\nIf there are no more records, then you are reduced to guessing whether\nyou have to undo the rename or not. If you guess wrong, you leave the\ndatabase in a corrupted state.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 26 Jul 2000 10:30:57 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: Vacuum only with 20% old tuples "
}
] |
[
{
"msg_contents": "I was wondering if anyone could help me with the following questions.\nThey are all related to user defined types and functions.\n\n 1. Environment variables in function pathname. We would like to\nhave multiple environments (i.e. production, backup, reporting, test\netc) with each environment totally independent of the other\nenvironments. One thing that stands in the way of this is the absolute\npathname requirement in the CREATE FUNCTION syntax. Obtimally we would\nlike the following syntax to work:\n\n CREATE FUNCTION myfunc(mytype) RETURNS text AS\n'$HOME/lib/libmyso.so' LANGUAGE 'c':\n\n and have the environment variable $HOME \"lazy\" evaluated. I\nhave looked at the fmgr code and this doesn't look too difficult to add\nas long as I could get the $HOME past the parser. Has anyone thought\nabout this before? Is there another, better way to do this?\n\n 2. tid assignment - We make extensive use of user defined types.\nOne, fairly painful, thing we have noticed is the following sequence\nreally doesn't work very well:\n\n CREATE FUNCTION mytype_in(opaque) RETURNS mytype AS\n'/lib/libmyso.so' LANGUAGE 'c';\n CREATE FUNCTION mytype_out(opaque) RETURNS opaque AS\n'/lib/libmyso.so' LANGUAGE 'c';\n CREATE TYPE mytype (internallength = VARIABLE,\ninput=mytype_in, output=mytype_out);\n CREATE TABLE mytable (t mytype);\n DROP TYPE mytype;\n then create the type again\n\n The reason for possibly wanting to do this is to fix a problem\nwith the implementation of the type mytype. The reason this doesn't\nseem to work is that the definition of mytable \"knows\" the TypeID of\nmytype and, because it got dropped and recreated, the TypeID is now\ndifferent. So the question is, is there a way to modify the definition\nof a type without dropping and recreating all of the tables that use the\ntype.\n\n 3. fid assignment - Basically the same question as above but with\nfunctions instead of types. If there is an index that uses a function,\nit appears that you can't drop and re-create the function without\nblowing away the index definition.\n\nThank you,\nJeff Collins\n\n\n",
"msg_date": "Wed, 26 Jul 2000 09:03:28 -0400",
"msg_from": "Jeffery Collins <[email protected]>",
"msg_from_op": true,
"msg_subject": "Some questions on user defined types and functions."
},
{
"msg_contents": "Jeffery Collins wrote:\n\n> I was wondering if anyone could help me with the following questions.\n> They are all related to user defined types and functions.\n>\n> 1. Environment variables in function pathname. We would like to\n> have multiple environments (i.e. production, backup, reporting, test\n> etc) with each environment totally independent of the other\n> environments. One thing that stands in the way of this is the absolute\n> pathname requirement in the CREATE FUNCTION syntax. Obtimally we would\n> like the following syntax to work:\n>\n> CREATE FUNCTION myfunc(mytype) RETURNS text AS\n> '$HOME/lib/libmyso.so' LANGUAGE 'c':\n>\n> and have the environment variable $HOME \"lazy\" evaluated. I\n> have looked at the fmgr code and this doesn't look too difficult to add\n> as long as I could get the $HOME past the parser. Has anyone thought\n> about this before? Is there another, better way to do this?\n>\n> 2. tid assignment - We make extensive use of user defined types.\n> One, fairly painful, thing we have noticed is the following sequence\n> really doesn't work very well:\n>\n> CREATE FUNCTION mytype_in(opaque) RETURNS mytype AS\n> '/lib/libmyso.so' LANGUAGE 'c';\n> CREATE FUNCTION mytype_out(opaque) RETURNS opaque AS\n> '/lib/libmyso.so' LANGUAGE 'c';\n> CREATE TYPE mytype (internallength = VARIABLE,\n> input=mytype_in, output=mytype_out);\n> CREATE TABLE mytable (t mytype);\n> DROP TYPE mytype;\n> then create the type again\n>\n> The reason for possibly wanting to do this is to fix a problem\n> with the implementation of the type mytype. The reason this doesn't\n> seem to work is that the definition of mytable \"knows\" the TypeID of\n> mytype and, because it got dropped and recreated, the TypeID is now\n> different. So the question is, is there a way to modify the definition\n> of a type without dropping and recreating all of the tables that use the\n> type.\n>\n> 3. fid assignment - Basically the same question as above but with\n> functions instead of types. If there is an index that uses a function,\n> it appears that you can't drop and re-create the function without\n> blowing away the index definition.\n>\n\nNever mind on questions 2 and 3. I figured out the answer. It seems the\nway to do this is to update the system tables (pg_attributes, pg_index,\netc.) to refer to the new oids instead of old oids.\n\nI would still appreciate any thoughts on using environment variables in\nfunction paths.\n\n>\n> Thank you,\n> Jeff Collins\n\n",
"msg_date": "Wed, 26 Jul 2000 09:58:27 -0400",
"msg_from": "Jeffery Collins <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Some questions on user defined types and functions."
},
{
"msg_contents": "Tom Lane wrote:\n\n> Jeffery Collins <[email protected]> writes:\n> > like the following syntax to work:\n>\n> > CREATE FUNCTION myfunc(mytype) RETURNS text AS\n> > '$HOME/lib/libmyso.so' LANGUAGE 'c':\n>\n> > and have the environment variable $HOME \"lazy\" evaluated. I\n> > have looked at the fmgr code and this doesn't look too difficult to add\n> > as long as I could get the $HOME past the parser.\n>\n> The parser doesn't know a thing about that, it's just seeing a string\n> literal. I think hacking in dfmgr.c would be sufficient. Whether it's\n> a good idea is another question --- you realize you'd be dealing with\n> postmaster environment variables, right, not those of the connected\n> user? The way we handle this in the distribution is by substituting\n> appropriate strings into a script before it's handed to psql; see the\n> regression tests directory for examples.\n>\n\nYes, I want the backend's environment to be used, so this is what I want.\nIt looks like a pretty simple change. I'm going to give it a shot. Whether\nor not it is something y'all want for the main distribution is, of course,\nup to you.\n\n>\n> > 3. fid assignment - Basically the same question as above but with\n> > functions instead of types. If there is an index that uses a function,\n> > it appears that you can't drop and re-create the function without\n> > blowing away the index definition.\n>\n> I think it would be a really bad idea to allow recycling of type and\n> function OIDs for what might be completely incompatible objects. But\n> something that's been on the TODO list for a while is to create an ALTER\n> FUNCTION command that would replace the body of an existing function\n> without changing the declared signature (parameters and return type).\n> That seems relatively safe, and it'd be awfully handy. Want to have a\n> go at it?\n>\n> regards, tom lane\n>\n> PS: you do realize that revising the function on which an index is\n> based probably renders the index useless anyway? Unless you can\n> guarantee that none of the stored values change...\n\nI agree it is a really bad idea, but sometimes bad things happen to good\ndatabases. I am really just attempting to figure out how to recover if\nsomeone accidently types a DROP TABLE or DROP FUNCTION command or (as\nactually did happen) needs to change the function's path. Assuming the\nreCREATEd TABLE and/or FUNCTION matches the old ones, it looks like updating\nthe oid references in the relevant system tables to point to the new TABLE\nand/or FUNCTION oids works just fine.\n\nAs far as looking at the ALTER FUNCTION command, I can't promise anything (I\nhave a lot of work commitments and a vacation coming up), but I will take a\nlook at it.\n\nThank you,\nJeff\n\n\n",
"msg_date": "Wed, 26 Jul 2000 10:37:26 -0400",
"msg_from": "Jeffery Collins <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Some questions on user defined types and functions."
},
{
"msg_contents": "Jeffery Collins <[email protected]> writes:\n> like the following syntax to work:\n\n> CREATE FUNCTION myfunc(mytype) RETURNS text AS\n> '$HOME/lib/libmyso.so' LANGUAGE 'c':\n\n> and have the environment variable $HOME \"lazy\" evaluated. I\n> have looked at the fmgr code and this doesn't look too difficult to add\n> as long as I could get the $HOME past the parser.\n\nThe parser doesn't know a thing about that, it's just seeing a string\nliteral. I think hacking in dfmgr.c would be sufficient. Whether it's\na good idea is another question --- you realize you'd be dealing with\npostmaster environment variables, right, not those of the connected\nuser? The way we handle this in the distribution is by substituting\nappropriate strings into a script before it's handed to psql; see the\nregression tests directory for examples.\n\n> 3. fid assignment - Basically the same question as above but with\n> functions instead of types. If there is an index that uses a function,\n> it appears that you can't drop and re-create the function without\n> blowing away the index definition.\n\nI think it would be a really bad idea to allow recycling of type and\nfunction OIDs for what might be completely incompatible objects. But\nsomething that's been on the TODO list for a while is to create an ALTER\nFUNCTION command that would replace the body of an existing function\nwithout changing the declared signature (parameters and return type).\nThat seems relatively safe, and it'd be awfully handy. Want to have a\ngo at it?\n\n\t\t\tregards, tom lane\n\nPS: you do realize that revising the function on which an index is\nbased probably renders the index useless anyway? Unless you can\nguarantee that none of the stored values change...\n",
"msg_date": "Wed, 26 Jul 2000 11:12:08 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Some questions on user defined types and functions. "
},
{
"msg_contents": "Jeffery Collins wrote:\n> I was wondering if anyone could help me with the following questions.\n> They are all related to user defined types and functions.\n>\n> 1. Environment variables in function pathname. We would like to\n> [...]\n\n Create your SQL scripts that define the functions in a make\n step, invoking sed(1) to substitute a constant string with\n the content of an environment variable. This worked for the\n past 20 years and I'm sure it's extremely portable.\n\n> 2. tid assignment - We make extensive use of user defined types.\n> One, fairly painful, thing we have noticed is the following sequence\n> really doesn't work very well:\n>\n> [...]\n>\n> The reason for possibly wanting to do this is to fix a problem\n> with the implementation of the type mytype.\n\n You don't need to DROP and reCREATE the functions and type if\n you just fixed some bug in the C coding. Recompile it,\n replace the shared object and reconnect to the database. The\n new backend (you get at reconnect) will load in the new\n shared module and use the new code.\n\n> 3. fid assignment - Basically the same question as above but with\n> functions instead of types. If there is an index that uses a function,\n> it appears that you can't drop and re-create the function without\n> blowing away the index definition.\n\n Same as 2.\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, 26 Jul 2000 21:17:15 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Some questions on user defined types and functions."
},
{
"msg_contents": "Jeffery Collins <[email protected]> writes:\n>>>> like the following syntax to work:\n>> \n>>>> CREATE FUNCTION myfunc(mytype) RETURNS text AS\n>>>> '$HOME/lib/libmyso.so' LANGUAGE 'c':\n>> \n>>>> and have the environment variable $HOME \"lazy\" evaluated. I\n>>>> have looked at the fmgr code and this doesn't look too difficult to add\n>>>> as long as I could get the $HOME past the parser.\n\n> I have made the changes necessary to allow environment variables to be\n> entered and expanded in file names. Two files had to be changed\n> backend/commands/define.c and backend/utils/fmgr/dfmgr.c. Assuming you are\n> interested in the change,\n\nWell, that's a good question. Does anyone else have an opinion on\nwhether this would be a good/bad/indifferent feature? We've seen\nproblems in the past caused by depending on postmaster environment\nvariables (restart the postmaster with different environment than\nusual, things mysteriously break). So I'm inclined to feel that adding\nmore dependence on them isn't such a hot idea. But I'm not going to\nveto it if there's interest in the feature from other people.\n\n> what is the proper way to build a patch file that\n> contains the changes? I have never done this before.\n\n\"diff -c\" against current sources, done so that the correct file\npathnames are visible in the diff output; that is, cd to top level\nof distribution tree and do something like\ndiff -c src/backend/utils/fmgr/dfmgr.c.orig src/backend/utils/fmgr/dfmgr.c\nDon't forget to include diffs for documentation updates, as well.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 26 Jul 2000 17:50:43 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Some questions on user defined types and functions. "
},
{
"msg_contents": "It would seem that it wouldn't break anyone's existing setup, since \nyou couldn't have an env variable in there anyway. (No one really \nhas a directory called $HOME, I hope!)\n\nSo, perhaps it could just be something in the documentation that \nhas a stern warning about watching your consistency. Caveat \nhacker and all that.\n\nOn 26 Jul 2000, at 17:50, Tom Lane wrote:\n\n> Jeffery Collins <[email protected]> writes:\n> >>>> like the following syntax to work:\n> >> \n> >>>> CREATE FUNCTION myfunc(mytype) RETURNS text AS\n> >>>> '$HOME/lib/libmyso.so' LANGUAGE 'c':\n> >> \n> >>>> and have the environment variable $HOME \"lazy\" evaluated. I have\n> >>>> looked at the fmgr code and this doesn't look too difficult to\n> >>>> add as long as I could get the $HOME past the parser.\n> \n> > I have made the changes necessary to allow environment variables to\n> > be entered and expanded in file names. Two files had to be changed\n> > backend/commands/define.c and backend/utils/fmgr/dfmgr.c. Assuming\n> > you are interested in the change,\n> \n> Well, that's a good question. Does anyone else have an opinion on\n> whether this would be a good/bad/indifferent feature? We've seen\n> problems in the past caused by depending on postmaster environment\n> variables (restart the postmaster with different environment than\n> usual, things mysteriously break). So I'm inclined to feel that\n> adding more dependence on them isn't such a hot idea. But I'm not\n> going to veto it if there's interest in the feature from other people.\n> \n> > what is the proper way to build a patch file that\n> > contains the changes? I have never done this before.\n> \n> \"diff -c\" against current sources, done so that the correct file\n> pathnames are visible in the diff output; that is, cd to top level of\n> distribution tree and do something like diff -c\n> src/backend/utils/fmgr/dfmgr.c.orig src/backend/utils/fmgr/dfmgr.c\n> Don't forget to include diffs for documentation updates, as well.\n> \n> regards, tom lane\n\n\n--\nJoel Burton, Director of Information Systems -*- [email protected]\nSupport Center of Washington (www.scw.org)\n",
"msg_date": "Wed, 26 Jul 2000 18:46:08 -0400",
"msg_from": "\"Joel Burton\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Some questions on user defined types and functions. "
},
{
"msg_contents": "Tom Lane wrote:\n> Jeffery Collins <[email protected]> writes:\n> > what is the proper way to build a patch file that\n> > contains the changes? I have never done this before.\n>\n> \"diff -c\" against current sources, done so that the correct file\n> pathnames are visible in the diff output; that is, cd to top level\n> of distribution tree and do something like\n\n For the past years I do a\n\n cp -R src src.orig\n\n after the configure step. Whatever I do in the sources, a\n\n diff -cr src src.orig\n\n in the toplevel directory gives me a patch I can apply to my\n CVS checkout. With this I can never forget a single source\n file touched.\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": "Thu, 27 Jul 2000 00:52:54 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Some questions on user defined types and functions."
},
{
"msg_contents": "> Well, that's a good question. Does anyone else have an opinion on\n> whether this would be a good/bad/indifferent feature? We've seen\n> problems in the past caused by depending on postmaster environment\n> variables (restart the postmaster with different environment than\n> usual, things mysteriously break). So I'm inclined to feel that adding\n> more dependence on them isn't such a hot idea. But I'm not going to\n> veto it if there's interest in the feature from other people.\n\nAs usual, I would like to see *more* support for environment variables\netc. This would fall into that category. You can choose to use it, or\nchoose to not, but the system has *more* flexibility when all is said\nand done.\n\nThere is code in the postmaster which does the same thing, nearly. You\nmight want to check out the implementation there...\n\n - Thomas\n",
"msg_date": "Thu, 27 Jul 2000 05:52:27 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Some questions on user defined types and functions."
},
{
"msg_contents": "I moved the discussion from General to Hackers, as I am getting into actual\ncode changes now. I hope this is appropriate.\n\nJeff\n\n\nThomas Lockhart wrote:\n\n>\n> There is code in the postmaster which does the same thing, nearly. You\n> might want to check out the implementation there...\n>\n> - Thomas\n\nI'm not exactly sure which code you are referring to. I did see the\nfollowing places where environment variables in paths are expanded:\n\nbackend/utils/adt/filename.c:\n After I looked at this code for a while, I decided I didn't like it\nenough to use. My biggest concern with this code is that it only allows one\nenvironment variable at the beginning of the path. For example,\n$PGHOME/rest/of/path is allowed, but $PGHOME/version_$VER/path is not\nallowed.\n\nbackend/utils/misc/database.c:\n This code is only applicable to finding the path to the database\ndirectory. It has a hardwired 'base' in the expanded pathname. Also only\nenvironment variables in the beginning of the path are supported.\n\nIf y'all want the code, here are the diffs. The are from 7.0.2. I made,\nwhat I think, are the appropriate changes to the documentation. I do not\nhave a way to build the documentation so I can't see how my changes actually\nlook - I hope they are appropriately formatted.\n\nJeff",
"msg_date": "Thu, 27 Jul 2000 09:55:02 -0400",
"msg_from": "Jeffery Collins <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [GENERAL] Some questions on user defined types and functions."
},
{
"msg_contents": "> I moved the discussion from General to Hackers, as I am getting into actual\n> code changes now. I hope this is appropriate.\n\nYup.\n\n> I'm not exactly sure which code you are referring to. I did see the\n> following places where environment variables in paths are expanded:\n...\n> backend/utils/misc/database.c:\n> This code is only applicable to finding the path to the database\n> directory. It has a hardwired 'base' in the expanded pathname. Also only\n> environment variables in the beginning of the path are supported.\n\nThis is the one I was thinking of. The \"leading envar\" is pretty\nunambiguous; allowing them farther into the string will restrict paths\nfrom having a dollar sign (not terribly important, but it is an obscure\nrestriction). Also, and probably more important, by requiring that the\nenvar be in the first position it is a simple one-byte comparison to see\nif any expansion *may* need to be done. So the performance is not\naffected at all if no environment variable is used.\n\n> If y'all want the code, here are the diffs. The are from 7.0.2. I made,\n> what I think, are the appropriate changes to the documentation. I do not\n> have a way to build the documentation so I can't see how my changes actually\n> look - I hope they are appropriately formatted.\n\nThanks. Shall we tweak it to support the same conventions as for the\nother cases (leading envar only)? It will remove any possible objection\nregarding efficiency, and it will conform to the other usages (btw, the\n\"hardwired 'base/' in the database.c example could/should be considered\na security feature since it requires a well-formed directory structure).\n\n - Thomas\n",
"msg_date": "Fri, 28 Jul 2000 02:33:01 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [GENERAL] Some questions on user defined types and functions."
},
{
"msg_contents": "Thomas Lockhart wrote:\n\n> > I'm not exactly sure which code you are referring to. I did see the\n> > following places where environment variables in paths are expanded:\n> ...\n> > backend/utils/misc/database.c:\n> > This code is only applicable to finding the path to the database\n> > directory. It has a hardwired 'base' in the expanded pathname. Also only\n> > environment variables in the beginning of the path are supported.\n>\n> This is the one I was thinking of. The \"leading envar\" is pretty\n> unambiguous; allowing them farther into the string will restrict paths\n> from having a dollar sign (not terribly important, but it is an obscure\n> restriction). Also, and probably more important, by requiring that the\n> envar be in the first position it is a simple one-byte comparison to see\n> if any expansion *may* need to be done. So the performance is not\n> affected at all if no environment variable is used.\n>\n> > If y'all want the code, here are the diffs. The are from 7.0.2. I made,\n> > what I think, are the appropriate changes to the documentation. I do not\n> > have a way to build the documentation so I can't see how my changes actually\n> > look - I hope they are appropriately formatted.\n>\n> Thanks. Shall we tweak it to support the same conventions as for the\n> other cases (leading envar only)? It will remove any possible objection\n> regarding efficiency, and it will conform to the other usages (btw, the\n> \"hardwired 'base/' in the database.c example could/should be considered\n> a security feature since it requires a well-formed directory structure).\n>\n> - Thomas\n\nFeel free to change so that the envar must be leading. It is definitely easier\ncode with this restriction and definately faster.\n\nIf you want, I will make the change. If the restriction is desired, I can make\nthe code in database.c and my code common.\n\nJeff\n\n\n",
"msg_date": "Fri, 28 Jul 2000 00:30:50 -0400",
"msg_from": "Jeffery Collins <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Re: [GENERAL] Some questions on user defined types and functions."
},
{
"msg_contents": "> If you want, I will make the change. If the restriction is desired, I can \n> make the code in database.c and my code common.\n\nOoh. That sounds like a great offer. You are welcome to do the work :)\n\nSo, we will end up with a routine which will take a string, check for a\nleading environment variable, and expand the envar if necessary? And we\nwill use that in two places?\n\nistm that the above will require some memory allocation at times. I\nhaven't checked to see if the memory context or states for both cases\nare compatible. If they aren't, then feel free to bring along two sets\nof code.\n\nRegards.\n\n -Thomas\n",
"msg_date": "Fri, 28 Jul 2000 14:41:11 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [GENERAL] Some questions on user defined types and functions."
}
] |
[
{
"msg_contents": "Hello,\n\nI have started a free auction system project at http://www.apartia.org\nwhich is closely tied to PostgreSQL. \n\nThe system is voluntarily closely tied to Postgres for several reasons:\n\n- political decision to support free DB, Postgres being the only one\n with advanced features;\n- take advantage of Postgres' advanced features (C triggers and\n functions, notify, foreign keys, etc.)\n- gather interest, support and guidance from the Postgres community to\n help out with the DB part of the project;\n- be a showcase of Postgres capabilities;\n\nOur goal is to replicate one by one all of the commercial auction\nsystems functionalities.\n\nWe want to program as much functionality as possible on the DB side with\nfunctions and triggers so that other interfaces can be plugged into the\nsystem besides a web interface (a java or GTK auction client, etc.).\n\nInformation about the project is available at:\n\nhttp://www.apartia.org/Project/\n\nwhere details about CVS access and mailing list are provided.\n\nSuggestions, criticism, comments welcome.\n\nCheers,\n\n-- \nLouis-David Mitterrand - [email protected] - http://www.apartia.org\n\n \"If you're not having fun right now, you're wasting your time.\"\n",
"msg_date": "Wed, 26 Jul 2000 15:08:54 +0200",
"msg_from": "Louis-David Mitterrand <[email protected]>",
"msg_from_op": true,
"msg_subject": "free auction project with Postgres"
},
{
"msg_contents": "Louis-David Mitterrand wrote:\n> \n> Hello,\n> \n> I have started a free auction system project at http://www.apartia.org\n> which is closely tied to PostgreSQL.\n\n (snip)\n\n> Our goal is to replicate one by one all of the commercial auction\n> systems functionalities.\n\nWow! This post just sent the Nasdaq into a tailspin! Ebay is off more\nthan 5 points! :-)\n\n-- \n\nRon Peterson\nSystems Manager\nWallace Floyd Design Group\n273 Summer Street\nBoston, MA 02210\n617.350.7400 tel\n617.350.0051 fax\[email protected]\n",
"msg_date": "Wed, 26 Jul 2000 10:39:30 -0400",
"msg_from": "Ron Peterson <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: free auction project with Postgres"
}
] |
[
{
"msg_contents": "\n> Zeugswetter Andreas SB <[email protected]> writes:\n> >> We scan the log and come upon the rename.\n> >> Hmm, there's a file foo and no file bar ... looks like the \n> >> rename didn't get done, so do it. Ooops.\n> \n> > No again. You come upon \"starting rename operation\" and then either \n> > \tno more log records (backend abort)\n> > or \n> > \tlog record \"rename succeeded\"\n> > or\n> > \tlog record \"rename failed\" --> transaction abort\n> \n> > In this scenario you can decide what to do without second guessing.\n> \n> If there are no more records, then you are reduced to guessing whether\n> you have to undo the rename or not. If you guess wrong, you leave the\n> database in a corrupted state.\n\nIf the original filename exists the rename failed else it succeeded.\nThe backends could not have created a new file of the old name\nafter \"starting rename\" beeing last log record. \n\nAndreas\n",
"msg_date": "Wed, 26 Jul 2000 17:09:17 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: AW: Vacuum only with 20% old tuples "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> If there are no more records, then you are reduced to guessing whether\n>> you have to undo the rename or not. If you guess wrong, you leave the\n>> database in a corrupted state.\n\n> If the original filename exists the rename failed else it succeeded.\n\nThat's exactly the unreliable assumption I do not want to make.\n\n> The backends could not have created a new file of the old name\n> after \"starting rename\" beeing last log record. \n\nSo you're assuming that we fsync() the log after *each* item is added?\n*Within* a transaction? fsync only at end of xact was the plan,\nI believe.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 26 Jul 2000 11:18:06 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: AW: Vacuum only with 20% old tuples "
}
] |
[
{
"msg_contents": "Fabrice Scemama wrote:\n\n> Hello;\n>\n> we've been using Postgres for nearly 2 years now, and have\n> followed updgrades, from 6.4.2 to 7.0.2. Our applications\n> are mainly shell scripts, and CGI. All is done in perl.\n> We have long, heavy, and simultaneous transactions.\n>\n> With 7.0.x versions, we've come across a problem, new for us:\n> very often (2 or 3 times a day), there are on our Pg machine\n> a dozen of 'update waiting', and our perl scripts are waiting\n> too to begin a transaction. So many postgres are running, than\n> no other one can be added; only SELECTs continue to be possible.\n> We finally have to restart Postgres; but even if we kill\n> postmaster's process, there still are postgres processes runnings,\n> and they have to be killed too! Definitely not working.\n>\n> We've been looking for solutions for a few weeks, and even\n> decided to move Pg from a satured PIII 650 to a DEC Alpha 500mhz,\n> where Postgres is the only application to run.\n> So far, we haven't found any workaround, and the hangings have\n> been quite nasty for our project.\n>\n> Yesterday, I moved back our DB to Pg 6.5.3, and yes, now\n> everything works fine again (it's slower, but it works).\n> And vacuums don't hang the postmaster any more.\n>\n> So, I've got 2 questions:\n> - Am I the only one here to have such problems with 7.0.2?\n> - Is 7.0.2 broken?\n>\n> Regards\n> Fabrice Scemama\n\nI saw this problem just last night, exactly the same, I couldn't vacuum,\n\nI shutdown the server but there\nwhere still postmasters running - I killed them, restarted but the locks\n\nwhere still in place but, in my\ncase even if I selected the affected record psql would hang. The only\nway I managed to recover was to\nshutdown the server completely - pgdump the database - drop it -\ncreateit - pgload it, now its working again.\nI too never had this problem with 6.5.3, this was the second time for me\n\nthe first time I put it down to a 'c'\nfunction I was playing with but I was not even logged it this time.\nIt seem that two people accessed the same record that started the\nproblem !\n\nRegards,\n Frank.\n\n\n\n\n",
"msg_date": "Wed, 26 Jul 2000 22:01:34 -0400",
"msg_from": "frank <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [GENERAL] Is Pg 7.0.x's Locking Mechanism BROKEN?"
}
] |
[
{
"msg_contents": "I'm wondering why insert doesn't temporarily ignore foreign key\nconstraints until after the rows are inserted and then check referential\nintegrity. If the inserted rows are invalid, then simply rollback the\ntransaction.\n\nThis might make more sense with an example:\n\nI was rebuilding some tables to use foreign keys and found that\ninserting several million rows into a new table with a foreign key\nconstraint is prohibitively slow (I killed it after > 24 hours). My\nguess is that the trigger is called repeatedly as each row is inserted. \nInserting the rows into the new table without the key constraint takes\nseveral minutes. I can then add the constraint to the new table using\n\"alter table ... add constraint\". Adding the constraint takes some time\nas the column with the foreign key constraint must be checked for\nreferential integrity. However, the sum of 1) inserting the rows and 2)\nadding the constraint is much less than inserting the rows while the\nconstraint is in force. It seems that these could be equal if you\ndidn't trigger the constraint after each row insertion, but instead\nwaited until all the rows were inserted (remember this is all within a\nsingle insert command and therefore within a single transaction) to\ncheck referential integrity. Does this make sense?\n\nTim\n\n-- \nTimothy H. Keitt\nNational Center for Ecological Analysis and Synthesis\n735 State Street, Suite 300, Santa Barbara, CA 93101\nPhone: 805-892-2519, FAX: 805-892-2510\nhttp://www.nceas.ucsb.edu/~keitt/\n",
"msg_date": "Wed, 26 Jul 2000 19:04:44 -0700",
"msg_from": "\"Timothy H. Keitt\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "faster insert with foreign key constraint?"
}
] |
[
{
"msg_contents": "\n> Zeugswetter Andreas SB <[email protected]> writes:\n> >> If there are no more records, then you are reduced to \n> guessing whether\n> >> you have to undo the rename or not. If you guess wrong, \n> you leave the\n> >> database in a corrupted state.\n> \n> > If the original filename exists the rename failed else it succeeded.\n> \n> That's exactly the unreliable assumption I do not want to make.\n> \n> > The backends could not have created a new file of the old name\n> > after \"starting rename\" beeing last log record. \n> \n> So you're assuming that we fsync() the log after *each* item is added?\n> *Within* a transaction? fsync only at end of xact was the plan,\n> I believe.\n\nWith trx log we imho would not need any fsyncs anymore\n(except maybe checkpoints).\nWe would open the trxlog file with O_SYNC and only do a write\nwhen it is absolutely necessary (buffer overflow, end of trx).\nBut yes the rename log entries (only those) would need to be \nwritten immediately. Is this a performance issue? I guess not.\n\nAndreas\n",
"msg_date": "Thu, 27 Jul 2000 10:09:29 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: AW: AW: Vacuum only with 20% old tuples "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n> But yes the rename log entries (only those) would need to be \n> written immediately. Is this a performance issue? I guess not.\n\nTwo fsyncs per rename is probably not a performance killer, but you'd\nhave to also fsync log entries for file creates and deletes, which\nmight be a bigger deal.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 27 Jul 2000 10:03:42 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: AW: AW: Vacuum only with 20% old tuples "
}
] |
[
{
"msg_contents": "\n> > TOAST is now vacuum-safe. When needed, the toaster creates a\n> > second heap tuple, containing only plain or compressed\n> > values. This one is then returned by the heap access methods\n> > to the caller, so indices will never contain external\n> > references.\n> > \n> > The changes are covered by #ifdef TOAST_INDICES, so can\n> > easily be disabled at the time we have file versioning and\n> > can recreate indices during vacuum.\n> \n> Seems this has some performance advantages. Un-toasting to traverse a\n> btree index would be pretty slow. This way, it is all in the index.\n\nYes, but it limits the key size. I was suggesting to Jan, that he reconsider\nthe \"toast choice made for the heap tuple\" for each index key, and store the\nkey \ncompressed if it fits into 1/4 page.\n\nI think the current setup (index toasting disabled) must be a lot better\nperformance \nwise than if you enable the current \"index toasting\" state of things.\n\nAndreas\n\n",
"msg_date": "Thu, 27 Jul 2000 10:21:47 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: TOAST & vacuum"
}
] |
[
{
"msg_contents": "\nCan anybody tell me, how I can insert text data larger then 20k in database \nwihtout using large objects?\n\n Vladimir\n\n\n",
"msg_date": "Thu, 27 Jul 2000 11:36:28 +0300",
"msg_from": "\"Vladimir Terziev\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Large text insertion"
}
] |
[
{
"msg_contents": "Hi all,\n\nI'm banging my head over this one:\n\nI want to set a table like this:\nCREATE TABLE readers (\nname varchar not null primary key,\ndocuments int[]);\n\nwhere name is the name of a reader and documents a list of documents he\ncan access.\n\nSo it's easy to say: hi, you're authorized to read his, this and this.\n\nNow I want to know who can read document x (there can be sevral readers\nfor a single doc)\n\nI also want to put referencial integrity in that each document listed has\nto be in a documents table.\n\nHow can I do that?\n\nMaybe the simplest solution is one row per reader/document. \n\nAny clues?\n-- \nOlivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\nQuartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n31190 AUTERIVE +33-6-07-63-80-64 (GSM)\nFRANCE Email: [email protected]\n------------------------------------------------------------------------------\nMake your life a dream, make your dream a reality. (St Exupery)\n\n",
"msg_date": "Thu, 27 Jul 2000 13:00:04 +0200 (MET DST)",
"msg_from": "Olivier PRENANT <[email protected]>",
"msg_from_op": true,
"msg_subject": "Arrays how to..."
}
] |
[
{
"msg_contents": "\n\n> Zeugswetter Andreas SB <[email protected]> writes:\n> > Why do you declare dlopen, dlsym, ... in dynamic_loader.h ?\n> > They are defined in the port specific dynloader.h .\n> > Why do you use \"void pg_dlclose\" when dlclose is \"int dlclose\" ?\n> > This makes a wrapper function necessary.\n> \n> It seems to me that the real problem here is that someone tried to\n> take shortcuts in the AIX dynloader code.\n\nactually most other ports do it that way. e.g. FreeBSD\nso I guess that is why it is done like that. The aix.c and aix.h\nwhere originally generic files to support the usual dl... functions,\nand thus had no connex to postgres. I would like to keep it that way\nsince aix now has it's own libdl.a with the functions making them obsolete\n(they have problems accessing exported global variables though,\nhave to look deeper).\n\n> Instead of implementing\n> the same interface that the rest of the ports support, the AIX files\n> try to force their own definition of the pg_dlXXX functions --- and\n> for what? To save a wrapper function? These are hardly performance-\n> critical routines, so I don't see the point.\n\nYes.\n\n> \n> I propose the following changes instead. I don't have any way to\n> test them however --- would you check them?\n\nWith the modification below it works, yes. \n\n> \n> \t\t\tregards, tom lane\n> \n> *** aix.h~\tMon Jul 17 00:40:12 2000\n> --- aix.h\tMon Jul 17 00:41:34 2000\n> ***************\n> *** 45,56 ****\n> \n> #ifdef __cplusplus\n> }\n> - \n> #endif\n> - \n> - #define pg_dlopen(f)\tdlopen(filename, RTLD_LAZY)\n> - #define pg_dlsym(h,f)\tdlsym(h, f)\n> - #define pg_dlclose(h)\tdlclose(h)\n> - #define pg_dlerror()\tdlerror()\n> \n> #endif\t /* __dlfcn_h__ */\n> --- 45,50 ----\n> *** aix.c~\tMon Jul 17 00:40:19 2000\n> --- aix.c\tMon Jul 17 00:45:34 2000\n\nalso #include \"utils/dynamic_loader.h\" for PGFunction\n\n> ***************\n> *** 601,603 ****\n> --- 601,631 ----\n> \tfree(buf);\n> \treturn ret;\n> }\n> + \n> + /*\n> + * PostgreSQL interface to the above functions\n> + */\n> + \n> + void *\n> + pg_dlopen(char *filename)\n> + {\n> + \treturn dlopen(filename, RTLD_LAZY);\n> + }\n> + \n> + PGFunction\n> + pg_dlsym(void *handle, char *funcname)\n> + {\n> + \treturn (PGFunction) dlsym(handle, funcname);\n> + }\n> + \n> + void\n> + pg_dlclose(void *handle)\n> + {\n> + \tdlclose(h);\n\nyou mean: dlclose(handle);\n\n> + }\n> + \n> + char *\n> + pg_dlerror()\n> + {\n> + \treturn dlerror();\n> + }\n>\n\nAndreas \n",
"msg_date": "Thu, 27 Jul 2000 15:20:18 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: fmgr changes not yet ported to AIX "
},
{
"msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n>> It seems to me that the real problem here is that someone tried to\n>> take shortcuts in the AIX dynloader code.\n\n> actually most other ports do it that way. e.g. FreeBSD\n> so I guess that is why it is done like that.\n\nHmm, good point. I wonder why we don't see problems with them? Perhaps\nthe underlying functions have the right signatures on those platforms.\n\n>> + void\n>> + pg_dlclose(void *handle)\n>> + {\n>> + \tdlclose(h);\n\n> you mean: dlclose(handle);\n\nOoops :-(. Thanks for the correction.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 27 Jul 2000 09:53:27 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: AW: AW: fmgr changes not yet ported to AIX "
}
] |
[
{
"msg_contents": "\n> > But yes the rename log entries (only those) would need to be \n> > written immediately. Is this a performance issue? I guess not.\n> \n> Two fsyncs per rename is probably not a performance killer, but you'd\n> have to also fsync log entries for file creates and deletes, which\n> might be a bigger deal.\n\nI am not sure, but I don't think those are necessary,\nonly if you want to guarantee no leftover files on backend abort.\nI agree that create/delete would be critical to performance.\n\nAndreas\n",
"msg_date": "Thu, 27 Jul 2000 16:22:41 +0200",
"msg_from": "Zeugswetter Andreas SB <[email protected]>",
"msg_from_op": true,
"msg_subject": "AW: AW: AW: AW: AW: Vacuum only with 20% old tuples "
}
] |
[
{
"msg_contents": "I've been trying to work on a system of using classes as a variation on \nnormalization of data.\n\nHowever, I've run into a really frustrating problem. I had posted this \npreviously but not in this form to the PGSQL SQL list.\n\n From that posting...\n--begin--\ncreate table foo (id int8);\ncreate table bar1 (name text) inherits (foo);\ncreate table bar2 (data text) inherits (foo);\ncreate table hybrid ( ) inherits (bar1, bar2);\n\nINSERT INTO foo VALUES (1);\nINSERT INTO bar1 VALUES (2,'myname');\nINSERT INTO bar2 VALUES (3,'mydata');\nINSERT INTO hybrid VALUES (4,'morename','moredata');\n\n\n\nI want to do a SELECT * FROM foo*; but I only get the 'id' column as in :\n\nid\n---\n 1\n 2\n 3\n 4\n\n\n\nWhat would be the query to get the following table or a magical way to \nexpand children?\n\nI had originally hoped that SELECT * FROM foo* would yield the following, \nbut it's not so.\n\nid | name | data\n---+------------+-------------\n 1 | null | null\n 2 | 'myname' | null\n 3 | null | 'mydata'\n 4 | 'morename' | 'moredata'\n\n--end--\n\nI can get the same result by doing the following query...\n\nSELECT * FROM hybrid UNION \\\n (SELECT id,null,data FROM bar2) UNION \\\n (SELECT id,name,null FROM bar1) UNION \\\n (SELECT id,null,null FROM foo)\n\nWhat I would like to suggest although it may be too much or a little odd is \nto have the column listing expanded based on the children. I have been \nunable to construct a query or function that would run through based on the \nclass/table name and return this.\n\nWhat if following a class/table by + did this.\n\nFor example the above query could be produced by the following statement:\n SELECT * FROM foo+\n\nThe pattern I noticed it works best starting from the farthest \nchild(ren). However, I also observed this could be really awkward \ndepending on the number of columns ancestors had. And, the table \n\"hybrid\" was unique in that it inherited all from a common set \nof parents. It would be different if the farthest branches merged or if a \nbranch contained a different data type in the same column namespace.\n\nI did figure a methodology on solving it:\n\n1. get the relid of the table/class;\n2. using pg_inherits, resolve all dependent children.\n3. create an array of all columns (may be data type conflicts so either \nresolve or error) {you could avoid conflicts with careful planning on names}\n4. union all tables inserting nulls in non-available columns places.\n\nNote: Step 2 might be easily facilitated if an array of immediate children \nwas available from pg_inherits table not just the parent, but then \ninserting classes might be expensive. It's a thought...\n\nThis has been very frustrating even in trying to get information from the \npg_* system tables. Ideally a user should never have to look at those.\n\nI'm afraid this all sounds like a complaint. Quite to the contrary, I've \nbeen more than pleased with postgresql and what it has to offer and \ncontinually look forward to newer releases, new features and improvements.\n\nThomas\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\n\nI've been trying to work on a system of using classes as a variation on\nnormalization of data.\n\nHowever, I've run into a really frustrating problem. I had posted\nthis previously but not in this form to the PGSQL SQL list.\n\n From that posting...\n--begin--\n\ncreate table foo (id int8);\ncreate table bar1 (name text) inherits (foo);\ncreate table bar2 (data text) inherits (foo);\ncreate table hybrid ( ) inherits (bar1, bar2);\n\n\nINSERT INTO foo VALUES (1);\nINSERT INTO bar1 VALUES (2,'myname');\nINSERT INTO bar2 VALUES (3,'mydata');\nINSERT INTO hybrid VALUES (4,'morename','moredata');\n\n\n\n\nI want to do a SELECT * FROM foo*; but I only get the 'id'\ncolumn as in :\n\n\nid \n---\n 1\n 2\n 3\n 4\n\n\n\n\nWhat would be the query to get the following table or a magical way\nto expand children?\n\nI had originally hoped that SELECT * FROM foo* would yield the\nfollowing, but it's not so.\n\n\nid | name | data\n---+------------+-------------\n 1 | null | null\n 2 | 'myname' | null\n 3 | null | 'mydata'\n 4 | 'morename' | 'moredata'\n\n\n--end--\n\nI can get the same result by doing the following query...\n\nSELECT * FROM hybrid UNION \\\n (SELECT id,null,data FROM bar2) UNION \\\n (SELECT id,name,null FROM bar1) UNION \\\n (SELECT id,null,null FROM foo)\n\nWhat I would like to suggest although it may be too much or a little\nodd is to have the column listing expanded based on the\nchildren. I have been unable to construct a query or function\nthat would run through based on the class/table name and return\nthis.\n\nWhat if following a class/table by + did this.\n\nFor example the above query could be produced by the following\nstatement:\n SELECT\n* FROM foo+\n\nThe pattern I noticed it works best starting from the farthest\nchild(ren). However, I also observed this could be really awkward\ndepending on the number of columns ancestors had. And,\nthe table \"hybrid\" was unique in that it inherited all from a\ncommon set of parents. It would be different if the farthest\nbranches merged or if a branch contained a different data type in the\nsame column namespace.\n\nI did figure a methodology on solving it:\n\n1. get the relid of the table/class;\n2. using pg_inherits, resolve all dependent children.\n3. create an array of all columns (may be data type conflicts so either\nresolve or error) {you could avoid conflicts with careful planning on\nnames}\n4. union all tables inserting nulls in non-available columns \nplaces.\n\nNote: Step 2 might be easily facilitated if an array of immediate\nchildren was available from pg_inherits table not just the parent, but\nthen inserting classes might be expensive. It's a thought...\n\nThis has been very frustrating even in trying to get information from the\npg_* system tables. Ideally a user should never have to look\nat those.\n\nI'm afraid this all sounds like a complaint. Quite to the contrary,\nI've been more than pleased with postgresql and what it has to offer and\ncontinually look forward to newer releases, new features and\nimprovements.\n\nThomas\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Thu, 27 Jul 2000 14:57:06 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": true,
"msg_subject": "Feature Suggestion: Select * from myparent+"
}
] |
[
{
"msg_contents": "I realized that 7.0.2 still doesn't have documentation about 'database\nrecovery'. Searching the PostgreSQL web server, I found worthy comments.\nWhat are the results of this discussion? My poor idea is to create a text\nfile which made from the debugging messages (via syslog and pg_options)\nand then, after a crash, resend all the queries from the text file. I have\nno idea to send the original time to the database if a recovery is needed\n(but this is only the first problem, I'm sure there will be many). What\nsolution do you suggest? Does anybody plan to write the documentation\nabout this?\n\nTIA,\nZoltan\n\n\n",
"msg_date": "Thu, 27 Jul 2000 22:00:08 +0200 (CEST)",
"msg_from": "Kovacs Zoltan Sandor <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Industrial-Strength Logging"
}
] |
[
{
"msg_contents": "I spent some time looking around for possible causes of the recently\nreported deadlock conditions. I couldn't find any smoking gun, but\nI found a couple of things that look fishy:\n\n1. I notice that ProcReleaseAll does not act quite the same way that\nProcRelease does. Look in particular at the logic for handling\nwakeupNeeded in each one. There is some useless code in ProcRelease,\nbut the bottom line is that it *will* call ProcLockWakeup() unless it\nfinds there are no remaining holders (and deletes the lock instead).\nOTOH, ProcReleaseAll will only call ProcLockWakeup() if this test\nsucceeds for some lockmode:\n\n if (!wakeupNeeded && xidLook->holders[i] > 0 &&\n lockMethodTable->ctl->conflictTab[i] & lock->waitMask)\n wakeupNeeded = true;\n\nI spent some time trying to see a way that this might fail to wake up\na waiter who needs to be woken up. I don't see one, but either this\ncode is broken or ProcRelease is doing unnecessary work.\n\n\n2. The loop in ProcLockWakeup() has been broken since the day it was\nwritten. It's trying to scan through the list of waiting processes\nand awaken all that can legitimately be awoken. However, as soon as\nit finds one that cannot be woken, it sets last_locktype = proc->token\nand then continues the loop *without advancing proc*. All subsequent\niterations will compare proc->token == last_locktype, find they are\nequal, and then continue --- again without advancing proc. It's not\nan infinite loop because there's a list-length counter, but none of\nthe proc entries beyond the first unawakenable one will be examined.\n\nThe net effect is that the behavior is the same as it was in 6.3 or so,\nwhen the loop was just \"while (LockResolveConflicts(...) succeeds) do\nremove-and-awaken-first-entry\".\n\nSo the question is, is there ever a case where it is necessary to wake\nprocesses that are in the list beyond one that can't be woken?\nI haven't been able to conjure up an example, but I am suspicious.\n\nThis error cannot explain any new hangs seen in 7.0, since the effective\nbehavior of ProcLockWakeup() hasn't changed since Postgre95. But\nperhaps someone made a change elsewhere relying on the assumption that\nProcLockWakeup() would wake up any available waiter.\n\n\nComments anyone?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 27 Jul 2000 16:14:20 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Questionable coding in proc.c & lock.c"
},
{
"msg_contents": "> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Tom Lane\n> \n> 2. The loop in ProcLockWakeup() has been broken since the day it was\n> written. It's trying to scan through the list of waiting processes\n> and awaken all that can legitimately be awoken. However, as soon as\n> it finds one that cannot be woken, it sets last_locktype = proc->token\n> and then continues the loop *without advancing proc*. All subsequent\n> iterations will compare proc->token == last_locktype, find they are\n\nI pointed out it once before 6.5 and it was one of the cause of lock\nfreezing then. I've known it has not been changed but neglected to tell it,\nsorry. However the freezing was resolved by Vadim's change and I've\nthought it doesn't cause freezing. Hmm,I don't remember well now how\nthe freezing occured.\n\nThe following is my posting about the freezing.\nHope that helps,\n\nRegards.\n\nHiroshi Inoue\[email protected]\n\n> There is no row-level locks: all locks over tables are\n> table-level ones, btree & hash use page-level locks, but\n> never do page->table level lock escalation.\n>\n> However, I'm not sure that proposed changes will help in the next case:\n>\n> session-1 => begin;\n> session-1 => insert into tt values (1);\t--RowExclusiveLock\n>\n> session-2 => begin;\n> session-2 => insert into tt values (2);\t--RowExclusiveLock\n>\n> session-3 => begin;\n> session-3 => lock table tt;\t\t\t--AccessExclusiveLock\n> (conflicts with 1 & 2)\n> ^\n> session-1 => lock table tt in share mode;\t--ShareLock\n> (conflicts with 2 & 3)\n> ^\n> This is deadlock situation and must be handled by\n> DeadLockCheck().\n>\n\nIt's really a deadlock ?\nCertainly end/abort of session-2 doesn't wakeup session-1/session3.\nI think it's due to the following code in ProcLockWakeup().\n\n while ((queue_size--) && (proc))\n {\n\n /*\n * This proc will conflict as the previous one did, don't\neven\n * try.\n */\n if (proc->token == last_locktype)\n continue;\n\n /*\n * This proc conflicts with locks held by others, ignored.\n */\n if (LockResolveConflicts(lockmethod,\n lock,\n\nproc->token,\n proc->xid,\n\n(XIDLookupEnt *\n) NULL) != STATUS_OK)\n {\n last_locktype = proc->token;\n continue;\n }\n\nOnce LockResolveConflicts() doesn't return STATUS_OK,proc\nis not changed and only queue_size-- is executed(never try\nto wakeup other procs).\n\nAfter inserting the code such as\n\tproc = (PROC *) MAKE_PTR(proc->links.prev);\nbefore continue statements,ProcLockWakeup() triggerd\nby end/abort of session-2 could try to wakeup session-1.\n",
"msg_date": "Fri, 28 Jul 2000 14:50:51 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Questionable coding in proc.c & lock.c"
},
{
"msg_contents": "> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Tom Lane\n> \n> I spent some time looking around for possible causes of the recently\n> reported deadlock conditions. I couldn't find any smoking gun, but\n> I found a couple of things that look fishy:\n> \n\nOops,I've forgotten another freezing issue reported by Alfred Perlstein.\nWe know the cause(db access in abort transaction state) of it.\nSeems xact.c has been pretty changed after I examined it 2 months\nago. Have you already fixed it ? If not,I would examine it again and\nfix the bug. OK ?\n\nHere's a reproducible example.\n\nSession-1\n\t# begin;\n\tBEGIN\n\t=# lock t;\n\tLOCK TABLE\n\nSession-2\n\t=# begin;\n\tBEGIN\n\t=# lock t; \n\t[blocked] ^C\n\tCancel request sent\n\tERROR: Query cancel requested while waiting lock\n\treindex=# select * from t;\n\t[blocked]\n\nSession-1\n\t=# commit;\n\tCOMMIT\n\nSession-2\n\tERROR: LockRelation: LockAcquire failed\n\t=# abort;\n\tROLLBACK\n\t=# lock t;\n\t[blocked]\n\nRegards.\n\nHiroshi Inoue \n",
"msg_date": "Fri, 28 Jul 2000 17:03:47 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Questionable coding in proc.c & lock.c"
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n> Oops,I've forgotten another freezing issue reported by Alfred Perlstein.\n> We know the cause(db access in abort transaction state) of it.\n> Seems xact.c has been pretty changed after I examined it 2 months\n> ago. Have you already fixed it ?\n\nThat example seems to work better than before, but the generic problem\nis still there: we should avoid running the planner analysis phase and\nthe rewriter when we are in abort state.\n\nWe also need to do something about holding locks on relations clear\nthrough from parsing till execution. It occurs to me that there is\na problem closely related to the abort problem here: what if there\nare transaction boundaries in the query string? Suppose the query\nstring is\n\n\tbegin; select * from foo; end; select * from bar;\n\nCurrently, even if the parser did grab a lock on bar, it'd get dropped\nduring execution of the \"end\".\n\nI think maybe what needs to be done to fix all this is to restructure\npostgres.c's interface to the parser/rewriter. What we want is to\nrun just the yacc grammar initially to produce a list of raw parse\ntrees (which is enough to detect begin/commit/rollback, no?) Then\npostgres.c walks down that list, and for each element, if it is\ncommit/rollback OR we are not in abort state, do parse analysis,\nrewrite, planning, and execution. (Thomas, any comments here?)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 10:58:45 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Questionable coding in proc.c & lock.c "
},
{
"msg_contents": "> I think maybe what needs to be done to fix all this is to restructure\n> postgres.c's interface to the parser/rewriter. What we want is to\n> run just the yacc grammar initially to produce a list of raw parse\n> trees (which is enough to detect begin/commit/rollback, no?) Then\n> postgres.c walks down that list, and for each element, if it is\n> commit/rollback OR we are not in abort state, do parse analysis,\n> rewrite, planning, and execution. (Thomas, any comments here?)\n\nSure, why not (restructure postgres.c that is)? I was just thinking\nabout how to implement \"autocommit\" and was considering doing a hack in\nanalyze.c which just plops a \"BEGIN\" in front of the existing query. But\nrestructuring a bit higher up will let us make this a real feature, not\na hack (I hope ;)\n\nbtw, even gram.y does touch some of the heap cache (for pg_type) to look\nfor type existance; don't know if that will be a problem but maybe that\nneeds to be rethought also...\n\n - Thomas\n",
"msg_date": "Fri, 28 Jul 2000 15:24:58 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Questionable coding in proc.c & lock.c"
},
{
"msg_contents": "> > I think maybe what needs to be done to fix all this is to restructure\n> > postgres.c's interface to the parser/rewriter. What we want is to\n> > run just the yacc grammar initially to produce a list of raw parse\n> > trees (which is enough to detect begin/commit/rollback, no?) Then\n> > postgres.c walks down that list, and for each element, if it is\n> > commit/rollback OR we are not in abort state, do parse analysis,\n> > rewrite, planning, and execution. (Thomas, any comments here?)\n> \n> Sure, why not (restructure postgres.c that is)? I was just thinking\n> about how to implement \"autocommit\" and was considering doing a hack in\n> analyze.c which just plops a \"BEGIN\" in front of the existing query. But\n\nMan, that is something I would do. :-)\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, 28 Jul 2000 11:51:57 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Questionable coding in proc.c & lock.c"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> btw, even gram.y does touch some of the heap cache (for pg_type) to look\n> for type existance; don't know if that will be a problem but maybe that\n> needs to be rethought also...\n\nWe'd need to postpone that processing till parse analysis, else we still\nhave the underlying problem. Fortunately we are not parsing C ;-) so\nit seems to me it shouldn't be necessary to do any table lookups during\ninitial parsing...\n\nI assume you are looking at the 'setof' processing? Offhand it seems to\nme that this code is broken anyway: use of a relation type should refer\nto the tuple type, but should *not* imply SETOF, at least IMHO.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 11:59:42 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Questionable coding in proc.c & lock.c "
},
{
"msg_contents": "> I assume you are looking at the 'setof' processing? Offhand it seems to\n> me that this code is broken anyway: use of a relation type should refer\n> to the tuple type, but should *not* imply SETOF, at least IMHO.\n\nNo, there is another routine (not remembering the name right now) which\nis involved, I *think* from within gram.y, which barfs when called with\n\"opaque\" as an argument (among other things). Can look up more info\nlater (I'm away this weekend).\n\n - Thomas\n",
"msg_date": "Sat, 29 Jul 2000 03:29:52 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Questionable coding in proc.c & lock.c"
}
] |
[
{
"msg_contents": "Didn't know if this is a known issue or not, but I think the following ought to fail, and it does not:\n\nmschout=# create table foo (f1 int not null, primary key (f1));\nNOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'foo_pkey' for table 'foo'\nCREATE\n\nso far, so good.\n\nnow the problem:\n\ncreate table bar (\n f2 int not null,\n\t\tforeign key (blah) REFERENCES foo (f1) ON DELETE RESTRICT\n);\n\nI think this *should* fail since \"blah\" isn't defined in the table anywhere.\n\nthe result:\nNOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)\nCREATE\n\nNote that column \"blah\" doesnt actually exist. Shouldn't we complain and bail\nout from the create in this case? A typeo in a FOREIGN KEY clause would bypass\nthe restriction altogether. \n\nThe only reason I can think where this might be desired is if the table created\nINHERITS some other table (that might have column \"blah\" in it). Maybe there\nis some easy way to check that though?\n\nThis is on postgreSQL 7.0.2, Redhat Linux 6.2\n\nAnyways, figured I better report this in case its not a known issue :)\n\nMike\n\n",
"msg_date": "Thu, 27 Jul 2000 19:07:35 -0500 (CDT)",
"msg_from": "Michael J Schout <[email protected]>",
"msg_from_op": true,
"msg_subject": "None"
}
] |
[
{
"msg_contents": "(sorry for sending this 2x. I accidently omitted the Subject on the first\ncopy)\n\n----------------\n\nDidn't know if this is a known issue or not, but I think the following ought to fail, and it does not:\n\nmschout=# create table foo (f1 int not null, primary key (f1));\nNOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'foo_pkey' for table 'foo'\nCREATE\n\nso far, so good.\n\nnow the problem:\n\ncreate table bar (\n f2 int not null,\n foreign key (blah) REFERENCES foo (f1) ON DELETE RESTRICT\n);\n\nI think this *should* fail since \"blah\" isn't defined in the table anywhere.\n\nthe result:\nNOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)\nCREATE\n\nNote that column \"blah\" doesnt actually exist. Shouldn't we complain and bail\nout from the create in this case? A typeo in a FOREIGN KEY clause would bypass\nthe restriction altogether. \n\nThe only reason I can think where this might be desired is if the table created\nINHERITS some other table (that might have column \"blah\" in it). Maybe there\nis some easy way to check that though?\n\nThis is on postgreSQL 7.0.2, Redhat Linux 6.2\n\nAnyways, figured I better report this in case its not a known issue :)\n\nMike\n\n\n",
"msg_date": "Thu, 27 Jul 2000 19:10:04 -0500 (CDT)",
"msg_from": "Michael J Schout <[email protected]>",
"msg_from_op": true,
"msg_subject": "Possible bug in FOREIGN KEY"
}
] |
[
{
"msg_contents": "\nJust looking at the TODO list for other pg_dump related items, and saw:\n\n add pg_dump option to dump type names as standard ANSI types \n\nTow questions:\n\nDo we already have a function to represent PG types as ANSI standard types?\nHow should types that are not in the standard be represented?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 28 Jul 2000 10:58:48 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump and ANSI types (TODO item)"
}
] |
[
{
"msg_contents": "\nYou might want to add:\n\n insert/update...returning {[new.|old.]col [as name],...}\n\nto TODO. I intend to do it eventually...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 28 Jul 2000 11:30:07 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Another TODO: insert/update...returning"
},
{
"msg_contents": "> \n> You might want to add:\n> \n> insert/update...returning {[new.|old.]col [as name],...}\n> \n> to TODO. I intend to do it eventually...\n\nAdded:\n\n\t* Allow INSERT/UPDATE to return new.col or old.col (Philip)\n\nSeems like a nifty feature from Rdb.\n\nNow you are immortalized on the TODO list. :-)\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, 27 Jul 2000 22:27:35 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Another TODO: insert/update...returning"
},
{
"msg_contents": "At 22:27 27/07/00 -0400, Bruce Momjian wrote:\n>\n>Added:\n>\n>\t* Allow INSERT/UPDATE to return new.col or old.col (Philip)\n>\n>Seems like a nifty feature from Rdb.\n\nIt's unbelievably useful, although the [old.|new.] was Jan's suggestion...\n\n>Now you are immortalized on the TODO list. :-)\n\nI'd better avoid doing it then.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 28 Jul 2000 12:40:30 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Another TODO: insert/update...returning"
},
{
"msg_contents": ">> Now you are immortalized on the TODO list. :-)\n\n> I'd better avoid doing it then.\n\nI was just going to say \"what, only until he actually does it?\"\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 01:22:34 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Another TODO: insert/update...returning "
},
{
"msg_contents": "> >> Now you are immortalized on the TODO list. :-)\n> \n> > I'd better avoid doing it then.\n> \n> I was just going to say \"what, only until he actually does it?\"\n\nWell, we assign it to him so he can answer questions about the feature,\nand perhaps implement it. At this point, he is the contact man on 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": "Fri, 28 Jul 2000 11:42:41 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Another TODO: insert/update...returning"
}
] |
[
{
"msg_contents": "Hello,\n\nWhat does this mean?????\n\n---------- Forwarded Message ----------\nSubject: Postgres update\nDate: Fri, 28 Jul 2000 04:00:09 -0500 (EST)\nFrom: [email protected] (WebmailStation User)\n\n\nCREATE\nDROP\nALTER\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: NOTICE: --Relation pg_largeobject--\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: NOTICE: Pages 577: Changed 0, reaped 549, Empty 0, New 0; Tup 105038: Vac 12554, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 36, MaxLen 36; Re-using: Free/Avail. Space 469760/465060; EndEmpty/Avail. Pages 0/548. CPU 0.00s/0.38u sec.\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: NOTICE: Index pg_largeobject_loid_index: Pages 209; Tuples 105038: Deleted 0. CPU 0.01s/0.50u sec.\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: NOTICE: Rel pg_largeobject: Pages: 577 --> 515; Tuple(s) moved: 10696. CPU 0.11s/1.08u sec.\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: NOTICE: Index pg_largeobject_loid_index: Pages 250; Tuples 105038: Deleted 10696. CPU 0.01s/0.55u sec.\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: NOTICE: FlushRelationBuffers(pg_largeobject, 515): block 504 is referenced (private 0, global 1)\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: FATAL 1: VACUUM (repair_frag): FlushRelationBuffers returned -2\npqReadData() -- backend closed the channel unexpectedly.\n\tThis probably means the backend terminated abnormally\n\tbefore or while processing the request.\npsql:/home/www/www.webmailstation.com/sql/reindex.lo.sql:5: connection to server was lost\n-------------------------------------------------------\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n",
"msg_date": "Fri, 28 Jul 2000 16:55:23 +0700",
"msg_from": "Denis Perchine <[email protected]>",
"msg_from_op": true,
"msg_subject": "Fwd: Postgres update"
},
{
"msg_contents": "Denis Perchine <[email protected]> writes:\n> NOTICE: FlushRelationBuffers(pg_largeobject, 515): block 504 is referenced (private 0, global 1)\n> FATAL 1: VACUUM (repair_frag): FlushRelationBuffers returned -2\n\nHmm, there's another report of that in the archives. You've got a\nbuffer that has a positive reference count even though (presumably)\nno one is using it. VACUUM is quitting out of paranoia that maybe\nsome other backend is accessing the table --- there's unlikely to be\nany actual data corruption here, just (over?) caution.\n\nYou can get back to a state where VACUUM will work on the table by\nrestarting the postmaster, but to fix the real problem we need to figure\nout how the system got into this state in the first place. Can you\nproduce a repeatable example of a series of queries that gets you into\nthis state?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 11:06:01 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Fwd: Postgres update "
},
{
"msg_contents": "> > NOTICE: FlushRelationBuffers(pg_largeobject, 515): block 504 is referenced (private 0, global 1)\n> > FATAL 1: VACUUM (repair_frag): FlushRelationBuffers returned -2\n> \n> Hmm, there's another report of that in the archives. You've got a\n> buffer that has a positive reference count even though (presumably)\n> no one is using it. VACUUM is quitting out of paranoia that maybe\n> some other backend is accessing the table --- there's unlikely to be\n> any actual data corruption here, just (over?) caution.\n> \n> You can get back to a state where VACUUM will work on the table by\n> restarting the postmaster, but to fix the real problem we need to figure\n> out how the system got into this state in the first place. Can you\n> produce a repeatable example of a series of queries that gets you into\n> this state?\n\nI get this after the following:\npsql:/home/www/www.webmailstation.com/sql/reindex.sql:75: NOTICE: !!! write error seems permanent !!!psql:/home/www/www.webmailstation.com/sql/reindex.sql:75: NOTICE: !!! now kill all backends and reset postmaster !!!\npsql:/home/www/www.webmailstation.com/sql/reindex.sql:75: ERROR: cannot write block 175 of ix_q_b_1 [webmailstation] blind\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally\n before or while processing the request.\npsql:/home/www/www.webmailstation.com/sql/reindex.sql:75: connection to server was lost\n\nThis was the command which should create unique index. Something happend and\nindex became corrupted. After that postgres starts to eat up memory and I killed him.\nI recognized that this happend on update of the table on which the index was build and\nthat update uses the index.\n\nIt is hard to reproduce this...\nI would like to give you binary data, but unfortunatly I was forced\nto rebuild index ASAP and has finished investigation later...\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n",
"msg_date": "Fri, 28 Jul 2000 22:12:06 +0700",
"msg_from": "Denis Perchine <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Fwd: Postgres update"
},
{
"msg_contents": "Denis Perchine <[email protected]> writes:\n>>>> NOTICE: FlushRelationBuffers(pg_largeobject, 515): block 504 is referenced (private 0, global 1)\n>>>> FATAL 1: VACUUM (repair_frag): FlushRelationBuffers returned -2\n\n> I get this after the following:\n\n> NOTICE: !!! write error seems permanent !!!\n> NOTICE: !!! now kill all backends and reset postmaster !!!\n> ERROR: cannot write block 175 of ix_q_b_1 [webmailstation] blind\n> pqReadData() -- backend closed the channel unexpectedly.\n\nOh, that's interesting. The NOTICEs are coming out of AbortBufferIO()\nwhich is invoked during error processing (in other words, I bet the\nERROR actually happened first. It's a libpq artifact that the NOTICEs\nare presented first on the client side. If you are keeping the\npostmaster log output you could confirm the sequence of events by\nlooking in the log). The backend shutdown is then forced by\nAbortBufferIO().\n\nAbortBufferIO() seems rather badly designed, but given that it forces\na database-wide restart, I'm not sure how this could relate to the\nlater FlushRelationBuffers problem. The restart should get rid of the\nold buffers anyway.\n\n> This was the command which should create unique index.\n\nWas the index on the same table that FlushRelationBuffers later had\ntrouble with (ie, \"pg_largeobject\")?\n\nWhat version are you running, anyway? There is no \"pg_largeobject\"\nin either 6.5 or current AFAIK.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 13:54:43 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Fwd: Postgres update "
},
{
"msg_contents": "> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Tom Lane\n> \n> Denis Perchine <[email protected]> writes:\n> >>>> NOTICE: FlushRelationBuffers(pg_largeobject, 515): block \n> 504 is referenced (private 0, global 1)\n> >>>> FATAL 1: VACUUM (repair_frag): FlushRelationBuffers returned -2\n> \n> > I get this after the following:\n> \n> > NOTICE: !!! write error seems permanent !!!\n> > NOTICE: !!! now kill all backends and reset postmaster !!!\n> > ERROR: cannot write block 175 of ix_q_b_1 [webmailstation] blind\n> > pqReadData() -- backend closed the channel unexpectedly.\n> \n> Oh, that's interesting. The NOTICEs are coming out of AbortBufferIO()\n> which is invoked during error processing (in other words, I bet the\n> ERROR actually happened first. It's a libpq artifact that the NOTICEs\n> are presented first on the client side. If you are keeping the\n> postmaster log output you could confirm the sequence of events by\n> looking in the log). The backend shutdown is then forced by\n> AbortBufferIO().\n> \n> AbortBufferIO() seems rather badly designed, but given that it forces\n> a database-wide restart, I'm not sure how this could relate to the\n\nIt was me who introduced xxxxBufferIO routines to avoid io_in_progress\nspinlock freezing. Unfortunately I didn't think of any elegant way to\nrecover parmanent write error then. I'm judging the error is parmanent\nwhen write error for the buffer occurs twice.\nBecause you changed bufmgr before 7.0,we may be able to avoid a\ndatabase-wide restart. However don't we have to leave the buffer \nstill dirty even after your change ? If I recognize correctly,we couldn't\nknow which backends dirtied the buffer. Even though we could know\nit,we couldn't know if the transactions which dirtied the buffer are still\nrunning.\n\nRegards.\n\nHiroshi Inoue\n\n\n",
"msg_date": "Sat, 29 Jul 2000 07:35:58 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Fwd: Postgres update "
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n> It was me who introduced xxxxBufferIO routines to avoid io_in_progress\n> spinlock freezing. Unfortunately I didn't think of any elegant way to\n> recover parmanent write error then. I'm judging the error is parmanent\n> when write error for the buffer occurs twice.\n> Because you changed bufmgr before 7.0,we may be able to avoid a\n> database-wide restart. However don't we have to leave the buffer \n> still dirty even after your change ? If I recognize correctly,we couldn't\n> know which backends dirtied the buffer. Even though we could know\n> it,we couldn't know if the transactions which dirtied the buffer are still\n> running.\n\nRight, that's why we can't just mark the buffer broken and recycle it.\nIf there is another transaction in progress that's dirtied that same\nbuffer, it would come back, find the disk page no longer present in that\nbuffer, conclude that its changes were successfully written, and go\nahead and commit. No good, it has to fail. So, leave the buffer\nsitting there marked BM_DIRTY + BM_IO_ERROR. When the other xact wants\nto commit, it will try to write the buffer, fail, and abort. (Or,\nif perchance it doesn't fail, that's OK too.)\n\nThe only way to discard the buffer short of a postmaster reset would be\nif we knew no current transaction could have dirtied the buffer. Hmm,\nI wonder if we could have VACUUM do that before it starts the main\nvacuuming process? If we have exclusive lock on the table, then\npresumably there can be no other xacts with pending changes. So maybe\nthe first step of VACUUM could be to sweep the buffer table for buffers\nof that relation that are marked BM_DIRTY + BM_IO_ERROR, and discard\nthem? Not sure about this.\n\nAlso, I think deleting the relation that owns the broken buffer will\nclean it up correctly in current sources --- ReleaseRelationBuffers\ndoesn't care if the buffer is dirty or not.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 18:47:24 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Fwd: Postgres update "
},
{
"msg_contents": "Hello Tom,\n\n> >>>> NOTICE: FlushRelationBuffers(pg_largeobject, 515): block 504 is referenced (private 0, global 1)\n> >>>> FATAL 1: VACUUM (repair_frag): FlushRelationBuffers returned -2\n> \n> > I get this after the following:\n> \n> > NOTICE: !!! write error seems permanent !!!\n> > NOTICE: !!! now kill all backends and reset postmaster !!!\n> > ERROR: cannot write block 175 of ix_q_b_1 [webmailstation] blind\n> > pqReadData() -- backend closed the channel unexpectedly.\n> \n> Oh, that's interesting. The NOTICEs are coming out of AbortBufferIO()\n> which is invoked during error processing (in other words, I bet the\n> ERROR actually happened first. It's a libpq artifact that the NOTICEs\n> are presented first on the client side. If you are keeping the\n> postmaster log output you could confirm the sequence of events by\n> looking in the log). The backend shutdown is then forced by\n> AbortBufferIO().\n> \n> AbortBufferIO() seems rather badly designed, but given that it forces\n> a database-wide restart, I'm not sure how this could relate to the\n> later FlushRelationBuffers problem. The restart should get rid of the\n> old buffers anyway.\n> \n> > This was the command which should create unique index.\n> \n> Was the index on the same table that FlushRelationBuffers later had\n> trouble with (ie, \"pg_largeobject\")?\n> \n> What version are you running, anyway? There is no \"pg_largeobject\"\n> in either 6.5 or current AFAIK.\n\n:-))) Sorry. Just to concatenate the pieces...\nI use modified 7.0.2. I applied my patch for largeobject (that one with files in hash dirs).\nThat's why you can see pg_largeobject. But this is not an issue here. That patch modifies\nonly large object related stuff.\n\nI get vacuum error first on pg_largeobject. Later index was automaticaly recreated (I have a cron job)\nand all became fine.\n\nAnd when I replied on your mail I get an error in table queue. It started when I noticed that\npostmaster starts to eat up memory. I shut it down and look at the log. The last query was update\non queue table. I tried to vacuum the table and get the same error as in the last time.\nThen I droped index and recreate it and all became fine.\n\nWhen later I go through the reports of cron (I do dropping and recreateing of indices each day)\nI found out the error message during recreating the index for this table. That is all.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n",
"msg_date": "Sat, 29 Jul 2000 12:03:54 +0700",
"msg_from": "Denis Perchine <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Fwd: Postgres update"
},
{
"msg_contents": "> -----Original Message-----\n> From: Tom Lane [mailto:[email protected]]\n\n> > Because you changed bufmgr before 7.0,we may be able to avoid a\n> > database-wide restart. However don't we have to leave the buffer \n> > still dirty even after your change ? If I recognize \n> correctly,we couldn't\n> > know which backends dirtied the buffer. Even though we could know\n> > it,we couldn't know if the transactions which dirtied the \n> buffer are still\n> > running.\n> \n> Right, that's why we can't just mark the buffer broken and recycle it.\n> If there is another transaction in progress that's dirtied that same\n> buffer, it would come back, find the disk page no longer present in that\n> buffer, conclude that its changes were successfully written, and go\n> ahead and commit. No good, it has to fail. So, leave the buffer\n> sitting there marked BM_DIRTY + BM_IO_ERROR. When the other xact wants\n> to commit, it will try to write the buffer, fail, and abort. (Or,\n> if perchance it doesn't fail, that's OK too.)\n>\n\nAgreed.\nHowever,BM_DIRTY+BM_IO_ERROR buffers seems to have to be\nexcluded from freelist of buffers. Then IO errors would be limited\nto backends which really need to update the buffers.\n \n> The only way to discard the buffer short of a postmaster reset would be\n> if we knew no current transaction could have dirtied the buffer. Hmm,\n> I wonder if we could have VACUUM do that before it starts the main\n> vacuuming process? If we have exclusive lock on the table, then\n> presumably there can be no other xacts with pending changes. So maybe\n\nYou are right.\n\n> the first step of VACUUM could be to sweep the buffer table for buffers\n> of that relation that are marked BM_DIRTY + BM_IO_ERROR, and discard\n> them? Not sure about this.\n>\n\nSounds reasonbale.\n \nRegards.\n\nHiroshi Inoue\n",
"msg_date": "Sat, 29 Jul 2000 23:38:05 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Fwd: Postgres update "
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n> However,BM_DIRTY+BM_IO_ERROR buffers seems to have to be\n> excluded from freelist of buffers. Then IO errors would be limited\n> to backends which really need to update the buffers.\n\nGood idea, that will prevent unrelated transactions from getting in\ntrouble by trying to flush and re-use the buffer.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 11:49:06 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Fwd: Postgres update "
}
] |
[
{
"msg_contents": "Tom,\n\n AFAICS, only \"text\", \"lztext\" and all arrays are yet\n toastable. Which of the other base types do we want to have\n in 7.1?\n\n Who else is willing to contribute to this?\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": "Fri, 28 Jul 2000 12:50:14 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": true,
"msg_subject": "toasting for other varlena types"
},
{
"msg_contents": "[email protected] (Jan Wieck) writes:\n> AFAICS, only \"text\", \"lztext\" and all arrays are yet\n> toastable. Which of the other base types do we want to have\n> in 7.1?\n\nAll of the varlena ones ... although I'm wondering whether it's worth\nmarking numeric as toastable or not. A numeric probably can't get\nbig enough to be worth toasting, no?\n\nI've been a little distracted by other issues but am still planning to\nturn the crank on the fmgr changes, and getting the rest of the varlena\ntypes done seems to be the number-one priority there.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 11:10:14 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: toasting for other varlena types "
}
] |
[
{
"msg_contents": "Hello dear people,\n\nWe all know PostgreSQL inability to handle exceptions. Inside a transaction, any\nerror will make it fall in *ABORT STATE*, and any further action not being\nROLLBACK, ABORT or COMMIT, will ask for a ROLLBACK, ABORT or COMMIT statement. I\nwant to know what exact code is executed inside PostgreSQL, when a ROLLBACK\nstatement is issued. Knowing that, I will modify backend/tcop/postgres.c, to do\nthe necesary calls to ROLLBACK. This will make PostgreSQL behave at least just\nlike IBM's DB2, which rolls back automatically after an error.\n\nRegards,\nHaroldo.\n\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Fri, 28 Jul 2000 10:47:49 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Automatically ROLLBACK after fall in *ABORT STATE*"
}
] |
[
{
"msg_contents": "Hello dear people,\n\nWe all know PostgreSQL inability to handle exceptions. Inside a transaction, any\nerror will make it fall in *ABORT STATE*, and any further action not being\nROLLBACK, ABORT or COMMIT, will ask for a ROLLBACK, ABORT or COMMIT statement. I\nwant to know what exact code is executed inside PostgreSQL, when a ROLLBACK\nstatement is issued. Knowing that, I will modify backend/tcop/postgres.c, to do\nthe necesary calls to ROLLBACK, inmediately after AbortCurrentTransaction().\nThis will make PostgreSQL behave at least just like IBM's DB2, which rolls back\nautomatically after an error.\n\nRegards,\nHaroldo.\n\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Fri, 28 Jul 2000 10:48:41 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Automatically ROLLBACK after fall in *ABORT STATE*"
},
{
"msg_contents": "[email protected] wrote:\n> We all know PostgreSQL inability to handle exceptions. Inside a transaction, any\n> error will make it fall in *ABORT STATE*, and any further action not being\n> ROLLBACK, ABORT or COMMIT, will ask for a ROLLBACK, ABORT or COMMIT statement. I\n> want to know what exact code is executed inside PostgreSQL, when a ROLLBACK\n> statement is issued. Knowing that, I will modify backend/tcop/postgres.c, to do\n> the necesary calls to ROLLBACK, inmediately after AbortCurrentTransaction().\n> This will make PostgreSQL behave at least just like IBM's DB2, which rolls back\n> automatically after an error.\n\nI'm new to gdb.\n\nI compiled PostgreSQL --enable-debug, and installed it.\nLogged in as postgres superuser.\nRan postmaster -i as foreground.\nOpened a second shell.\nOpened ddd-gdb debugger.\nOpened postmaster binary with symbols.\nOpened a third shell.\nRun psql template1. This makes the postmaster fork.\n>From the gdb, attach to the forked postmaster, the one attending the psql\nconnection, and start it.\n\nNow I run commands from psql, and expect the debugger to follow the backend\nresolution of my queries. But nothing moves.\n\nI want to see what happens in the backend when I enter ROLLBACK in psql.\n\nPlease, help me.\n\nRegards,\nHaroldo.\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Fri, 28 Jul 2000 17:14:49 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Re: Automatically ROLLBACK after fall in *ABORT STATE*"
}
] |
[
{
"msg_contents": "\nApologies if this has been asked before, but the mailing list archive seems\nto be down again.\n\nIs there any reason that a security model does not exist for psql that\nallows Unix user 'fred' to log in as PG user 'fred' with no password etc,\nbut any user trying to log on as someone other than themselves has to\nprovide a password?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 00:30:56 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Security choices..."
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> Is there any reason that a security model does not exist for psql that\n> allows Unix user 'fred' to log in as PG user 'fred' with no password etc,\n> but any user trying to log on as someone other than themselves has to\n> provide a password?\n\nDefine \"log in as themselves\" --- in particular, how will you check?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 12:25:18 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Security choices... "
},
{
"msg_contents": "At 12:25 28/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> Is there any reason that a security model does not exist for psql that\n>> allows Unix user 'fred' to log in as PG user 'fred' with no password etc,\n>> but any user trying to log on as someone other than themselves has to\n>> provide a password?\n>\n>Define \"log in as themselves\" --- in particular, how will you check?\n\nI was thinking (in a very blinkered way) of client processes on the same\nmachine as the postmaster. Admitedly, I had not considered network access etc.\n\nEven in this limited form, it does not seem too bad; is there a way the\npostmaster can tell (a) the client is on the same machine, and (b) what the\nprocess username is?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 02:39:21 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Security choices... "
},
{
"msg_contents": "Philip Warner writes:\n> At 12:25 28/07/00 -0400, Tom Lane wrote:\n> >Philip Warner <[email protected]> writes:\n> >> Is there any reason that a security model does not exist for psql that\n> >> allows Unix user 'fred' to log in as PG user 'fred' with no password etc,\n> >> but any user trying to log on as someone other than themselves has to\n> >> provide a password?\n> >\n> >Define \"log in as themselves\" --- in particular, how will you check?\n> \n> I was thinking (in a very blinkered way) of client processes on the same\n> machine as the postmaster. Admitedly, I had not considered network access etc.\n> \n> Even in this limited form, it does not seem too bad; is there a way the\n> postmaster can tell (a) the client is on the same machine, and (b) what the\n> process username is?\n\nYou can tell whether someone is connecting via a Unix domain\nsocket (client on same machine) or an Internet domain socket\n(remote machine or someone using localhost loopback or similar\nfor some reason). If it's a Unix domain socket then modern Unices\nusually provide a way to find out who (i.e. the uid/gid which can\nthen be mapped to a username/groupname). The problem is that there's\nno standard API to do so. Some ways need the cooperation of the\nclient to send a special \"tell the peer who I am\" thingy (SCM_CRED\nmessage); some ways don't (Linux getsockopt SO_PEER_CRED and the\nSTREAMS way). I submitted an example patch (using the simple Linux\nAPI) a month or few back to implement \"only let username connect to\nown database\" but it wasn't accept or worked on because of lack of\nportability. On the plus side, I found a Linux kernel bug in that\narea (socketpair sockets didn't initialise SO_PEER_CRED) so I got\none bug fix patch accepted out of it :-)\n\n--Malcolm\n\n-- \nMalcolm Beattie <[email protected]>\nUnix Systems Programmer\nOxford University Computing Services\n",
"msg_date": "Fri, 28 Jul 2000 21:53:34 +0100",
"msg_from": "Malcolm Beattie <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Security choices..."
}
] |
[
{
"msg_contents": "\nBrian Baquiran in the [GENERAL] list recently asked if it was possible to\n'throttle-down' pg_dump so that it did not cause an IO bottleneck when\ncopying large tables.\n\nCan anyone see a reason not to pause periodically?\n\nThe only problem I have with pausing is that pg_dump runs in a single\ntransaction, and I have an aversion to keeping TX's open too long, but this\nis born of experience with other databases, and may not be relevant to PG.\n\nIf it is deemed acceptable, can anyone offer a sensible scheme for pausing?\n\neg. Allow the user to specify an active:sleep ratio, then after ever 'get'\non the COPY command, see how much time has elaped since it last slept, and\nif more than, say, 100ms, then sleep for an amount of time based on the\nuser's choice.\n\nFinally, can anyone point me to the most portable subsecond timer routines?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 00:41:52 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump & performance degradation"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> Brian Baquiran in the [GENERAL] list recently asked if it was possible to\n> 'throttle-down' pg_dump so that it did not cause an IO bottleneck when\n> copying large tables.\n\n> Can anyone see a reason not to pause periodically?\n\nBecause it'd slow things down?\n\nAs long as the default behavior is \"no pauses\", I have no strong\nobjection.\n\n> Finally, can anyone point me to the most portable subsecond timer routines?\n\nYou do not want a timer routine, you want a delay. I think using a\ndummy select() with a timeout parameter might be the most portable way.\nAnyway we've used it for a long time --- see the spinlock backoff code\nin s_lock.c.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 12:22:37 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "At 12:22 28/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> Brian Baquiran in the [GENERAL] list recently asked if it was possible to\n>> 'throttle-down' pg_dump so that it did not cause an IO bottleneck when\n>> copying large tables.\n>\n>> Can anyone see a reason not to pause periodically?\n>\n>Because it'd slow things down?\n\nCute.\n\n\n>> Finally, can anyone point me to the most portable subsecond timer routines?\n>\n>You do not want a timer routine, you want a delay. I think using a\n>dummy select() with a timeout parameter might be the most portable way.\n>Anyway we've used it for a long time --- see the spinlock backoff code\n>in s_lock.c.\n\nWell...pg_dump sits in a loop reading COPY output; my hope was to see how\nlong the copy took, and then wait an appropriate amount of time. The dummy\nselect works nicely as a sleep call, but I can't really tell how long to\nsleep without a sub-second timer, or something that tells me the time\nbetween two calls.\n\nWould there be a portability problem with using setitimer, pause, & sigaction?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 02:52:57 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n>> You do not want a timer routine, you want a delay. I think using a\n>> dummy select() with a timeout parameter might be the most portable way.\n>> Anyway we've used it for a long time --- see the spinlock backoff code\n>> in s_lock.c.\n\n> Well...pg_dump sits in a loop reading COPY output; my hope was to see how\n> long the copy took, and then wait an appropriate amount of time. The dummy\n> select works nicely as a sleep call, but I can't really tell how long to\n> sleep without a sub-second timer, or something that tells me the time\n> between two calls.\n\nSeems like just delaying for a user-specifiable number of microseconds\nbetween blocks or lines of COPY output would get the job done. I'm not\nclear what the reason is for needing to measure anything --- the user is\ngoing to be tweaking the parameter anyway to arrive at what he feels is\nan acceptable overall system load from the backup operation, so how are\nyou making his life easier by varying the delay?\n\n> Would there be a portability problem with using setitimer, pause, &\n> sigaction?\n\nSignal behavior is not very portable, and I'd counsel against\nintroducing any new portability risks for what's fundamentally a pretty\nthird-order feature. (AFAIR no one's ever asked for this before, so...)\nWe do have an existing dependency on gettimeofday() in postgres.c's\nShowUsage(), so if you really feel a compulsion to measure then that's\nwhat to use. I don't see what it's buying you though.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 13:36:35 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "At 13:36 28/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> Well...pg_dump sits in a loop reading COPY output; my hope was to see how\n>> long the copy took, and then wait an appropriate amount of time. The dummy\n>> select works nicely as a sleep call, but I can't really tell how long to\n>> sleep without a sub-second timer, or something that tells me the time\n>> between two calls.\n>\n>Seems like just delaying for a user-specifiable number of microseconds\n>between blocks or lines of COPY output would get the job done. \n\nYou're probably right; and if I can't trust setitimer, sigaction and pause,\nthen I guess I have no choice.\n\n\n> I'm not\n>clear what the reason is for needing to measure anything --- the user is\n>going to be tweaking the parameter anyway to arrive at what he feels is\n>an acceptable overall system load from the backup operation, so how are\n>you making his life easier by varying the delay?\n...\n>We do have an existing dependency on gettimeofday() in postgres.c's\n>ShowUsage(), so if you really feel a compulsion to measure then that's\n>what to use. I don't see what it's buying you though.\n\nThe plan was for the user to specify a single number that was the ratio of\ntime spent sleeping to the time spent 'working' (ie. reading COPY lines).\n\nIn the ordinary case this value would be 0 (no sleep), and for a very low\nload model it might be as high as 10 - for every 100ms spent working it\nspends 1000ms sleeping.\n\nThis was intended to handle the arbitrary speed variations that occur when\nreading, eg, large toasted rows and reading lots of small normal rows. A\nsimple 'wait 200ms' model would be fine for the former, but way too long\nfor the latter.\n\n>(AFAIR no one's ever asked for this before, so...)\n\nlike most of these things (at least for me), it is personally relevant: I\nalso experience severe peformance degradation during backups.\n\nI'll look at gettimeofday...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 14:14:11 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> The plan was for the user to specify a single number that was the ratio of\n> time spent sleeping to the time spent 'working' (ie. reading COPY lines).\n\n> In the ordinary case this value would be 0 (no sleep), and for a very low\n> load model it might be as high as 10 - for every 100ms spent working it\n> spends 1000ms sleeping.\n\n> This was intended to handle the arbitrary speed variations that occur when\n> reading, eg, large toasted rows and reading lots of small normal rows.\n\nBut ... but ... you have no idea at all how much time the backend has\nexpended to provide you with those rows, nor how much of the elapsed\ntime was used up by unrelated processes. It's pointless to suppose\nthat you are regulating system load this way --- and I maintain that\nsystem load is what the dbadmin would really like to regulate.\n\nYou may as well keep it simple and not introduce unpredictable\ndependencies into the behavior of the feature.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 00:57:46 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "At 00:57 29/07/00 -0400, Tom Lane wrote:\n>Philip Warner <[email protected]> writes:\n>> The plan was for the user to specify a single number that was the ratio of\n>> time spent sleeping to the time spent 'working' (ie. reading COPY lines).\n>\n>> In the ordinary case this value would be 0 (no sleep), and for a very low\n>> load model it might be as high as 10 - for every 100ms spent working it\n>> spends 1000ms sleeping.\n>\n>> This was intended to handle the arbitrary speed variations that occur when\n>> reading, eg, large toasted rows and reading lots of small normal rows.\n>\n>But ... but ... you have no idea at all how much time the backend has\n>expended to provide you with those rows, nor how much of the elapsed\n>time was used up by unrelated processes.\n\nTrue & true.\n\nBut where the time was used is less important to me; if it was used by PG,\nor by another process, then it still means that there was a consumer who I\nwas fighting. All I am trying to do is prevent the consumption of all\navailable resources by pg_dump. I realize that this is totally opposed to\nthe notion of a good scheduler, but it does produce good results for me:\nwhen I put delays in pg_dump, I couldn't really tell (from the system\nperformance) that backup was running.\n\n\n> It's pointless to suppose\n>that you are regulating system load this way --- \n\nThat is true, but what I am regulating is consumption of available\nresources (except in the case of delays caused by excessive lock contention).\n\nFor the most part, my backups go to 100%CPU, and huge numbers of I/Os. Most\nimportantly this affects web server response times as well as the time\ntaken for 'production' database queries (usually via the web).\n\nWith a backup process that sleeps, I get free CPU time & I/Os for\nopportunistic processes (web servers & db queries), and a backup that takes\nmore time. This seems like a Good Thing.\n\nSince backups on VMS never cause this sort of problem, I assume I am just\nbattling the Linux scheduler, rather than a deficiency in Postgres. Maybe\nthings would be different if I could set the priority on the backend from\nthe client...that might bear thinking about, but for R/W transactions it\nwould be a disaster to allow setting of priorities of backend processes.\n\n\n>and I maintain that\n>system load is what the dbadmin would really like to regulate.\n\nIn my case, because the scheduler does not cope well at 100% load, I think\nI need to keep some resources in reserve. But I agree in principal. \n\n\n>You may as well keep it simple and not introduce unpredictable\n>dependencies into the behavior of the feature.\n\nThis is certainly still an option; I might base the choice on some\nempirical tests. I get very different results between a large table with\nmany columns and a large table with a small number of columns. I'll have to\nkeep investigating the causes.\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 15:58:17 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "At 02:14 PM 7/29/00 +1000, Philip Warner wrote:\n\n>>(AFAIR no one's ever asked for this before, so...)\n>\n>like most of these things (at least for me), it is personally relevant: I\n>also experience severe peformance degradation during backups.\n\nI can't think of any Unix utility that does this, offhand.\n\n\"nice\" doesn't help at all when you try it?\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, 29 Jul 2000 05:28:02 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "At 05:28 29/07/00 -0700, Don Baccus wrote:\n>At 02:14 PM 7/29/00 +1000, Philip Warner wrote:\n>\n>>>(AFAIR no one's ever asked for this before, so...)\n>>\n>>like most of these things (at least for me), it is personally relevant: I\n>>also experience severe peformance degradation during backups.\n>\n>I can't think of any Unix utility that does this, offhand.\n>\n>\"nice\" doesn't help at all when you try it?\n\nOnly marginally; and what I really need to do is 'nice' the backend, and\nwhen I do that it still only helps only a little - even if I drop it to the\nlowest priority. I think a process with only a little CPU can still do a\nlot of I/O requests, and perhaps it is getting swapped back in to service\nthe requests. This is just guesswork.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Sat, 29 Jul 2000 23:27:45 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n>> \"nice\" doesn't help at all when you try it?\n\n> Only marginally; and what I really need to do is 'nice' the backend, and\n> when I do that it still only helps only a little - even if I drop it to the\n> lowest priority. I think a process with only a little CPU can still do a\n> lot of I/O requests, and perhaps it is getting swapped back in to service\n> the requests. This is just guesswork.\n\nI think that's true --- on most Unixes, 'nice' level only affects CPU\nscheduling not I/O scheduling.\n\nIt would be a bad idea to nice down a backend anyway, if the intent is\nto speed up other backends. The Unix scheduler has no idea about\napplication-level locking, so you'll get priority-inversion problems:\nonce the nice'd backend has acquired any sort of lock, other backends\nthat may be waiting for that lock are at the mercy of the low priority\nsetting. In effect, your entire database setup may be running at the\nnice'd priority relative to anything else on the system.\n\nI think Philip's idea of adding some delays into pg_dump is a reasonable\nanswer. I'm just recommending a KISS approach to implementing the\ndelay, in the absence of evidence that a more complex mechanism will\nactually buy anything...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 11:34:05 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "At 11:34 29/07/00 -0400, Tom Lane wrote:\n>\n>I think Philip's idea of adding some delays into pg_dump is a reasonable\n>answer. I'm just recommending a KISS approach to implementing the\n>delay, in the absence of evidence that a more complex mechanism will\n>actually buy anything...\n>\n\nThe results of some experiments:\n\nUnfortunately I have been unable to devise a proper test of the 'fixed'\nsleep method: the COPY loop is sufficiently tight so that on a fast machine\neven a small delay inside *each* iteration makes for a very slow process\n(on my machine, I think the smallest allowed delay is 10ms, and the COPY\nloop runs in about 100-300 usec intervals while the COPY buffer is being\ndumped). As a result I have had to activate the sleep code only when the\ntime since it last sleep is > 100ms. Which means that the 'throttle time'\nspecified by the user is effectively a ratio anyway, and I have implemented\nit as such.\n\nBasically, the user can specify a number of ms to wait per second of\n'running'. This ratio is checked on each iteration, and when the amount of\ntime to sleep exceeds 100ms, the sleep call is made, and the timer is reset.\n\neg. \n\n pg_dump dbname -T1000 --tab=big-table > /dev/null\n\nwill rest for an average of 1 second for each second running (during COPY);\nthe actual 'sleeps' will occur every 100ms or so, and last for 100ms.\n\n\n pg_dump dbname -T30000 --tab=big-table > /dev/null\n\nwill rest for an average of 30 seconds for each second running (during\nCOPY); the actual 'sleeps' will occur every 3ms or so and last for 100ms\n\n pg_dump dbname -T500 --tab=big-table > /dev/null\n\nwill rest for an average of 0.5 seconds for each second running (during\nCOPY); the actual 'sleeps' will occur every 200ms or so and last for 100ms.\n\netc.\n\nThis is actually more complex that I had hoped (originally I planned to\njust do a simple ratio), but experimentation of a *very* slow mashine (P90)\nand a fast-ish one (PIII 550) showed that a range of values to achieve 50%\nCPU utilization (on an unloaded machine) varied from as high as 30:1 down\nto 0.3:1 (the CPU boost from IO on a P90 is enormous - postmaster runs at\n90% CPU until a ratio of about 15:1).\n\nThese times are obviously highly subjective, and the only real conclusion I\ncan draw from them are:\n\n- It's too hard to predict (as Tom suggested)\n- It's important to allow for a very tight loop in coding the 'sleep' code.\n\nThis is disappointing in the sense that I had hoped to get a\none-number-suits-all-tables-at-a-given-time-on-a-given-machine solution,\nbut experiments with tables with lots of columns and tables with large\ntoasted values reveals quite a wide variation even with this model.\n\nUnless someone has a further suggestion, I'll just clean it up and submit\nit...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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": "Mon, 31 Jul 2000 13:20:15 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation "
},
{
"msg_contents": "I do not think it is a good idea to add some sleep-ability to pg_dump\nunless we can get a general agreement that this is a valuable feature.\n\n\n> At 13:36 28/07/00 -0400, Tom Lane wrote:\n> >Philip Warner <[email protected]> writes:\n> >> Well...pg_dump sits in a loop reading COPY output; my hope was to see how\n> >> long the copy took, and then wait an appropriate amount of time. The dummy\n> >> select works nicely as a sleep call, but I can't really tell how long to\n> >> sleep without a sub-second timer, or something that tells me the time\n> >> between two calls.\n> >\n> >Seems like just delaying for a user-specifiable number of microseconds\n> >between blocks or lines of COPY output would get the job done. \n> \n> You're probably right; and if I can't trust setitimer, sigaction and pause,\n> then I guess I have no choice.\n> \n> \n> > I'm not\n> >clear what the reason is for needing to measure anything --- the user is\n> >going to be tweaking the parameter anyway to arrive at what he feels is\n> >an acceptable overall system load from the backup operation, so how are\n> >you making his life easier by varying the delay?\n> ...\n> >We do have an existing dependency on gettimeofday() in postgres.c's\n> >ShowUsage(), so if you really feel a compulsion to measure then that's\n> >what to use. I don't see what it's buying you though.\n> \n> The plan was for the user to specify a single number that was the ratio of\n> time spent sleeping to the time spent 'working' (ie. reading COPY lines).\n> \n> In the ordinary case this value would be 0 (no sleep), and for a very low\n> load model it might be as high as 10 - for every 100ms spent working it\n> spends 1000ms sleeping.\n> \n> This was intended to handle the arbitrary speed variations that occur when\n> reading, eg, large toasted rows and reading lots of small normal rows. A\n> simple 'wait 200ms' model would be fine for the former, but way too long\n> for the latter.\n> \n> >(AFAIR no one's ever asked for this before, so...)\n> \n> like most of these things (at least for me), it is personally relevant: I\n> also experience severe peformance degradation during backups.\n> \n> I'll look at gettimeofday...\n> \n> \n> ----------------------------------------------------------------\n> Philip Warner | __---_____\n> Albatross Consulting Pty. Ltd. |----/ - \\\n> (A.C.N. 008 659 498) | /(@) ______---_\n> Tel: (+61) 0500 83 82 81 | _________ \\\n> Fax: (+61) 0500 83 82 82 | ___________ |\n> Http://www.rhyme.com.au | / \\|\n> | --________--\n> PGP key available upon request, | /\n> and from pgp5.ai.mit.edu:11371 |/\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, 31 Jul 2000 21:37:34 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "> It would be a bad idea to nice down a backend anyway, if the intent is\n> to speed up other backends. The Unix scheduler has no idea about\n> application-level locking, so you'll get priority-inversion problems:\n> once the nice'd backend has acquired any sort of lock, other backends\n> that may be waiting for that lock are at the mercy of the low priority\n> setting. In effect, your entire database setup may be running at the\n> nice'd priority relative to anything else on the system.\n> \n> I think Philip's idea of adding some delays into pg_dump is a reasonable\n> answer. I'm just recommending a KISS approach to implementing the\n> delay, in the absence of evidence that a more complex mechanism will\n> actually buy anything...\n\nI am worried about feature creep here. Does any other database\nimplement this? I can accept it as a config.h flag, but it seems\npublishing it as a pg_dump flag is just way too complicated for users.\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, 31 Jul 2000 21:48:41 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 21:48 31/07/00 -0400, Bruce Momjian wrote:\n>> It would be a bad idea to nice down a backend anyway, if the intent is\n>> to speed up other backends. The Unix scheduler has no idea about\n>> application-level locking, so you'll get priority-inversion problems:\n>> once the nice'd backend has acquired any sort of lock, other backends\n>> that may be waiting for that lock are at the mercy of the low priority\n>> setting. In effect, your entire database setup may be running at the\n>> nice'd priority relative to anything else on the system.\n>> \n>> I think Philip's idea of adding some delays into pg_dump is a reasonable\n>> answer. I'm just recommending a KISS approach to implementing the\n>> delay, in the absence of evidence that a more complex mechanism will\n>> actually buy anything...\n>\n>I am worried about feature creep here.\n\nI agree; it's definitely a non-critical feature. But then, it is only 80\nlines of code in one place (including 28 non-code lines). I am not totally\nhappy with the results it produces, so I have no objection to removing it\nall. I just need some more general feedback...\n\n\n>I can accept it as a config.h flag, \n\nYou mean stick it in a bunch of ifdefs? What is the gain there?\n\n\n>but it seems\n>publishing it as a pg_dump flag is just way too complicated for users.\n\nI've missed something, obviously. What is the problem here?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 13:06:51 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "> >> I think Philip's idea of adding some delays into pg_dump is a reasonable\n> >> answer. I'm just recommending a KISS approach to implementing the\n> >> delay, in the absence of evidence that a more complex mechanism will\n> >> actually buy anything...\n> >\n> >I am worried about feature creep here.\n> \n> I agree; it's definitely a non-critical feature. But then, it is only 80\n> lines of code in one place (including 28 non-code lines). I am not totally\n> happy with the results it produces, so I have no objection to removing it\n> all. I just need some more general feedback...\n> \n> \n> >I can accept it as a config.h flag, \n> \n> You mean stick it in a bunch of ifdefs? What is the gain there?\n> \n> \n> >but it seems\n> >publishing it as a pg_dump flag is just way too complicated for users.\n> \n> I've missed something, obviously. What is the problem here?\n\nI am more concerned with giving people a pg_dump option of questionable\nvalue. I don't have problems adding it to the C code because it may be\nof use to some people.\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, 31 Jul 2000 23:41:59 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 23:41 31/07/00 -0400, Bruce Momjian wrote:\n>> \n>> I've missed something, obviously. What is the problem here?\n>\n>I am more concerned with giving people a pg_dump option of questionable\n>value.\n\nAnd, sadly, I think questionable effectiveness...\n\n\n>I don't have problems adding it to the C code because it may be\n>of use to some people.\n\nIt's pretty easy code to write; I'm actually more inclined to remove it and\navoid the clutter. I'll probably put a comment in the code as to how to do\nit, and what the pitfalls are - then I/we don't need to maintain any more\nunused code.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 14:00:28 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 01:06 PM 8/1/00 +1000, Philip Warner wrote:\n\n>I agree; it's definitely a non-critical feature. But then, it is only 80\n>lines of code in one place (including 28 non-code lines). I am not totally\n>happy with the results it produces, so I have no objection to removing it\n>all. I just need some more general feedback...\n\nHave you tried pg_dump on a multi-processor machine, which most serious\ndatabase-backed websites run on these days? Do you see the same performance\ndegradation? My site runs on a dual P450 with RAID 1 LVD disks, and cost\nme exactly $2100 to build (would've been less if I'd laid off the extra\ncooling fans!)\n\nIf not, the target audience has shrunk even further. Any way you cut it,\nbackups want to be scheduled for low-volume hours and even internationally\npopular sites don't have steady volume for each hour of the 24 hour day.\n\n(after all, some hours of the day that correspond to the normal \"traffic\njam\" hours fall mostly in areas like the south pacific where few people\nlive, even if each and every one is an avid user the load they put on\npopular sites is bound to be low compared to, say, the eastern seaboard\nor Europe)\n\nIf your site's so popular that it has to be perky 24 hours a day for a\nrabid base of worldwide fans, then you can either:\n\n1. afford to invest in hardware (if not, you're not asking enough of your\n fans)\n2. afford to invest in other improvements in your website.\n\nDoing such unheard of things to a utility (again, is there any Unix or NT\nor VMS etc utility that has such a user option?) makes me think you're \nfinger-pointing at the wrong part of your service.\n\nBut, then again, I'm the kinda guy that looks for simple solutions to simple\nproblems...\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, 31 Jul 2000 21:12:57 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 11:41 PM 7/31/00 -0400, Bruce Momjian wrote:\n>I am more concerned with giving people a pg_dump option of questionable\n>value. I don't have problems adding it to the C code because it may be\n>of use to some people.\n\nI'm uncomfortable because I know of no other *nix utility that has such\noptions.\n\nIf they exist, can someone enumerate them?\n\nIt's hard to see why PG is such a special case in this regard, requiring\nsuch an overbearingly groty kludge.\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": "Mon, 31 Jul 2000 21:15:10 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "> At 11:41 PM 7/31/00 -0400, Bruce Momjian wrote:\n> >I am more concerned with giving people a pg_dump option of questionable\n> >value. I don't have problems adding it to the C code because it may be\n> >of use to some people.\n> \n> I'm uncomfortable because I know of no other *nix utility that has such\n> options.\n> \n> If they exist, can someone enumerate them?\n> \n> It's hard to see why PG is such a special case in this regard, requiring\n> such an overbearingly groty kludge.\n\nYes, agreed. I read a nice article about Mozilla feature-creep, and how\nit killed them:\n\n\thttp://www.suck.com/daily/2000/07/31/\n\nWe have been pretty good about keeping ourselves lean and directed.\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, 1 Aug 2000 00:26:06 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 21:12 31/07/00 -0700, Don Baccus wrote:\n>At 01:06 PM 8/1/00 +1000, Philip Warner wrote:\n>\n>>I agree; it's definitely a non-critical feature. But then, it is only 80\n>>lines of code in one place (including 28 non-code lines). I am not totally\n>>happy with the results it produces, so I have no objection to removing it\n>>all. I just need some more general feedback...\n>\n>Have you tried pg_dump on a multi-processor machine, which most serious\n>database-backed websites run on these days? Do you see the same performance\n>degradation? My site runs on a dual P450 with RAID 1 LVD disks, and cost\n>me exactly $2100 to build (would've been less if I'd laid off the extra\n>cooling fans!)\n\nThe original request came from a person with a \"4-CPU Xeon with 2GB of\nRAM\", but the \"solution\" does not seem to work for them (I think), so it's\nprobably a waste of time.\n\n\n>Doing such unheard of things to a utility (again, is there any Unix or NT\n>or VMS etc utility that has such a user option?) makes me think you're \n>finger-pointing at the wrong part of your service.\n\nI agree; I think in an earlier post I did say that I was trying to 'fix' an\nOS issue in the application, which is really not a good thing to do...but\nthere *is* a problem. Just no solution, apparently.\n\n\n>But, then again, I'm the kinda guy that looks for simple solutions to simple\n>problems...\n\nIt was simple when I started. Honest...\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 14:31:28 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 21:15 31/07/00 -0700, Don Baccus wrote:\n>At 11:41 PM 7/31/00 -0400, Bruce Momjian wrote:\n>>I am more concerned with giving people a pg_dump option of questionable\n>>value. I don't have problems adding it to the C code because it may be\n>>of use to some people.\n>\n>I'm uncomfortable because I know of no other *nix utility that has such\n>options.\n>\n>If they exist, can someone enumerate them?\n>\n>It's hard to see why PG is such a special case in this regard, requiring\n>such an overbearingly groty kludge.\n\nDon't beat about the bush. What are you trying to say, here? ;-}.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 14:34:48 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "\nIs this the sort of problem that nice() might solve, or not?\n\nBruce Momjian wrote:\n> \n> > >> I think Philip's idea of adding some delays into pg_dump is a reasonable\n> > >> answer. I'm just recommending a KISS approach to implementing the\n> > >> delay, in the absence of evidence that a more complex mechanism will\n> > >> actually buy anything...\n> > >\n> > >I am worried about feature creep here.\n> >\n> > I agree; it's definitely a non-critical feature. But then, it is only 80\n> > lines of code in one place (including 28 non-code lines). I am not totally\n> > happy with the results it produces, so I have no objection to removing it\n> > all. I just need some more general feedback...\n> >\n> >\n> > >I can accept it as a config.h flag,\n> >\n> > You mean stick it in a bunch of ifdefs? What is the gain there?\n> >\n> >\n> > >but it seems\n> > >publishing it as a pg_dump flag is just way too complicated for users.\n> >\n> > I've missed something, obviously. What is the problem here?\n> \n> I am more concerned with giving people a pg_dump option of questionable\n> value. I don't have problems adding it to the C code because it may be\n> of use to some people.\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, 01 Aug 2000 14:38:43 +1000",
"msg_from": "Chris Bitmead <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 14:38 1/08/00 +1000, Chris Bitmead wrote:\n>\n>Is this the sort of problem that nice() might solve, or not?\n>\n\nDoesn't seem to; the problem is the IO, I think. Besides, it's a bad idea\nto change priorities on backend processes (which is where most of the work\nis done).\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 14:56:51 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "\nDon Baccus writes:\n\n> At 01:06 PM 8/1/00 +1000, Philip Warner wrote:\n> \n> >I agree; it's definitely a non-critical feature. But then, it is only 80\n> >lines of code in one place (including 28 non-code lines). I am not totally\n> >happy with the results it produces, so I have no objection to removing it\n> >all. I just need some more general feedback...\n> \n> Have you tried pg_dump on a multi-processor machine, which most serious\n> database-backed websites run on these days? Do you see the same performance\n> degradation? My site runs on a dual P450 with RAID 1 LVD disks, and cost\n> me exactly $2100 to build (would've been less if I'd laid off the extra\n> cooling fans!)\n\nHi Don. \n\nI'm the one having the problem. The machine in question is a 4-CPU Xeon\nwith 4GB RAM running Linux and Postgres6.5. It's not a web application\n(although AOLserver is running on the same machine). The table has more\nthan 10 million rows, but I don't know exactly how many.\n\nIn any case, I tried Philip's throttle code, ported to pg_dump for 6.5 but\nit doesn't seem to help. It seems that the backend doing the COPY is taking\nup all the I/O. If there's no way around that I will probably just have to\nschedule a couple of hours of downtime to dump the data.\n\nI would like to extend my thanks to Philip and everyone else for their help\nand suggestions.\n\nBrian\n--\nBrian Baquiran <[email protected]>\nhttp://www.baquiran.com/ AIM: bbaquiran \nWork: +63(2)7182222 Home: +63(2) 9227123\n\nI'm smarter than average. Therefore, average, to me, seems kind of stupid. \nPeople weren't purposely being stupid. It just came naturally.\n -- Bruce \"Tog\" Toganazzini\n",
"msg_date": "Tue, 01 Aug 2000 05:36:58 GMT",
"msg_from": "[email protected]",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pg_dump & performance degradation"
},
{
"msg_contents": "My $.02 ...\n :)\n\nAnyway, the command line option makes the most sense. An arbitrary or \nrelative sleep timer specified as an option is an ideal way to go about \nit. I really liked the\npg_dump -T {pick a number, any number} idea. maybe a -d for delay or \nsomething...\n\nNote: A command line option is not too difficult for someone to use. (I \nsaw someone mention this.) If you're using a GUI and rely on it... get \nsomeone to add a check box for the option. Otherwise if your actually \nusing a command-line utility, you've got the hardest part licked... (It's \na nice FAQ item, why is my db so slow when doing a backup? ... how can I \nfix this? ...)\n\nThis seems a little rhetorical in some respects... I would want a backup or \ndump of the DB to hit as quickly as possible... (scheduled for a low load \ntime). But if, hypothetically, the load is constant, then a more relaxed \nbackup might be in order...\n\nAll in all, hard coding in the delay, would aggravate me and quite a few \nothers; can't you hear it, \"Why the *#!##@$ is this taking so long?\"\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\nMy $.02 ...\n :)\n\nAnyway, the command line option makes the most\nsense. An arbitrary or relative sleep timer specified\nas an option is an ideal way to go about it. I really liked the\n\npg_dump -T {pick a number, any number} idea. maybe a\n-d for delay or something... \n\nNote: A command line option is not too difficult for someone\nto use. (I saw someone mention this.) If you're using a\nGUI and rely on it... get someone to add a check box for the\noption. Otherwise if your actually using a command-line\nutility, you've got the hardest part licked... (It's a nice FAQ\nitem, why is my db so slow when doing a backup? ... how can I fix this?\n...)\n\nThis seems a little rhetorical in some respects... I would want a\nbackup or dump of the DB to hit as quickly as possible... (scheduled for\na low load time). But if, hypothetically, the load is constant,\nthen a more relaxed backup might be in order...\n\nAll in all, hard coding in the delay, would aggravate me and quite a\nfew others; can't you hear it, \"Why the *#!##@$ is this taking so\nlong?\"\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Tue, 01 Aug 2000 01:49:44 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "",
"msg_date": "Tue, 01 Aug 2000 16:54:49 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": ">>All in all, hard coding in the delay, would aggravate me and quite a few \n>>others; can't you hear it, \"Why the *#!##@$ is this taking so long?\"\n>Just in case there is a misunderstanding, this was never, ever, part of \n>the plan or implementation. The 'throttle' code was driven by a command \n>option...\nIt was... my apologies...\n\nThomas\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\n\nAll in all, hard\ncoding in the delay, would aggravate me and quite a few others; can't you\nhear it, \"Why the *#!##@$ is this taking so long?\"\nJust in case there is a misunderstanding, this was never,\never, part of the plan or implementation. The 'throttle' code was driven\nby a command option... It was... my apologies...\n\nThomas\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Tue, 01 Aug 2000 02:48:32 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "> \n> Is this the sort of problem that nice() might solve, or not?\n\nNo. Nice only handles CPU scheduling, not I/O. In fact, most kernels\ngive I/O bound processed higher priority because they are using valuable\nshared resources while doing the I/O, so the kernel wants it to finish\nas quickly as possible.\n\n> \n> Bruce Momjian wrote:\n> > \n> > > >> I think Philip's idea of adding some delays into pg_dump is a reasonable\n> > > >> answer. I'm just recommending a KISS approach to implementing the\n> > > >> delay, in the absence of evidence that a more complex mechanism will\n> > > >> actually buy anything...\n> > > >\n> > > >I am worried about feature creep here.\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, 1 Aug 2000 08:46:38 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 02:31 PM 8/1/00 +1000, Philip Warner wrote:\n\n>>Have you tried pg_dump on a multi-processor machine, which most serious\n>>database-backed websites run on these days? Do you see the same\nperformance\n>>degradation? My site runs on a dual P450 with RAID 1 LVD disks, and cost\n>>me exactly $2100 to build (would've been less if I'd laid off the extra\n>>cooling fans!)\n>\n>The original request came from a person with a \"4-CPU Xeon with 2GB of\n>RAM\", but the \"solution\" does not seem to work for them (I think), so it's\n>probably a waste of time.\n\nIt seems really strange that pg_dump could suck the guts out of a\nfour-processor\nmachine. What kind of device were they backing up to? Disk?\n\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": "Tue, 01 Aug 2000 06:05:53 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & performance degradation"
},
{
"msg_contents": "At 06:05 1/08/00 -0700, Don Baccus wrote:\n>At 02:31 PM 8/1/00 +1000, Philip Warner wrote:\n>\n>>>Have you tried pg_dump on a multi-processor machine, which most serious\n>>>database-backed websites run on these days? Do you see the same\n>performance\n>>>degradation? My site runs on a dual P450 with RAID 1 LVD disks, and cost\n>>>me exactly $2100 to build (would've been less if I'd laid off the extra\n>>>cooling fans!)\n>>\n>>The original request came from a person with a \"4-CPU Xeon with 2GB of\n>>RAM\", but the \"solution\" does not seem to work for them (I think), so it's\n>>probably a waste of time.\n>\n>It seems really strange that pg_dump could suck the guts out of a\n>four-processor\n>machine. What kind of device were they backing up to? Disk?\n\nI *think* you missed the point; the problem is that the CPU is perfectly\nadequate to \"suck the guts\" out of his disks. If it was just a CPU issue,\nthen 'nice' would work.\n\nThe throttle stuff is there to slow down pg_dump and thereby reduce IO\nload. AFAIK, there is no supported way of limiting IO demand in Unix. But\nI'd love to be corrected. My meagre PIII 550 is perfectly able to simulate\nthe problem (with just a million rows) - and the code seems to help. But\nnot apparently for the 4-CPU Xeon (although I don't think he has tested the\nmost recent code).\n\nBut, given the negative response to the code (and the fact that it seems to\nonly be somewhat effective), I'll probably be ditching it.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 23:37:04 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & performance degradation"
}
] |
[
{
"msg_contents": "I've committed changes to gram.y to get PATH accepted as both a data\ntype and a column label (the latter is what the regression test has been\ncomplaining about).\n\nThere is some difference in \"edge case\" names allowed for ColId and, for\nexample, function names, though I think the current state is more\nconsistant than earlier. There are likely to be more changes coming, and\n*possibly* these changes will include ugly restrictions on where SQL92\ntype names are allowed to appear.\n\nThis last point comes from SQL99 allowing\n\n CREATE FUNCTION name (IN argname argtype,...)\n CREATE FUNCTION name (argname argtype,...)\n CREATE FUNCTION name (argtype,...)\n\nand afaict most other permutations. yacc has trouble with the \"argname\nargtype\" pair since it can't tell by looking ahead just one token\nwhether what is reading is an \"argname\" or an \"argtype\". I'll keep\npoking at it...\n\n - Thomas\n",
"msg_date": "Fri, 28 Jul 2000 15:33:39 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Fixed PATH regression test"
}
] |
[
{
"msg_contents": "I have just noticed something that's been broken for a good long while\n(at least since 6.3): bufmgr.c expects that I/O errors will result in\nan SM_FAIL return code from the smgr.c routines, but smgr.c does no\nsuch thing: it does elog(ERROR) if it sees a failure. All of the\n\"error handling\" paths in bufmgr.c are dead code and have been since\nat least 6.3.\n\nIt seems to me that we should either reduce smgr.c's elog()s to NOTICEs,\nor rip out all of the dead code in bufmgr.c. I'm inclined to the\nlatter, since the former seems likely to create new bugs.\n\nI'm also thinking that AbortBufferIO is *way* overstepping its authority\nby forcing a postmaster restart if it notices a double write failure.\nThe dirty buffer is a problem, no doubt, but this solution looks like\nurban renewal via A-bomb. I'd rather just keep failing anytime some\ntransaction tries to write the buffer --- better that than taking out\nall active transactions whether they'd ever touched that buffer or not.\nIf the write failure really is permanent, the dbadmin would eventually\nhave to intervene via a manual restart, but a manual restart at the time\nof the dbadmin's choosing seems better than forcing a failure under\nload.\n\nComments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 18:10:11 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "bufmgr and smgr don't talk to each other, apparently"
},
{
"msg_contents": "> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Tom Lane\n> \n> I have just noticed something that's been broken for a good long while\n> (at least since 6.3): bufmgr.c expects that I/O errors will result in\n> an SM_FAIL return code from the smgr.c routines, but smgr.c does no\n> such thing: it does elog(ERROR) if it sees a failure. All of the\n\nexcept smgropen(). It's not easy to return from mdxxx() in case of\nerrors. Fortunately I succeeded to return from mdopen() in 'file non-\nexistent' cases.\n\n> \"error handling\" paths in bufmgr.c are dead code and have been since\n> at least 6.3.\n> \n> It seems to me that we should either reduce smgr.c's elog()s to NOTICEs,\n> or rip out all of the dead code in bufmgr.c. I'm inclined to the\n> latter, since the former seems likely to create new bugs.\n>\n\nI also prefer the latter. Even though smgr returns SM_FAIL,md stuff\nalready calls elog(ERROR) in many places.\n\nRegards.\n\nHiroshi Inoue\n",
"msg_date": "Sat, 29 Jul 2000 23:38:02 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: bufmgr and smgr don't talk to each other, apparently"
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n>> (at least since 6.3): bufmgr.c expects that I/O errors will result in\n>> an SM_FAIL return code from the smgr.c routines, but smgr.c does no\n>> such thing: it does elog(ERROR) if it sees a failure. All of the\n\n> except smgropen().\n\nRight. I'm mainly looking at the block read/write/flush calls,\nwhich have a lot of now-useless error recovery code after them.\n\n> I also prefer the latter. Even though smgr returns SM_FAIL,md stuff\n> already calls elog(ERROR) in many places.\n\nGood point, and the fd.c level may have some elogs too...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 11:59:26 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: bufmgr and smgr don't talk to each other, apparently "
}
] |
[
{
"msg_contents": "I've noticed that adding an index on a column has no effect on \"select\ndistinct\" (index or no index, the entire table is sequence scanned; see\nexample below). Couldn't you just traverse the index to get the\ndistinct values?\n\nTim\n\nkeitt=# vacuum analyze test;\nVACUUM\nkeitt=# select distinct a from test;\n a \n---\n a\n b\n c\n d\n f\n s\n z\n(7 rows)\n\nkeitt=# explain select distinct a from test;\nNOTICE: QUERY PLAN:\n\nUnique (cost=1.67..1.72 rows=2 width=12)\n -> Sort (cost=1.67..1.67 rows=21 width=12)\n -> Seq Scan on test (cost=0.00..1.21 rows=21 width=12)\n\nEXPLAIN\nkeitt=# create index test_index on test (a);\nCREATE\nkeitt=# explain select distinct a from test;\nNOTICE: QUERY PLAN:\n\nUnique (cost=1.67..1.72 rows=2 width=12)\n -> Sort (cost=1.67..1.67 rows=21 width=12)\n -> Seq Scan on test (cost=0.00..1.21 rows=21 width=12)\n\nEXPLAIN\n\n\n-- \nTimothy H. Keitt\nNational Center for Ecological Analysis and Synthesis\n735 State Street, Suite 300, Santa Barbara, CA 93101\nPhone: 805-892-2519, FAX: 805-892-2510\nhttp://www.nceas.ucsb.edu/~keitt/\n",
"msg_date": "Fri, 28 Jul 2000 16:36:50 -0700",
"msg_from": "\"Timothy H. Keitt\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "select distinct"
},
{
"msg_contents": "\"Timothy H. Keitt\" <[email protected]> writes:\n> Couldn't you just traverse the index to get the distinct values?\n\nNo, because the index doesn't contain commit status; you can't tell\nwhich values are actually valid without visiting the main table.\n\n7.0 does consider both indexscan | unique and seqscan | sort | unique\nplans for this problem, but the explicit sort is usually faster\n(according to the system's cost models, anyway).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 22:55:00 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: select distinct "
}
] |
[
{
"msg_contents": "I'm updating path & polygon for TOAST/new fmgr. I'm not going to\nbother to fix the following functions; they'll be deleted instead:\n\n/* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */\n\nAny objections?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 28 Jul 2000 23:58:03 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "pre-6.1-to-6.1 conversion procs slated for destruction"
},
{
"msg_contents": "> I'm updating path & polygon for TOAST/new fmgr. I'm not going to\n> bother to fix the following functions; they'll be deleted instead:\n> /* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */\n> Any objections?\n\nNo, kill 'em!\n\n - Thomas\n",
"msg_date": "Mon, 31 Jul 2000 05:26:01 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pre-6.1-to-6.1 conversion procs slated for destruction"
}
] |
[
{
"msg_contents": "I just noticed that path_distance() in geo_ops.c (the \"<->\" operator\nfor path datatype) claims to be computing the minimum distance between\nany two line segments of the two paths, but actually it's computing the\nmaximum such distance.\n\nIsn't this broken?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 00:39:17 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Hmm ... shouldn't path_distance be MIN distance not MAX distance?"
},
{
"msg_contents": "> I just noticed that path_distance() in geo_ops.c (the \"<->\" operator\n> for path datatype) claims to be computing the minimum distance between\n> any two line segments of the two paths, but actually it's computing the\n> maximum such distance.\n> Isn't this broken?\n\nSure sounds like it :(\n\n - Thomas\n",
"msg_date": "Mon, 31 Jul 2000 05:26:50 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Hmm ... shouldn't path_distance be MIN distance not MAX\n\tdistance?"
}
] |
[
{
"msg_contents": "Dear all, \n\nI need drawing tools to show the table relationship. I have used pgaccess but \nit seems that the effect is not very good. Are there any recommendations? \n\n\nBest regards,\nBoris\n",
"msg_date": "Sat, 29 Jul 2000 15:15:11 +0800",
"msg_from": "<[email protected]>",
"msg_from_op": true,
"msg_subject": "Database Diagram Drawing Tools ? "
},
{
"msg_contents": "On Sat, 29 Jul 2000, [email protected] wrote:\n> Dear all, \n> \n> I need drawing tools to show the table relationship. I have used pgaccess but \n> it seems that the effect is not very good. Are there any recommendations? \n\nDia\n\nhttp://www.lysator.liu.se/~alla/dia/\n\n-- \n\t\t\t- Robert\n",
"msg_date": "Sat, 29 Jul 2000 05:18:50 -0400",
"msg_from": "\"Robert B. Easter\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Database Diagram Drawing Tools ?"
},
{
"msg_contents": "\"Robert B. Easter\" wrote:\n> \n> On Sat, 29 Jul 2000, [email protected] wrote:\n> > Dear all,\n> >\n> > I need drawing tools to show the table relationship. I have used pgaccess but\n> > it seems that the effect is not very good. Are there any recommendations?\n> \n> Dia\n> \n> http://www.lysator.liu.se/~alla/dia/\n> \n> --\n> - Robert\n\nWe paid $$$ for visio pro. It can automatically detect table\nrelationships and show joins. But we were never able to find a way to\nshow which attributes the joins were based on. In the end we found dia\nto handle the task easily. And for no $$$.\n\nI second the recommendation.\n\n-- \nKarl DeBisschop\t\t\t\t\[email protected]\nFamily Education Network/Information Please\thttp://www.infoplease.com\nNetsaint Plugin Developer\t\t\[email protected]\n",
"msg_date": "Sat, 29 Jul 2000 08:16:06 -0400",
"msg_from": "Karl DeBisschop <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Database Diagram Drawing Tools ?"
},
{
"msg_contents": "Hi all,\n\nI have downloaded the dia 0.80 for Redhat. But it has only diagrams for \nflowchart, network, sybase uml and circuit. I would like to use it to show the \ntable fields and the relationship. How can I do it? \n\nMany thanks!!!\n\nBest regards,\nBoris\n\nQuoting Karl DeBisschop <[email protected]>:\n\n> \"Robert B. Easter\" wrote:\n> > \n> > On Sat, 29 Jul 2000, [email protected] wrote:\n> > > Dear all,\n> > >\n> > > I need drawing tools to show the table relationship. I have used\n> pgaccess but\n> > > it seems that the effect is not very good. Are there any\n> recommendations?\n> > \n> > Dia\n> > \n> > http://www.lysator.liu.se/~alla/dia/\n> > \n> > --\n> > - Robert\n> \n> We paid $$$ for visio pro. It can automatically detect table\n> relationships and show joins. But we were never able to find a way to\n> show which attributes the joins were based on. In the end we found dia\n> to handle the task easily. And for no $$$.\n> \n> I second the recommendation.\n> \n> -- \n> Karl DeBisschop\t\t\t\t\n\[email protected]\n> Family Education Network/Information Please\thttp://www.infoplease.com\n> Netsaint Plugin Developer\t\t\[email protected]\n> \n",
"msg_date": "Sat, 29 Jul 2000 21:03:01 +0800",
"msg_from": "<[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Database Diagram Drawing Tools ?"
},
{
"msg_contents": "[email protected] wrote:\n> \n> Hi all,\n> \n> I have downloaded the dia 0.80 for Redhat. But it has only diagrams for\n> flowchart, network, sybase uml and circuit. I would like to use it to show the\n> table fields and the relationship. How can I do it?\n\nI used classes and associations in UML. Worked for me.\n\n-- \nKarl DeBisschop\t\t\t\t\[email protected]\nFamily Education Network/Information Please\thttp://www.infoplease.com\nNetsaint Plugin Developer\t\t\[email protected]\n",
"msg_date": "Sat, 29 Jul 2000 10:20:49 -0400",
"msg_from": "Karl DeBisschop <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Database Diagram Drawing Tools ?"
}
] |
[
{
"msg_contents": "I'm thinking of removing the datatype \"filename\", which is a fixed-size\narray of 256 characters with no support functions other than input and\noutput converters. Apparently it was once used in the system tables,\nbut it is so no longer AFAICT. Since it's fixed-length, it cannot be\nmade TOASTable, which makes it substantially inferior to type \"text\"\nfor any purpose that I can think of.\n\nAnyone using this type?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 14:23:02 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Anyone care about type \"filename\" ?"
},
{
"msg_contents": "> I'm thinking of removing the datatype \"filename\", which is a fixed-size\n> array of 256 characters with no support functions other than input and\n> output converters. Apparently it was once used in the system tables,\n> but it is so no longer AFAICT. Since it's fixed-length, it cannot be\n> made TOASTable, which makes it substantially inferior to type \"text\"\n> for any purpose that I can think of.\n> \n> Anyone using this type?\n\nI vote for removal.\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, 31 Jul 2000 21:50:44 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Anyone care about type \"filename\" ?"
},
{
"msg_contents": "On Mon, 31 Jul 2000, Bruce Momjian wrote:\n\n> > I'm thinking of removing the datatype \"filename\", which is a fixed-size\n> > array of 256 characters with no support functions other than input and\n> > output converters. Apparently it was once used in the system tables,\n> > but it is so no longer AFAICT. Since it's fixed-length, it cannot be\n> > made TOASTable, which makes it substantially inferior to type \"text\"\n> > for any purpose that I can think of.\n> > \n> > Anyone using this type?\n> \n> I vote for removal.\n\nworks for me too ...\n\ncurious though, but why would such a type even be used in the system\ntables? what difference does it have to a varchar(256)?\n\n",
"msg_date": "Mon, 31 Jul 2000 23:09:23 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Anyone care about type \"filename\" ?"
},
{
"msg_contents": "The Hermit Hacker <[email protected]> writes:\n> curious though, but why would such a type even be used in the system\n> tables? what difference does it have to a varchar(256)?\n\nIt was *fixed* length, not varlena. 256 bytes, no more, no less,\nno length word, no nuthin.\n\nMight've had some use in a system table, but I can't see a reason\nfor it in general-purpose user tables.\n\nIn any case, it's already history ;-)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 00:04:37 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Anyone care about type \"filename\" ? "
},
{
"msg_contents": "On Tue, 1 Aug 2000, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > curious though, but why would such a type even be used in the system\n> > tables? what difference does it have to a varchar(256)?\n> \n> It was *fixed* length, not varlena. 256 bytes, no more, no less,\n> no length word, no nuthin.\n\nokay, reword ... what would have been the difference between that and\nchar(256)? :) I'm just curious as to whether it had any checks that would\nhave validated it as being a filename or something like that, that's all\n... \n\n\n",
"msg_date": "Tue, 1 Aug 2000 17:27:57 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Anyone care about type \"filename\" ? "
},
{
"msg_contents": "The Hermit Hacker <[email protected]> writes:\n> okay, reword ... what would have been the difference between that and\n> char(256)? :) I'm just curious as to whether it had any checks that would\n> have validated it as being a filename or something like that, that's all\n\nActually, the input converter did have some code to expand \"~username\"\npaths. But putting that in the input converter was broken by design;\nyou don't want the home directory expanded in a path when it's stored\ninto the database, you want to expand it when the path is used (what\nif the user's home dir has moved since you made the DB entry?)\n\nIt might be worth pulling that code out of the CVS attic and inventing\na text-to-text \"expand_pathname()\" function that expands ~username and\nperhaps also $ENVIRONMENTVAR in text strings interpreted as pathnames.\nBut I doubt that having a separate type for filenames is useful.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 17:23:53 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Anyone care about type \"filename\" ? "
},
{
"msg_contents": "On Tue, 1 Aug 2000, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > okay, reword ... what would have been the difference between that and\n> > char(256)? :) I'm just curious as to whether it had any checks that would\n> > have validated it as being a filename or something like that, that's all\n> \n> Actually, the input converter did have some code to expand \"~username\"\n> paths. But putting that in the input converter was broken by design;\n> you don't want the home directory expanded in a path when it's stored\n> into the database, you want to expand it when the path is used (what\n> if the user's home dir has moved since you made the DB entry?)\n\nAh, okay, cool ... thanks :) Just seemed like a weird type to define if\nyou don't do anything different then char(256) would have done ...\n\n",
"msg_date": "Tue, 1 Aug 2000 20:42:04 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Anyone care about type \"filename\" ? "
}
] |
[
{
"msg_contents": "I notice that ACL lists are represented as arrays of aclitem, which\nmeans they are now theoretically toastable. (In practice, I haven't\nfinished fixing all the routines that touch ACLs, but will soon.)\n\nDo we need long lists of ACLs? If so, is there any danger in giving\npg_class a toast relation? It's a tad closer to the heart of the\nsystem than pg_rewrite, so I'm not quite sure if that will work or\nnot. Jan?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 29 Jul 2000 15:08:39 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Hmm, should ACL[] be toastable?"
},
{
"msg_contents": "Tom Lane wrote:\n> I notice that ACL lists are represented as arrays of aclitem, which\n> means they are now theoretically toastable. (In practice, I haven't\n> finished fixing all the routines that touch ACLs, but will soon.)\n>\n> Do we need long lists of ACLs? If so, is there any danger in giving\n> pg_class a toast relation? It's a tad closer to the heart of the\n> system than pg_rewrite, so I'm not quite sure if that will work or\n> not. Jan?\n\n In theory it should work, in practice, I don't know.\n\n Since pg_class is really close to the heart of the system, it\n is created a little different during bootstrap. This causes,\n that setting relacl to storage 'x' doesn't automatically\n create a toast relation for it during bootstrap. And\n therefore, the toaster should only try to compress, never\n move out (to where?).\n\n Someone could later create such a toast table with ALTER\n TABLE ... if he wants to give it a try. And we could warn\n him not to do so before we really stress tested it.\n\n Is that a compromise?\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": "Sun, 30 Jul 2000 01:23:02 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Hmm, should ACL[] be toastable?"
}
] |
[
{
"msg_contents": "Unfortunately I managed to create a problematic database. The problem\noccurs if I execute pg_dump and then try to reload the database. Details:\n\nMy only definitions in this database are:\n\n> create function x(int4) returns bool as 'select $1 > 10;' language 'sql';\n> create table y(z int4 check(x(z)));\n\nThen, after pg_dump I got the next dump:\n\n\\connect - postgres\nCREATE TABLE \"y\" (\n\t\"z\" int4,\n\tCONSTRAINT \"y_z\" CHECK (x(z))\n);\nCREATE FUNCTION \"x\" (int4 ) RETURNS bool AS 'select $1 > 10;' LANGUAGE 'SQL';\nCOPY \"y\" FROM stdin;\n\\.\n\nThen, loading this dump back into the dropped and recreated database, I\ngot error messages, because the FUNCTION \"x\" is not created before the\nTABLE \"y\".\n\nThe problem doesn't seems to be solved too easily. In fact, it is not a\ngood solution that FUNCTIONs are dumped before the TABLEs, because\nthe 'SQL' FUNCTIONs use the TABLEs in general (and the parser tries to\ndetect the SQL query). What to do? We need to store some kind of hierarchy\nbetween table and function definitions, and after that could we say\nsomething about the regenerating order. Of course, it needs at least one\nnew table among the system tables and needs pg_dump to be a bit more\ncomplicated.\n\nRegards,\nZoltan\n\n------------------------------------------------------------------------------\nKOVACS, Zoltan [email protected]\n\n",
"msg_date": "Sat, 29 Jul 2000 21:18:17 +0200 (CEST)",
"msg_from": "Kovacs Zoltan Sandor <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump + function/table hierarchy"
}
] |
[
{
"msg_contents": "At 21:18 29/07/00 +0200, Kovacs Zoltan Sandor wrote:\n>Unfortunately I managed to create a problematic database. The problem\n>occurs if I execute pg_dump and then try to reload the database. Details:\n>\n>My only definitions in this database are:\n>\n>> create function x(int4) returns bool as 'select $1 > 10;' language 'sql';\n>> create table y(z int4 check(x(z)));\n>\n\nThis is fixed in the next version as well as an experimental version for\n7.0.2 found at:\n\n ftp://ftp.rhyme.com.au/pub/postgresql/pg_dump/blobs/\n\nThe solution (as suggested by Tom Lane) was to sort the items by OID before\ndumping them. This is not a perfect solution, but it will cover 95% of cases.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 30 Jul 2000 10:08:03 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump + function/table hierarchy"
},
{
"msg_contents": "> This is fixed in the next version as well as an experimental version for\n> 7.0.2 found at:\n> \n> ftp://ftp.rhyme.com.au/pub/postgresql/pg_dump/blobs/\n> \n> The solution (as suggested by Tom Lane) was to sort the items by OID before\n> dumping them. This is not a perfect solution, but it will cover 95% of cases.\nI tried this new pg_dump. It worked for me very well. But, for a\ndatabase with 10000 rows it wasn't too fast dumping out (twice slower than\nthe original one) and restoring it was three times slower.\n\nThanks again, Zoltan\n\n",
"msg_date": "Mon, 31 Jul 2000 20:52:46 +0200 (CEST)",
"msg_from": "Kovacs Zoltan Sandor <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump + function/table hierarchy"
},
{
"msg_contents": "At 20:52 31/07/00 +0200, Kovacs Zoltan Sandor wrote:\n>> This is fixed in the next version as well as an experimental version for\n>> 7.0.2 found at:\n>> \n>> ftp://ftp.rhyme.com.au/pub/postgresql/pg_dump/blobs/\n>> \n>> The solution (as suggested by Tom Lane) was to sort the items by OID before\n>> dumping them. This is not a perfect solution, but it will cover 95% of\ncases.\n>I tried this new pg_dump. It worked for me very well. But, for a\n>database with 10000 rows it wasn't too fast dumping out (twice slower than\n>the original one) and restoring it was three times slower.\n\nCan you send me the actual times? And the command you used?\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 11:54:23 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump + function/table hierarchy"
},
{
"msg_contents": "At 18:26 1/08/00 +0200, Kovacs Zoltan Sandor wrote:\n>> Can you send me the actual times? And the command you used?\n>I don't think my database is large enough to give you worthy data (~10000\n>lines). But, with the old pg_dump I got 5 secs, with the new one: 9 secs.\n>I used the -Fc option. The old dump was 377K, the new one is 285K.\n\nThe time diff and size diff is because the -Fc format compresses the data\nby default. If you did '-Fc -Z0', you would get 0 compression, a larger\nfile, and a time that was closer to the original.\n\n>pg_restore was fast, it was less than 1 sec. The total restoring time with\n>psql was 29 secs from the old dump, 86 secs from the new one. \n\n86 with the new one is a worry. It should not be that much slower - unless\nthere are a lot of tables, in which case updating of pg_class to disable\ntriggers for each table will slow it down a bit. \n\nI assume from this that you used pg_restore to create a script, which you\nthen fed into psql. Is that right?\n\nIf so, you might like to try:\n\n% createdb newdb\n% pg_restore <backup-file> --db=newdb\n\nthis avoids using psql and should be faster. I'd be interested to know how\nslow/fast it is. If it it still slow, is there any chance you could mail me\nthe backup file directly? I'll certainly understand if you say 'no', for\nobvious reasons.\n\n\n>I use Linux\n>2.2-12.20 (RedHat 6.1), the server is a 366 MHz Intel Celeron with a\n>WD64AA hard disk w/ 2048K cache.\n\nShould be plenty.\n\n\n>By the way, is there any statistics about the dumping/restoring time with\n>larger databases? Is there a faster method to backup and restore a\n>database than I did?\n\nAs above; dump: use -Z0 (no compression), restore: use --db to attach to\nthe DB directly.\n\nStatistics I have done with databases of 100,000 records and 1.3M records\nshow no appreciable difference between the old & new for both dump &\nrestore. The dump always takes longer if compression is used. I have not\ncompared it to piping the output to gzip, but I imagine they are similar.\n\nHope this helps,\n\nPhilip.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 02 Aug 2000 02:10:49 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump and pg_restore, speed"
},
{
"msg_contents": "> Can you send me the actual times? And the command you used?\nI don't think my database is large enough to give you worthy data (~10000\nlines). But, with the old pg_dump I got 5 secs, with the new one: 9 secs.\nI used the -Fc option. The old dump was 377K, the new one is 285K.\npg_restore was fast, it was less than 1 sec. The total restoring time with\npsql was 29 secs from the old dump, 86 secs from the new one. I use Linux\n2.2-12.20 (RedHat 6.1), the server is a 366 MHz Intel Celeron with a\nWD64AA hard disk w/ 2048K cache.\n\nBy the way, is there any statistics about the dumping/restoring time with\nlarger databases? Is there a faster method to backup and restore a\ndatabase than I did?\n\nRegards, Zoltan\n\n",
"msg_date": "Tue, 1 Aug 2000 18:26:55 +0200 (CEST)",
"msg_from": "Kovacs Zoltan Sandor <[email protected]>",
"msg_from_op": false,
"msg_subject": "pg_dump and pg_restore, speed"
}
] |
[
{
"msg_contents": "Hi all,\n\nI found another(??) lock freezing phenomenon.\nSeems I'm guilty for the bug.\n\nsession-1\n\tbegin;\n\tlock table a in share mode;\n\nsession-2\n\tbegin;\n\tlock table a;\n\t[blocked]\n\nsession-3\n\tbegin;\n\tlock table a in share mode;\n\t[blocked]\n\nsession-2\n\t^C\n\tCancel request sent\n\tERROR: Query cancel requested while waiting lock\n\tabort;\n\nsession-1\n\tcommit;\n\n Unfortunately LockReleaseAll() doesn't wake up session-3\n and so session-3 is still blocked.\n\nEither the cancel of session-2 or commit of session-1 must \nwake up session-3. I would change the cancel request stuff\nso that it can wake up sleeping processes. \n\nComments ?\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Sun, 30 Jul 2000 10:35:47 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "another ? lock freezing"
}
] |
[
{
"msg_contents": "I have a quick question. What is the quickest way to determine\nthe next highest power of two which is greater than a given\ninteger in 'C'. For example, given the number 7, I would like to\nreturn 8. Given the number 13, I would like to return 16, etc. Is\nthere a gem to do this without shifting a bit value from 1 left\nup to a maximum of 32 (or 64) iterations? \n\nThanks for any info, \n\nMike Mascari\n",
"msg_date": "Sat, 29 Jul 2000 21:38:33 -0400",
"msg_from": "Mike Mascari <[email protected]>",
"msg_from_op": true,
"msg_subject": "Off topic 'C' question"
},
{
"msg_contents": "* Mike Mascari <[email protected]> [000729 18:40] wrote:\n> I have a quick question. What is the quickest way to determine\n> the next highest power of two which is greater than a given\n> integer in 'C'. For example, given the number 7, I would like to\n> return 8. Given the number 13, I would like to return 16, etc. Is\n> there a gem to do this without shifting a bit value from 1 left\n> up to a maximum of 32 (or 64) iterations? \n> \n> Thanks for any info, \n\nThink \"binary search\".\n\n-Alfred\n",
"msg_date": "Sat, 29 Jul 2000 20:26:22 -0700",
"msg_from": "Alfred Perlstein <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Off topic 'C' question"
},
{
"msg_contents": "Alfred Perlstein wrote:\n> \n> * Mike Mascari <[email protected]> [000729 18:40] wrote:\n> > I have a quick question. What is the quickest way to determine\n> > the next highest power of two which is greater than a given\n> > integer in 'C'. For example, given the number 7, I would like to\n> > return 8. Given the number 13, I would like to return 16, etc. Is\n> > there a gem to do this without shifting a bit value from 1 left\n> > up to a maximum of 32 (or 64) iterations?\n> >\n> > Thanks for any info,\n> \n> Think \"binary search\".\n> \n> -Alfred\n\nYeah. Start with 2^16, check if larger. If so, check 2^8, etc. In\nGraphics Gems II, there's an algorithm by Ken Shoemake for\nfinding the lowest 1-bit set. You take the bit-wise AND of the\nword and its negative -- that easy. I was hoping something\nsimilar existed for finding the highest bit set. If so, I could\njust shift the result left one. If not, if there's a way to flip\nthe bits in an unsigned integer without barrel shifting, then all\nI would have to do is:\n\nflip\ntake bit-wise AND with negative\nflip\nshift left 1\n\nThe binary search, is of course, better then brute force, but can\nbe worse than linear for low values. For example, a search for\n2^5 would yield:\n\n2^16\n2^0\n2^8\n2^4\n2^6\n2^5\n\nor 6 iterations instead of 5, plus the actual shifting of the\nsearch value. I guess I was hoping for some \"bit-magic\" out\nthere.\n\nCheers,\n\nMike Mascari\n",
"msg_date": "Sun, 30 Jul 2000 01:05:51 -0400",
"msg_from": "Mike Mascari <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Off topic 'C' question"
},
{
"msg_contents": "Mike Mascari wrote:\n> I have a quick question. What is the quickest way to determine\n> the next highest power of two which is greater than a given\n> integer in 'C'. For example, given the number 7, I would like to\n> return 8. Given the number 13, I would like to return 16, etc. Is\n> there a gem to do this without shifting a bit value from 1 left\n> up to a maximum of 32 (or 64) iterations?\n\nBinary search.\n\n I assumed you really mean greater than, so that\n next_power2(4096) is 8192.\n\n For 32 bit values, the function\n\n unsigned int next_power2_32 (unsigned int value)\n {\n unsigned int comp = 1 << 16;\n unsigned int off = 8;\n\n if (value == 0)\n return 1;\n\n while (off > 0 && comp != value)\n {\n if (comp > value)\n comp >>= off;\n else\n comp <<= off;\n\n off >>= 1;\n }\n\n if (comp <= value)\n comp <<= 1;\n return comp;\n }\n\n is guaranteed to have at maximum 4 loop iterations for any\n value you want. Should be polished up a little for values >=\n (1 << 31), but I leave that to you. Obviuosly, looking for 64\n bit numbers, the loop max would be 5, and when we have 256\n bit integers as standard (in approx. 5-6 years :-) it'll\n finish with 7 iterations.\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": "Sun, 30 Jul 2000 13:28:38 +0200 (MEST)",
"msg_from": "[email protected] (Jan Wieck)",
"msg_from_op": false,
"msg_subject": "Re: Off topic 'C' question"
},
{
"msg_contents": "On Sat, Jul 29, 2000 at 09:38:33PM -0400, Mike Mascari wrote:\n> I have a quick question. What is the quickest way to determine\n> the next highest power of two which is greater than a given\n> integer in 'C'. For example, given the number 7, I would like to\n> return 8. Given the number 13, I would like to return 16, etc. Is\n> there a gem to do this without shifting a bit value from 1 left\n> up to a maximum of 32 (or 64) iterations? \n\nYou could use:\n\npow(x, ((int)(log(x)/log(2)) + 1));\n\n-- \nLouis-David Mitterrand - [email protected] - http://www.apartia.org\n\n \"Poor girl looks as confused as a blind lesbian in a fish market.\" -\n Simon R. Green \n",
"msg_date": "Fri, 11 Aug 2000 23:18:23 +0200",
"msg_from": "Louis-David Mitterrand <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Off topic 'C' question"
},
{
"msg_contents": "On Fri, Aug 11, 2000 at 11:18:23PM +0200, Louis-David Mitterrand wrote:\n> On Sat, Jul 29, 2000 at 09:38:33PM -0400, Mike Mascari wrote:\n> > I have a quick question. What is the quickest way to determine\n> > the next highest power of two which is greater than a given\n> > integer in 'C'. For example, given the number 7, I would like to\n> > return 8. Given the number 13, I would like to return 16, etc. Is\n> > there a gem to do this without shifting a bit value from 1 left\n> > up to a maximum of 32 (or 64) iterations? \n> \n> You could use:\n> \n> pow(x, ((int)(log(x)/log(2)) + 1));\n\nSorry the correct way is:\n\n #include <math.h>\n #include <stdio.h>\n #include <stdlib.h>\n\n int main(int argc, char ** argv) {\n int r = atoi(argv[1]);\n printf(\"result is %g\\n\", pow(2, (int)((log(r)/log(2)) + 1)));\n return 0;\n }\n\nThis works for any power, simply replace 2 by the desired exponent.\n\n-- \nLouis-David Mitterrand - [email protected] - http://www.apartia.org\n",
"msg_date": "Sat, 12 Aug 2000 08:50:54 +0200",
"msg_from": "Louis-David Mitterrand <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: Off topic 'C' question"
}
] |
[
{
"msg_contents": "Hello,\n\nSometime ago I did a patch to have large objects rollbackable.\nThat patch was against the current (on that moment) CVS.\nIt worked fine.\n\nNow I tried to port the patch to 7.0.2 and have the following problem:\nSomehow index which I made is not updated.\nIt can be figure out quite simple.\nAfter creating new LO I have:\n\nwebmailstation=> explain select * from pg_largeobject where loid=14035719;\nNOTICE: QUERY PLAN:\n\nSeq Scan on pg_largeobject (cost=0.00..0.00 rows=1 width=20)\nEXPLAIN\nwebmailstation=> select * from pg_largeobject where loid=14035719;\n loid | pageno | data\n----------+--------+------\n 14035719 | 0 |\n(1 row)\nwebmailstation=> set enable_seqscan=off;\nSET VARIABLE\nwebmailstation=> explain select * from pg_largeobject where loid=14035719;\nNOTICE: QUERY PLAN:\n\nIndex Scan using pg_largeobject_loid_pn_index on pg_largeobject (cost=0.00..5.01 rows=1 width=20)\n\nEXPLAIN\nwebmailstation=> select * from pg_largeobject where loid=14035719;\n loid | pageno | data\n------+--------+------\n(0 rows)\n\nAs far as you can see index does not contains such value.\n\nThe code which creates a LO looks like this:\n\nOid LargeobjectCreate(Oid loid) {\n Oid retval;\n Relation pg_largeobject;\n HeapTuple ntup = (HeapTuple) palloc(sizeof(HeapTupleData));\n Relation idescs[Num_pg_index_indices];\n Datum values[Natts_pg_largeobject];\n char nulls[Natts_pg_largeobject];\n int i;\n\n for (i=0; i<Natts_pg_largeobject; i++) {\n nulls[i] = ' ';\n values[i] = (Datum)NULL;\n }\n\n i = 0;\n values[i++] = ObjectIdGetDatum(loid);\n values[i++] = Int32GetDatum(0);\n values[i++] = (Datum) _byteain(NULL, 0);\n\n pg_largeobject = heap_openr(LargeobjectRelationName, RowExclusiveLock);\n ntup = heap_formtuple(pg_largeobject->rd_att, values, nulls);\n retval = heap_insert(pg_largeobject, ntup);\n\n if (!IsIgnoringSystemIndexes()) {\n CatalogOpenIndices(Num_pg_largeobject_indices, Name_pg_largeobje\n CatalogIndexInsert(idescs, Num_pg_largeobject_indices, pg_largeo\n CatalogCloseIndices(Num_pg_largeobject_indices, idescs);\n }\n\n heap_close(pg_largeobject, RowExclusiveLock);\n heap_freetuple(ntup);\n\n CommandCounterIncrement();\n\n return retval;\n}\n\nAnd all go fine and indices should be updated... What I did wrong???\nI traces through this code step by step and all seems fine...\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n",
"msg_date": "Sun, 30 Jul 2000 15:18:26 +0700",
"msg_from": "Denis Perchine <[email protected]>",
"msg_from_op": true,
"msg_subject": "Problem with updating system indices."
},
{
"msg_contents": "Denis Perchine <[email protected]> writes:\n> Relation idescs[Num_pg_index_indices];\n ^^^^^^^^\n\nDunno whether you have Num_pg_largeobject_indices =\nNum_pg_index_indices, but in any case there's a latent\nstack clobber here.\n\n> CommandCounterIncrement();\n\nAre you sure it's a good idea to be incrementing the CC here?\nThis seems like a pretty low-level routine, so there might be\npeople further up the stack who do not want this done.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 30 Jul 2000 10:53:41 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Problem with updating system indices. "
},
{
"msg_contents": "> > Relation idescs[Num_pg_index_indices];\n> ^^^^^^^^\n> \n> Dunno whether you have Num_pg_largeobject_indices =\n> Num_pg_index_indices, but in any case there's a latent\n> stack clobber here.\n\nOugh... That's bad to work too much...\n \n> > CommandCounterIncrement();\n> \n> Are you sure it's a good idea to be incrementing the CC here?\n> This seems like a pretty low-level routine, so there might be\n> people further up the stack who do not want this done.\n\nHmmm... Problem is that if I did not do this I do not see this change\nlater when I do lo_create/lo_open inside transaction...\nWhat should I use else for this purpose?\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n",
"msg_date": "Mon, 31 Jul 2000 11:53:32 +0700",
"msg_from": "Denis Perchine <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Problem with updating system indices."
}
] |
[
{
"msg_contents": ">Subject: Re: Inprise InterBase(R) 6.0 Now Free and Open Source \nTom Lane <[email protected]> writes:\n>It is not possible to be \"tainted\" by looking. There are only two kinds\n>of intellectual property rights (at least in the USA) and neither one\n>creates that risk:\n>\n>1. Copyright means you can't take the code verbatim, just like you can't\n>plagiarize a novel. You can use the same ideas (plot, characters, etc)\n>but you have to express 'em in your own words. Structure the code\n>differently, use different names, write your own comments, etc, and\n>you're clear even if you lifted the algorithm lock stock & barrel.\n>\n>2. Patent means you can't use the algorithm. However, looking doesn't\n>create extra risk here, because you can't use a patented algorithm\n>(without paying) no matter how you learned of it --- not even if you\n>invented it independently.\n\nYou overlooked a third type: trade secret.\n\nIt is possible to be \"tainted\" by being privy to a trade secret. There was\na recent fuss about exactly this with Microsoft's \"publication\" of their \nSamba extensions in the form of a trade-secret document protected by a\nclick-wrap license.\n\nHowever this is an extremely rare circumstance these days, now that software\nenjoys full copyright protections.\n\nAnything distributed under any open source license is by definition not a\ntrade secret, and so the Inprise database carries no such limitations.\n\n\t-Michael Robinson\n\nP.S. Of course, there's also trademark, which is a fourth protected form of\nintellectual property, but that's definitely not relevant here.\n",
"msg_date": "Sun, 30 Jul 2000 16:51:42 +0800 (+0800)",
"msg_from": "Michael Robinson <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: in"
}
] |
[
{
"msg_contents": "> -----Original Message-----\n> From: Alfred Perlstein [mailto:[email protected]]\n> \n> * Hiroshi Inoue <[email protected]> [000729 18:38] wrote:\n> > Hi all,\n> > \n> > I found another(??) lock freezing phenomenon.\n> > Seems I'm guilty for the bug.\n> > \n> [snip]\n> > \n> > Either the cancel of session-2 or commit of session-1 must \n> > wake up session-3. I would change the cancel request stuff\n> > so that it can wake up sleeping processes. \n> > \n> > Comments ?\n> \n> The simplest and fairest way is to simply wake all the programs looking\n> for a lock when that lock is released, it also simplifies the design.\n>\n\nHmm,cancel request while waiting for a lock removes the waiting\nlock from waitQueue not release the holding lock.\nBut you are right. It was my fault that I didn't wake up sleeping\nprocesses in my implementation.\n\nRegards.\n\nHiroshi Inoue \n",
"msg_date": "Mon, 31 Jul 2000 09:22:36 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: another ? lock freezing"
}
] |
[
{
"msg_contents": "OK, so what do I have to do to make a function that returns a \nmasked macaddr? I.E. sets the last 3 bytes to 0x00?\n\nThat in conjunction with some changes to my ouiparse.awk script and \nwe can put this to bed.\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, 30 Jul 2000 20:16:28 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "mac.c"
},
{
"msg_contents": "Oh, BTW, I'm inclined to replace macaddr_manuf with this code, but it changes\nthe return type from text to macaddr...\n\nLER\n\n> OK, so what do I have to do to make a function that returns a \n> masked macaddr? I.E. sets the last 3 bytes to 0x00?\n> \n> That in conjunction with some changes to my ouiparse.awk script and \n> we can put this to bed.\n> \n> Larry\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-- \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, 30 Jul 2000 20:17:36 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: mac.c"
}
] |
[
{
"msg_contents": "Here is my ouiparse.awk script for your amusement....\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",
"msg_date": "Sun, 30 Jul 2000 20:34:46 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "ouiparse.awk to populate a SQL table with Manufacturers"
}
] |
[
{
"msg_contents": "make[3]: Entering directory `/home/postgres/pgsql/src/backend/parser'\nbison -y -d gram.y\n12 rules never reduced\ngram.y contains 3 useless nonterminals and 12 useless rules\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sun, 30 Jul 2000 21:35:59 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "gram.y now producing warnings?"
},
{
"msg_contents": "> make[3]: Entering directory `/home/postgres/pgsql/src/backend/parser'\n> bison -y -d gram.y\n> 12 rules never reduced\n> gram.y contains 3 useless nonterminals and 12 useless rules\n\nYeah, I'll go in and clean it up (I assume it is from my recent PATH\nfixes; there are some rules no longer used, but I hate to get rid of\nthem just yet).\n\n - Thomas\n",
"msg_date": "Mon, 31 Jul 2000 06:09:25 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: gram.y now producing warnings?"
}
] |
[
{
"msg_contents": "Hello nice people,\n\nSlowly & happily I'm becoming a PostgreSQL hacker ;-) What a pleasure. Last\ndays, I learned to use the debugger, to follow code, & understood some of\nPostgreSQL internals. In spanish we say someone is a 'cabeza dura' when tries\nhard to do something against the odds, & so am I. My goal is to make the backend\naccept erroneous commands, not falling in *ABORT STATE*, but rolling back\nautomatically, & continue accepting commands. So I found that there is a\nfunction StartTransactionCommand(), which does things before executing commands,\ndepending on transaction state. And it did nothing explicitely when\nTBLOCK_ABORT. So I added three lines, which pretend to set the backend in a safe\nstate, and I think I did it. What do you think about this? In my early tests, it\nworks. It complains saying something about the transaction state, but works\nanyway. I think that by polishing it, the complain can be eliminated.\n\n\n\n case TBLOCK_ABORT:\n+ s->blockState = TBLOCK_INPROGRESS;\n+ AbortTransaction();\n+ StartTransaction();\n break;\n\n\nSo now I can give back to PostgreSQL a 0.1% of what it gave to me. Thanks.\n\nCheers,\nHaroldo.\n\nP.S. Now I'll have to learn java, to make the JDBC give errors analogous to\nInformix, so that my CASE tool thinks it talks to Informix. Someone posted\nsomething about more analyzable error messages by PostgreSQL, maybe we can chat\nabout it.\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Mon, 31 Jul 2000 11:11:53 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Now PostgreSQL recovers from errors within trns"
},
{
"msg_contents": "[email protected] writes:\n> My goal is to make the backend accept erroneous commands, not falling\n> in *ABORT STATE*, but rolling back automatically, & continue accepting\n> commands.\n\nThe way you're doing it, you might as well just not use transaction\nblocks at all. I don't think wiping out the effects of all preceding\ncommands within the transaction counts as \"recovering from an error\".\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 31 Jul 2000 11:08:03 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Now PostgreSQL recovers from errors within trns "
},
{
"msg_contents": "At 02:10 PM 7/31/00 -0300, [email protected] wrote:\n>Tom Lane wrote:\n>> \n>> [email protected] writes:\n>> > My goal is to make the backend accept erroneous commands, not falling\n>> > in *ABORT STATE*, but rolling back automatically, & continue accepting\n>> > commands.\n>> \n>> The way you're doing it, you might as well just not use transaction\n>> blocks at all. I don't think wiping out the effects of all preceding\n>> commands within the transaction counts as \"recovering from an error\".\n>\n>Ok, maybe I exagerated, but kind of solves my problem. GeneXus, my CASE tool,\n>will send begin/commit pairs, so I must 'recover' automatically. I aimed\n>DB2-like behaviour, which I was told, aborts on errors within\ntransactions, but\n>remains in a runnable state. Don't you consider it valueable whatsoever?\n\nWell, Postgresql's behavior isn't SQL92 compliant, but neither is the \nbehavior you want. I far prefer the current non-standard behavior.\nEventually,\nof course, PG should conform to SQL92.\n\nGeneXus should be catching the error and issuing a rollback if that's\nthe behavior it expects.\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, 31 Jul 2000 10:05:12 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Now PostgreSQL recovers from errors within trns"
},
{
"msg_contents": "Tom Lane wrote:\n> \n> [email protected] writes:\n> > My goal is to make the backend accept erroneous commands, not falling\n> > in *ABORT STATE*, but rolling back automatically, & continue accepting\n> > commands.\n> \n> The way you're doing it, you might as well just not use transaction\n> blocks at all. I don't think wiping out the effects of all preceding\n> commands within the transaction counts as \"recovering from an error\".\n\nOk, maybe I exagerated, but kind of solves my problem. GeneXus, my CASE tool,\nwill send begin/commit pairs, so I must 'recover' automatically. I aimed\nDB2-like behaviour, which I was told, aborts on errors within transactions, but\nremains in a runnable state. Don't you consider it valueable whatsoever?\n\nHaroldo.\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Mon, 31 Jul 2000 14:10:16 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Re: Now PostgreSQL recovers from errors within trns"
},
{
"msg_contents": "Don Baccus wrote:\n> Well, Postgresql's behavior isn't SQL92 compliant, but neither is the\n> behavior you want. I far prefer the current non-standard behavior.\n> Eventually,\n> of course, PG should conform to SQL92.\n\nThis change is not a must. Is very optional. Since I solved a problem, I'happy.\nI don't know much about the standards, but agree with you just in case.\n\n> GeneXus should be catching the error and issuing a rollback if that's\n> the behavior it expects.\n\nYup, but GeneXus is closed source, and PostgreSQL is open source. I'm trying to\nconvince GeneXus' ARTech (www.genexus.com.uy) about the importance of supporting\nPostgreSQL. From the PostgreSQL point of view, if this has place someday,\nPostgreSQL will gain a lot of corporate users, and a whole new consulting field\nwill be available. Do you understand my point? \n\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Mon, 31 Jul 2000 14:30:40 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Re: Now PostgreSQL recovers from errors within trns"
},
{
"msg_contents": "On Mon, Jul 31, 2000 at 02:30:40PM -0300, [email protected] wrote:\n> \n> Yup, but GeneXus is closed source, and PostgreSQL is open source. I'm trying to\n> convince GeneXus' ARTech (www.genexus.com.uy) about the importance of supporting\n> PostgreSQL. From the PostgreSQL point of view, if this has place someday,\n> PostgreSQL will gain a lot of corporate users, and a whole new consulting field\n> will be available. Do you understand my point? \n> \n\nAs an aside, to the hackers (and Ned Lilly, in particular) This sort\nof corporate evangalism is one avenue in which I could see BreatBridge\nbeing very helpful to the PostgreSQL community. Find out what SQL CASE/CAD\nwhat-have-you tools are in use in businesses out there, and work with the\ntool makers to support PostgreSQL out-of-the-box. Existing end users (and\npotential end users) need to make noise too, of course, but GreateBridge\nwould be in the position to credibly tell the tool builders how much\neffort it might be to support pgsql. Heck, for the lower end of these\ntools, they could package pgsql with the tool, to provide a working,\nfunctional system, with an \"upgrade\" path to commericial systems.\nA lot of those systems would just never find the need top upgrade,\nwould be my bet.\n\nHmm, a quick survey over on GENERAL might get a starter list of tools\nto target. Myself, I've looked at Embarcadero Technology's \"lifecycle\"\ntools: ER/Studio FastSQL, DBArtisan. They look interesting, and sort of\nwork with the ODBC driver, but could use some tweaking to unserstand a\npgsql installion better.\n\nhttp://www.embarcadero.com/\n\nAnother, not quite the same category, but interesting, one is a\nreplication/remote access layer we looked at about a year ago: ISG\nNavigator. Hmm, seems to have been renamed to AttunityConnect. That one\nwas very flexible: could be tuned by editing a config file with various\n'features' flags.\n\nhttp://www.attunity.com/\n\nRoss\n-- \nRoss J. Reedstrom, Ph.D., <[email protected]> \nNSBRI Research Scientist/Programmer\nComputer and Information Technology Institute\nRice University, 6100 S. Main St., Houston, TX 77005\n",
"msg_date": "Mon, 31 Jul 2000 13:08:33 -0500",
"msg_from": "\"Ross J. Reedstrom\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Now PostgreSQL recovers from errors within trns"
}
] |
[
{
"msg_contents": "Hi,\n\nWhat do we mean in the last two lines of the following comment?\n\n /* ----------------\n * Here we are in the middle of a\ntransaction block but\n * one of the commands caused an abort so\nwe do nothing\n * but remain in the abort state. \nEventually we will get\n * to the \"END TRANSACTION\" which will set\nthings straight.\n * ----------------\n */\n case TBLOCK_ABORT:\n s->blockState = TBLOCK_INPROGRESS;\n AbortTransaction();\n StartTransaction();\n break;\n\nHaroldo.\n\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Mon, 31 Jul 2000 15:53:33 -0300",
"msg_from": "[email protected]",
"msg_from_op": true,
"msg_subject": "Managing Rollback"
},
{
"msg_contents": "[email protected] writes:\n> What do we mean in the last two lines of the following comment?\n\n> /* ----------------\n> * Here we are in the middle of a\n> transaction block but\n> * one of the commands caused an abort so\n> we do nothing\n> * but remain in the abort state. \n> Eventually we will get\n> * to the \"END TRANSACTION\" which will set\n> things straight.\n> * ----------------\n> */\n> case TBLOCK_ABORT:\n\nIt just means that nothing's going to happen until the user sends\nCOMMIT or ROLLBACK --- the xact.c state will remain the same until\nthen.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 31 Jul 2000 15:31:24 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Managing Rollback "
}
] |
[
{
"msg_contents": "I'd like to inform the pghackers community that I've accepted an offer\nof employment from Great Bridge. I expect to be doing essentially\nthe same sort of work I've been doing on Postgres for the last two\nyears; except that now I'll be able to do it full-time rather than\njust in my spare time.\n\nI think this is a great opportunity to help move the project forward.\n\nI want to assure everyone that I will continue to work with the good\nof the overall Postgres project in mind, and not just for the benefit\nof one company.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 31 Jul 2000 19:31:13 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Announcement: I'm joining Great Bridge"
},
{
"msg_contents": "Tom Lane wrote:\n> \n> I'd like to inform the pghackers community that I've accepted an offer\n> of employment from Great Bridge. I expect to be doing essentially\n> the same sort of work I've been doing on Postgres for the last two\n> years; except that now I'll be able to do it full-time rather than\n> just in my spare time.\n\nCongratulations!\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Mon, 31 Jul 2000 19:37:13 -0400",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Announcement: I'm joining Great Bridge"
},
{
"msg_contents": "\nThat's great news, congratulations!\n\nTom Lane wrote:\n> \n> I'd like to inform the pghackers community that I've accepted an offer\n> of employment from Great Bridge. I expect to be doing essentially\n> the same sort of work I've been doing on Postgres for the last two\n> years; except that now I'll be able to do it full-time rather than\n> just in my spare time.\n> \n> I think this is a great opportunity to help move the project forward.\n> \n> I want to assure everyone that I will continue to work with the good\n> of the overall Postgres project in mind, and not just for the benefit\n> of one company.\n> \n> regards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 10:06:18 +1000",
"msg_from": "Chris Bitmead <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Announcement: I'm joining Great Bridge"
},
{
"msg_contents": "Congratulations!\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\nCongratulations!\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Mon, 31 Jul 2000 20:44:43 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Announcement: I'm joining Great Bridge"
},
{
"msg_contents": "Tom Lane wrote:\n> I'd like to inform the pghackers community that I've accepted an offer\n> of employment from Great Bridge. I expect to be doing essentially\n> the same sort of work I've been doing on Postgres for the last two\n> years; except that now I'll be able to do it full-time rather than\n> just in my spare time.\n> \n> I think this is a great opportunity to help move the project forward.\n> \n> I want to assure everyone that I will continue to work with the good\n> of the overall Postgres project in mind, and not just for the benefit\n> of one company.\n\nCongratulations, and thanks for telling us. You deserve it, and I hope it will\nbe a Great Bridge for your career. \n\nRegards,\nHaroldo.\n\n-- \n----------------------+------------------------\n Haroldo Stenger | [email protected]\n Montevideo, Uruguay. | [email protected]\n----------------------+------------------------\n Visit UYLUG Web Site: http://www.linux.org.uy\n-----------------------------------------------\n",
"msg_date": "Tue, 01 Aug 2000 00:33:38 -0300",
"msg_from": "[email protected]",
"msg_from_op": false,
"msg_subject": "Re: Announcement: I'm joining Great Bridge"
},
{
"msg_contents": "> I'd like to inform the pghackers community that I've accepted an offer\n> of employment from Great Bridge. I expect to be doing essentially\n> the same sort of work I've been doing on Postgres for the last two\n> years; except that now I'll be able to do it full-time rather than\n> just in my spare time.\n\nCongrats (as I've already mentioned elsewhere), but I've got to ask:\n\nHow will we tell the difference between spare time and full-time, when\nyou seem to be up and working 25 hours a day already? :)\n\n - Thomas\n",
"msg_date": "Tue, 01 Aug 2000 04:38:01 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Announcement: I'm joining Great Bridge"
}
] |
[
{
"msg_contents": "I didn't know if this had made it to the list or not... if it has, please \nexcuse...\n\nI've been trying to work on a system of using classes as a variation on \nnormalization of data.\nHowever, I've run into a really frustrating problem. I had posted the \nfollowing but not in this form to the PGSQL SQL list.\n\n From that posting...\n--begin--\ncreate table foo (id int8);\ncreate table bar1 (name text) inherits (foo);\ncreate table bar2 (data text) inherits (foo);\ncreate table hybrid ( ) inherits (bar1, bar2);\n\nINSERT INTO foo VALUES (1);\nINSERT INTO bar1 VALUES (2,'myname');\nINSERT INTO bar2 VALUES (3,'mydata');\nINSERT INTO hybrid VALUES (4,'morename','moredata');\n\n\n\n\n\nI want to do a SELECT * FROM foo*; but I only get the 'id' column as in :\n\nid\n---\n 1\n 2\n 3\n 4\n\n\n\n\n\nWhat would be the query to get the following table or a magical way to \nexpand children without knowing the children's table names?\n\nI had originally hoped that SELECT * FROM foo* would yield the following, \nbut it's not so.\n\nid | name | data\n---+------------+-------------\n 1 | null | null\n 2 | 'myname' | null\n 3 | null | 'mydata'\n 4 | 'morename' | 'moredata'\n--end--\n\nI can get the same result by doing the following query...\n\nSELECT * FROM hybrid UNION \\\n (SELECT id,null,data FROM bar2) UNION \\\n (SELECT id,name,null FROM bar1) UNION \\\n (SELECT id,null,null FROM foo)\n\nHowever, this doesn't allow for flexibility in the declaration of classes \nas all queries have to be rewritten.\n\nProposal\n\nWhat I would like to suggest although it may be too much or a little odd is \nto have a way for the column listing to be expanded based on the \nchildren. So far, I have been unable to construct a query or function \nthat would run through and expand all columns based on class/table name and \nits' children and return a suitable union.\n\nWhat if following a class/table by + did this.\n\nFor example the above query could be produced by the following statement:\n SELECT * FROM foo+\n\nThe pattern I noticed it works best starting from the farthest child(ren) \nsince the mininum number of columns in a child is >= the number of columns \nin the parent. However, I also observed this could be really awkward \ndepending on the number of columns ancestors had in addition to the depth \nof the tree. In the example give below, the table \"hybrid\" was unique in \nthat it inherited all from a common set of parents. It would be different \nif the farthest branches merged or if a branch contained a different data \ntype in the same column namespace.\n\nI did figure a methodology on solving it:\n\n1. get the relid of the table/class;\n2. using pg_inherits, resolve all dependent children.\n3. create an array of all columns (may be data type conflicts so either \nresolve or error) {you could avoid conflicts with careful planning on names}\n4. union all tables inserting nulls in non-available columns places.\n\nNote: Step 2 might be easily facilitated if an array of immediate children \nwas available from pg_inherits table not just the parent, but then \ninserting classes might be expensive. It's a thought...\n\nThis has been very frustrating even in trying to get information from the \npg_* system tables. And, ideally, a user should never have to look at \nthose although it is nice to such as in this case.\n\nI'm afraid this all sounds like a complaint. Quite to the contrary, I've \nbeen more than pleased with postgresql and what it has to offer and \ncontinually look forward to newer releases, new features and improvements.\n\nThomas\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\n\nI didn't know if this had made it to the list or not... if it has,\nplease excuse...\n\nI've been trying to work on a system of using classes as a variation\non normalization of data.\nHowever, I've run into a really frustrating problem. I had posted\nthe following but not in this form to the PGSQL SQL list.\n\n From that posting...\n--begin--\n\ncreate table foo (id int8); \ncreate table bar1 (name text) inherits (foo); \ncreate table bar2 (data text) inherits (foo); \ncreate table hybrid ( ) inherits (bar1, bar2);\n\n\nINSERT INTO foo VALUES (1); \nINSERT INTO bar1 VALUES (2,'myname'); \nINSERT INTO bar2 VALUES (3,'mydata'); \nINSERT INTO hybrid VALUES (4,'morename','moredata');\n\n\n\n\n\n\nI want to do a SELECT * FROM foo*; but I only get the 'id'\ncolumn as in :\n\n\nid \n--- \n 1 \n 2 \n 3 \n 4\n\n\n\n\n\n\nWhat would be the query to get the following table or a magical way\nto expand children without knowing the children's table names?\n\nI had originally hoped that SELECT * FROM foo* would yield the\nfollowing, but it's not so.\n\n\nid | name | data \n---+------------+------------- \n 1 | null | null \n 2 | 'myname' | null \n 3 | null | 'mydata' \n 4 | 'morename' | 'moredata'\n--end--\n\nI can get the same result by doing the following query...\n\nSELECT * FROM hybrid UNION \\\n (SELECT id,null,data FROM bar2) UNION \\\n (SELECT id,name,null FROM bar1) UNION \\\n (SELECT id,null,null FROM foo)\n\nHowever, this doesn't allow for flexibility in the declaration of\nclasses as all queries have to be rewritten.\n\nProposal\n\nWhat I would like to suggest although it may be too much or a little\nodd is to have a way for the column listing to be expanded based on the\nchildren. So far, I have been unable to construct a query or\nfunction that would run through and expand all columns based on\nclass/table name and its' children and return a suitable union.\n\nWhat if following a class/table by + did this.\n\nFor example the above query could be produced by the following\nstatement:\n SELECT\n* FROM foo+\n\nThe pattern I noticed it works best starting from the farthest\nchild(ren) since the mininum number of columns in a child is >= the\nnumber of columns in the parent. However, I also observed this\ncould be really awkward depending on the number of columns ancestors had\nin addition to the depth of the tree. In the example\ngive below, the table \"hybrid\" was unique in that it inherited\nall from a common set of parents. It would be different if\nthe farthest branches merged or if a branch contained a different data\ntype in the same column namespace.\n\nI did figure a methodology on solving it:\n\n1. get the relid of the table/class;\n2. using pg_inherits, resolve all dependent children.\n3. create an array of all columns (may be data type conflicts so either\nresolve or error) {you could avoid conflicts with careful planning on\nnames}\n4. union all tables inserting nulls in non-available columns \nplaces.\n\nNote: Step 2 might be easily facilitated if an array of immediate\nchildren was available from pg_inherits table not just the parent, but\nthen inserting classes might be expensive. It's a thought...\n\nThis has been very frustrating even in trying to get information from the\npg_* system tables. And, ideally, a user should never have to\nlook at those although it is nice to such as in this case.\n\nI'm afraid this all sounds like a complaint. Quite to the contrary,\nI've been more than pleased with postgresql and what it has to offer and\ncontinually look forward to newer releases, new features and\nimprovements.\n\nThomas\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Mon, 31 Jul 2000 20:42:21 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": true,
"msg_subject": "Classes and Inheritance"
},
{
"msg_contents": "\nHi,\n\nThis is something that has been discussed extensively in the hackers\nlist in recent times (mostly by me :). It is a reasonably extensive\nchange, affecting front and back ends etc. The syntax suggested has been\nsomething like \"select ** from foo\" or \"select % from foo\". The status\nof it is I have done the changes to libpq, and am looking into the\nbackend situation. If you want to help out it would certainly be\nwelcome.\n\n\nThomas Swan wrote:\n> \n> I didn't know if this had made it to the list or not... if it has,\n> please excuse...\n> \n> I've been trying to work on a system of using classes as a variation\n> on normalization of data.\n> However, I've run into a really frustrating problem. I had posted the\n> following but not in this form to the PGSQL SQL list.\n> \n> From that posting...\n> --begin--\n> \n> create table foo (id int8);\n> create table bar1 (name text) inherits (foo);\n> create table bar2 (data text) inherits (foo);\n> create table hybrid ( ) inherits (bar1, bar2);\n> \n> INSERT INTO foo VALUES (1);\n> INSERT INTO bar1 VALUES (2,'myname');\n> INSERT INTO bar2 VALUES (3,'mydata');\n> INSERT INTO hybrid VALUES (4,'morename','moredata');\n> \n> I want to do a SELECT * FROM foo*; but I only get the 'id' column\n> as in :\n> \n> id\n> ---\n> 1\n> 2\n> 3\n> 4\n> \n> What would be the query to get the following table or a magical\n> way to expand children without knowing the children's table\n> names?\n> \n> I had originally hoped that SELECT * FROM foo* would yield the\n> following, but it's not so.\n> \n> id | name | data\n> ---+------------+-------------\n> 1 | null | null\n> 2 | 'myname' | null\n> 3 | null | 'mydata'\n> 4 | 'morename' | 'moredata'\n> \n> --end--\n> \n> I can get the same result by doing the following query...\n> \n> SELECT * FROM hybrid UNION \\\n> (SELECT id,null,data FROM bar2) UNION \\\n> (SELECT id,name,null FROM bar1) UNION \\\n> (SELECT id,null,null FROM foo)\n> \n> However, this doesn't allow for flexibility in the declaration of\n> classes as all queries have to be rewritten.\n> \n> Proposal\n> \n> What I would like to suggest although it may be too much or a little\n> odd is to have a way for the column listing to be expanded based on\n> the children. So far, I have been unable to construct a query or\n> function that would run through and expand all columns based on\n> class/table name and its' children and return a suitable union.\n> \n> What if following a class/table by + did this.\n> \n> For example the above query could be produced by the following\n> statement:\n> SELECT * FROM foo+\n> \n> The pattern I noticed it works best starting from the farthest\n> child(ren) since the mininum number of columns in a child is >= the\n> number of columns in the parent. However, I also observed this could\n> be really awkward depending on the number of columns ancestors had in\n> addition to the depth of the tree. In the example give below, the\n> table \"hybrid\" was unique in that it inherited all from a common set\n> of parents. It would be different if the farthest branches merged or\n> if a branch contained a different data type in the same column\n> namespace.\n> \n> I did figure a methodology on solving it:\n> \n> 1. get the relid of the table/class;\n> 2. using pg_inherits, resolve all dependent children.\n> 3. create an array of all columns (may be data type conflicts so\n> either resolve or error) {you could avoid conflicts with careful\n> planning on names}\n> 4. union all tables inserting nulls in non-available columns places.\n> \n> Note: Step 2 might be easily facilitated if an array of immediate\n> children was available from pg_inherits table not just the parent, but\n> then inserting classes might be expensive. It's a thought...\n> \n> This has been very frustrating even in trying to get information from\n> the pg_* system tables. And, ideally, a user should never have to\n> look at those although it is nice to such as in this case.\n> \n> I'm afraid this all sounds like a complaint. Quite to the contrary,\n> I've been more than pleased with postgresql and what it has to offer\n> and continually look forward to newer releases, new features and\n> improvements.\n> \n> Thomas\n> \n> -\n> - Thomas Swan\n> - Graduate Student - Computer Science\n> - The University of Mississippi\n> -\n> - \"People can be categorized into two fundamental\n> - groups, those that divide people into two groups\n> - and those that don't.\"\n",
"msg_date": "Tue, 01 Aug 2000 14:10:37 +1000",
"msg_from": "Chris Bitmead <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Classes and Inheritance"
}
] |
[
{
"msg_contents": "Hi Lamar. I got around to building 7.0.2 RPMs for Mandrake, and afaict\nyour .src.rpm built without trouble. It even got the \".bz2\" man page\ncompression right (of course, without explicitly doing this in the spec\nfile).\n\nWill post on ftp.postgresql.org soon. Is a new RPM coming out before the\nnext Postgres release?\n\n - Thomas\n",
"msg_date": "Tue, 01 Aug 2000 04:20:07 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "RPMs built for Mandrake"
},
{
"msg_contents": "> Will post on ftp.postgresql.org soon...\n\nI've posted .src and .i686 Mandrake RPMs for Postgres-7.0.2 built on\nmdk-7.1 at\n\n ftp://ftp.postgresql.org/pub/binary/Mandrake/\n\nThe Mandrake/ directory will move to /pub/binary/v7.0.2/Mandrake once\nthe permissions are fixed up: Lamar, can you please adjust the group\npermissions to allow pgsql to write into those directories (and to move\naround files, just in case)? Should we adjust the names on the\ndirectories from RPM and redhat-RPM to \"redhat\" only (or \"RedHat\" or ??)\nto get some symmetry with the other distros?\n\nWhen I have a chance, I'll go ahead and make some .i586 versions, unless\nsomeone else beats me to it...\n\n - Thomas\n",
"msg_date": "Tue, 01 Aug 2000 06:35:20 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: RPMs built for Mandrake"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n\n> Will post on ftp.postgresql.org soon. Is a new RPM coming out before the\n> next Postgres release?\n\nRPM 3.0.5 has already been released, and is available from ftp.rpm.org\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n",
"msg_date": "01 Aug 2000 07:57:25 -0400",
"msg_from": "[email protected] (Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?=)",
"msg_from_op": false,
"msg_subject": "Re: RPMs built for Mandrake"
},
{
"msg_contents": "Thomas Lockhart wrote:\n> ftp://ftp.postgresql.org/pub/binary/Mandrake/\n \n> The Mandrake/ directory will move to /pub/binary/v7.0.2/Mandrake once\n> the permissions are fixed up: Lamar, can you please adjust the group\n> permissions to allow pgsql to write into those directories (and to move\n> around files, just in case)? Should we adjust the names on the\n> directories from RPM and redhat-RPM to \"redhat\" only (or \"RedHat\" or ??)\n> to get some symmetry with the other distros?\n\nWell, what I had in mind was have a unified RPM tree, single SRPM, with\nmultiple binary RPM trees. So, since someone else has fixed the group\nperms on that tree already (thanks Jeff or Marc), pop the Mandrake\nbinary RPMs into pub/binary/v7.0.2/RPM/RPMS/mandrake-7.x (the dir is\nalready created).\n\nIf there had been departures from the main RPMset source RPM, then we\nwould need the source RPM as well uploaded -- but, as long as the build\nis simply a rpm --rebuild (or equivalent), then there's no need to use\nthe space for an essentially identical file.\n\nIf you want to follow Mandrake naming conventions (-2mdk) that's fine,\nbut not necessary as being in the 'mandrake-7.x' dir should set them\napart.\n\nAs to a new RPM version, yes on both interpretations -- there is/will be\na new version of the PostgreSQL RPM's before the next major PostgreSQL\nrelease, and there will also be a new major version of RPM itself before\nthe next major PgSQL release. The RPM's from the public RedHat beta\nrelease should, until I post newer ones, be considered the current\nversion -- and, since the release of the public beta, I will be posting\nnewer RPM's this week.\n\nAs a matter of necessity, you will be needing to upgrade to RPM 3.0.5 to\ndo any RPM building from these src RPMs in the future, more than\nlikely. And, if you want to poke around with the src RPM from the\nRedHat beta, you will have to upgrade to RPM 3.0.5 in order to even read\nthe src rpm, as the RedHat beta is using RPM 4.0-format RPMs. RPM 4.0\nshould be in a released state by the time PgSQL releases a new major\nversion. And I can now say that since the beta is public ~;-). So, you\nshould be seeing more updates to the RPMset now.\n\nAnd I want to give many kudos and thanks to Trond Eivind Glomsr�d, who\nhas been shepherding the RPMset through the labyrinthine update publicly\nknown as Pinstripe.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 01 Aug 2000 11:45:58 -0400",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RPMs built for Mandrake"
},
{
"msg_contents": "> > ftp://ftp.postgresql.org/pub/binary/Mandrake/\n> > The Mandrake/ directory will move to /pub/binary/v7.0.2/Mandrake once\n> > the permissions are fixed up: Lamar, can you please adjust the group\n> > permissions to allow pgsql to write into those directories (and to move\n> > around files, just in case)? Should we adjust the names on the\n> > directories from RPM and redhat-RPM to \"redhat\" only (or \"RedHat\" or ??)\n> > to get some symmetry with the other distros?\n> Well, what I had in mind was have a unified RPM tree, single SRPM, with\n> multiple binary RPM trees. So, since someone else has fixed the group\n> perms on that tree already (thanks Jeff or Marc), pop the Mandrake\n> binary RPMs into pub/binary/v7.0.2/RPM/RPMS/mandrake-7.x (the dir is\n> already created).\n\nOh. Since there was already an RPM->redhat-RPM, it was pretty clear that\nwe would be segregating the RPM files. Will rearrange asap.\n\n> If there had been departures from the main RPMset source RPM, then we\n> would need the source RPM as well uploaded -- but, as long as the build\n> is simply a rpm --rebuild (or equivalent), then there's no need to use\n> the space for an essentially identical file.\n> If you want to follow Mandrake naming conventions (-2mdk) that's fine,\n> but not necessary as being in the 'mandrake-7.x' dir should set them\n> apart.\n\nThat would seem to be problematic, since it would be difficult to tell\nthem apart outside the context of the Postgres ftp site. Don't know how\nto assign a different version for different vendors within the RPM,\nthough I've gotten hints from your communications that it would be\npossible. Also...\n\n> As a matter of necessity, you will be needing to upgrade to RPM 3.0.5 to\n> do any RPM building from these src RPMs in the future, more than\n> likely.\n\nHmm. So we are forcing an \"RPM fork\"? I'm running rpm-3.0.4 on a\nMandrake machine, and your current 7.0.2-2 rpms build just fine. What\nnew features are we getting with the update? Can an rpm built with 3.0.5\nbe installed with a previous version of rpm (I would assume so, but just\nchecking...)?\n\nIt seems like we will need to carry along two versions of the RPMs for a\nwhile, since RedHat is pushing for new, incompatible versions of these\nbuilds on *their* release cycle (though perhaps Mandrake is up the curve\non this; don't know myself).\n\n - Thomas\n",
"msg_date": "Tue, 01 Aug 2000 16:19:07 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: RPMs built for Mandrake"
},
{
"msg_contents": "Thomas Lockhart wrote:\n> > Well, what I had in mind was have a unified RPM tree, single SRPM, with\n \n> Oh. Since there was already an RPM->redhat-RPM, it was pretty clear that\n> we would be segregating the RPM files. Will rearrange asap.\n\nSorry for the misunderstanding -- originally I had wanted it with a\n'redhat-RPM', 'SuSE-RPM', etc structure -- so I went ahead and created\n(and linked to) redhat-RPM -- then, I realized the nightmare of multiple\nsource RPM's, and symlinked 'RPM' to 'redhat-RPM' so as to not break the\nexisting link(s). The next PostgreSQL version (major or minor) will\nhave just the 'RPM' dir instead of 'redhat-RPM' and the symlink, unless\nit is felt by us that segregating the RPMs is better for the userbase.\n \n> > If you want to follow Mandrake naming conventions (-2mdk) that's fine,\n> > but not necessary as being in the 'mandrake-7.x' dir should set them\n> > apart.\n \n> That would seem to be problematic, since it would be difficult to tell\n> them apart outside the context of the Postgres ftp site. Don't know how\n> to assign a different version for different vendors within the RPM,\n> though I've gotten hints from your communications that it would be\n> possible. Also...\n\nYes, this would be possible. There are macros available to the spec\nfile that can change the output filename. This is why (I think)\nmandrake chose to put the -mdk on theirs.\n\n> > As a matter of necessity, you will be needing to upgrade to RPM 3.0.5 to\n> > do any RPM building from these src RPMs in the future, more than\n> > likely.\n \n> Hmm. So we are forcing an \"RPM fork\"? I'm running rpm-3.0.4 on a\n> Mandrake machine, and your current 7.0.2-2 rpms build just fine. What\n> new features are we getting with the update? Can an rpm built with 3.0.5\n> be installed with a previous version of rpm (I would assume so, but just\n> checking...)?\n\nThe only new feature 3.0.5 has over 3.0.4, IIRC, is ability to read\nrpm-4 source RPM's. There _are_ a number of bugfixes, however. With\nRPM 3.0.5 installed, there will still only need to be a single source\nRPM, potentially in rpm-4 format. I'm not sold on why a major format\nchange was required, but, then again, I've not dug into it at that\nlevel. Yeah, I guess you could say we are forcing a 'fork' of sorts --\nbut the split was kindof forced on us, if we want to continue providing\n'canonical' RPMs that distributions can ship -- easing somewhat the\nsupport burden.\n\nBinaries built with RPM 3.0.5 will install just fine on any RPM3 system,\nAFAIK.\n\nRPM 4, OTOH, is a major upgrade, and is likely one of the major upgrades\nthat necessitated this RedHat release being version 7.0. The biggest\nchange that I know of is a lowlevel major version upgrade of Berkeley\nDB, causing the very database format to be very incompatible with prior\nreleases.\n \n> It seems like we will need to carry along two versions of the RPMs for a\n> while, since RedHat is pushing for new, incompatible versions of these\n> builds on *their* release cycle (though perhaps Mandrake is up the curve\n> on this; don't know myself).\n\nWe will need to carry both 'redhat-6.x' and 'redhat-7.x' trees at least\nuntil Red Hat 8.0 is released. This is the same thing that happened\nwith 5.2 -- which I really should reinstall to get newer RPM's onto it,\nas it is still officially supported by RedHat.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Tue, 01 Aug 2000 12:52:56 -0400",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RPMs built for Mandrake"
},
{
"msg_contents": "As far as naming for rpms go. I have seen the following and it makes sense \nto me.\n\npackage-[subpackage-]version-release.distro.arch.rpm\n\ne.g.\n\npostgresql-7.0.2-2.rh5.x.i386.rpm\npostgresql-7.0.2-2.rh6.x.i386.rpm\npostgresql-7.0.2-2.rh6.x.i686.rpm\npostgresql-7.1-0.mandrake7.x.i386.rpm\npostgresql-7.1-0.mandrake7.x.i586.rpm\npostgresql-7.1-0.mandrake7.x.i686.rpm\n\nBoy, wouldn't be great if they didn't have to be packaged for different \ndistro's .. :)\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\n\nAs far as naming for rpms go. I have seen the following and it\nmakes sense to me.\n\npackage-[subpackage-]version-release.distro.arch.rpm\n\ne.g.\n\npostgresql-7.0.2-2.rh5.x.i386.rpm\npostgresql-7.0.2-2.rh6.x.i386.rpm\npostgresql-7.0.2-2.rh6.x.i686.rpm\npostgresql-7.1-0.mandrake7.x.i386.rpm\npostgresql-7.1-0.mandrake7.x.i586.rpm\npostgresql-7.1-0.mandrake7.x.i686.rpm\n\nBoy, wouldn't be great if they didn't have to be packaged for\ndifferent distro's .. :)\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Tue, 01 Aug 2000 12:27:35 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: RPMs built for Mandrake"
}
] |
[
{
"msg_contents": "\nRecent testing of the BLOB restoration code of pg_dump has highlighted\nsomething that *may* be a problem, but I am not sure. BLOBs create tables,\nand AFAICT those tables are owned by the user who was connected at the\ntime. This theoretically means that even though a user has access to a\ntable with a BLOB column, they may not be able to read the BLOB - is that\nright? Should I worry about this?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 01 Aug 2000 23:02:26 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump & ownership (again)"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> Recent testing of the BLOB restoration code of pg_dump has highlighted\n> something that *may* be a problem, but I am not sure. BLOBs create tables,\n> and AFAICT those tables are owned by the user who was connected at the\n> time. This theoretically means that even though a user has access to a\n> table with a BLOB column, they may not be able to read the BLOB - is that\n> right? Should I worry about this?\n\nThe BLOB access code contains no permissions checks --- which is likely\na bug in itself, but anyway if you know the OID of a large object you\ncan do anything you want to it via the lo_xxx functions.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 15:49:16 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: pg_dump & ownership (again) "
},
{
"msg_contents": "At 15:49 1/08/00 -0400, Tom Lane wrote:\n>\n>The BLOB access code contains no permissions checks --- which is likely\n>a bug in itself, but anyway if you know the OID of a large object you\n>can do anything you want to it via the lo_xxx functions.\n\nThis is good to know; I really hope that a new BLOB implementation can come\nout of TOAST, and get rid of this mess ASAP...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 02 Aug 2000 09:12:02 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: pg_dump & ownership (again) "
}
] |
[
{
"msg_contents": "The comment in the random() function indicates that its author thought\nit'd produce output in the range 0..1, which seems like a pretty\nreasonable definition:\n\n\t/* result 0.0-1.0 */\n\tresult = ((double) random()) / RAND_MAX;\n\nUnfortunately, at least on my box, it produces no such thing. random()\nactually yields values in the range 0..2^31-1 --- while RAND_MAX is\nonly 32767, because it applies to the rand() function not random().\nSo what I actually get is floating-point output in the range 0..65535.\n\nregression=# select random();\n random\n------------------\n 35771.3981139561\n(1 row)\n\nregression=# select random();\n random\n------------------\n 58647.5821405683\n(1 row)\n\nThis is, to say the least, a bizarre definition.\n\nI would like to propose changing the code to\n\n\t/* result 0.0-1.0 */\n\tresult = ((double) random()) / INT_MAX;\n\n(and making the corresponding change in setseed()). But I wonder if\nanyone out there has applications that depend on the current behavior.\n\nAs far as I can find, random() isn't mentioned in the documentation\ncurrently, so there probably aren't many people using it...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 12:02:36 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "random() function produces wrong range"
},
{
"msg_contents": "\nOn Tue, 1 Aug 2000, Tom Lane wrote:\n\n> The comment in the random() function indicates that its author thought\n> it'd produce output in the range 0..1, which seems like a pretty\n> reasonable definition:\n> \n> \t/* result 0.0-1.0 */\n> \tresult = ((double) random()) / RAND_MAX;\n> \n> Unfortunately, at least on my box, it produces no such thing. random()\n> actually yields values in the range 0..2^31-1 --- while RAND_MAX is\n> only 32767, because it applies to the rand() function not random().\n\n> I would like to propose changing the code to\n> \n> \t/* result 0.0-1.0 */\n> \tresult = ((double) random()) / INT_MAX;\n> \n> (and making the corresponding change in setseed()). But I wonder if\n> anyone out there has applications that depend on the current behavior.\n\nActually, on my machines, both man pages for rand() and random() say\nthey return values between 0 and RAND_MAX (whether that's true or not\nis another matter). In my case RAND_MAX==INT_MAX so the change wouldn't\nbe a problem, but it might be problematic on some of the 64 bit machines.\n\n",
"msg_date": "Tue, 1 Aug 2000 10:46:46 -0700 (PDT)",
"msg_from": "Stephan Szabo <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: random() function produces wrong range"
},
{
"msg_contents": "Stephan Szabo <[email protected]> writes:\n> Actually, on my machines, both man pages for rand() and random() say\n> they return values between 0 and RAND_MAX (whether that's true or not\n> is another matter). In my case RAND_MAX==INT_MAX so the change wouldn't\n> be a problem, but it might be problematic on some of the 64 bit machines.\n\nOh, that's interesting. What platform do you use? If RAND_MAX applies\nto random() on some machines that'd probably explain why the code is\nwritten like it is. But on my box (HPUX) the rand() function is old\nand crufty and considerably different from random().\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 14:23:38 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: random() function produces wrong range "
},
{
"msg_contents": "\"Mike Sears\" <[email protected]> writes:\n> What build of postgres is this running on.\n\nI think random() is new in 7.0.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Tue, 01 Aug 2000 14:33:18 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: random() function produces wrong range "
},
{
"msg_contents": "\nOn Tue, 1 Aug 2000, Tom Lane wrote:\n\n> Stephan Szabo <[email protected]> writes:\n> > Actually, on my machines, both man pages for rand() and random() say\n> > they return values between 0 and RAND_MAX (whether that's true or not\n> > is another matter). In my case RAND_MAX==INT_MAX so the change wouldn't\n> > be a problem, but it might be problematic on some of the 64 bit machines.\n> \n> Oh, that's interesting. What platform do you use? If RAND_MAX applies\n> to random() on some machines that'd probably explain why the code is\n> written like it is. But on my box (HPUX) the rand() function is old\n> and crufty and considerably different from random().\n\nThat's from a pair of linux boxes, although checking on a FreeBSD box a\nfriend has, his boxes man pages show the range as explicitly 0 to 2^31-1\nas your box does.\n\n\n",
"msg_date": "Tue, 1 Aug 2000 13:20:44 -0700 (PDT)",
"msg_from": "Stephan Szabo <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: random() function produces wrong range "
},
{
"msg_contents": "Stephan Szabo wrote:\n> \n> On Tue, 1 Aug 2000, Tom Lane wrote:\n> \n> > Stephan Szabo <[email protected]> writes:\n> > > Actually, on my machines, both man pages for rand() and random() say\n> > > they return values between 0 and RAND_MAX (whether that's true or not\n> > > is another matter). In my case RAND_MAX==INT_MAX so the change wouldn't\n> > > be a problem, but it might be problematic on some of the 64 bit machines.\n> >\n> > Oh, that's interesting. What platform do you use? If RAND_MAX applies\n> > to random() on some machines that'd probably explain why the code is\n> > written like it is. But on my box (HPUX) the rand() function is old\n> > and crufty and considerably different from random().\n> \n> That's from a pair of linux boxes, although checking on a FreeBSD box a\n> friend has, his boxes man pages show the range as explicitly 0 to 2^31-1\n> as your box does.\n\nOn my SCO 5.0.4 box, rand() from the man page...\n\nThe rand function uses a multiplicative congruential random-number\ngenerator\n with period 2^32 that returns successive pseudo-random numbers in the\nrange\n from 0 to (2^15)-1.\n\n\nThe following functions define the semantics of the functions rand and\nsrand.\n\n static unsigned long int next = 1;\n int rand()\n {\n next = next * 1103515245 + 12345;\n return ((unsigned int)(next/65536) % 32768);\n }\n void srand(seed)\n unsigned int seed;\n {\n next = seed;\n }\n\n \n-- \nDave Smith\nCandata Systems Ltd.\n(416) 493-9020\[email protected]\n",
"msg_date": "Tue, 01 Aug 2000 16:40:33 -0400",
"msg_from": "Dave Smith <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] Re: random() function produces wrong range"
},
{
"msg_contents": "What build of postgres is this running on. I've tried this on 6x and it\ndoesn't seem to work.\n\n\n----- Original Message -----\nFrom: \"Tom Lane\" <[email protected]>\nTo: \"Stephan Szabo\" <[email protected]>\nCc: <[email protected]>; <[email protected]>\nSent: Tuesday, August 01, 2000 11:23 AM\nSubject: Re: [GENERAL] random() function produces wrong range\n\n\n> Stephan Szabo <[email protected]> writes:\n> > Actually, on my machines, both man pages for rand() and random() say\n> > they return values between 0 and RAND_MAX (whether that's true or not\n> > is another matter). In my case RAND_MAX==INT_MAX so the change wouldn't\n> > be a problem, but it might be problematic on some of the 64 bit\nmachines.\n>\n> Oh, that's interesting. What platform do you use? If RAND_MAX applies\n> to random() on some machines that'd probably explain why the code is\n> written like it is. But on my box (HPUX) the rand() function is old\n> and crufty and considerably different from random().\n>\n> regards, tom lane\n>\n\n",
"msg_date": "Tue, 1 Aug 2000 15:26:36 -0700",
"msg_from": "\"Mike Sears\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: random() function produces wrong range "
},
{
"msg_contents": "> The comment in the random() function indicates that its author thought\n> it'd produce output in the range 0..1, which seems like a pretty\n> reasonable definition:\n> Unfortunately, at least on my box, it produces no such thing. random()\n> actually yields values in the range 0..2^31-1 --- while RAND_MAX is\n> only 32767, because it applies to the rand() function not random().\n> So what I actually get is floating-point output in the range 0..65535.\n> This is, to say the least, a bizarre definition.\n\nOr, a bizarre machine. Linux (where I did the testing) produces the\nexpected result.\n\n> I would like to propose changing the code to\n> /* result 0.0-1.0 */\n> result = ((double) random()) / INT_MAX;\n\nErk...\n\nActually, I depend on the behavior being as advertised, which is what\nyou would have expected. This is true on Linux boxes from RedHat-5.2 to\nMandrake-7.1. Not sure why your machine is different, but if there is a\nmore portable way to define this let's find it. Otherwise, get used to\n#ifdef HPUX ;)\n\nThe Linux man pages indicate that the behavior and underlying\nimplementation of random() and rand() are the same (so I just picked\none). Would it be better to try using rand() instead?\n\n - Thomas\n",
"msg_date": "Wed, 02 Aug 2000 06:10:34 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] random() function produces wrong range"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> The Linux man pages indicate that the behavior and underlying\n> implementation of random() and rand() are the same (so I just picked\n> one).\n\nAh, well, there's your problem. Whoever did this part of the library\non Linux took shortcuts. On older-line systems, rand() is a\nconsiderably older and crummier generator than random(). It would\ndefinitely not be a wise decision to use rand() instead.\n\nIt appears that on SysV-heritage machines, rand() delivers 15-bit\nresults (which is what I'm getting) whereas on BSD-heritage platforms\nit produces 31-bit results. But even the BSD machines say\n\n The spectral properties of rand() leave a great deal to be\n desired. drand48(3) and random(3) provide much better,\n though more elaborate, random-number generators.\n\n(quote from SunOS 4.1 man page for rand()).\n\nI believe using random() is the right thing. The portability bug here\nis the assumption that RAND_MAX applies to random() (or is even defined;\nnone of the man pages I've looked at so far mention it). But all the\nmachines say that the output of random() is 31 bits, so INT_MAX should\nwork.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 02 Aug 2000 10:07:48 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] random() function produces wrong range "
},
{
"msg_contents": "Tom Lane writes:\n> Thomas Lockhart <[email protected]> writes:\n> > The Linux man pages indicate that the behavior and underlying\n> > implementation of random() and rand() are the same (so I just picked\n> > one).\n> \n> Ah, well, there's your problem. Whoever did this part of the library\n> on Linux took shortcuts.\n\nWhy? Linux is compliant with the Single Unix Standard v2 from my brief\nreading of it. The only fragile part is the man page for random(3)\nwhich on Linux says \"range from 0 to RAND_MAX\" whereas SuSv2 says\n\"range from 0 to 2^31-1\". Since RAND_MAX on Linux is actually 2^31-1\nanyway, it is still correct albeit misleading. Documentation bug, say.\n\n> I believe using random() is the right thing. The portability bug here\n> is the assumption that RAND_MAX applies to random() (or is even defined;\n> none of the man pages I've looked at so far mention it). But all the\n> machines say that the output of random() is 31 bits, so INT_MAX should\n> work.\n\nSuSv2 says explicitly 2^31-1 so you should use that, otherwise you'll\nbe non-portable to platforms with 64-bit ints, for example.\n\n--Malcolm\n\n-- \nMalcolm Beattie <[email protected]>\nUnix Systems Programmer\nOxford University Computing Services\n",
"msg_date": "Wed, 2 Aug 2000 15:21:45 +0100",
"msg_from": "Malcolm Beattie <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: random() function produces wrong range"
},
{
"msg_contents": "Malcolm Beattie <[email protected]> writes:\n> Tom Lane writes:\n>> Thomas Lockhart <[email protected]> writes:\n>>>> The Linux man pages indicate that the behavior and underlying\n>>>> implementation of random() and rand() are the same (so I just picked\n>>>> one).\n>> \n>> Ah, well, there's your problem. Whoever did this part of the library\n>> on Linux took shortcuts.\n\n> Why? Linux is compliant with the Single Unix Standard v2 from my brief\n> reading of it.\n\nSorry, bad choice of words on my part. Linux is within its rights to\nuse the same underlying implementation for rand() and random(), but it\nis a poor guide to the behavior of other systems, which are equally\nwithin their rights not to.\n\n>> none of the man pages I've looked at so far mention it). But all the\n>> machines say that the output of random() is 31 bits, so INT_MAX should\n>> work.\n\n> SuSv2 says explicitly 2^31-1 so you should use that, otherwise you'll\n> be non-portable to platforms with 64-bit ints, for example.\n\nMaybe. You don't think that a 64-bit-int platform would choose to\nsupply a random() function with a range of 2^63-1? The HPUX and SunOS\nman pages clearly specify that random()'s result is \"long\", so I think\na case could also be made for LONG_MAX.\n\nI suspect we have a good chance at getting burned no matter what we use\n:-(. But RAND_MAX is definitely the wrong thing.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 02 Aug 2000 16:36:20 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] random() function produces wrong range "
},
{
"msg_contents": "> >> none of the man pages I've looked at so far mention it). But all the\n> >> machines say that the output of random() is 31 bits, so INT_MAX should\n> >> work.\n>\n> > SuSv2 says explicitly 2^31-1 so you should use that, otherwise you'll\n> > be non-portable to platforms with 64-bit ints, for example.\n>\n>Maybe. You don't think that a 64-bit-int platform would choose to\n>supply a random() function with a range of 2^63-1? The HPUX and SunOS\n>man pages clearly specify that random()'s result is \"long\", so I think\n>a case could also be made for LONG_MAX.\n>\n>I suspect we have a good chance at getting burned no matter what we use\n>:-(. But RAND_MAX is definitely the wrong thing.\n\nIs it possible to test (during configure phase) and then go from there... \nor does it need to be the same for all platforms?\n\n-\n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\n\n>> none of the man pages I've looked at\nso far mention it). But all the\n>> machines say that the output of random() is 31 bits, so INT_MAX\nshould\n>> work.\n\n> SuSv2 says explicitly 2^31-1 so you should use that, otherwise\nyou'll\n> be non-portable to platforms with 64-bit ints, for example.\n\nMaybe. You don't think that a 64-bit-int platform would choose\nto\nsupply a random() function with a range of 2^63-1? The HPUX and\nSunOS\nman pages clearly specify that random()'s result is \"long\", so\nI think\na case could also be made for LONG_MAX.\n\nI suspect we have a good chance at getting burned no matter what we\nuse\n:-(. But RAND_MAX is definitely the wrong thing.\nIs it possible to test (during configure phase) and then go from there...\nor does it need to be the same for all platforms?\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"",
"msg_date": "Wed, 02 Aug 2000 22:23:07 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] random() function produces wrong range "
},
{
"msg_contents": "Thomas Swan <[email protected]> writes:\n>> I suspect we have a good chance at getting burned no matter what we use\n>> :-(. But RAND_MAX is definitely the wrong thing.\n\n> Is it possible to test (during configure phase) and then go from there... \n> or does it need to be the same for all platforms?\n\nI thought about that last night. We could do a configure test. Since\nit'd be probing random() results there'd be a small probability of\nfailure, but if we wire in an assumption that the max value must be\n2^(15 + n*16)-1 for some n, ten or so probes would give us a failure\nprobability on the order of 2^-160, which ought to satisfy anyone.\n\nHowever, in the absence of any hard evidence that there are platforms\nwhere the value is different from 2^31-1, it's probably just a waste of\nconfiguration cycles at the moment.\n\nI suggest we add a config.h constant like\n\n/* The local random() function yields values 0 .. MAX_RANDOM_VALUE */\n#define MAX_RANDOM_VALUE <2^31-1>\n\nand use that in the code. Then, if we ever find a platform where\nrandom() does actually produce 64-bit results, it'll be time enough\nto crank up a real configure test to set the value.\n\nComments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 10:56:30 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] random() function produces wrong range "
},
{
"msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\n\n>>>>> \"Thomas\" == Thomas Swan <[email protected]> writes:\n\n Thomas> Is it possible to test (during configure phase) and then\n Thomas> go from there... or does it need to be the same for all\n Thomas> platforms?\n\nYou should be able to test, but it is, of course, a statistical test.\nCall random() several times and test the maximum value against your\nthresholds of 2^15 and 2^31. If random() is generating values in the\nrange 1:2^31-1, you would expect half of your values to be greater\nthan 2^15-1; more importantly, if you generate, say, 10 values, you\nexpect only a 1:1024 chance that they are all below 2^15. If those\nodds aren't good enough, generate more.\n\nroland\n- -- \n\t\t PGP Key ID: 66 BC 3B CD\nRoland B. Roberts, PhD Unix Software Solutions\[email protected] 76-15 113th Street, Apt 3B\[email protected] Forest Hills, NY 11375\n\n-----BEGIN PGP SIGNATURE-----\nVersion: 2.6.3a\nCharset: noconv\nComment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface\n\niQCVAwUBOYmNSeoW38lmvDvNAQHFegQAlexEvaG0t+1H0IkPWikbdMUIck1fE0DI\nrfcGi1M/SQ6K9Hmvi1HB/SVEU4DKGaHDoqlU7ei78OgOzchbsLL5cqAJNIsKv5QJ\nF4u/A0Fg7yuyRZ3/CNCo0+nTwhyDANktMw78AM5ssHCs75UxC+vHWibHHBmXJzrF\n8WD2LyjPSNI=\n=dR25\n-----END PGP SIGNATURE-----\n",
"msg_date": "03 Aug 2000 11:18:34 -0400",
"msg_from": "Roland Roberts <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] random() function produces wrong range"
},
{
"msg_contents": "Tom Lane writes:\n> I thought about that last night. We could do a configure test. Since\n> it'd be probing random() results there'd be a small probability of\n> failure, but if we wire in an assumption that the max value must be\n> 2^(15 + n*16)-1 for some n, ten or so probes would give us a failure\n> probability on the order of 2^-160, which ought to satisfy anyone.\n> \n> However, in the absence of any hard evidence that there are platforms\n> where the value is different from 2^31-1, it's probably just a waste of\n> configuration cycles at the moment.\n> \n> I suggest we add a config.h constant like\n> \n> /* The local random() function yields values 0 .. MAX_RANDOM_VALUE */\n> #define MAX_RANDOM_VALUE <2^31-1>\n> \n> and use that in the code. Then, if we ever find a platform where\n> random() does actually produce 64-bit results, it'll be time enough\n> to crank up a real configure test to set the value.\n> \n> Comments?\n\nIf any platform *does* produced 64-bit results, it won't be compliant\nwith SUSv2 which states explicitly that the resulting range is up to\n2^31-1. Since most portability problems are with older platforms which\nhaven't caught up, I'd be hopeful that any new 64-bit-int platforms\nwould get it right from the outset. Maybe I'm being over-optimistic :-)\n\n--Malcolm\n\n-- \nMalcolm Beattie <[email protected]> I am looking for a Linux (and\nUnix Systems Programmer maybe Apache/mod_perl) job/contract\nOxford University Computing Services http://users.ox.ac.uk/~mbeattie/cv.html\n",
"msg_date": "Thu, 3 Aug 2000 16:27:56 +0100",
"msg_from": "Malcolm Beattie <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: random() function produces wrong range"
},
{
"msg_contents": "Roland Roberts <[email protected]> writes:\n> Call random() several times and test the maximum value against your\n> thresholds of 2^15 and 2^31. If random() is generating values in the\n> range 1:2^31-1, you would expect half of your values to be greater\n> than 2^15-1; more importantly, if you generate, say, 10 values, you\n> expect only a 1:1024 chance that they are all below 2^15.\n\nActually the odds are far better than that. If the range is 2^31-1\nthen only about 2^-16th of the outputs should be less than 2^15.\nSo ten probes gives you a failure probability of about 2^-160 not\n2^-10.\n\nGeneralizing, you could tell the difference between widths of 31,\n47, or 63 bits with the same level of reliability.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 11:45:39 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Re: [HACKERS] random() function produces wrong range "
},
{
"msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\n\n>>>>> \"Tom\" == Tom Lane <[email protected]> writes:\n\n Tom> Actually the odds are far better than that. If the range is\n Tom> 2^31-1 then only about 2^-16th of the outputs should be less\n Tom> than 2^15. So ten probes gives you a failure probability of\n Tom> about 2^-160 not 2^-10.\n\nOops, 2^16 != 2^32 / 2.\n\nSo a dynamic test is not only possible but wouldn't cost to much at\nconfigure time.\n\nroland\n- -- \n\t\t PGP Key ID: 66 BC 3B CD\nRoland B. Roberts, PhD Unix Software Solutions\[email protected] 76-15 113th Street, Apt 3B\[email protected] Forest Hills, NY 11375\n\n-----BEGIN PGP SIGNATURE-----\nVersion: 2.6.3a\nCharset: noconv\nComment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface\n\niQCVAwUBOYmtf+oW38lmvDvNAQGWYwP/eXRtrDPu/xN+W9pCd9y34d4jbrPH7jku\nnBAuSYtCRyoMgTkjdCtqThzq3vzPLDwfmOZcmWP8W5AmQPJjvcdFwI7y1XgGlaxd\naAIlqqf+TTkZwIUh2vnWTuu5JKkiAZI6UuzNSzy79O/frxKE2y97zCuMw02I0kMK\niGNSybN3L5w=\n=36yP\n-----END PGP SIGNATURE-----\n",
"msg_date": "03 Aug 2000 13:36:01 -0400",
"msg_from": "Roland Roberts <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Re: [HACKERS] random() function produces wrong range"
},
{
"msg_contents": "Tom Lane <[email protected]> writes:\n\n> Thomas Lockhart <[email protected]> writes:\n> > The Linux man pages indicate that the behavior and underlying\n> > implementation of random() and rand() are the same (so I just picked\n> > one).\n> \n> Ah, well, there's your problem. Whoever did this part of the library\n> on Linux took shortcuts. On older-line systems, rand() is a\n> considerably older and crummier generator than random(). It would\n> definitely not be a wise decision to use rand() instead.\n> \n> I believe using random() is the right thing. The portability bug here\n> is the assumption that RAND_MAX applies to random() (or is even defined;\n> none of the man pages I've looked at so far mention it). But all the\n> machines say that the output of random() is 31 bits, so INT_MAX should\n> work.\n\nOn an i386 machine, certainly; but not on an Alpha or a Sparc.\nProbably safer to use (2**31)-1, which is what my (NetBSD) man page\nsays.\n\nFWIW, I believe random(3) running on NetBSD/alpha, for example, will\nreturn a 31-bit result.\n\nChris\n\n-- \n---------------------------------------------------- [email protected]\nChris Jones\n System Administrator, RightNow Technologies\n\"Is this going to be a stand-up programming session, sir, or another bug hunt?\"\n",
"msg_date": "03 Aug 2000 13:43:51 -0600",
"msg_from": "Chris Jones <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] random() function produces wrong range "
},
{
"msg_contents": "On Thu, Aug 03, 2000 at 11:45:39AM -0400, Tom Lane wrote:\n> Actually the odds are far better than that. If the range is 2^31-1\n> then only about 2^-16th of the outputs should be less than 2^15.\n> So ten probes gives you a failure probability of about 2^-160 not\n> 2^-10.\n\nIt occurs to me that Perl has to provide a portable rand function, so\nI looked at how its Configure script works. It's pretty much what\nyou've been discussing. First it checks for a couple of possible\nrandom functions (preferring drand48(), then random(), then bitching\nand using rand()).\n\nint main()\n{\n register int i;\n register unsigned long tmp;\n register unsigned long max = 0L;\n\n for (i = 1000; i; i--) {\n tmp = (unsigned long) $randfunc();\n if (tmp > max) max = tmp;\n }\n for (i = 0; max; i++)\n max /= 2;\n printf(\"%d\\n\",i);\n}\n\nOh well.\n-- \nChristopher Masto Senior Network Monkey NetMonger Communications\[email protected] [email protected] http://www.netmonger.net\n\nFree yourself, free your machine, free the daemon -- http://www.freebsd.org/\n",
"msg_date": "Fri, 4 Aug 2000 14:28:28 -0400",
"msg_from": "Christopher Masto <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: random() function produces wrong range"
},
{
"msg_contents": "Perhaps a little off topic.\n\nI had been using int8 as primary / foreign keys pairs. \nAfter joining several large tables on the keys, I noticed about a 30/40%\nspeed improvement just in changing the keys from int8 to int4 data\ntypes.\n\nShould it affect it that much?\n\n\n- \n- Thomas Swan\n \n- Graduate Student - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"\n",
"msg_date": "Fri, 04 Aug 2000 15:01:20 -0500",
"msg_from": "Thomas Swan <[email protected]>",
"msg_from_op": false,
"msg_subject": "Differences between int8 and int4 as pkeys and fkeys"
},
{
"msg_contents": "> I had been using int8 as primary / foreign keys pairs. After joining\n> several large tables on the keys, I noticed about a 30/40% speed\n> improvement just in changing the keys from int8 to int4 data types.\n\nApparently it should be that much (though this is the first report\neither way). Here are some reasons why there is the difference:\n\n1) int4 is \"pass by value\", int8 is \"pass by reference\". So int8 hits\npalloc() every time you generate a new one, whereas int4 may just copy\nthe data itself.\n\n2) int8 is implemented in software libraries, at least on 32-bit\nmachines. int4 is implemented in hardware. Libraries are slower than\n~1cycle hardware operations.\n\n - Thomas\n",
"msg_date": "Sat, 05 Aug 2000 02:28:32 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Differences between int8 and int4 as pkeys and fkeys"
}
] |
[
{
"msg_contents": "Any comments at all from anyone on my mail from Sunday Nite on\nmaking the macaddr_manuf function just return a \nmasked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\ndo this in the code?\n\nAny comments on the ouiparse.awk script?\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, 1 Aug 2000 20:55:19 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "mac.c"
},
{
"msg_contents": "It appears to me that macaddr_manuf can be defined as this:\n\nmacaddr * macaddr_trunc (macaddr *addr)\n{\n macaddr *result;\n if (addr==NULL) return NULL;\n result=(macaddr *) palloc(sizeof(struct macaddr));\n result->a=addr->a;\n result->b=addr->b;\n result->c=addr->c;\n result->d=0;\n result->e=0;\n result->f=0;\n return result;\n}\n\nand then \n\ncreate function macaddr_trunc(macaddr) returns macaddr as \n 'MODULE_PATHNAME' language 'c';\n\nand then\ncreate function macaddr_manuf(macaddr) returns varchar2 as '\n select name from macaddr_blah where mac=macaddr_trunc($1)\n' language 'sql';\n\nBe warned, this code was typed directly in editor and not compiled ;P\nUnfortunately, I don't have time to make a full-fledged contrib out of\nthis and Larry's awk files.\n\n-alex\n\n\nOn Tue, 1 Aug 2000, Larry Rosenman wrote:\n\n> Any comments at all from anyone on my mail from Sunday Nite on\n> making the macaddr_manuf function just return a \n> masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> do this in the code?\n> \n> Any comments on the ouiparse.awk script?\n> \n> LER\n> \n> \n\n\n",
"msg_date": "Tue, 1 Aug 2000 23:06:44 -0400 (EDT)",
"msg_from": "Alex Pilosov <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> Any comments at all from anyone on my mail from Sunday Nite on\n> making the macaddr_manuf function just return a\n> masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> do this in the code?\n\nSo macaddr_manuf() will be changed to return a mac address with the low\nbytes set to zero? There is certainly a use for a function like this,\nalong with another function, say ismanuf() or same() or similar() or ??,\nwhich takes two mac addresses and compares just the manufacturer's\nfields. Why not call the \"manufacturer's mask\" function something like\nmanuf() or brand() or ?? rather than reusing macaddr_manuf() which would\nbecome obsolete?\n\n> Any comments on the ouiparse.awk script?\n\nThe awk script looks OK (and if anyone objected enough they could\nrewrite in perl or whatever). Where does one get the IEEE list it uses?\n\n - Thomas\n",
"msg_date": "Wed, 02 Aug 2000 07:07:06 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> > Any comments at all from anyone on my mail from Sunday Nite on\n> > making the macaddr_manuf function just return a\n> > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > do this in the code?\n> \n> So macaddr_manuf() will be changed to return a mac address with the low\n> bytes set to zero? There is certainly a use for a function like this,\n> along with another function, say ismanuf() or same() or similar() or ??,\n> which takes two mac addresses and compares just the manufacturer's\n> fields. Why not call the \"manufacturer's mask\" function something like\n> manuf() or brand() or ?? rather than reusing macaddr_manuf() which would\n> become obsolete?\nSure, I just don't want to make a mistake on coding it. I'm open.\n\nSince macaddr_manuf() will not be up to date, I'd say lets make\nthe new function macaddr_brand, and if someone wants to do the other\ntwo, fine. I'd also doc the fact that macaddr_manuf() is deprecated, marked\nfor deletion one or two releases down the line (since the table will\nno longer be updated, and is very much outdated). \n> \n> > Any comments on the ouiparse.awk script?\n> \n> The awk script looks OK (and if anyone objected enough they could\n> rewrite in perl or whatever). Where does one get the IEEE list it uses?\nIt's on the IEEE site (http://standards.ieee.org/regauth/oui/index.shtml).\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, 2 Aug 2000 04:53:24 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > making the macaddr_manuf function just return a\n> > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > do this in the code?\n> > \n> > So macaddr_manuf() will be changed to return a mac address with the low\n> > bytes set to zero? There is certainly a use for a function like this,\n> > along with another function, say ismanuf() or same() or similar() or ??,\n> > which takes two mac addresses and compares just the manufacturer's\n> > fields. Why not call the \"manufacturer's mask\" function something like\n> > manuf() or brand() or ?? rather than reusing macaddr_manuf() which would\n> > become obsolete?\n> Sure, I just don't want to make a mistake on coding it. I'm open.\n> \n> Since macaddr_manuf() will not be up to date, I'd say lets make\n> the new function macaddr_brand, and if someone wants to do the other\n> two, fine. I'd also doc the fact that macaddr_manuf() is deprecated, marked\n> for deletion one or two releases down the line (since the table will\n> no longer be updated, and is very much outdated). \n\nWe can delete it in 7.1. No reason to keep it around if the output is\ninvalid.\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, 2 Aug 2000 09:14:32 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "What about people that are using it? Or will it get noted in the upgrade\npath doc?\n\nLER\n\n\n-----Original Message-----\nFrom: [email protected] [mailto:[email protected]]On\nBehalf Of Bruce Momjian\nSent: Wednesday, August 02, 2000 8:15 AM\nTo: Larry Rosenman\nCc: Thomas Lockhart; [email protected]\nSubject: Re: [HACKERS] mac.c\n\n\n> > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > making the macaddr_manuf function just return a\n> > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > do this in the code?\n> >\n> > So macaddr_manuf() will be changed to return a mac address with the low\n> > bytes set to zero? There is certainly a use for a function like this,\n> > along with another function, say ismanuf() or same() or similar() or ??,\n> > which takes two mac addresses and compares just the manufacturer's\n> > fields. Why not call the \"manufacturer's mask\" function something like\n> > manuf() or brand() or ?? rather than reusing macaddr_manuf() which would\n> > become obsolete?\n> Sure, I just don't want to make a mistake on coding it. I'm open.\n>\n> Since macaddr_manuf() will not be up to date, I'd say lets make\n> the new function macaddr_brand, and if someone wants to do the other\n> two, fine. I'd also doc the fact that macaddr_manuf() is deprecated,\nmarked\n> for deletion one or two releases down the line (since the table will\n> no longer be updated, and is very much outdated).\n\nWe can delete it in 7.1. No reason to keep it around if the output is\ninvalid.\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",
"msg_date": "Wed, 2 Aug 2000 08:19:05 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: mac.c"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> What about people that are using it? Or will it get noted in the upgrade\n> path doc?\n\nThere can't be many if it is not working 100%. Better to remove it than\nleave an incorrect feature.\n\n> \n> LER\n> \n> \n> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Bruce Momjian\n> Sent: Wednesday, August 02, 2000 8:15 AM\n> To: Larry Rosenman\n> Cc: Thomas Lockhart; [email protected]\n> Subject: Re: [HACKERS] mac.c\n> \n> \n> > > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > > making the macaddr_manuf function just return a\n> > > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > > do this in the code?\n> > >\n> > > So macaddr_manuf() will be changed to return a mac address with the low\n> > > bytes set to zero? There is certainly a use for a function like this,\n> > > along with another function, say ismanuf() or same() or similar() or ??,\n> > > which takes two mac addresses and compares just the manufacturer's\n> > > fields. Why not call the \"manufacturer's mask\" function something like\n> > > manuf() or brand() or ?? rather than reusing macaddr_manuf() which would\n> > > become obsolete?\n> > Sure, I just don't want to make a mistake on coding it. I'm open.\n> >\n> > Since macaddr_manuf() will not be up to date, I'd say lets make\n> > the new function macaddr_brand, and if someone wants to do the other\n> > two, fine. I'd also doc the fact that macaddr_manuf() is deprecated,\n> marked\n> > for deletion one or two releases down the line (since the table will\n> > no longer be updated, and is very much outdated).\n> \n> We can delete it in 7.1. No reason to keep it around if the output is\n> invalid.\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-- \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, 2 Aug 2000 09:34:22 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "ok. How do we go about getting this done (I don't trust my skills for the\nBE yet...)\n\nLER\n\n\n-----Original Message-----\nFrom: [email protected] [mailto:[email protected]]On\nBehalf Of Bruce Momjian\nSent: Wednesday, August 02, 2000 8:34 AM\nTo: Larry Rosenman\nCc: Thomas Lockhart; [email protected]\nSubject: Re: [HACKERS] mac.c\n\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> What about people that are using it? Or will it get noted in the upgrade\n> path doc?\n\nThere can't be many if it is not working 100%. Better to remove it than\nleave an incorrect feature.\n\n>\n> LER\n>\n>\n> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Bruce Momjian\n> Sent: Wednesday, August 02, 2000 8:15 AM\n> To: Larry Rosenman\n> Cc: Thomas Lockhart; [email protected]\n> Subject: Re: [HACKERS] mac.c\n>\n>\n> > > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > > making the macaddr_manuf function just return a\n> > > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > > do this in the code?\n> > >\n> > > So macaddr_manuf() will be changed to return a mac address with the\nlow\n> > > bytes set to zero? There is certainly a use for a function like this,\n> > > along with another function, say ismanuf() or same() or similar() or\n??,\n> > > which takes two mac addresses and compares just the manufacturer's\n> > > fields. Why not call the \"manufacturer's mask\" function something like\n> > > manuf() or brand() or ?? rather than reusing macaddr_manuf() which\nwould\n> > > become obsolete?\n> > Sure, I just don't want to make a mistake on coding it. I'm open.\n> >\n> > Since macaddr_manuf() will not be up to date, I'd say lets make\n> > the new function macaddr_brand, and if someone wants to do the other\n> > two, fine. I'd also doc the fact that macaddr_manuf() is deprecated,\n> marked\n> > for deletion one or two releases down the line (since the table will\n> > no longer be updated, and is very much outdated).\n>\n> We can delete it in 7.1. No reason to keep it around if the output is\n> invalid.\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--\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",
"msg_date": "Wed, 2 Aug 2000 08:39:16 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: mac.c"
},
{
"msg_contents": "[ Charset ISO-8859-1 unsupported, converting... ]\n> ok. How do we go about getting this done (I don't trust my skills for the\n> BE yet...)\n\nI will remove it whenever you want.\n\n> \n> LER\n> \n> \n> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Bruce Momjian\n> Sent: Wednesday, August 02, 2000 8:34 AM\n> To: Larry Rosenman\n> Cc: Thomas Lockhart; [email protected]\n> Subject: Re: [HACKERS] mac.c\n> \n> \n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > What about people that are using it? Or will it get noted in the upgrade\n> > path doc?\n> \n> There can't be many if it is not working 100%. Better to remove it than\n> leave an incorrect feature.\n> \n> >\n> > LER\n> >\n> >\n> > -----Original Message-----\n> > From: [email protected] [mailto:[email protected]]On\n> > Behalf Of Bruce Momjian\n> > Sent: Wednesday, August 02, 2000 8:15 AM\n> > To: Larry Rosenman\n> > Cc: Thomas Lockhart; [email protected]\n> > Subject: Re: [HACKERS] mac.c\n> >\n> >\n> > > > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > > > making the macaddr_manuf function just return a\n> > > > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > > > do this in the code?\n> > > >\n> > > > So macaddr_manuf() will be changed to return a mac address with the\n> low\n> > > > bytes set to zero? There is certainly a use for a function like this,\n> > > > along with another function, say ismanuf() or same() or similar() or\n> ??,\n> > > > which takes two mac addresses and compares just the manufacturer's\n> > > > fields. Why not call the \"manufacturer's mask\" function something like\n> > > > manuf() or brand() or ?? rather than reusing macaddr_manuf() which\n> would\n> > > > become obsolete?\n> > > Sure, I just don't want to make a mistake on coding it. I'm open.\n> > >\n> > > Since macaddr_manuf() will not be up to date, I'd say lets make\n> > > the new function macaddr_brand, and if someone wants to do the other\n> > > two, fine. I'd also doc the fact that macaddr_manuf() is deprecated,\n> > marked\n> > > for deletion one or two releases down the line (since the table will\n> > > no longer be updated, and is very much outdated).\n> >\n> > We can delete it in 7.1. No reason to keep it around if the output is\n> > invalid.\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> --\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-- \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, 2 Aug 2000 10:28:03 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "I'm also talking about the actual changes as well....\n\n\n\n-----Original Message-----\nFrom: [email protected] [mailto:[email protected]]On\nBehalf Of Bruce Momjian\nSent: Wednesday, August 02, 2000 9:28 AM\nTo: Larry Rosenman\nCc: Thomas Lockhart; [email protected]\nSubject: Re: [HACKERS] mac.c\n\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> ok. How do we go about getting this done (I don't trust my skills for the\n> BE yet...)\n\nI will remove it whenever you want.\n\n>\n> LER\n>\n>\n> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Bruce Momjian\n> Sent: Wednesday, August 02, 2000 8:34 AM\n> To: Larry Rosenman\n> Cc: Thomas Lockhart; [email protected]\n> Subject: Re: [HACKERS] mac.c\n>\n>\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > What about people that are using it? Or will it get noted in the\nupgrade\n> > path doc?\n>\n> There can't be many if it is not working 100%. Better to remove it than\n> leave an incorrect feature.\n>\n> >\n> > LER\n> >\n> >\n> > -----Original Message-----\n> > From: [email protected] [mailto:[email protected]]On\n> > Behalf Of Bruce Momjian\n> > Sent: Wednesday, August 02, 2000 8:15 AM\n> > To: Larry Rosenman\n> > Cc: Thomas Lockhart; [email protected]\n> > Subject: Re: [HACKERS] mac.c\n> >\n> >\n> > > > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > > > making the macaddr_manuf function just return a\n> > > > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > > > do this in the code?\n> > > >\n> > > > So macaddr_manuf() will be changed to return a mac address with the\n> low\n> > > > bytes set to zero? There is certainly a use for a function like\nthis,\n> > > > along with another function, say ismanuf() or same() or similar() or\n> ??,\n> > > > which takes two mac addresses and compares just the manufacturer's\n> > > > fields. Why not call the \"manufacturer's mask\" function something\nlike\n> > > > manuf() or brand() or ?? rather than reusing macaddr_manuf() which\n> would\n> > > > become obsolete?\n> > > Sure, I just don't want to make a mistake on coding it. I'm open.\n> > >\n> > > Since macaddr_manuf() will not be up to date, I'd say lets make\n> > > the new function macaddr_brand, and if someone wants to do the other\n> > > two, fine. I'd also doc the fact that macaddr_manuf() is deprecated,\n> > marked\n> > > for deletion one or two releases down the line (since the table will\n> > > no longer be updated, and is very much outdated).\n> >\n> > We can delete it in 7.1. No reason to keep it around if the output is\n> > invalid.\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\n19026\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\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",
"msg_date": "Wed, 2 Aug 2000 09:36:09 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: mac.c"
},
{
"msg_contents": "I'd say lets go for it. do you want me to try and code it, or do you or one\nof the others?\n\n\n\n-----Original Message-----\nFrom: [email protected] [mailto:[email protected]]On\nBehalf Of Larry Rosenman\nSent: Wednesday, August 02, 2000 9:36 AM\nTo: Bruce Momjian; Larry Rosenman\nCc: Thomas Lockhart; [email protected]\nSubject: RE: [HACKERS] mac.c\n\n\nI'm also talking about the actual changes as well....\n\n\n\n-----Original Message-----\nFrom: [email protected] [mailto:[email protected]]On\nBehalf Of Bruce Momjian\nSent: Wednesday, August 02, 2000 9:28 AM\nTo: Larry Rosenman\nCc: Thomas Lockhart; [email protected]\nSubject: Re: [HACKERS] mac.c\n\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> ok. How do we go about getting this done (I don't trust my skills for the\n> BE yet...)\n\nI will remove it whenever you want.\n\n>\n> LER\n>\n>\n> -----Original Message-----\n> From: [email protected] [mailto:[email protected]]On\n> Behalf Of Bruce Momjian\n> Sent: Wednesday, August 02, 2000 8:34 AM\n> To: Larry Rosenman\n> Cc: Thomas Lockhart; [email protected]\n> Subject: Re: [HACKERS] mac.c\n>\n>\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > What about people that are using it? Or will it get noted in the\nupgrade\n> > path doc?\n>\n> There can't be many if it is not working 100%. Better to remove it than\n> leave an incorrect feature.\n>\n> >\n> > LER\n> >\n> >\n> > -----Original Message-----\n> > From: [email protected] [mailto:[email protected]]On\n> > Behalf Of Bruce Momjian\n> > Sent: Wednesday, August 02, 2000 8:15 AM\n> > To: Larry Rosenman\n> > Cc: Thomas Lockhart; [email protected]\n> > Subject: Re: [HACKERS] mac.c\n> >\n> >\n> > > > > Any comments at all from anyone on my mail from Sunday Nite on\n> > > > > making the macaddr_manuf function just return a\n> > > > > masked MACADDR (I.E. set the low 3 bytes to 0x00) and how we\n> > > > > do this in the code?\n> > > >\n> > > > So macaddr_manuf() will be changed to return a mac address with the\n> low\n> > > > bytes set to zero? There is certainly a use for a function like\nthis,\n> > > > along with another function, say ismanuf() or same() or similar() or\n> ??,\n> > > > which takes two mac addresses and compares just the manufacturer's\n> > > > fields. Why not call the \"manufacturer's mask\" function something\nlike\n> > > > manuf() or brand() or ?? rather than reusing macaddr_manuf() which\n> would\n> > > > become obsolete?\n> > > Sure, I just don't want to make a mistake on coding it. I'm open.\n> > >\n> > > Since macaddr_manuf() will not be up to date, I'd say lets make\n> > > the new function macaddr_brand, and if someone wants to do the other\n> > > two, fine. I'd also doc the fact that macaddr_manuf() is deprecated,\n> > marked\n> > > for deletion one or two releases down the line (since the table will\n> > > no longer be updated, and is very much outdated).\n> >\n> > We can delete it in 7.1. No reason to keep it around if the output is\n> > invalid.\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\n19026\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\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",
"msg_date": "Wed, 2 Aug 2000 09:39:21 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: mac.c"
},
{
"msg_contents": "> Since macaddr_manuf() will not be up to date, I'd say lets make\n> the new function macaddr_brand, and if someone wants to do the other\n> two, fine. I'd also doc the fact that macaddr_manuf() is deprecated, marked\n> for deletion one or two releases down the line (since the table will\n> no longer be updated, and is very much outdated).\n\nI've been thinking about this a bit, coincidentally while I've been\nworking on the LIKE implementation for string comparisons.\n\nWhy not implement like() and notlike() for macaddr data types which (if\nboth args are macaddr) will compare on manufacturer's fields alone? That\nwould seem to get all the functionality you might want.\n\nExample:\n\n SELECT * FROM machines where hwaddr LIKE\n (select id from MacIdCodes where manuf = 'Intel');\n\nor something like that.\n\nThat would avoid ginning up something artificial like a macaddr with\nsome fields zeroed out. We would still have an equality operator etc.\n\nComments?\n\n - Thomas\n",
"msg_date": "Mon, 07 Aug 2000 07:22:44 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> > Since macaddr_manuf() will not be up to date, I'd say lets make\n> > the new function macaddr_brand, and if someone wants to do the other\n> > two, fine. I'd also doc the fact that macaddr_manuf() is deprecated, marked\n> > for deletion one or two releases down the line (since the table will\n> > no longer be updated, and is very much outdated).\n> \n> I've been thinking about this a bit, coincidentally while I've been\n> working on the LIKE implementation for string comparisons.\n> \n> Why not implement like() and notlike() for macaddr data types which (if\n> both args are macaddr) will compare on manufacturer's fields alone? That\n> would seem to get all the functionality you might want.\n> \n> Example:\n> \n> SELECT * FROM machines where hwaddr LIKE\n> (select id from MacIdCodes where manuf = 'Intel');\n> \n> or something like that.\n> \n> That would avoid ginning up something artificial like a macaddr with\n> some fields zeroed out. We would still have an equality operator etc.\nWe still need to load a *TABLE* with a 3 byte hex number (at least) for \nthe OUI, and a text field for the actual manufacturer (see my posted \nouiparse.awk script). How do we store that 3 byte hex number (we don't have\na type that I'm aware of...)? \n\nDon't get me wrong, I like your idea, but I'm not sure what it buys us after\nthe later suggestions I made of returning a half-zeroed mac...\n\nLarry\n\n> \n> Comments?\n> \n> - Thomas\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": "Mon, 7 Aug 2000 05:25:57 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "> We still need to load a *TABLE* with a 3 byte hex number (at least) for\n> the OUI, and a text field for the actual manufacturer (see my posted\n> ouiparse.awk script). How do we store that 3 byte hex number (we don't have\n> a type that I'm aware of...)?\n\nWe extend those three bytes to a full zero-filled mac address when\nfilling the table. Is there any downside to that?\n\n> Don't get me wrong, I like your idea, but I'm not sure what it buys us after\n> the later suggestions I made of returning a half-zeroed mac...\n\nIt buys us a natural way of comparing classes of mac addresses. And we\ndon't have to invoke any extra functions to do it, so you don't need to\nremember an obscure function name. Also, it could be extended to do\nsimple pattern matching a la the LIKE string code:\n\n SELECT * FROM t1 WHERE t1.addr LIKE '00:01:23:__:05:%';\n\nbtw, are fields \"a\"-\"f\" a general convention in labeling mac address\nfields? Or is that an artifact of Postgres' definition?\n\n - Thomas\n",
"msg_date": "Mon, 07 Aug 2000 15:40:43 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> Why not implement like() and notlike() for macaddr data types which (if\n> both args are macaddr) will compare on manufacturer's fields alone? That\n> would seem to get all the functionality you might want.\n\nThat seems like an entirely unjustified overloading of the \"LIKE\"\noperator. I don't see any reason why someone would expect a string-\npattern-match operator to have the semantics of \"compare the\nmanufacturer part only\" when applied to macaddr.\n\n> That would avoid ginning up something artificial like a macaddr with\n> some fields zeroed out.\n\nIf you don't like that, provide a function that extracts the\nmanufacturer part as a text string (and I guess another to extract the\nlow-order bits as text). Then a lookup to get the manufacturer name can\nbe done as a text-field search. There is plenty of precedent in the\ninet/cidr functions for extracting portions of a data value as text\nstrings.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 07 Aug 2000 11:57:30 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c "
},
{
"msg_contents": "> > Why not implement like() and notlike() for macaddr data types which (if\n> > both args are macaddr) will compare on manufacturer's fields alone? That\n> > would seem to get all the functionality you might want.\n> That seems like an entirely unjustified overloading of the \"LIKE\"\n> operator. I don't see any reason why someone would expect a string-\n> pattern-match operator to have the semantics of \"compare the\n> manufacturer part only\" when applied to macaddr.\n\nWell, because \"similar\" is a synonym for \"like\", at least in the Western\nUS. And because LIKE is a string-pattern-match operator only because\nSQL9x has a limited view of the world, and doesn't have any types other\nthan strings for which \"similar\" could have an unambiguous meaning.\n\nIn this case it is pretty clear what \"like\" could mean since we are\ncomparing two MAC addresses.\n\n> > That would avoid ginning up something artificial like a macaddr with\n> > some fields zeroed out.\n> If you don't like that, provide a function that extracts the\n> manufacturer part as a text string (and I guess another to extract the\n> low-order bits as text). Then a lookup to get the manufacturer name can\n> be done as a text-field search. There is plenty of precedent in the\n> inet/cidr functions for extracting portions of a data value as text\n> strings.\n\nHmm. All I would really need is a \"macaddr to text\" conversion function\nand Postgres will take care of the rest (so we could use the full string\npattern matching capabilities). So\n\n SELECT m.* FROM machines m, mactbl WHERE mactbl.manuf = 'Intel'\n AND m.mac LIKE (substring(mactbl.id for 8) || '%');\n\nmight get a list of all of your machines with intel cards in them. Or we\ncould store the manufacturer's fields as strings (e.g. '01:02:03'), in\nwhich case the query becomes\n\n SELECT m.* FROM machines m, mactbl WHERE mactbl.manuf = 'Intel'\n AND m.mac LIKE (mactbl.id || '%');\n\n\nPerhaps this is a better solution until someone complains about\nperformance (since we would be going through a bunch of printf's) but\nI'll bet it isn't noticable in most instances. And I'd want the\nmacaddr->text and text->macaddr conversion functions anyway, so the code\nwill already be there to try.\n\nComments?\n\n - Thomas\n",
"msg_date": "Mon, 07 Aug 2000 16:30:30 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c"
},
{
"msg_contents": "Ok, that's what ouiparse.awk does now loads the bottom 3 octets as 0's.\n\nAs to the a-f, I think that's implementation detail(s).\n\nSo what you are saying is to find a manufacturer we'd say:\n\n SELECT manufacturer FROM mac_table WHERE substr(mac_table.oui,1,3) =\nsubstr(your_table.mac,1,3);\n\n?\n\nThis still looks stilted to me.\n\nLER\n\n\n-----Original Message-----\nFrom: [email protected]\n[mailto:[email protected]]On Behalf Of Thomas Lockhart\nSent: Monday, August 07, 2000 10:41 AM\nTo: Larry Rosenman\nCc: [email protected]\nSubject: Re: [HACKERS] mac.c\n\n\n> We still need to load a *TABLE* with a 3 byte hex number (at least) for\n> the OUI, and a text field for the actual manufacturer (see my posted\n> ouiparse.awk script). How do we store that 3 byte hex number (we don't\nhave\n> a type that I'm aware of...)?\n\nWe extend those three bytes to a full zero-filled mac address when\nfilling the table. Is there any downside to that?\n\n> Don't get me wrong, I like your idea, but I'm not sure what it buys us\nafter\n> the later suggestions I made of returning a half-zeroed mac...\n\nIt buys us a natural way of comparing classes of mac addresses. And we\ndon't have to invoke any extra functions to do it, so you don't need to\nremember an obscure function name. Also, it could be extended to do\nsimple pattern matching a la the LIKE string code:\n\n SELECT * FROM t1 WHERE t1.addr LIKE '00:01:23:__:05:%';\n\nbtw, are fields \"a\"-\"f\" a general convention in labeling mac address\nfields? Or is that an artifact of Postgres' definition?\n\n - Thomas\n\n",
"msg_date": "Mon, 7 Aug 2000 11:51:19 -0500",
"msg_from": "\"Larry Rosenman\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: mac.c"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> Hmm. All I would really need is a \"macaddr to text\" conversion function\n> and Postgres will take care of the rest (so we could use the full string\n> pattern matching capabilities). So\n\n> SELECT m.* FROM machines m, mactbl WHERE mactbl.manuf = 'Intel'\n> AND m.mac LIKE (substring(mactbl.id for 8) || '%');\n\nUgh. That requires applications to make assumptions about what\ntext-string manipulation corresponds to \"extract the manufacturer part\".\nWhat's so wrong with providing a function \"manufacturer(macaddr)\" to\nencapsulate that knowledge?\n\n> Perhaps this is a better solution until someone complains about\n> performance (since we would be going through a bunch of printf's)\n\nLack of indexability of the WHERE clause is going to be a much bigger\nperformance problem than how many printf's are involved. If you're\ntrying to do a lookup in a table of manufacturer codes you want to be\nable to compare equality to a search value, not have to do an unanchored\nLIKE comparison at every tuple.\n\nI do like providing a macaddr-to-text conversion function (if there's\nnot one already), since as you say it'd allow pattern-match searches\non more general patterns than \"what's the manufacturer\". But extracting\nthe manufacturer part is a common case that is part of the agreed-on\nsemantics of the type, so providing a function for it seems reasonable\nto me.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Mon, 07 Aug 2000 13:02:11 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c "
},
{
"msg_contents": "At 11:57 AM 8/7/00 -0400, Tom Lane wrote:\n>Thomas Lockhart <[email protected]> writes:\n>> Why not implement like() and notlike() for macaddr data types which (if\n>> both args are macaddr) will compare on manufacturer's fields alone? That\n>> would seem to get all the functionality you might want.\n>\n>That seems like an entirely unjustified overloading of the \"LIKE\"\n>operator. I don't see any reason why someone would expect a string-\n>pattern-match operator to have the semantics of \"compare the\n>manufacturer part only\" when applied to macaddr.\n\nIt seems really unintuitive, breaking the \"law of least astonishment\",\nsince it isn't really at all like \"LIKE\". Which, after all, does an\nexact match unless you wildcard.\n\nI would think the trend would be to reduce items in the kludge bucket,\nnot add to them.\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, 07 Aug 2000 11:05:10 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: mac.c "
}
] |
[
{
"msg_contents": "Hope this function won't be removed. I'm using it\nto select a random row like \"select xxx from yyy\norder by random() limit 1\". It's painful to do it\nbefore 7.0.\n\nRegards,\n-- \nGuo Bin\n\n--- Tom Lane <[email protected]> wrote:\n> \n> As far as I can find, random() isn't mentioned in the\n> documentation\n> currently, so there probably aren't many people using\n> it...\n> \n> \t\t\tregards, tom lane\n\n\n__________________________________________________\nDo You Yahoo!?\nKick off your party with Yahoo! Invites.\nhttp://invites.yahoo.com/\n",
"msg_date": "Tue, 1 Aug 2000 23:54:44 -0700 (PDT)",
"msg_from": "Guo Bin <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: random() function produces wrong range"
}
] |
[
{
"msg_contents": "I am wondering what's the best way to to build a database where rows of tables\nare like objects.\nAn object (a row of table t1) can have a collection of\npointers to other objects (rows of table t2).\nTo make an analogy, a man has a collection of thousands of\nestates which can also be shared with other people.\n\nHow to represent that?\nSuppose I have a table People and a table Estates.\nIf Alice has 400 properties, I would have to replicate the\nrow Alice 400 times, each row pointing to a different\nestate (bad thing). Otherwise, I would have to make another\ntable only for the association between the two tables, but\nthen :\n1) the efficiency is lower (too many accesses to the\nintermediary table and too many joins)\n2) the SQL clarity is lower\n3) too many intermediate tables: an object can have more\nthan one collection of objects\n\nIf there's no better way to do the things, then\n\n- Proposal -\n\nAdd a new internal featured type : set\n\nSo that, say, if Harry has a new estate, one would have just to:\n1) add the estate in table Estates, if it doesn't exist\n2) get the oid of the estate\n3) add the oid in the field set_of_estate_oids in the Harry's row\nin table People\n\nIf one wants to list all Harry's estate, one has simply to\nexpress a SQL query like :\n\nSELECT People.*, Estates.*\nFROM People, Estates\nWHERE People.set_of_estate_oids = Estates.oid\n\nnote that the field People.set_of_estate_oids is not single\nvalued but is set-valued, the parser should understand it\nand should behave as if there were many rows with that field\nsingle-valued.\n\n\nWithout that feature anyway, I might proceduraly redefine the operator\n'=' but I don't know how to make iterative the query by\nitself. I mean, how to span the above query in more or\nless something like this:\n\n( SELECT People.*, Estates.*\nFROM People, Estates\nWHERE People.set_of_estate_oids[1] = Estates.oid ) UNION \\\n\n( SELECT People.*, Estates.*\nFROM People, Estates\nWHERE People.set_of_estate_oids[2] = Estates.oid ) UNION \\\n\n( SELECT People.*, Estates.*\nFROM People, Estates\nWHERE People.set_of_estate_oids[3] = Estates.oid )\n\nand so on for every element contained in the set field.\n\n\nMany thanks in advance,\nNico\n\nIT u.g. engineering student\n\n\n",
"msg_date": "Wed, 2 Aug 2000 08:57:11 +0200",
"msg_from": "Nico D <[email protected]>",
"msg_from_op": true,
"msg_subject": "set-of-pointer valued attributes - help!"
}
] |
[
{
"msg_contents": "I am having trouble understanding the relationship between passwords in the\n\"passwd\" flat file and the system table pg_user. It seems that if I don't\nperform a sql \"create user\" with the \"with password\" option I can't connect\nto the database when I use password authentication even though I used the\npg_passwd command to enter the user. Also pardon my ignorance but is there\na secure way to enter the password using the \"create user\" command without\nexposing the password? I hate to expose a set of \"canned\" passwords that I\nwanted to enter using a script when installing the database.\n\n\nThanks in advance.\n\nJeff\n\n",
"msg_date": "Wed, 2 Aug 2000 09:27:41 -0400",
"msg_from": "\"jeff seaman\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "user authentication question"
},
{
"msg_contents": "I need to have PostgreSQL running with AOLserver before about 8 p.m. this\nevening.\n\nIs there anybody in Toronto I can chat with on the phone, or who could come\nover to help out? Thai dinner and a bottle of Scotch. Location is Hyde Park\nat Dundas West. 416-604-9495.\n\n -dlj.\n\n\n\n\n\n",
"msg_date": "Wed, 2 Aug 2000 12:33:01 -0400",
"msg_from": "\"David Lloyd-Jones\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Is There Anybody in Toronto Running Postgresql with AOLserver?"
}
] |
[
{
"msg_contents": "Can anyone explain the ERROR below? Is this a bug or a feature?\nThis is 7.0.2.\n\ntest=# select (1,2,3) = (1,2,3);\n ?column? \n----------\n t\n(1 row)\n\ntest=# select (1,2,3) = (1,2,9);\n ?column? \n----------\n f\n(1 row)\n\ntest=# select (1,2,3) = (1,2,null);\n ?column? \n----------\n \n(1 row)\n\ntest=# select (1,2,null) = (1,2,null);\nERROR: Unable to identify an operator '=' for types 'unknown' and 'unknown'\n\tYou will have to retype this query using an explicit cast\n--\nTatsuo Ishii\n",
"msg_date": "Thu, 03 Aug 2000 10:09:07 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": true,
"msg_subject": "comparing rows"
},
{
"msg_contents": "Tatsuo Ishii <[email protected]> writes:\n> test=# select (1,2,null) = (1,2,null);\n> ERROR: Unable to identify an operator '=' for types 'unknown' and 'unknown'\n> \tYou will have to retype this query using an explicit cast\n\nWell, there's no basis for deciding what the datatype of the third\ncolumn is.\n\nThe only reason you don't get the same error from the non-row case\n\nregression=# select null = null;\n ?column?\n----------\n t\n(1 row)\n\nis that we have an ugly, horrible kluge in the parser to (mis) interpret\n\"foo = null\" as meaning \"foo ISNULL\", in order to be compatible with\nbroken Microsoft SQL implementations. If you try any other operator\nyou get\n\nregression=# select null <> null;\nERROR: Unable to identify an operator '<>' for types 'unknown' and 'unknown'\n You will have to retype this query using an explicit cast\n\nI'd certainly not vote to propagate the \"= null\" kluge into the\nrow-equality code...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Wed, 02 Aug 2000 21:36:38 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
}
] |
[
{
"msg_contents": "Hi all,\n\nI have a question.\nAs far as I see,constraints are stored into PG database ordinarily\nas follows.\n\n 1) RelationAddRawConstraints() converts each raw constaint\n to bin form.\n 2) StoreRelCheck() converts the bin form to src form and store\n them into pg_relcheck tuples.\n\nIs pg_relcheck.rcsrc equivalent to the original raw constraint ?\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Thu, 3 Aug 2000 13:40:23 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Raw constraint & pg_relcheck.rcsrc"
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n> Is pg_relcheck.rcsrc equivalent to the original raw constraint ?\n\nTo the best of deparse_expression()'s ability, it should be.\nI'm not real sure why we bother to store it, rather than deparsing\nrcbin on-the-fly on demand...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 01:07:26 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Raw constraint & pg_relcheck.rcsrc "
},
{
"msg_contents": "> -----Original Message-----\n> From: Tom Lane [mailto:[email protected]]\n> \n> \"Hiroshi Inoue\" <[email protected]> writes:\n> > Is pg_relcheck.rcsrc equivalent to the original raw constraint ?\n> \n> To the best of deparse_expression()'s ability, it should be.\n> I'm not real sure why we bother to store it, rather than deparsing\n> rcbin on-the-fly on demand...\n>\n\nI'm looking at DefineRelation() in commands/creartinh.c.\nIn case of inheritance,constraints of super classes are\nstored using their pg_relcheck.rcbin-s. It seems bad \nin case of multiple inheritance. rcsrc-s may be available\ninstead.\n\nComments ? \n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Thu, 3 Aug 2000 14:36:53 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: Raw constraint & pg_relcheck.rcsrc "
}
] |
[
{
"msg_contents": "> Well, there's no basis for deciding what the datatype of the third\n> column is.\n> \n> The only reason you don't get the same error from the non-row case\n> \n> regression=# select null = null;\n> ?column?\n> ----------\n> t\n> (1 row)\n> \n> is that we have an ugly, horrible kluge in the parser to \n> (mis) interpret\n> \"foo = null\" as meaning \"foo ISNULL\", in order to be compatible with\n> broken Microsoft SQL implementations. If you try any other operator\n> you get\n\nNot compatible with the current release of MS SQL/MSDE :-) At least not\nfully.\n\nIsn't it just plain *wrong* to state that null = null? After all, NULL is\nunknown, and is not equal to anything, no?\n\nI just checked on MS SQL Server 7.0, and using the query \"select CASE WHEN\nnull=null THEN 'Yes' ELSE 'No' END\" (just doing null=null produces a syntax\nerror), it returns \"No\" (that is, null != null).\n\nHowever, if I turn *off* \"ANSI nulls, paddings and warnings\", it produces\n\"Yes\" (null=null). The default can be changed on a per-database basis. By\ndefault, any ODBC/OLEDB client turns *on* ANSI Nulls when it connects.\n\n\nSummary of MS:\nWhen it runs in ANSI mode, null != null.\nWhen it runs in backwards compatible mode , null=null.\n\n\nPerhaps it would be more correct for postgresql to provide an option for\n\"non-ANSI null handling\" as well? And leaving ANSI compliant handling as the\ndefault?\n\n//Magnus\n",
"msg_date": "Thu, 3 Aug 2000 10:15:20 +0200 ",
"msg_from": "Magnus Hagander <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: comparing rows "
},
{
"msg_contents": "> Not compatible with the current release of MS SQL/MSDE :-) At least not\n> fully.\n\nThe original issue was that \"foo = NULL\" is *not* a legal SQL92\nstatement. But of course M$ garbage like Access (and presumably other\nproducts) generated \"foo = NULL\" in their automated ODBC queries,\ndespite the fact that \"foo IS NULL\" is defined in the standard and would\nhave been an obvious choice :(\n\n> Isn't it just plain *wrong* to state that null = null? After all, NULL is\n> unknown, and is not equal to anything, no?\n\nRight. But also wrong from an SQL92 compliance standpoint. afaict this\nis still true for SQL99.\n\nbtw, it appears that SQL99 (haven't checked SQL92) specifies that\n\ntest=# select (1,2,3) = (1,2,null);\n ?column? \n----------\n \n(1 row)\n\nshould return FALSE, not NULL. I haven't looked to see if this is\nconsistant with other comparisons involving NULL.\n\n> I just checked on MS SQL Server 7.0, and using the query \"select CASE WHEN\n> null=null THEN 'Yes' ELSE 'No' END\" (just doing null=null produces a syntax\n> error), it returns \"No\" (that is, null != null).\n> However, if I turn *off* \"ANSI nulls, paddings and warnings\", it produces\n> \"Yes\" (null=null). The default can be changed on a per-database basis. By\n> default, any ODBC/OLEDB client turns *on* ANSI Nulls when it connects.\n> Summary of MS:\n> When it runs in ANSI mode, null != null.\n\n*sigh* If it actually *had* an ANSI mode, then \"foo = NULL\" would be\nrejected. Period.\n\n> When it runs in backwards compatible mode , null=null.\n> Perhaps it would be more correct for postgresql to provide an option for\n> \"non-ANSI null handling\" as well? And leaving ANSI compliant handling as the\n> default?\n\nafaict the option will be \"M$\" vs \"published standards\" support, and it\nseems the wrong way to head. Especially since M$ will try break any\ncompliance we may achieve. Better to ask your friendly M$ supplier to\nsupport standards ;)\n\n - Thomas\n",
"msg_date": "Thu, 03 Aug 2000 13:44:22 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "At 01:44 PM 8/3/00 +0000, Thomas Lockhart wrote:\n>> Not compatible with the current release of MS SQL/MSDE :-) At least not\n>> fully.\n>\n>The original issue was that \"foo = NULL\" is *not* a legal SQL92\n>statement. \n\nUmmm...I think this is wrong, and I have Date on my side (I just\nchecked). foo = NULL is NULL, just like foo + NULL is NULL.\n\nIf foo = NULL is illegal, doesn't this make it rather difficult to\nsay things like table1.i = table2.i for tables that contain NULLs\nin column i?\n\nOracle allows it, and returns NULL. Oracle's fairly trustworthy\non low-level standards compliance over things like NULL (not\nentirely, though - it treats '' as NULL in the VALUES list of\nan INSERT, though not elsewhere, for instance).\n\nNULL = NULL is also perfectly legal, returning NULL. Before one\ngets too excited, NULL <> NULL and NULL < NULL etc all return\nNULL, too, along with NULL = <anything> so it's not terribly\nuseful, which is why IS NULL exists.\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, 03 Aug 2000 06:52:53 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "Magnus Hagander <[email protected]> writes:\n> Summary of MS:\n> When it runs in ANSI mode, null != null.\n> When it runs in backwards compatible mode , null=null.\n\nOh, that's interesting, they fixed their bug.\n\nfoo = NULL should produce NULL (*not* true, and *not* false either,\nthough it'd act like false in a CASE test).\n\nHere is one vote for ripping out our parser kluge and making null act\nlike it should according to the spec. Comments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 09:55:35 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n> btw, it appears that SQL99 (haven't checked SQL92) specifies that\n\n> test=# select (1,2,3) = (1,2,null);\n> ?column? \n> ----------\n \n> (1 row)\n\n> should return FALSE, not NULL.\n\nWhat? If so, they broke it pretty badly. This should be equivalent to\n1 = 1 AND 2 = 2 AND 3 = NULL, which should reduce to TRUE AND TRUE AND NULL,\nwhich should reduce to NULL. Anything else is not self-consistent.\n\n>> Summary of MS:\n>> When it runs in ANSI mode, null != null.\n\n> *sigh* If it actually *had* an ANSI mode, then \"foo = NULL\" would be\n> rejected. Period.\n\nWell, mumble, that is an overly literal interpretation of the spec if\nyou ask me. It is not unreasonable to allow NULL as a literal constant,\nespecially since it doesn't create any issues that you can't get to with\n100%-plain-vanilla-SQL92 constructs like\n\tCASE WHEN TRUE THEN NULL END\nWhere MS blew it was in not following SQL92-compatible semantics of\noperations on nulls. (We can't throw *too* many stones, since we had\na number of problems with logical ops on nulls too, up till 7.0 ...)\n\n> afaict the option will be \"M$\" vs \"published standards\" support, and it\n> seems the wrong way to head.\n\nI don't want an option either. I want to change our code (back to) SQL\ncompliant semantics of NULL comparisons, ie remove the parser kluge.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 10:07:24 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "> Oracle allows it, and returns NULL. Oracle's fairly trustworthy\n> on low-level standards compliance over things like NULL (not\n> entirely, though - it treats '' as NULL in the VALUES list of\n> an INSERT, though not elsewhere, for instance).\n\nSo you can't get a zero-length string into a column in Oracle. \nInteresting.\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, 3 Aug 2000 10:22:37 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "Don Baccus <[email protected]> writes:\n> If foo = NULL is illegal, doesn't this make it rather difficult to\n> say things like table1.i = table2.i for tables that contain NULLs\n> in column i?\n\nThomas is not saying that the *operation* is illegal. His point is\npurely a syntactic one: SQL92 allows the keyword \"NULL\" only in certain\nspecified contexts, and out on its own as a component of an arithmetic\nexpression ain't one of them. You could legally write the same thing in\nat least two ways, though:\n\n\tfoo = (CASE WHEN TRUE THEN NULL END)\n\n\tfoo = (CAST NULL AS somedatatype)\n\nIt may be that the SQL92 authors intended this restriction to avoid\nhaving to figure out what datatype an unadorned NULL is. Unfortunately\nthey blew it in the CASE case :-(, so you still have to have a way of\ndeciding that.\n\nAs far as I can see, allowing NULL as a general-purpose literal is a\nperfectly reasonable spec extension that *everybody* does, including us.\nThomas may be the only person anywhere who is bothered by it ;-)\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 10:23:15 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "> Magnus Hagander <[email protected]> writes:\n> > Summary of MS:\n> > When it runs in ANSI mode, null != null.\n> > When it runs in backwards compatible mode , null=null.\n> \n> Oh, that's interesting, they fixed their bug.\n> \n> foo = NULL should produce NULL (*not* true, and *not* false either,\n> though it'd act like false in a CASE test).\n> \n> Here is one vote for ripping out our parser kluge and making null act\n> like it should according to the spec. Comments?\n\nI thought our only kludge was allowing = NULL because we got tons of MS\nfolks complaining in the past before we did this. Are you thinking that\nthe newer MS versions will not give us a problem.\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, 3 Aug 2000 10:24:28 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "At 10:07 AM 8/3/00 -0400, Tom Lane wrote:\n>Thomas Lockhart <[email protected]> writes:\n>> btw, it appears that SQL99 (haven't checked SQL92) specifies that\n>\n>> test=# select (1,2,3) = (1,2,null);\n>> ?column? \n>> ----------\n> \n>> (1 row)\n>\n>> should return FALSE, not NULL.\n>\n>What? If so, they broke it pretty badly. \n\nDate disagrees with Thomas on this one, too.\n\nOn the other hand, select (2,2,3) = (1,2,null) would be false\nbecause 1 <> 2, therefore the result is not unknown.\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, 03 Aug 2000 07:32:36 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "At 10:22 AM 8/3/00 -0400, Bruce Momjian wrote:\n>> Oracle allows it, and returns NULL. Oracle's fairly trustworthy\n>> on low-level standards compliance over things like NULL (not\n>> entirely, though - it treats '' as NULL in the VALUES list of\n>> an INSERT, though not elsewhere, for instance).\n>\n>So you can't get a zero-length string into a column in Oracle. \n>Interesting.\n\nThe killer is it makes porting from Oracle to Postgres or another\nDB that does it right a pain in the ass.\n\nI've got a lot of experience with this particular issue due to the\nOpenACS web toolkit (arsDigita's stuff ported from Oracle to Postgres).\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, 03 Aug 2000 07:35:13 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "At 10:23 AM 8/3/00 -0400, Tom Lane wrote:\n>Don Baccus <[email protected]> writes:\n>> If foo = NULL is illegal, doesn't this make it rather difficult to\n>> say things like table1.i = table2.i for tables that contain NULLs\n>> in column i?\n>\n>Thomas is not saying that the *operation* is illegal. His point is\n>purely a syntactic one: SQL92 allows the keyword \"NULL\" only in certain\n>specified contexts, and out on its own as a component of an arithmetic\n>expression ain't one of them. \n\nI misunderstood, didn't check for the use of the literal, just the\nsemantics of the operations.\n\n>As far as I can see, allowing NULL as a general-purpose literal is a\n>perfectly reasonable spec extension that *everybody* does, including us.\n>Thomas may be the only person anywhere who is bothered by it ;-)\n\nThomas, do you have a reference into the standard?\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, 03 Aug 2000 07:37:17 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "Bruce Momjian <[email protected]> writes:\n> I thought our only kludge was allowing = NULL because we got tons of MS\n> folks complaining in the past before we did this. Are you thinking that\n> the newer MS versions will not give us a problem.\n\nWell, I'm not sure. Magnus is saying that the newer MS servers default\nto spec-compliant semantics --- ie, foo = NULL will yield NULL. But\nIIRC the original complaints were because MS tools like Access would\n*generate* this expression and expect it to behave like foo IS NULL.\n\nCan MS have fixed all their apps already? Seems unlikely. Maybe we\nhave to leave the kluge in there awhile longer.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 10:40:24 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "On Thu, 3 Aug 2000, Tom Lane wrote:\n\n> Bruce Momjian <[email protected]> writes:\n> > I thought our only kludge was allowing = NULL because we got tons of MS\n> > folks complaining in the past before we did this. Are you thinking that\n> > the newer MS versions will not give us a problem.\n> \n> Well, I'm not sure. Magnus is saying that the newer MS servers default\n> to spec-compliant semantics --- ie, foo = NULL will yield NULL. But\n> IIRC the original complaints were because MS tools like Access would\n> *generate* this expression and expect it to behave like foo IS NULL.\n> \n> Can MS have fixed all their apps already? Seems unlikely. Maybe we\n> have to leave the kluge in there awhile longer.\n\nI kind of agree with your original comment about removing the kludge,\nsince the kludge does go against the spec ...\n\n... a couple of thoughts to that effect:\n\n1. this won't be 'in effect' until v7.1 comes out anyway\n2. v7.0.2 will still have the kludge and will be available if ppl *really*\n need it, no?\n\nMy vote is to go with Tom on this and remove the kludge ...\n\n\n",
"msg_date": "Thu, 3 Aug 2000 13:23:47 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "The Hermit Hacker wrote:\n> \n> On Thu, 3 Aug 2000, Tom Lane wrote:\n>\n> > Can MS have fixed all their apps already? Seems unlikely. Maybe we\n> > have to leave the kluge in there awhile longer.\n> \n> I kind of agree with your original comment about removing the kludge,\n> since the kludge does go against the spec ...\n> \n> ... a couple of thoughts to that effect:\n> \n> 1. this won't be 'in effect' until v7.1 comes out anyway\n> 2. v7.0.2 will still have the kludge and will be available if ppl *really*\n> need it, no?\n> \n> My vote is to go with Tom on this and remove the kludge ...\n\nPlease don't. It seems true that Microsoft has enabled a mode for\nSQL Server, but the main problem was Access. And Access 95/97 has\na huge installed base of users that would not be able to use its\nautomated query tools with PostgreSQL. If the interfaces' list is\nany indication, most people use a architecture like:\n\nPostgreSQL Server <--------- Access Front-End\n |\n |\n V\n Web Server\n\nI hate kludges. But I'd prefer compatibility with Microsoft\ntools.\n\nJust my opinion, \n\nMike Mascari\n",
"msg_date": "Thu, 03 Aug 2000 15:36:50 -0400",
"msg_from": "Mike Mascari <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "Mike Mascari <[email protected]> writes:\n> Please don't. It seems true that Microsoft has enabled a mode for\n> SQL Server, but the main problem was Access. And Access 95/97 has\n> a huge installed base of users that would not be able to use its\n> automated query tools with PostgreSQL.\n\nThat was what I was afraid of :-(. Question though: if MS has changed\nthe default behavior of their server to be (more) SQL-compliant, aren't\nthese folks being forced to update their Access installs anyway?\nPresumably those old versions do not know how to select the non-default\nbehavior of SQL Server, so they're gonna be incompatible with newer\nservers despite the nominal presence of a workaround.\n\nI've got no objection to leaving in the kluge for another release or two\nif there's still a big installed base that needs it --- but I don't want\nto leave it there indefinitely for the benefit of a few tail-end\nCharlies. Seems like folks running obsolete Access code are unlikely\nto pick up the latest Postgres either, so will it really matter if we\nchange?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 16:12:52 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "On Thu, 3 Aug 2000, Tom Lane wrote:\n\n> Mike Mascari <[email protected]> writes:\n> > Please don't. It seems true that Microsoft has enabled a mode for\n> > SQL Server, but the main problem was Access. And Access 95/97 has\n> > a huge installed base of users that would not be able to use its\n> > automated query tools with PostgreSQL.\n> \n> That was what I was afraid of :-(. Question though: if MS has changed\n> the default behavior of their server to be (more) SQL-compliant, aren't\n> these folks being forced to update their Access installs anyway?\n> Presumably those old versions do not know how to select the non-default\n> behavior of SQL Server, so they're gonna be incompatible with newer\n> servers despite the nominal presence of a workaround.\n> \n> I've got no objection to leaving in the kluge for another release or two\n> if there's still a big installed base that needs it --- but I don't want\n> to leave it there indefinitely for the benefit of a few tail-end\n> Charlies. Seems like folks running obsolete Access code are unlikely\n> to pick up the latest Postgres either, so will it really matter if we\n> change?\n\nthat was my opinion ... if these ppl are already using it for talking to\nPostgreSQL., they have to be running a current release of it with the\nkludge inplace ... we're only preventing PostgreSQL admin from being able\nto upgrade while their clients are still stuck with the older Access ...\n\n\n",
"msg_date": "Thu, 3 Aug 2000 17:20:36 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
},
{
"msg_contents": "> btw, it appears that SQL99 (haven't checked SQL92) specifies that\n> \n> test=# select (1,2,3) = (1,2,null);\n> ?column? \n> ----------\n> \n> (1 row)\n> \n> should return FALSE, not NULL. I haven't looked to see if this is\n> consistant with other comparisons involving NULL.\n\nThis is interesting. If \"(1,2,3) = (1,2,null)\" is legal from the point\nof view of the standard, isn't \"(1,2,null) = (1,2,null)\" legal\ncomparison too? no?\n\nBTW, I would like to object the \"null = null\" support in\nPostgreSQL. It is against the standard. That's enough reason to reject\nthe syntax.\n--\nTatsuo Ishii\n",
"msg_date": "Fri, 04 Aug 2000 10:07:38 +0900",
"msg_from": "Tatsuo Ishii <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "> > btw, it appears that SQL99 (haven't checked SQL92) specifies that\n> > test=# select (1,2,3) = (1,2,null);\n> > ?column?\n> > ----------\n> \n> > (1 row)\n> \n> > should return FALSE, not NULL.\n> What? If so, they broke it pretty badly. This should be equivalent to\n> 1 = 1 AND 2 = 2 AND 3 = NULL, which should reduce to TRUE AND TRUE AND NULL,\n> which should reduce to NULL. Anything else is not self-consistent.\n\nHmm. I could have sworn I looked this up (and was suprised at the\nresult). But I'm not finding the example anywhere, and Section 8.2\nGeneral Rule 1 seems to indicate that we do the right thing here\nalready.\n\nAlso, I *think* we have settled on the following facts:\n\n1) \"3 = NULL\" is typical of an expression generated by M$ Access.\n\n2) \"3 = NULL\" is *not* legal SQL9x syntax, which specifies \"3 IS NULL\"\nfor the comparison \"does three have a value of NULL?\".\n\n3) New versions of M$ Access continue to generate bogus queries\ncontaining these comparisons.\n\n4) Postgres will continue to understand (at least) the special case of\n\"column/value = NULL\" to retain compatibility with M$.\n\nOh, and\n\n5) Thomas will continue to complain about M$ for shipping products with\ngratuitous deviations from published standards. ;)\n\n - Thomas\n",
"msg_date": "Fri, 04 Aug 2000 06:43:45 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "On Fri, 4 Aug 2000, Thomas Lockhart wrote:\n\n> > > btw, it appears that SQL99 (haven't checked SQL92) specifies that\n> > > test=# select (1,2,3) = (1,2,null);\n> > > ?column?\n> > > ----------\n> > \n> > > (1 row)\n> > \n> > > should return FALSE, not NULL.\n> > What? If so, they broke it pretty badly. This should be equivalent to\n> > 1 = 1 AND 2 = 2 AND 3 = NULL, which should reduce to TRUE AND TRUE AND NULL,\n> > which should reduce to NULL. Anything else is not self-consistent.\n> \n> Hmm. I could have sworn I looked this up (and was suprised at the\n> result). But I'm not finding the example anywhere, and Section 8.2\n> General Rule 1 seems to indicate that we do the right thing here\n> already.\n> \n> Also, I *think* we have settled on the following facts:\n> \n> 1) \"3 = NULL\" is typical of an expression generated by M$ Access.\n> \n> 2) \"3 = NULL\" is *not* legal SQL9x syntax, which specifies \"3 IS NULL\"\n> for the comparison \"does three have a value of NULL?\".\n> \n> 3) New versions of M$ Access continue to generate bogus queries\n> containing these comparisons.\n> \n> 4) Postgres will continue to understand (at least) the special case of\n> \"column/value = NULL\" to retain compatibility with M$.\n\nStupid question here ... but ... can't this kludge be \"faked\" in the ODBC\ndriver itself, vs in the server? *raised eyebrow*\n\n\n",
"msg_date": "Fri, 4 Aug 2000 11:43:17 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "> Stupid question here ... but ... can't this kludge be \"faked\" in the ODBC\n> driver itself, vs in the server? *raised eyebrow*\n\nRight now, the ODBC driver does not do full parsing of the input\nqueries, so imho it would be difficult to reliably identify the correct\nstring substitution.\n\n - Thomas\n",
"msg_date": "Fri, 04 Aug 2000 14:58:55 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "On Fri, 4 Aug 2000, Thomas Lockhart wrote:\n\n> > Stupid question here ... but ... can't this kludge be \"faked\" in the ODBC\n> > driver itself, vs in the server? *raised eyebrow*\n> \n> Right now, the ODBC driver does not do full parsing of the input\n> queries, so imho it would be difficult to reliably identify the correct\n> string substitution.\n\nAh, there went that idea ... to bad we couldn't put some sort of check in\nthe server \"if through odbc driver, allow this kludge\" :)\n\nYou say 'right now' ... is full parsing something that the ODBC driver\nshould be done?\n\n",
"msg_date": "Fri, 4 Aug 2000 12:41:10 -0300 (ADT)",
"msg_from": "The Hermit Hacker <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "On Fri, Aug 04, 2000 at 12:41:10PM -0300, The Hermit Hacker wrote:\n> On Fri, 4 Aug 2000, Thomas Lockhart wrote:\n> \n> > > Stupid question here ... but ... can't this kludge be \"faked\" in the ODBC\n> > > driver itself, vs in the server? *raised eyebrow*\n> > \n> > Right now, the ODBC driver does not do full parsing of the input\n> > queries, so imho it would be difficult to reliably identify the correct\n> > string substitution.\n> \n> Ah, there went that idea ... to bad we couldn't put some sort of check in\n> the server \"if through odbc driver, allow this kludge\" :)\n\nCould the ODBC driver have a little checkbox that causes it to magically\nissue a \"SET BROKEN_MICROSOFT_NULL\" immediately after it connects?\n-- \nChristopher Masto Senior Network Monkey NetMonger Communications\[email protected] [email protected] http://www.netmonger.net\n\nFree yourself, free your machine, free the daemon -- http://www.freebsd.org/\n",
"msg_date": "Fri, 4 Aug 2000 14:08:18 -0400",
"msg_from": "Christopher Masto <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
},
{
"msg_contents": "Thomas Lockhart <[email protected]> writes:\n>> Stupid question here ... but ... can't this kludge be \"faked\" in the ODBC\n>> driver itself, vs in the server? *raised eyebrow*\n\n> Right now, the ODBC driver does not do full parsing of the input\n> queries, so imho it would be difficult to reliably identify the correct\n> string substitution.\n\nHowever, the ODBC driver's parsing is desperately inadequate anyway\n(it fails to handle nested function calls properly). It might well be\nthat fixing that will entail doing enough work that \"= NULL\" could be\nrecognized without much more work.\n\nOn the third hand, pushing the kluge out to the ODBC driver doesn't make\nit any less a kluge...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Sat, 05 Aug 2000 21:54:27 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows "
}
] |
[
{
"msg_contents": "At 10:15 AM 8/3/00 +0200, Magnus Hagander wrote:\n\n>Isn't it just plain *wrong* to state that null = null? After all, NULL is\n>unknown, and is not equal to anything, no?\n\nAccording to the standard, yes, it is wrong. \n\n>Perhaps it would be more correct for postgresql to provide an option for\n>\"non-ANSI null handling\" as well? And leaving ANSI compliant handling as the\n>default?\n\nI would think so. \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, 03 Aug 2000 06:22:10 -0700",
"msg_from": "Don Baccus <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: comparing rows "
}
] |
[
{
"msg_contents": "> Magnus Hagander <[email protected]> writes:\n> > Summary of MS:\n> > When it runs in ANSI mode, null != null.\n> > When it runs in backwards compatible mode , null=null.\n> \n> Oh, that's interesting, they fixed their bug.\n> \n> foo = NULL should produce NULL (*not* true, and *not* false either,\n> though it'd act like false in a CASE test).\nOk.\nHmm. I wonder how I check if it produces NULL :-) If I just do:\nSELECT null=null\nI get a syntax error. Is there some other way for me to check what it does?\nIt appears that \"null=null\" isn't a valid expression (neither is \"1=1\" or\nsomething like that). Basically, it does not appear to be possible to SELECT\nthe return value of a comparison at all - and CASE will apparantly not work\nin this case. I don't think it's capable of handling anything other than\nTRUE/FALSE as the result of a comparison.\n\n//Magnus\n",
"msg_date": "Thu, 3 Aug 2000 16:00:37 +0200 ",
"msg_from": "Magnus Hagander <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: comparing rows "
}
] |
[
{
"msg_contents": "> > Summary of MS:\n> > When it runs in ANSI mode, null != null.\n> > When it runs in backwards compatible mode , null=null.\n> \n> Oh, that's interesting, they fixed their bug.\n> \n> foo = NULL should produce NULL (*not* true, and *not* false either,\n> though it'd act like false in a CASE test).\n\nHmm. I think I can answer my own question by using the dreaded manual. This\nis what Books On-Line for MS has to say:\n\n\"\nThe result of a comparison operator has the Boolean data type, which has\nthree values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean\ndata type are known as Boolean expressions.\n\nUnlike other SQL Server data types, a Boolean data type cannot be specified\nas the data type of a table column or variable, and cannot be returned in a\nresult set.\n\nWhen SET ANSI_NULLS is ON, an operator that has one or two NULL expressions\nreturns UNKNOWN. When SET ANSI_NULLS is OFF, the same rules apply, except an\nequals operator returns TRUE if both expressions are NULL. For example, NULL\n= NULL returns TRUE if SET ANSI_NULLS is OFF.\n\"\n\nSo apparantly:\na) I can't check it :-)\nb) It does return UNKNOWN (NULL?) for <anything>=NULL\n\n\n//Magnus\n",
"msg_date": "Thu, 3 Aug 2000 16:10:06 +0200 ",
"msg_from": "Magnus Hagander <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: comparing rows "
}
] |
[
{
"msg_contents": "I'm thinking of diving into the bit/varbit stuff, mainly because it's\npractically the last area left on the list of functions not converted\nto new fmgr style.\n\nIn a quick look at the code, I wonder why we are bothering with separate\nbit and varbit functions/operators when they all do the same things.\nWhy not have one set of functions and mark the two types\nbinary-equivalent?\n\nI notice also that we're missing a length-coercion function for bit.\nI will add that, also the table entries needed for indexing support.\n\nAdriaan, could I get your last set of changes (the patch submitted 7/21)\nin the form of diffs from what you'd submitted before? It's not easy to\ntell exactly what you changed --- diffing against what's in CVS isn't\nvery helpful because of the intervening pgindent reformat. Also, do you\nobject to sticking the standard Postgres copyright notices on the files?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 12:20:50 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "bit/varbit stuff"
}
] |
[
{
"msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\n\nFirst, I built from the 7.0.2 source RPM.\n\nThis RPM seems to have installed /usr/lib/pgsql/os.h as a symlink to\n.././include/port/linux.h which doesn't exist.\n\nroland\n- -- \n\t\t PGP Key ID: 66 BC 3B CD\nRoland B. Roberts, PhD Unix Software Solutions\[email protected] 76-15 113th Street, Apt 3B\[email protected] Forest Hills, NY 11375\n\n-----BEGIN PGP SIGNATURE-----\nVersion: 2.6.3a\nCharset: noconv\nComment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface\n\niQCVAwUBOYmue+oW38lmvDvNAQG6wwP/W4tBCi8WdyG/4Rf2SZsclnw4q/HyyTQU\nTKAUu1vQQyexNH4ZEHrm1pkhLldIceonEGZLR6k+Qyv/t4uYAB1Tg8rNggB3PCvK\nLpJkC0iD6KztNCEdrj5en8DOkSZ6bbcpjmEhdyLdjOMMPr/1ed1ayfxBEhNLVQYp\n/G3NLl7ZpaY=\n=pvls\n-----END PGP SIGNATURE-----\n",
"msg_date": "03 Aug 2000 13:40:13 -0400",
"msg_from": "Roland Roberts <[email protected]>",
"msg_from_op": true,
"msg_subject": "RPM buglet, postgres-devel"
},
{
"msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\n\nI have finally needed to use ipcclean. I recently built HaruspeX 4.0,\nan application for managing pictures which uses Postgres, and while\nasking to delete a table, it hung. I had the app in the debugger, and\nI found it was hung on the database call itself. So, after waiting a\ncouple of hours, I decided to bounce postgres by running the init\nscript. HaruspeX dutifully reported that the backend had closed the\nconnection. However, postgres did not come back up. I found two\nprocesses running as postgres:\n\n532 root> ps -efw | grep post\npostgres 26171 1 0 00:02 ? 00:01:04 /usr/bin/postgres localhost roland family idle\npostgres 26188 1 0 00:03 ? 00:00:00 /usr/bin/postgres localhost roland family idle\nroot 6681 20510 0 21:20 pts/2 00:00:00 grep post\n\nWhen I attempted to run pgctl directly, it reported a problem with\nsemaphore space, so I tried to run ipcclean. It kept reporting I had\na postmaster running when I couldn't find it. Finally, I had a look\nat the script. Oops, it has this line:\n\n if ps x | grep -s 'postmaster' >/dev/null 2>&1 ; then\n\nBut consider:\n\n557 root> ps x | grep -s 'postmaster'\n 7084 pts/2 S 0:00 grep -s postmaster\n\nSo, it keeps seeing its test instead of the real postmaster. How about\n\n ps x | grep -s postmaster | grep -v grep\n\ninstead?\n\nroland\n- -- \n\t\t PGP Key ID: 66 BC 3B CD\nRoland B. Roberts, PhD Unix Software Solutions\[email protected] 76-15 113th Street, Apt 3B\[email protected] Forest Hills, NY 11375\n\n-----BEGIN PGP SIGNATURE-----\nVersion: 2.6.3a\nCharset: noconv\nComment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface\n\niQCVAwUBOYoeLOoW38lmvDvNAQGFsAP+IHgR7bCai2W8mV9eJQvMMid29ulz4n0T\ngHqVDE7hO7KWR+Lrd3KDmCQvOtEGVQazZXwp74SWBtWt1FBMUaLa8HzN3uhO4PPB\n77jssDJJchC7ivNo49cxkRu+rCDK/u0GX7iw+sZQSHWwgQnzx69+9/XmhLkT3bUp\ne8LkSp7jly8=\n=kwCA\n-----END PGP SIGNATURE-----\n",
"msg_date": "03 Aug 2000 21:36:49 -0400",
"msg_from": "Roland Roberts <[email protected]>",
"msg_from_op": true,
"msg_subject": "RH 6.1, PostgreSQL 7.0.2, ipcclean madness"
}
] |
[
{
"msg_contents": "I find the following varlena (ie, potentially toastable) columns\npresent in the system tables:\n\n relname | attname | typname | attstorage\n----------------+--------------+----------+------------\n pg_aggregate | agginitval | text | x\n pg_attrdef | adbin | text | p\n pg_attrdef | adsrc | text | p\n pg_class | relacl | _aclitem | m\n pg_database | datpath | text | p\n pg_description | description | text | x\n pg_group | grolist | _int4 | p\n pg_index | indpred | text | x\n pg_language | lancompiler | text | x\n pg_proc | probin | bytea | p\n pg_proc | prosrc | text | p\n pg_relcheck | rcbin | text | p\n pg_relcheck | rcsrc | text | p\n pg_rewrite | ev_action | text | x\n pg_rewrite | ev_qual | text | x\n pg_shadow | passwd | text | p\n pg_statistic | stacommonval | text | x\n pg_statistic | stahival | text | x\n pg_statistic | staloval | text | x\n pg_trigger | tgargs | bytea | p\n pg_type | typdefault | text | p\n\nOf these tables, only pg_rewrite has a toast table so far.\n\nOffhand it would seem to be a good idea to create toast tables for\npg_attrdef, pg_description, pg_proc, pg_relcheck, possibly pg_statistic.\nCertainly a toast table for pg_proc is a must so that we can deal with\nlarge procedure bodies. Toasting pg_attrdef would allow very large\ncolumn default expressions (dubious value), pg_description for long\ncomments (probably should have this), pg_relcheck for long constraint\nexpressions (probably want this), pg_statistic to cope with long\nmin/max/common values (not sure about this).\n\nI doubt the other system tables need toast tables, although we may as\nwell mark all of these attributes \"m\", ie, they should be compressible\nin-line even if there is no toast table.\n\nComments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 13:48:57 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Toasting more system-table columns"
},
{
"msg_contents": "Tom Lane wrote:\n> Offhand it would seem to be a good idea to create toast tables for\n> pg_attrdef, pg_description, pg_proc, pg_relcheck, possibly pg_statistic.\n> Certainly a toast table for pg_proc is a must so that we can deal with\n> large procedure bodies. Toasting pg_attrdef would allow very large\n> column default expressions (dubious value), pg_description for long\n> comments (probably should have this), pg_relcheck for long constraint\n> expressions (probably want this), pg_statistic to cope with long\n> min/max/common values (not sure about this).\n\nI would think pg_statistic would be a 'must'.\n\n\n-- \n\nMark Hollomon\[email protected]\nESN 451-9008 (302)454-9008\n",
"msg_date": "Thu, 03 Aug 2000 14:38:01 -0400",
"msg_from": "\"Mark Hollomon\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Toasting more system-table columns"
},
{
"msg_contents": "\"Mark Hollomon\" <[email protected]> writes:\n> Tom Lane wrote:\n>> pg_statistic to cope with long\n>> min/max/common values (not sure about this).\n\n> I would think pg_statistic would be a 'must'.\n\nWell, it's not a \"must\" because the code copes fine now (there's a test\nin there that simply drops pg_statistic tuples that won't fit).\n\nQuestion is whether we need good selectivity estimation on columns where\nthe min/max/common values exceed 8K total (when represented in text form).\nOr for that matter whether the estimates we derive from such values are\nreally useful ...\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 15:57:47 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Toasting more system-table columns "
},
{
"msg_contents": "Tom Lane wrote:\n> \n> \"Mark Hollomon\" <[email protected]> writes:\n> > Tom Lane wrote:\n> >> pg_statistic to cope with long\n> >> min/max/common values (not sure about this).\n> \n> > I would think pg_statistic would be a 'must'.\n> \n> Well, it's not a \"must\" because the code copes fine now (there's a test\n> in there that simply drops pg_statistic tuples that won't fit).\n\nOh, well of course. Even pre-toast len(min)+len(max)+len(common) > 8K\nwas possible.\n\n\n-- \n\nMark Hollomon\[email protected]\nESN 451-9008 (302)454-9008\n",
"msg_date": "Thu, 03 Aug 2000 16:23:56 -0400",
"msg_from": "\"Mark Hollomon\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Toasting more system-table columns"
}
] |
[
{
"msg_contents": "Stephan Szabo <[email protected]> writes:\n> I believe these are all the cases I saw of heap_openr with no lock\n> and no check in the actual trigger functions (patch to\n> hopefully elog(ERROR) instead of crashing attached).\n> [ patch snipped ]\n\nWe had a discussion about that on 11-July and the consensus seemed to be\nthat the real problem is heap_open's definition; it's too easy to forget\nwhen you need to check for failure return. I have just committed\nchanges that split heap_open into two routines: heap_open() now ALWAYS\nelogs on failure, regardless of lock mode, while heap_open_nofail() is\nwhat to call if you really want a NULL return on failure. (Likewise for\nheap_openr() of course.) I found only about three places in the whole\nbackend that really wanted the _nofail() case.\n\nAccordingly, this patch is not needed anymore in current sources, though\nit'd still be the most convenient fix for 7.0.* series if anyone is\nconcerned enough to apply it.\n\nA possibly more important issue: why are the RI triggers opening the\nreferenced rel with NoLock anyway? Doesn't that leave you open to\nsomeone deleting the referenced rel out from under you while you are\nworking with it? Seems like at minimum you should grab AccessShareLock.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 15:33:37 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: ALTER TABLE "
},
{
"msg_contents": "On Thu, 3 Aug 2000, Tom Lane wrote:\n\n> Accordingly, this patch is not needed anymore in current sources, though\n> it'd still be the most convenient fix for 7.0.* series if anyone is\n> concerned enough to apply it.\nYeah, actually, a friend of mine ran into this recently with incorrect \ncreate constraint trigger statements so I already was going to send a\npatch to him, then it got mentioned on -bugs.\n\n> A possibly more important issue: why are the RI triggers opening the\n> referenced rel with NoLock anyway? Doesn't that leave you open to\n> someone deleting the referenced rel out from under you while you are\n> working with it? Seems like at minimum you should grab AccessShareLock.\nThat's a good point. To be honest, I don't really know why it's not\ngrabbing a lock (Jan?). As a general newbie question for such things,\nwhat happens to your relation pointer if it were to be deleted out\nfrom under? I figure that if it gets to the actual query, it will fail\n(unless someone were to create a table with that name in the meantime -\nouch...)\n\n\n\n",
"msg_date": "Thu, 3 Aug 2000 13:08:56 -0700 (PDT)",
"msg_from": "Stephan Szabo <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [BUGS] ALTER TABLE "
}
] |
[
{
"msg_contents": "The \"target list\" that's added to function-call nodes in expressions\nhas bugged me for a long time, because it seems to clutter expression\ntrees quite a bit (thus wasting space in stored rules, for example)\nwithout really being used for much.\n\nI've now dug around and determined that the only thing it is used for\nis selecting out a single field from a function that returns a tuple.\nFor example, if you have a function-returning-tuple f(x), you can select\nout field f1 from its result with \"x.f.f1\" (in the rather bogus notation\nPG uses for this). In functions that return simple datatypes, the\ntlist is a complete waste of space.\n\nIt seems to me that this design is completely bogus --- for one thing,\nit's silly to restrict the notion of field-selection to be done only in\nthe context of a function call.\n\nI propose removing the tlist from function-call nodes. To handle field\nselection, we should instead invent a separate \"FieldSelect\" expression\noperator that is applied to the result of the function call, or perhaps\nsomeday other kinds of expressions that can return tuples. Aside from\nsaving space, we'll be able to cleanly represent both the result type of\nthe function (ie, the tuple datatype) and the type of the field (which\nwill be the result of the FieldSelect node). Right now there's only one\nnode field that represents the result type of the function call, so we\ncan't remember the actual result type of the function call itself.\n\nBTW, the same remarks apply to Param node tlists.\n\nComments?\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 18:15:19 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Anyone particularly wedded to func_tlist mechanism?"
},
{
"msg_contents": "> I propose removing the tlist from function-call nodes. To handle field\n> selection, we should instead invent a separate \"FieldSelect\" expression\n> operator that is applied to the result of the function call, or perhaps\n> someday other kinds of expressions that can return tuples. Aside from\n> saving space, we'll be able to cleanly represent both the result type of\n> the function (ie, the tuple datatype) and the type of the field (which\n> will be the result of the FieldSelect node). Right now there's only one\n> node field that represents the result type of the function call, so we\n> can't remember the actual result type of the function call itself.\n\nI totally agree. That structure is very confusing, and it is hard to\nknow what they mean.\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, 3 Aug 2000 19:22:40 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Anyone particularly wedded to func_tlist mechanism?"
},
{
"msg_contents": "\nAt some stage I'd like to be able to query fields by odbms style\nnavigation. Like select * from person where person.garage.car.colour =\n'red'. Just keep that in mind with any change you do.\n\nTom Lane wrote:\n> \n> The \"target list\" that's added to function-call nodes in expressions\n> has bugged me for a long time, because it seems to clutter expression\n> trees quite a bit (thus wasting space in stored rules, for example)\n> without really being used for much.\n> \n> I've now dug around and determined that the only thing it is used for\n> is selecting out a single field from a function that returns a tuple.\n> For example, if you have a function-returning-tuple f(x), you can select\n> out field f1 from its result with \"x.f.f1\" (in the rather bogus notation\n> PG uses for this). In functions that return simple datatypes, the\n> tlist is a complete waste of space.\n> \n> It seems to me that this design is completely bogus --- for one thing,\n> it's silly to restrict the notion of field-selection to be done only in\n> the context of a function call.\n> \n> I propose removing the tlist from function-call nodes. To handle field\n> selection, we should instead invent a separate \"FieldSelect\" expression\n> operator that is applied to the result of the function call, or perhaps\n> someday other kinds of expressions that can return tuples. Aside from\n> saving space, we'll be able to cleanly represent both the result type of\n> the function (ie, the tuple datatype) and the type of the field (which\n> will be the result of the FieldSelect node). Right now there's only one\n> node field that represents the result type of the function call, so we\n> can't remember the actual result type of the function call itself.\n> \n> BTW, the same remarks apply to Param node tlists.\n> \n> Comments?\n> \n> regards, tom lane\n",
"msg_date": "Fri, 04 Aug 2000 10:21:28 +1000",
"msg_from": "Chris Bitmead <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Anyone particularly wedded to func_tlist mechanism?"
},
{
"msg_contents": "> -----Original Message-----\n> From: Tom Lane\n> \n> The \"target list\" that's added to function-call nodes in expressions\n> has bugged me for a long time, because it seems to clutter expression\n> trees quite a bit (thus wasting space in stored rules, for example)\n> without really being used for much.\n> \n> I've now dug around and determined that the only thing it is used for\n> is selecting out a single field from a function that returns a tuple.\n\nI don't understand details about current fmgr changes,sorry.\nIf I remember correctly,this has been only in case of SQL functions.\nIn addition,SQL functions has returned a TupleTableSlot not a tuple\nif the return type is a compound type. Has it been changed already ?\nOr would it be changed ?\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Fri, 4 Aug 2000 09:43:50 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Anyone particularly wedded to func_tlist mechanism?"
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n>> The \"target list\" that's added to function-call nodes in expressions\n>> has bugged me for a long time, because it seems to clutter expression\n>> trees quite a bit (thus wasting space in stored rules, for example)\n>> without really being used for much.\n\n> If I remember correctly,this has been only in case of SQL functions.\n\nTrue, the tlist is ignored except in SQL functions --- another reason\nwhy attaching it to all function nodes is a waste. I believe that's\nitself a bug, since it seems like PL functions ought to be capable\nof returning tuples (whether they actually can or not is another story,\nbut it sure seems like plpgsql ought to be close to being able to).\nBy separating the fieldselect operation into another node, we can fix\nthat bug too, since it wouldn't matter what the function's\nimplementation language is.\n\n> In addition,SQL functions has returned a TupleTableSlot not a tuple\n> if the return type is a compound type.\n\nRight, the Datum representation of a tuple type is a pointer to a\nTupleTableSlot, so that's what this new FieldSelect node would expect\nto see at runtime. I don't see any need to change that.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 20:55:15 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Anyone particularly wedded to func_tlist mechanism? "
},
{
"msg_contents": "> -----Original Message-----\n> From: Tom Lane [mailto:[email protected]]\n> \n> \"Hiroshi Inoue\" <[email protected]> writes:\n> \n> > In addition,SQL functions has returned a TupleTableSlot not a tuple\n> > if the return type is a compound type.\n> \n> Right, the Datum representation of a tuple type is a pointer to a\n> TupleTableSlot, so that's what this new FieldSelect node would expect\n> to see at runtime. I don't see any need to change that.\n>\n\nI see. Fieldselect node could expect to see the tuple descriptor used\nto store the HeapTuple. \n\nBTW,AFAIK PL/pgSQL functions return a HeapTuple directly.\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Fri, 4 Aug 2000 11:00:52 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "RE: Anyone particularly wedded to func_tlist mechanism? "
},
{
"msg_contents": "Chris Bitmead <[email protected]> writes:\n> At some stage I'd like to be able to query fields by odbms style\n> navigation. Like select * from person where person.garage.car.colour =\n> 'red'. Just keep that in mind with any change you do.\n\nAFAICS what I have in mind doesn't affect that one way or the other.\nThe main problem you'll have to deal with is the tension between single\nvalues and sets. If you try it now with the regression database:\n\nregression=# SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM ONLY\nperson p;\n name | name | name\n-------+-------------+---------------\n mike | posthacking | advil\n mike | posthacking | peet's coffee\n joe | basketball | hightops\n sally | basketball | hightops\n(4 rows)\n\nregression=# SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM ONLY\nregression-# person p where p.hobbies.equipment.name = 'hightops';\nERROR: An operand to the '=' operator returns a set of text,\n but '=' takes single values, not sets.\n\nThis is not just the parser being unreasonably picky: it's protecting\nexecQual.c, which has no idea what to do with set-valued qual\nexpressions.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Fri, 04 Aug 2000 02:30:21 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Anyone particularly wedded to func_tlist mechanism? "
}
] |
[
{
"msg_contents": "> -----Original Message-----\n> From: Hiroshi Inoue [mailto:[email protected]]\n> \n> > -----Original Message-----\n> > From: Tom Lane [mailto:[email protected]]\n> > \n> > \"Hiroshi Inoue\" <[email protected]> writes:\n> > > Is pg_relcheck.rcsrc equivalent to the original raw constraint ?\n> > \n> > To the best of deparse_expression()'s ability, it should be.\n> > I'm not real sure why we bother to store it, rather than deparsing\n> > rcbin on-the-fly on demand...\n> >\n> \n> I'm looking at DefineRelation() in commands/creartinh.c.\n> In case of inheritance,constraints of super classes are\n> stored using their pg_relcheck.rcbin-s. It seems bad \n> in case of multiple inheritance. rcsrc-s may be available\n> instead.\n>\n\nOops,I've been completely off the point.\nThe raw expression of constraints seems to be really needed.\n\nIs there any way to convert rcbin(cooked text format) to the\nraw(pre-cooked) Node expression ? Or is there a way to\nconvert rcsrc to the pre-cooked Node expression ?\nOr is there a way to convert rcsrc to the cooked expression ?\n\nHere's a simple bug case.\n\n=# create table p1 (id int4);\nCREATE\n=# create table p2 (dt text check (dt = 'a'));\nCREATE\n=# create table inh () inherits (p1,p2);\nCREATE\n=# \\d inh\n Table \"inh\"\n Attribute | Type | Modifier\n-----------+---------+----------\n id | integer |\n dt | text |\nConstraint: (id = 'a'::text)\n\nRegards.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Fri, 4 Aug 2000 09:02:33 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: Raw constraint & pg_relcheck.rcsrc "
},
{
"msg_contents": "\"Hiroshi Inoue\" <[email protected]> writes:\n> Is there any way to convert rcbin(cooked text format) to the\n> raw(pre-cooked) Node expression?\n\nNo.\n\n> Or is there a way to\n> convert rcsrc to the pre-cooked Node expression ?\n> Or is there a way to convert rcsrc to the cooked expression ?\n\nI think what you'd have to do is take the parent's rcsrc and run it\nthrough the parse and transform phases again, using the new child\ntable as the reference for attribute name resolution. Thomas might\nhave a clearer idea than I do about the cleanest way to interface\nto the parser for that.\n\nAnother possibility is to determine the mapping from parent columns\nto child columns, and then walk through the (cooked) expression tree\nand substitute varattno field values in Var nodes accordingly. I'm\nnot certain that's sufficient, but if it is it'd be a fairly small\namount of code (in fact you might be able to just call the routines in\nthe rewriter that do similar things).\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 21:24:23 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Raw constraint & pg_relcheck.rcsrc "
},
{
"msg_contents": "> -----Original Message-----\n> From: Tom Lane\n> \n> \"Hiroshi Inoue\" <[email protected]> writes:\n> > Is there any way to convert rcbin(cooked text format) to the\n> > raw(pre-cooked) Node expression?\n> \n> No.\n> \n> > Or is there a way to\n> > convert rcsrc to the pre-cooked Node expression ?\n> > Or is there a way to convert rcsrc to the cooked expression ?\n>\n\n[snip]\n \n> Another possibility is to determine the mapping from parent columns\n> to child columns, and then walk through the (cooked) expression tree\n> and substitute varattno field values in Var nodes accordingly. I'm\n> not certain that's sufficient, but if it is it'd be a fairly small\n> amount of code (in fact you might be able to just call the routines in\n> the rewriter that do similar things).\n>\n\nOK,I would try this way using expression_tree_walker() which I\nused once in my trial for ALTER TABLE DROP COLUMN.\n\nThanks.\n\nHiroshi Inoue\[email protected]\n",
"msg_date": "Fri, 4 Aug 2000 11:41:21 +0900",
"msg_from": "\"Hiroshi Inoue\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: Raw constraint & pg_relcheck.rcsrc "
}
] |
[
{
"msg_contents": "\nNow that I *seem* to have a pg_dump/restore that handles BLOBs (for 7.0.2\nand 7.1), would there be any value in adding a 'conversion' option to\npg_restore (for 7.1)?\n\nThe idea being that there are probably people out there who use BLOBs for\nlarge text fields, who *might* be better served is using LZTEXT (or\nwhatever is appropriate) in 7.1.\n\nAt this stage I am not sure *how* I would do the conversion, but my initial\nthought would be to store the BLOB as an LZTEXT in a temp table, then find\nall tables with BLOB columns, either do an ALTER TABLE ALTER COLUMN <name>\nLZTEXT (if supported?), or just add a new column? Then set the column value\nto the new LZTEXT.\n\nAnother option would be to do 'alter table add <newname> lztext', then load\nthe data, drop the old column and rename the new one...\n\nFor BLOBS that are referenced in more than one table, this will duplicate\nthe text which may be a problem, but this is only enforcing what should\nhave been the case all along, I think.\n\nI'd be interested in feedback from people who think this would be a\ngood/bad idea as well as any ideas on how to implement it nicely...\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 04 Aug 2000 10:54:02 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "pg_dump/restore to convert BLOBs to LZTEXT (optional!)"
},
{
"msg_contents": "Philip Warner <[email protected]> writes:\n> For BLOBS that are referenced in more than one table, this will duplicate\n> the text which may be a problem,\n\nAs well as break the semantics: if you have a multiply-referenced BLOB\nthen you can update it through any reference and the changes are visible\nthrough all the references. Not so after you convert the data into\nnon-BLOB values.\n\nAnother problem is that even if you manage to restructure the database\nproperly, you can't do anything to help with conversion of the\napplication code that talks to the database (not even the functions\nand triggers/rules that may appear right in the database).\n\nAFAICS converting from BLOB to TOAST storage is going to require a\nfair amount of actual thought and work on the part of the DB\nprogrammer/admin. I don't see that pg_dump can help meaningfully,\nand I'd just as soon resist feature bloat in pg_dump.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 21:10:53 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!) "
},
{
"msg_contents": "At 21:10 3/08/00 -0400, Tom Lane wrote:\n>As well as break the semantics: if you have a multiply-referenced BLOB\n>then you can update it through any reference and the changes are visible\n>through all the references. Not so after you convert the data into\n>non-BLOB values.\n\nThat's what I meant. People *shouldn't* expect BLOB fields to be updated in\nmore than one table, but the implementation currently allow it (since BLOBs\nare not implemented as fields).\n\n\n>I don't see that pg_dump can help meaningfully,\n>and I'd just as soon resist feature bloat in pg_dump.\n\nFine. Thinking about it, even *if* it was implemented as a utility, I\nsuspect (for the reasons you outlined), conversion would be a multi-step\nprocess. And a more useful utility would be one that converted an existing\ndatabase, rather than trying to everything in the 'restore'...\n\nForget I even mentioned it.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 04 Aug 2000 11:29:28 +1000",
"msg_from": "Philip Warner <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!) "
}
] |
[
{
"msg_contents": "Tom, \n I noted you edited mac.c, did you pick up the suggestions\n from myself and Bruce re: macaddr_manuf?\n\n Larry\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, 3 Aug 2000 19:57:11 -0500 (CDT)",
"msg_from": "Larry Rosenman <[email protected]>",
"msg_from_op": true,
"msg_subject": "MAC.C (still?)"
},
{
"msg_contents": "Larry Rosenman <[email protected]> writes:\n> I noted you edited mac.c, did you pick up the suggestions\n> from myself and Bruce re: macaddr_manuf?\n\nI just converted the functions to new-style, didn't change their\nbehavior at all.\n\n\t\t\tregards, tom lane\n",
"msg_date": "Thu, 03 Aug 2000 21:25:27 -0400",
"msg_from": "Tom Lane <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: MAC.C (still?) "
}
] |
[
{
"msg_contents": "See below...\n\n--\nPeter Mount\nEnterprise Support\nMaidstone Borough Council\nAny views stated are my own, and not those of Maidstone Borough Council\n\n\n-----Original Message-----\nFrom: Philip Warner [mailto:[email protected]]\nSent: Friday, August 04, 2000 2:29 AM\nTo: Tom Lane\nCc: [email protected]; [email protected]\nSubject: Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT\n(optional!) \n\n\nAt 21:10 3/08/00 -0400, Tom Lane wrote:\n>As well as break the semantics: if you have a multiply-referenced BLOB\n>then you can update it through any reference and the changes are visible\n>through all the references. Not so after you convert the data into\n>non-BLOB values.\n\nThat's what I meant. People *shouldn't* expect BLOB fields to be updated in\nmore than one table, but the implementation currently allow it (since BLOBs\nare not implemented as fields).\n\nPeter: I dissagree. There are dozens of instances where you would use a\nsingle BLOB but refer to it in more than one table. If you have a 1Mb blob\nrefered to in 3 different tables, you don't want to store 3 instances of it.\nSay you were implementing some form of DIP system (Document Image\nProcessing), then you only want one copy of the document stored, so that if\nthat document changes, then every instance is changed.\n\n>I don't see that pg_dump can help meaningfully,\n>and I'd just as soon resist feature bloat in pg_dump.\n\nFine. Thinking about it, even *if* it was implemented as a utility, I\nsuspect (for the reasons you outlined), conversion would be a multi-step\nprocess. And a more useful utility would be one that converted an existing\ndatabase, rather than trying to everything in the 'restore'...\n\nPeter: It might be useful to have the utility and put it under contrib. It\nwould then save people from reinventing the wheel.\n\nForget I even mentioned it.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.C.N. 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, 4 Aug 2000 07:55:52 +0100 ",
"msg_from": "Peter Mount <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optiona l!) "
},
{
"msg_contents": "On Fri, Aug 04, 2000 at 07:55:52AM +0100, Peter Mount wrote:\n> See below...\n> \n> Peter: I dissagree. There are dozens of instances where you would use a\n> single BLOB but refer to it in more than one table. If you have a 1Mb blob\n> refered to in 3 different tables, you don't want to store 3 instances of it.\n> Say you were implementing some form of DIP system (Document Image\n> Processing), then you only want one copy of the document stored, so that if\n> that document changes, then every instance is changed.\n> \n\nBut Peter, the relational way to avoid redundant storage should apply. For\nevery other type, one does this by storing the data in one place, with\na unique ID, and using the ID to refer to the data item, and joining when\nyou need the item itself.\n\nSo, once large data items are promoted to first class types, they should\nact just like every other first class type. Otherwise, we violate the \nprinciple of least surprise. Having software that tries to second guess\nthe developer is always frustrating.\n\nRoss\n-- \nRoss J. Reedstrom, Ph.D., <[email protected]> \nNSBRI Research Scientist/Programmer\nComputer and Information Technology Institute\nRice University, 6100 S. Main St., Houston, TX 77005\n\n",
"msg_date": "Fri, 4 Aug 2000 09:47:45 -0500",
"msg_from": "\"Ross J. Reedstrom\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optiona l!)"
},
{
"msg_contents": "> On Fri, Aug 04, 2000 at 07:55:52AM +0100, Peter Mount wrote:\n> > See below...\n> > \n> > Peter: I dissagree. There are dozens of instances where you would use a\n> > single BLOB but refer to it in more than one table. If you have a 1Mb blob\n> > refered to in 3 different tables, you don't want to store 3 instances of it.\n> > Say you were implementing some form of DIP system (Document Image\n> > Processing), then you only want one copy of the document stored, so that if\n> > that document changes, then every instance is changed.\n> > \n> \n> But Peter, the relational way to avoid redundant storage should apply. For\n> every other type, one does this by storing the data in one place, with\n> a unique ID, and using the ID to refer to the data item, and joining when\n> you need the item itself.\n> \n> So, once large data items are promoted to first class types, they should\n> act just like every other first class type. Otherwise, we violate the \n> principle of least surprise. Having software that tries to second guess\n> the developer is always frustrating.\n\nI totally agree. Because large objects exist aas separate file, this\nwas required, but after TOAST, the proper relational way should be used.\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, 4 Aug 2000 11:47:26 -0400 (EDT)",
"msg_from": "Bruce Momjian <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optiona l!)"
}
] |
[
{
"msg_contents": "> Mike Mascari <[email protected]> writes:\n> > Please don't. It seems true that Microsoft has enabled a mode for\n> > SQL Server, but the main problem was Access. And Access 95/97 has\n> > a huge installed base of users that would not be able to use its\n> > automated query tools with PostgreSQL.\n> \n> That was what I was afraid of :-(. Question though: if MS has changed\n> the default behavior of their server to be (more) \n> SQL-compliant, aren't\n> these folks being forced to update their Access installs anyway?\n> Presumably those old versions do not know how to select the \n> non-default\n> behavior of SQL Server, so they're gonna be incompatible with newer\n> servers despite the nominal presence of a workaround.\n\nCan somebody enlighten me as to *when* Access creates a query that has\n\"=null\" in it?\n\nI just tried to reproduce it, and I failed. \n\nI type\t\tAccess 97SR2\tAccess 2000SR1\n------\t\t------------\t--------------\n=NULL\t\t\tIs Null\t\t=Null\nIS NULL\t\tIs Null\t\tIs Null\n<>NULL\t\tIs Not Null\t\tIs Not Null\nIS NOT NULL\t\tIs Not Null\t\tIs Not Null\n\n\nSeems to me that Access 2000 *allows* you to write =Null, but if you write\n\"Is Null\" (correct), it will leave it alone. And <>NULL is always converted\nto Is Not Null.\n\nI don't have any Access 95 around - but it's so old that hardly anybody\nshould be using it anymore, right? :-)\n\n\nProblem is that it's too easy to change your MS SQL Installation to work in\n\"the old way\". Simply have the clients click in a box when they create the\nODBC datasource. The downside of backwards compatibilty is not forcing\npeople to fix their stuff :-)\n\n\n//Magnus\n",
"msg_date": "Fri, 4 Aug 2000 10:12:57 +0200 ",
"msg_from": "Magnus Hagander <[email protected]>",
"msg_from_op": true,
"msg_subject": "RE: comparing rows "
},
{
"msg_contents": "Magnus Hagander wrote:\n> \n> Can somebody enlighten me as to *when* Access creates a query that has\n> \"=null\" in it?\n> \n> I just tried to reproduce it, and I failed.\n> \n\nThe problem appears (just from a quick look at the mail archive)\nto manifest itself when Access generates queries to handle Forms\nprocessing. Below is a sample issue that people had when using\nAccess 97 w/PostgreSQL:\n\n------------------------------------------------------\nFrom: [email protected] \nTo: [email protected] \nSubject: Access ODBC worries \nDate: Thu, 12 Aug 1999 16:44:41 +1200 (NZST) \n\nHi All\n\nI have been battling with a problem now for days. I have a linked\nform in Access 97 to linked tables to a PGSQL backend via ODBC.\nThe code works well, but after the form has been on the screen\nfor about 20 minutes idling or doing something (makes no\ndifference) then all hell breaks loose. The computer tries to\nrequery the form data from the backend in a very strange way. \nThe odbc log file output at the bottom of this message explains\nthe problem in greater detail.\n\n...\n\n<ODBC log follows>\n\n...\n\n------------------------------------------------------------\nhdbc=91652364, stmt=91555964, result=0\nmanual_result=0, prepare=0, internal=0\nbindings=0, bindings_allocated=0\nparameters=92605260, parameters_allocated=1\nstatement_type=0, statement='SELECT \"Toplevel time\nrecordal\".\"oid\" FROM \"Toplevel time\nrecordal\" WHERE (\"File link\" = ? ) ORDER BY \"Startdate\" DESC '\nstmt_with_params='SELECT \"Toplevel time recordal\".\"oid\" FROM\n\"Toplevel time recordal\"\nWHERE (\"File link\" = NULL ) ORDER BY \"Startdate\" DESC '\ndata_at_exec=-1, current_exec_param=-1, put_data=0\ncurrTuple=-1, current_col=-1, lobj_fd=-1\nmaxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,\nscroll_concurrency=1\ncursor_name='SQL_CUR0575087C'\n----------------QResult Info -------------------------------\nCONN ERROR: func=SC_execute, desc='', errnum=110, errmsg='ERROR: \nparser: parse error\nat or near \"null\"'\n\n------------------------------------------------------\n\nI'll attempt to provide an easily repeatable operation, but the\nproblem *does* exist in Access 97.\n\nMike Mascari\n",
"msg_date": "Fri, 04 Aug 2000 05:15:11 -0400",
"msg_from": "Mike Mascari <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: comparing rows"
}
] |
[
{
"msg_contents": "I am using a new dial-in drop for my network connection, and a somewhat\nunfamiliar mail handling system (postfix) on my local computer. A large\namount of outbound mail is getting returned because the recipient\nmachine is not found (these include such obscure names as redhat.com :/\n\nAnyway, I'm going to try to install sendmail this weekend to see if it\nfixes the problem, but in the meantime does anyone have a suggestion for\na \"relay machine\" I could try using? Most machines nowadays reject relay\nrequests, but perhaps there is a \"known relay\"? btw, I have postfix\nconfigured to *not* verify dns on mail (and currently to *not* use a\nrelay), and the problem seems to be coming from farther along the chain.\n\nTIA for any suggestions.\n\n - Thomas\n\nbtw, I've got DSL on order, so hopefully these problems will go away in\na month or so...\n",
"msg_date": "Fri, 04 Aug 2000 14:57:24 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": true,
"msg_subject": "OT: Dumb mail question"
}
] |
[
{
"msg_contents": " I have been looking at all of the online docs, and I can't find it, or just didn't see it. What is the max length string than can be stored in a TEXT field. I am running v7.0.2 on RedHat 6.2\n\nThanks,\nDale.\n\n\n",
"msg_date": "Fri, 04 Aug 2000 15:58:42 -0500",
"msg_from": "\"Dale Anderson\" <[email protected]>",
"msg_from_op": true,
"msg_subject": "Upper limit of a TEXT field"
},
{
"msg_contents": "Dale Anderson wrote:\n> \n> I have been looking at all of the online docs, and I can't find it, or just didn't see it. What is the max length string than can be stored in a TEXT field. I am running v7.0.2 on RedHat 6.2\n\nAssuming the RPM postgresql and no BLKSZ trickery, a little less than\n8K.\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n",
"msg_date": "Fri, 04 Aug 2000 17:02:01 -0400",
"msg_from": "Lamar Owen <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Upper limit of a TEXT field"
}
] |
[
{
"msg_contents": "Henry B. Hotz writes:\n\n> Shouldn't there be an option to disable shared libraries altogether?\n\nThe promised land for all of this is GNU libtool, which offers all these\nlittle options. I brought up the rpath thing a while ago, and while it\nmight look the same on a lot of platforms, it's potentially just another\nsource of problems when implemented manually. The LD_RUN_PATH does the\nsame thing on many platforms; perhaps we should mention it somewhere.\n\n\n-- \nPeter Eisentraut Sernanders v�g 10:115\[email protected] 75262 Uppsala\nhttp://yi.org/peter-e/ Sweden\n\n",
"msg_date": "Fri, 4 Aug 2000 23:58:58 +0200 (CEST)",
"msg_from": "Peter Eisentraut <[email protected]>",
"msg_from_op": true,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "At 11:58 PM +0200 8/4/00, Peter Eisentraut wrote:\n>Henry B. Hotz writes:\n>\n> > Shouldn't there be an option to disable shared libraries altogether?\n>\n>The promised land for all of this is GNU libtool, which offers all these\n>little options. I brought up the rpath thing a while ago, and while it\n>might look the same on a lot of platforms, it's potentially just another\n>source of problems when implemented manually. The LD_RUN_PATH does the\n>same thing on many platforms; perhaps we should mention it somewhere.\n\nNetBSD has a FAQ on all the arguments about what ELF does/doesn't, \nshould/shouldn't do. What I can remember sounded pretty unresolved, \nwith a clear disconnect between the design intent for ELF and actual \ncurrent practice.\n\nI think what you're supposed to do in NetBSD is what was said earlier \n(-Wl,-R/usr/whatever/lib). Sounds like that conflicts with a lot of \npeople's beliefs about how to do it on a lot of other platforms \nthough. It also breaks the \"try the regression tests before \ninstalling\" feature.\n\n*sigh*\n\n\nSignature held pending an ISO 9000 compliant\nsignature design and approval process.\[email protected], or [email protected]\n",
"msg_date": "Fri, 4 Aug 2000 15:50:42 -0700",
"msg_from": "\"Henry B. Hotz\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "> I think what you're supposed to do in NetBSD is what was said earlier\n> (-Wl,-R/usr/whatever/lib). Sounds like that conflicts with a lot of\n> people's beliefs about how to do it on a lot of other platforms\n> though. It also breaks the \"try the regression tests before\n> installing\" feature.\n\nNot necessarily, since you can override the rpath setting with\nLD_LIBRARY_PATH (at least on Linux and presumably other gnu-capable\nsystems).\n\nHowever, the link set will fail if the path to the directory does not\nexist (again, at least for gcc/g++ on Linux and Solaris). That may not\nbe a problem for most package builders (since things will go in a\nstandard place) but will cause problems for installing into standalone\nareas. Especially for, as you point out, testing before installation.\n\n - Thomas\n",
"msg_date": "Sat, 05 Aug 2000 02:20:20 +0000",
"msg_from": "Thomas Lockhart <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
},
{
"msg_contents": "At 2:20 AM +0000 8/5/00, Thomas Lockhart wrote:\n> > I think what you're supposed to do in NetBSD is what was said earlier\n> > (-Wl,-R/usr/whatever/lib). Sounds like that conflicts with a lot of\n> > people's beliefs about how to do it on a lot of other platforms\n> > though. It also breaks the \"try the regression tests before\n> > installing\" feature.\n>\n>Not necessarily, since you can override the rpath setting with\n>LD_LIBRARY_PATH (at least on Linux and presumably other gnu-capable\n>systems).\n\nAh, I found it! It's LD_RUN_PATH on this platform (NetBSD/macppc). \nAt least we do have the (backward IMHO) Solaris-style workaround. \nNetBSD/mac68k is still using xcoff so they have a /etc/ld.so.conf \nfile. That works much better for this situation.\n\nFWIW the Linux crowd (MkLinux and LinuxPPC) are also using SysV/ELF \nbinaries while AIX/Darwin/MacOS X are using xcoff. I'm really not \nsure that ELF is the step forward it's cracked up to be. I guess the \nLinux folks are no happier with the situation.\n\nIt would appear that the correct thing to do for NetBSD/ELF is the \n-W-R stuff and then set LD_RUN_PATH for the preinstall regression \ntests. Sorry if that makes the configure setup more complex.\n\n\nSignature held pending an ISO 9000 compliant\nsignature design and approval process.\[email protected], or [email protected]\n",
"msg_date": "Mon, 7 Aug 2000 09:40:22 -0700",
"msg_from": "\"Henry B. Hotz\" <[email protected]>",
"msg_from_op": false,
"msg_subject": "Re: Installation Report for powerpc-apple-netbsdelf1.5"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.