threads
listlengths
1
2.99k
[ { "msg_contents": "I have just been looking into a bug report against the jdbc driver and I \nfound the following behavior that I can't explain.\n\nIf I run jdbc with setAutoCommit=true then notifications work as \nexpected, however if I run with setAutoCommit=false then notifications \nare not being sent from the backend to the client.\n\nWith autoCommit=false the jdbc driver is sending the following SQL \ncommands to the server:\n\nbegin\nselect 1\ncommit;begin;\nselect 1\ncommit;begin;\nselect 1\n...\n\nMy test code is using the select statement as a means to poll for the \nnotifications. The only thing that is unusual about this is that the \n\"commit;begin;\" command string is sent to the server as a single query \nto be processed.\n\nWith autoCommit=true the SQL commands are simply:\n\nselect 1\nselect 1\nselect 1\n...\n\nIn this mode the notifications work correctly.\n\nIs there something I am doing wrong, or is this expected behavior for \nthe server?\n\nthanks,\n--Barry\n\n", "msg_date": "Mon, 14 Jan 2002 22:35:29 -0800", "msg_from": "Barry Lind <barry@xythos.com>", "msg_from_op": true, "msg_subject": "problem with notify/listen" }, { "msg_contents": "Barry Lind <barry@xythos.com> writes:\n> If I run jdbc with setAutoCommit=true then notifications work as \n> expected, however if I run with setAutoCommit=false then notifications \n> are not being sent from the backend to the client.\n\nYou are aware that notifications are only sent at transaction commit,\nright?\n\n> The only thing that is unusual about this is that the \n> \"commit;begin;\" command string is sent to the server as a single query \n> to be processed.\n\nHm. The response to this string (assuming that there's a notify\nwaiting) would look like\n\n\tN foo\t\t\t(NOTIFY)\n\tC COMMIT\t\t(commit command complete)\n\tC BEGIN\t\t\t(begin command complete)\n\tZ\t\t\t(ready for new query)\n\n(that's from memory, so forgive any minor inaccuracy). I speculate that\neither JDBC or your test code is dropping the NOTIFY in this situation.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 Jan 2002 10:25:51 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: problem with notify/listen " }, { "msg_contents": "\nI assume this item is still open. I put it in the 7.3 queue:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches2\n\n---------------------------------------------------------------------------\n\nBarry Lind wrote:\n> I have just been looking into a bug report against the jdbc driver and I \n> found the following behavior that I can't explain.\n> \n> If I run jdbc with setAutoCommit=true then notifications work as \n> expected, however if I run with setAutoCommit=false then notifications \n> are not being sent from the backend to the client.\n> \n> With autoCommit=false the jdbc driver is sending the following SQL \n> commands to the server:\n> \n> begin\n> select 1\n> commit;begin;\n> select 1\n> commit;begin;\n> select 1\n> ...\n> \n> My test code is using the select statement as a means to poll for the \n> notifications. The only thing that is unusual about this is that the \n> \"commit;begin;\" command string is sent to the server as a single query \n> to be processed.\n> \n> With autoCommit=true the SQL commands are simply:\n> \n> select 1\n> select 1\n> select 1\n> ...\n> \n> In this mode the notifications work correctly.\n> \n> Is there something I am doing wrong, or is this expected behavior for \n> the server?\n> \n> thanks,\n> --Barry\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 20:52:38 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: problem with notify/listen" }, { "msg_contents": "Yes this is still an open item. I have already created a patch to jdbc \nfor the problem and am waiting for a 7.3 tree to apply it, as I am \nuncomfortable with the changes going into 7.2 at this late date.\n\nthanks,\n--Barry\n\nBruce Momjian wrote:\n\n> I assume this item is still open. I put it in the 7.3 queue:\n> \n> \thttp://candle.pha.pa.us/cgi-bin/pgpatches2\n> \n> ---------------------------------------------------------------------------\n> \n> Barry Lind wrote:\n> \n>>I have just been looking into a bug report against the jdbc driver and I \n>>found the following behavior that I can't explain.\n>>\n>>If I run jdbc with setAutoCommit=true then notifications work as \n>>expected, however if I run with setAutoCommit=false then notifications \n>>are not being sent from the backend to the client.\n>>\n>>With autoCommit=false the jdbc driver is sending the following SQL \n>>commands to the server:\n>>\n>>begin\n>>select 1\n>>commit;begin;\n>>select 1\n>>commit;begin;\n>>select 1\n>>...\n>>\n>>My test code is using the select statement as a means to poll for the \n>>notifications. The only thing that is unusual about this is that the \n>>\"commit;begin;\" command string is sent to the server as a single query \n>>to be processed.\n>>\n>>With autoCommit=true the SQL commands are simply:\n>>\n>>select 1\n>>select 1\n>>select 1\n>>...\n>>\n>>In this mode the notifications work correctly.\n>>\n>>Is there something I am doing wrong, or is this expected behavior for \n>>the server?\n>>\n>>thanks,\n>>--Barry\n>>\n>>\n>>---------------------------(end of broadcast)---------------------------\n>>TIP 2: you can get off all lists at once with the unregister command\n>> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n>>\n>>\n> \n\n\n", "msg_date": "Thu, 24 Jan 2002 18:38:54 -0800", "msg_from": "Barry Lind <barry@xythos.com>", "msg_from_op": true, "msg_subject": "Re: problem with notify/listen" } ]
[ { "msg_contents": "I am getting this error when I attempt to connect to a production\ndatabase. All other databases have valid pg_shadow and appear to be fine.\n\nThe database version is\n\n PostgreSQL 7.1 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66\n\nLogging was going to the terminal (completely useless, I know) but there\nwas an interesting error from a VACUUM of another database on the system:\n\nNOTICE: Rel qafinal_fti_i: TID 2023/112: OID IS INVALID. TUPGONE 0.\n\nThe affected database was not being vacuumed, not had it been since I'd\nseen it 'stable'.\n\nDoes anyone have any ideas about this? Anything to prevent my needing to\ngo to tape and spend a long night in a cold cold server room?\n\nThanks\n\nGavin\n\n", "msg_date": "Tue, 15 Jan 2002 20:13:08 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": true, "msg_subject": "FATAL 1: Relation 'pg_shadow' does not exist" }, { "msg_contents": "Gavin Sherry wrote:\n> \n> I am getting this error when I attempt to connect to a production\n> database. All other databases have valid pg_shadow and appear to be fine.\n> \n> The database version is\n> \n> PostgreSQL 7.1 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66\n> \n> Logging was going to the terminal (completely useless, I know) but there\n> was an interesting error from a VACUUM of another database on the system:\n> \n> NOTICE: Rel qafinal_fti_i: TID 2023/112: OID IS INVALID. TUPGONE 0.\n> \n> The affected database was not being vacuumed, not had it been since I'd\n> seen it 'stable'.\n> \n> Does anyone have any ideas about this? Anything to prevent my needing to\n> go to tape and spend a long night in a cold cold server room?\n\nCan you connect to the db using standalone postgres ?\ni.e.\n\n postgres -P -O your_database_name\n\nregards,\nHiroshi Inoue\n> \n> Thanks\n> \n> Gavin\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n", "msg_date": "Tue, 15 Jan 2002 18:54:33 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: FATAL 1: Relation 'pg_shadow' does not exist" }, { "msg_contents": "On Tue, 15 Jan 2002, Hiroshi Inoue wrote:\n\n> > Does anyone have any ideas about this? Anything to prevent my needing to\n> > go to tape and spend a long night in a cold cold server room?\n> \n> Can you connect to the db using standalone postgres ?\n> i.e.\n> \n> postgres -P -O your_database_name\n\nWhen I first brought it down, I attempted this, but forgot -O. I've just\ndone this, however, it connected fine. Moreover, a select * from\npg_shadow; returned results! I vacuumed and brought the database back\nonline -- everything fine.\n\nExtremely strange =\\.\n\nGavin\n\n", "msg_date": "Tue, 15 Jan 2002 21:44:02 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": true, "msg_subject": "Re: FATAL 1: Relation 'pg_shadow' does not exist" }, { "msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> When I first brought it down, I attempted this, but forgot -O. I've just\n> done this, however, it connected fine. Moreover, a select * from\n> pg_shadow; returned results! I vacuumed and brought the database back\n> online -- everything fine.\n\n> Extremely strange =\\.\n\nDid I read you correctly to say that you're still on 7.1?\n\nThis episode should convince you to update to 7.1.3, pronto.\nWe don't make dot-releases for amusement value.\n\n(No, I can't cite any particular bug that might've led to this.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 Jan 2002 10:32:00 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: FATAL 1: Relation 'pg_shadow' does not exist " }, { "msg_contents": "Tom Lane wrote:\n> Gavin Sherry <swm@linuxworld.com.au> writes:\n> > When I first brought it down, I attempted this, but forgot -O. I've just\n> > done this, however, it connected fine. Moreover, a select * from\n> > pg_shadow; returned results! I vacuumed and brought the database back\n> > online -- everything fine.\n>\n> > Extremely strange =\\.\n>\n> Did I read you correctly to say that you're still on 7.1?\n>\n> This episode should convince you to update to 7.1.3, pronto.\n> We don't make dot-releases for amusement value.\n>\n> (No, I can't cite any particular bug that might've led to this.)\n\n IIRC there was this cross DB shared buffer usage bug\n somewhere in 7.1, that used blocks from another DB found by\n accident in the cache. So it all must have been a cache\n problem and the postmaster restart fix^H^H^H made it\n disappear and lurk again.\n\n That bug can corrupt the system catalogs of all your\n databases! Upgrade NOW!\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Tue, 15 Jan 2002 16:24:31 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: FATAL 1: Relation 'pg_shadow' does not exist" }, { "msg_contents": "Jan Wieck <janwieck@yahoo.com> writes:\n> IIRC there was this cross DB shared buffer usage bug\n> somewhere in 7.1, that used blocks from another DB found by\n> accident in the cache.\n\nNo, we found that one before 7.1 release, thank goodness.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 Jan 2002 16:39:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: FATAL 1: Relation 'pg_shadow' does not exist " }, { "msg_contents": "Tom Lane wrote:\n> Jan Wieck <janwieck@yahoo.com> writes:\n> > IIRC there was this cross DB shared buffer usage bug\n> > somewhere in 7.1, that used blocks from another DB found by\n> > accident in the cache.\n>\n> No, we found that one before 7.1 release, thank goodness.\n\n You're right, it was just Tim who ran on BETA in production\n for far too long (from out POV).\n\n Well, got me, out of ideas too.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Tue, 15 Jan 2002 17:13:58 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: FATAL 1: Relation 'pg_shadow' does not exist" } ]
[ { "msg_contents": "I had a hard disk crash recently (Those IBM 45Gb drives again) and had to\nreinstall Linux (RedHat 7.2) on the new disk (Seagate)\n\nMy question is - how can I tell PostgreSQL (which I've obviously had to\nreinstall) to look at my existing database which was mounted on another\nvolume and is still intact.?. In other words- Can you tell a\nfreshly-installed PostgreSQL to use an existing (same version) database?\n\nThanks In Advance\n\nPeter, Sydney Australia\n\n\n", "msg_date": "Tue, 15 Jan 2002 09:42:37 GMT", "msg_from": "\"Peter Bayley\" <peterb@homer.com.au>", "msg_from_op": true, "msg_subject": "Recovering a database" }, { "msg_contents": "\nPeter Bayley <peterb@homer.com.au> wrote in message\nnews:hQS08.1234$gf1.7634@news-server.bigpond.net.au...\n> I had a hard disk crash recently (Those IBM 45Gb drives again) and had to\n> reinstall Linux (RedHat 7.2) on the new disk (Seagate)\n>\n> My question is - how can I tell PostgreSQL (which I've obviously had to\n> reinstall) to look at my existing database which was mounted on another\n> volume and is still intact.?. In other words- Can you tell a\n> freshly-installed PostgreSQL to use an existing (same version) database?\n>\n> Thanks In Advance\n>\n> Peter, Sydney Australia\n>\n\nPeter,\n I have not tried this but it is mentioned in the install docs that you\ncan set and environment variable PGDATA2 I beleive, and this will make\npostgres look for the second data directory. I recommend searching for\nenvironment variables in the docs at postgres.org.\n\nSteve..\n\n\n\n", "msg_date": "Tue, 15 Jan 2002 12:33:54 GMT", "msg_from": "\"Steve Spencer\" <stevenspencer@ozemail.com.au>", "msg_from_op": false, "msg_subject": "Re: Recovering a database" }, { "msg_contents": "\"Peter Bayley\" <peterb@homer.com.au> writes:\n\n> I had a hard disk crash recently (Those IBM 45Gb drives again) and had to\n> reinstall Linux (RedHat 7.2) on the new disk (Seagate)\n> \n> My question is - how can I tell PostgreSQL (which I've obviously had to\n> reinstall) to look at my existing database which was mounted on another\n> volume and is still intact.?. In other words- Can you tell a\n> freshly-installed PostgreSQL to use an existing (same version) database?\n\nSure--set PGDATA appropriately before starting the postmaster. See\nthe docs.\n\nBTW, this would have been better posted to GENERAL rather than\nHACKERS.\n\n-Doug\n-- \nLet us cross over the river, and rest under the shade of the trees.\n --T. J. Jackson, 1863\n", "msg_date": "18 Jan 2002 14:47:15 -0500", "msg_from": "Doug McNaught <doug@wireboard.com>", "msg_from_op": false, "msg_subject": "Re: Recovering a database" }, { "msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n> > My question is - how can I tell PostgreSQL (which I've obviously had to\n> > reinstall) to look at my existing database which was mounted on another\n> > volume and is still intact.?. In other words- Can you tell a\n> > freshly-installed PostgreSQL to use an existing (same version) database?\n\n> Peter,\n> I have not tried this but it is mentioned in the install docs that you\n> can set and environment variable PGDATA2 I beleive, and this will make\n> postgres look for the second data directory. I recommend searching for\n> environment variables in the docs at postgres.org.\n\nI would think that more than that, you just want to tell postgres to use that \ndirectory as the data directory. When you start postgres you can specify the \ndata dir with the -D argument. If you are using the redhat RPMS, then \npostgres is probably started by /etc/init.d/postgres script. You can look in \nthere, find the line that starts postgres, or sets the variable, and then \nstartup postgres. I assume the old data dir is the same major version of \npostgres (7.1.x).\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.6 (GNU/Linux)\nComment: For info see http://www.gnupg.org\n\niD8DBQE8SIDA8BXvT14W9HARAt+lAJ9ORQioRifTLcQWj7MrGh/ALC6OvgCfWyKk\ntwSYblpdOM1GfM4gCA0I6Bc=\n=Z2Uv\n-----END PGP SIGNATURE-----\n", "msg_date": "Fri, 18 Jan 2002 14:08:27 -0600", "msg_from": "\"Matthew T. O'Connor\" <matthew@zeut.net>", "msg_from_op": false, "msg_subject": "Re: Recovering a database" } ]
[ { "msg_contents": "Tom wrote:\n> > [ compare_and_swap man page ]\n> \n> Looks kinda baroque. What about the referenced fetch_and_or routine?\n> If that's atomic it might be closer to TAS semantics.\n\nThanks for the hint!\nTatsuo, can you try the performance of fetch_and_or on your machine ?\nReplace the cs() line in s_lock.h with the following:\n\n<-- #define TAS(lock) cs((int *) (lock), 0, 1)\n--> #define TAS(lock) fetch_and_or(lock, 1)\n\nOn my machine the various implemtations have the following runtimes:\n(with a modified s_lock test that does not sleep, and SPINS_PER_DELAY 100000)\n\nwith LinuxPPC asm: \t1m5.16s\t(Which may not work relyably on SMP)\nwith cs:\t\t\t1m12.25s\nwith fetch_and_or:\t1m26.71s\n\nI don't know if that is enough difference to worry about.\n\nAndreas\n", "msg_date": "Tue, 15 Jan 2002 10:44:55 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " } ]
[ { "msg_contents": "\n> On my machine the various implemtations have the following runtimes:\n> (with a modified s_lock test that does not sleep, and \n> SPINS_PER_DELAY 100000)\n> \n> with LinuxPPC asm: \t1m5.16s\t(Which may not work relyably on SMP)\n> with cs:\t\t\t1m12.25s\n> with fetch_and_or:\t1m26.71s\n\nAah, there we have it. Same test on a slower 4Way SMP:\n\nwith LinuxPPC asm: \t2m9.340s\nwith cs:\t\t\t10m11.15s\nwith fetch_and_or:\t3m55.19s\n\nThese numbers look more alarming.\nUnfortunately the man page for fetch_and_or does not mention anything \nabout using it as a locking primitive. It is documented atomic though,\nso I guess that is enough.\n\nAndreas\n", "msg_date": "Tue, 15 Jan 2002 11:03:08 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " }, { "msg_contents": "> > On my machine the various implemtations have the following runtimes:\n> > (with a modified s_lock test that does not sleep, and \n> > SPINS_PER_DELAY 100000)\n> > \n> > with LinuxPPC asm: \t1m5.16s\t(Which may not work relyably on SMP)\n> > with cs:\t\t\t1m12.25s\n> > with fetch_and_or:\t1m26.71s\n> \n> Aah, there we have it. Same test on a slower 4Way SMP:\n> \n> with LinuxPPC asm: \t2m9.340s\n> with cs:\t\t\t10m11.15s\n> with fetch_and_or:\t3m55.19s\n> \n> These numbers look more alarming.\n> Unfortunately the man page for fetch_and_or does not mention anything \n> about using it as a locking primitive. It is documented atomic though,\n> so I guess that is enough.\n> \n> Andreas\n> \n\nI did several times of pgbenhc -c 10 -t 20 with the modification you\nsuggested and once got a hung (all backends sleeping with the status\nshowing \"COMMIT\"). Also I had an eror:\n\nNOTICE: LockRelease: no such lock\n\nI'm afraid now the locking is broken. Will look into more.\n--\nTatsuo Ishii\n", "msg_date": "Tue, 15 Jan 2002 22:11:04 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> Unfortunately the man page for fetch_and_or does not mention anything \n> about using it as a locking primitive. It is documented atomic though,\n> so I guess that is enough.\n\nYou could disassemble it and see if it includes that \"isync\" instruction\nor not.\n\nGiven Tatsuo's later report, I'm afraid the answer is \"not\".\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 Jan 2002 10:15:20 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " } ]
[ { "msg_contents": "Sorry - I have been 'off scene' for some time, but a new set of projects is\ncoming up at a new place of employment. Some of the new features coming in\n7.2 (no table lock for vacuums particularly) sound necessary - but I have\nhad no luck finding any indication of a likely date for the planned release\n?\n\nI would prefer to start these projects with 7.2 rather than 7.1.3 and\nupgrading once live but I need to know how long I may need to wait, or to go\nwith 7.1.3.\n\nThanks,\n--\nPeter\n\n", "msg_date": "Tue, 15 Jan 2002 10:14:19 -0000", "msg_from": "\"Peter Galbavy\" <peter.galbavy@knowtion.net>", "msg_from_op": true, "msg_subject": "Ignorance time: when is 7.2 due ?" }, { "msg_contents": "Peter Galbavy wrote:\n> Sorry - I have been 'off scene' for some time, but a new set of projects is\n> coming up at a new place of employment. Some of the new features coming in\n> 7.2 (no table lock for vacuums particularly) sound necessary - but I have\n> had no luck finding any indication of a likely date for the planned release\n> ?\n> \n> I would prefer to start these projects with 7.2 rather than 7.1.3 and\n> upgrading once live but I need to know how long I may need to wait, or to go\n> with 7.1.3.\n\nWe are putting out our 7.2 release candidate today. The final release\nin a week or two may be identical to that.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 15:09:05 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Ignorance time: when is 7.2 due ?" } ]
[ { "msg_contents": "Is postgres prepared to run in cluster, or is there any project around\nit?\nThanks in advance\n\n", "msg_date": "Tue, 15 Jan 2002 12:18:57 +0100", "msg_from": "Luis Amigo <lamigo@atc.unican.es>", "msg_from_op": true, "msg_subject": "Psql in cluster-machines" } ]
[ { "msg_contents": "Hi,\n I recently lost the ability to run postgres from a drive due to a kernal\nimplosion, as a result I have had to install a new version of postgres on\nanother drive. (Which was fine since I was changing servers anyway) I\nrecovered the files on this old machine which were in 7.0 format and the\ninstall on the new machine is 7.1.3, due to the format change I was unable\nto use the old files. After several day and a lot of anguish trying to\ninstall an older version of postgres I have resorted to asking for help. Is\nthere a way to recover the database info via a dump from these files?\n\nSteve\n\n\n", "msg_date": "Tue, 15 Jan 2002 12:39:59 GMT", "msg_from": "\"Steve Spencer\" <stevenspencer@ozemail.com.au>", "msg_from_op": true, "msg_subject": "Recover old version database files." }, { "msg_contents": "\"Steve Spencer\" <stevenspencer@ozemail.com.au> writes:\n\n> Hi,\n> I recently lost the ability to run postgres from a drive due to a kernal\n> implosion, as a result I have had to install a new version of postgres on\n> another drive. (Which was fine since I was changing servers anyway) I\n> recovered the files on this old machine which were in 7.0 format and the\n> install on the new machine is 7.1.3, due to the format change I was unable\n> to use the old files. After several day and a lot of anguish trying to\n> install an older version of postgres I have resorted to asking for help. Is\n> there a way to recover the database info via a dump from these files?\n\nYou need to install 7.0.3 and dump out the old data, unless you have\nan up-to-date dump file (created with pg_dump before the crash). \n\n7.0.3 should compile on your system; if not, post the error messages\nyou're getting and we can probably help you. You don't even need to\ninstall it; just get it compiled and point it to your old data files\nfor long enough to run pg_dump.\n\n-Doug\n-- \nLet us cross over the river, and rest under the shade of the trees.\n --T. J. Jackson, 1863\n", "msg_date": "18 Jan 2002 14:59:25 -0500", "msg_from": "Doug McNaught <doug@wireboard.com>", "msg_from_op": false, "msg_subject": "Re: Recover old version database files." } ]
[ { "msg_contents": "\nGood morning ...\n\n\tOn the 14th of January, 2002, the PostgreSQL Global Development\nGroup packaged up and released v7.2b5 (and, hopefully, our last beta) of\nour upcoming release.\n\n\tRelease Candidate 1, baring any major bug reports from Beta5, is\nschedualed for packaging and release on Friday, January 18th, with Full\nRelease a week later if all remains quiet.\n\n\tAlthough primarily a documentation and packaging related release,\nthere are several fixes for bugs reported in v7.2b4.\n\n\tFor a complete listing of changes since v7.2b4, as well as the\nnewest source code, please go to:\n\n\t\tftp://ftp.postgresql.org/pub/beta\n\n\t!!!!WARNING!!!! !!!!WARNING!!!! !!!!WARNING!!!!\n\n\tAltho we try hard to keep this from happening, due to some\n internal changes, this release *requires* a full\n dump/initdb/reload from previous v7.2 betas ...\n\n\t!!!!WARNING!!!! !!!!WARNING!!!! !!!!WARNING!!!!\n\n\tBug reports, as always, should be directed to\npgsql-bugs@postgresql.org, and the severity of all bugs reported will\ndetermine whether we move to the release cycle, or do another Beta, so we\nencourage as many administrators as possible to test this current release.\n\n\nMarc G. Fournier\nCoordinator, PGDG\n\n\n\n", "msg_date": "Tue, 15 Jan 2002 10:51:27 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": true, "msg_subject": "PostgreSQL v7.2b5 Released " }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n\n> Good morning ...\n> \n> \tOn the 14th of January, 2002, the PostgreSQL Global Development\n> Group packaged up and released v7.2b5 (and, hopefully, our last beta) of\n> our upcoming release.\n\nRPMs for Red Hat Linux 7.2 are available at\nhttp://people.redhat.com/teg/pg/\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "15 Jan 2002 11:48:09 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: PostgreSQL v7.2b5 Released" }, { "msg_contents": "\n Good morning ...\n\n \tOn the 26th of January, 2002, the PostgreSQL Global Development\n Group packaged up and released v7.2rc2 of our upcoming release. rc1 was\n released as a 'hackers-only' release, since there were several bugs quickly\n found ...\n\n \tAlthough primarily a documentation and packaging related release,\n there are several fixes for bugs reported in v7.2b5 and v7.2rc1 (not formally\n released).\n\n \tFor a complete listing of changes since v7.2b5, as well as the\n newest source code, please go to:\n\n \t\tftp://ftp.postgresql.org/pub/beta\n\n\tNote that this release does not require a full reload from b5, but,\n as b5 did require one, anyone upgrading from an earlier version *will*\n require one to go to RC1 ...\n\n \tBug reports, as always, should be directed to\n pgsql-bugs@postgresql.org, and the severity of all bugs reported will\n determine whether we move to the release cycle, or do another Beta, so we\n encourage as many administrators as possible to test this current release.\n\n\n Marc G. Fournier\n Coordinator, PGDG\n\n\n\n\n\n", "msg_date": "Sun, 27 Jan 2002 01:49:28 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": true, "msg_subject": "PostgreSQL v7.2rc2 Released " }, { "msg_contents": "Marc G. Fournier wrote:\n\n> Good morning ...\n> \n> \tOn the 26th of January, 2002, the PostgreSQL Global Development\n> Group packaged up and released v7.2rc2 of our upcoming release. rc1 was\n> released as a 'hackers-only' release, since there were several bugs quickly\n> found ...\n\n\nI have to admit to a certain curiosity. Who attended the Ouiji-board \nsession that predicted that several bugs would be found quickly, \nrequiring RC1 to be a \"hackers-only\" release instead of a real one?\n\nOK, I can't type understandable prose any better than anyone else here, \nbut I did find the wording entertaining.\n\n(And, Marc, please don't take offense, that's not the intent).\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Sat, 26 Jan 2002 23:04:38 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL v7.2rc2 Released" }, { "msg_contents": "On Sat, 26 Jan 2002, Don Baccus wrote:\n\n> Marc G. Fournier wrote:\n>\n> > Good morning ...\n> >\n> > \tOn the 26th of January, 2002, the PostgreSQL Global Development\n> > Group packaged up and released v7.2rc2 of our upcoming release. rc1 was\n> > released as a 'hackers-only' release, since there were several bugs quickly\n> > found ...\n>\n>\n> I have to admit to a certain curiosity. Who attended the Ouiji-board\n> session that predicted that several bugs would be found quickly,\n> requiring RC1 to be a \"hackers-only\" release instead of a real one?\n>\n> OK, I can't type understandable prose any better than anyone else here,\n> but I did find the wording entertaining.\n>\n> (And, Marc, please don't take offense, that's not the intent).\n\nNo offense .. the usual release procedure is to roll the tar ball, put it\non hackers for ~24hrs for limited testing, before a more formal release\n... some of the folks at Redhat picks up a couple of issues within that\n24hr period that needs to be fixed before that more formal release, so we\njust held off, fixed those and re-rolled as rc2 in case some ppl had\npicked up rc1 without the release announcements :)\n\n\n\n", "msg_date": "Sun, 27 Jan 2002 03:14:11 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": true, "msg_subject": "Re: [HACKERS] PostgreSQL v7.2rc2 Released" }, { "msg_contents": "On Sunday 27 January 2002 12:49 am, Marc G. Fournier wrote:\n> \tOn the 26th of January, 2002, the PostgreSQL Global Development\n> Group packaged up and released v7.2rc2 of our upcoming release. rc1 was\n> released as a 'hackers-only' release, since there were several bugs\n> quickly found ...\n\n> \tNote that this release does not require a full reload from b5, but,\n> as b5 did require one, anyone upgrading from an earlier version *will*\n> require one to go to RC1 ...\n\nPre-release RPMS are available for this release candidate at \nftp://ftp.postgresql.org/pub/binary/beta/RPMS\n\nBinary RPMs built on Red Hat 7.2/Intel.\n\nAs the last beta RPMs WERE beta 3, a dump/reload is *required*.\n\nThese are pre-release RPMs. Regression passes (with the 'expected' failures \ndue to RHL's locale settings and the manner in which the regression tests are \nbuilt and run in this environment.).\n\nQuestions to pgsql-ports@postgresql.org.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Sun, 27 Jan 2002 23:46:58 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL v7.2rc2 Released" }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n\n> Good morning ...\n> \n> \tOn the 26th of January, 2002, the PostgreSQL Global Development\n> Group packaged up and released v7.2rc2 of our upcoming release. rc1 was\n> released as a 'hackers-only' release, since there were several bugs quickly\n> found ...\n> \n> \tAlthough primarily a documentation and packaging related release,\n> there are several fixes for bugs reported in v7.2b5 and v7.2rc1 (not formally\n> released).\n\nBuilds fine, all regression tests succeed on a Rawhideish system\n(bleeding edge components) as as on Red Hat Linux 7.2.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "28 Jan 2002 18:02:05 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: PostgreSQL v7.2rc2 Released" }, { "msg_contents": "Lamar Owen writes:\n\n> Pre-release RPMS are available for this release candidate at\n> ftp://ftp.postgresql.org/pub/binary/beta/RPMS\n\n* Still way old JDBC drivers in there.\n\n* You're defining PGLIB in the bash profile. PGLIB doesn't do anything.\n\n* postgresql.init:\n\n Why do you need networking for postmaster?\n\n Using `pidof postmaster` is wrong. There could be other postmasters\n running just fine. Should use the lock file, or not care because the\n postmaster or pg_ctl can handle this just fine.\n\n Might want to implement the \"reload\" option.\n\n* What happened to the contrib handling patch?\n\n* What is going to happen to NLS?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 28 Jan 2002 19:29:48 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)" }, { "msg_contents": "On Monday 28 January 2002 07:29 pm, Peter Eisentraut wrote:\n> Lamar Owen writes:\n> > Pre-release RPMS are available for this release candidate at\n> > ftp://ftp.postgresql.org/pub/binary/beta/RPMS\n\n> * Still way old JDBC drivers in there.\n\nYes. I still haven't gotten a good answer as to a good development \nenvironment for the java build.\n\n> * You're defining PGLIB in the bash profile. PGLIB doesn't do anything.\n\nAs of?\n\n> * postgresql.init:\n\n> Why do you need networking for postmaster?\n\nLegacy. Shouldn't be an issue now as long as TCP/IP listening isn't on -- \nbut then again, I don't know that, thus I have to make sure networking is up \nin case it is. If there is a clean solution to this, then that would be a \ngood thing.\n\n> Using `pidof postmaster` is wrong. There could be other postmasters\n> running just fine. Should use the lock file, or not care because the\n> postmaster or pg_ctl can handle this just fine.\n\nIn this RPM incarnation there is the assumption that only one postmaster is \nrunning. This will change once multiple config files are easier.... :-)\n\n> Might want to implement the \"reload\" option.\n\n> * What happened to the contrib handling patch?\n> * What is going to happen to NLS?\n\nIt's going to be integrated, if I can remember to apply the patch you sent. \nI would appreciate patches against the current release as opposed to your \npersonal development spec file.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Mon, 28 Jan 2002 22:49:16 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)" }, { "msg_contents": "Lamar Owen writes:\n\n> Yes. I still haven't gotten a good answer as to a good development\n> environment for the java build.\n\nhttp://jdbc.postgresql.org/download.html might be a good place to start.\n\n> > * You're defining PGLIB in the bash profile. PGLIB doesn't do anything.\n>\n> As of?\n\nIt's been unnecessary since 7.0. Beginning with 7.2 it's officially\nuseless.\n\n> > Using `pidof postmaster` is wrong. There could be other postmasters\n> > running just fine. Should use the lock file, or not care because the\n> > postmaster or pg_ctl can handle this just fine.\n>\n> In this RPM incarnation there is the assumption that only one postmaster is\n> running. This will change once multiple config files are easier.... :-)\n\nBut what's really wrong about it is that if the admin shuts down the\n\"official\" postgresql service, he inadvertently kills of all users'\npostmasters as well.\n\n> > * What happened to the contrib handling patch?\n> > * What is going to happen to NLS?\n>\n> It's going to be integrated, if I can remember to apply the patch you sent.\n> I would appreciate patches against the current release as opposed to your\n> personal development spec file.\n\nGot a point there. ;-) Updated NLS patch attached. I'll see about\nupdating the contrib patch soon. Contrib isn't so important, but it'd be\na shame to ship without NLS.\n\nTIA.\n\n-- \nPeter Eisentraut peter_e@gmx.net", "msg_date": "Tue, 29 Jan 2002 00:13:15 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)" }, { "msg_contents": "On Tuesday 29 January 2002 12:13 am, Peter Eisentraut wrote:\n> http://jdbc.postgresql.org/download.html might be a good place to start.\n\nNo, it's not a good place to start. It is an excellent place to start. :-) \nThanks for the pointer.\n\n> > > * You're defining PGLIB in the bash profile. PGLIB doesn't do\n\n> It's been unnecessary since 7.0. Beginning with 7.2 it's officially\n> useless.\n\nOk.\n\n> But what's really wrong about it is that if the admin shuts down the\n> \"official\" postgresql service, he inadvertently kills of all users'\n> postmasters as well.\n\nTrue enough. I'll see if I can't work around it. \n\n> > > * What happened to the contrib handling patch?\n> > > * What is going to happen to NLS?\n\n> > It's going to be integrated, if I can remember to apply the patch you\n> > sent. I would appreciate patches against the current release as opposed\n> > to your personal development spec file.\n\n> Got a point there. ;-) Updated NLS patch attached. I'll see about\n> updating the contrib patch soon. Contrib isn't so important, but it'd be\n> a shame to ship without NLS.\n\nOk, which contrib patch was that? The only patch I hadn't yet added in was \nthe NLS stuff. And thanks for the patch against the current released spec \nfile -- it helps greatly, as I don't have to do the error-prone hand \napplications that way.\n\nI do need to survey the contrib stuff more -- but this prerelease set was \nmostly to get the rc2 code out to RPM users quickly. I still have some \ncleanup to do in the packaging, as you noticed. ;-)\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 29 Jan 2002 00:36:06 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)" }, { "msg_contents": "I wrote:\n\n> * postgresql.init:\n\n> Might want to implement the \"reload\" option.\n\nOr I might. ;-)\n\nAttached is a patch that implements \"postgresql.init reload\" and\n\"postgresql.init force-reload\" as per LSB 1.1.0 Chapter 19[*].\n\nActually, that chapter makes for some fine reading. For instance, I quote\n\n\"\"\"\nInit files must ensure that they will behave sensibly if invoked with\nstart when the service is already running, or with stop when it isn't, and\nthat they don't kill unfortunately-named user processes.\n\"\"\"\n;-)\n\n\n[*] http://www.linuxbase.org/spec/refspecs/LSB_1.1.0/gLSB/iniscrptact.html\n\n-- \nPeter Eisentraut peter_e@gmx.net", "msg_date": "Tue, 29 Jan 2002 13:33:00 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)" }, { "msg_contents": "On Tuesday 29 January 2002 01:33 pm, Peter Eisentraut wrote:\n> Attached is a patch that implements \"postgresql.init reload\" and\n> \"postgresql.init force-reload\" as per LSB 1.1.0 Chapter 19[*].\n\n> Actually, that chapter makes for some fine reading. For instance, I quote\n\n> \"\"\"\n> Init files must ensure that they will behave sensibly if invoked with\n> start when the service is already running, or with stop when it isn't, and\n> that they don't kill unfortunately-named user processes.\n> \"\"\"\n> ;-)\n\nYou enjoyed that, didn't you? :-)\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 29 Jan 2002 17:02:16 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)" } ]
[ { "msg_contents": "What sort of cluster? \n\n-----Original Message-----\nFrom: Luis Amigo [mailto:lamigo@atc.unican.es]\nSent: Tuesday, January 15, 2002 6:19 AM\nTo: pgsql-hackers@postgresql.org\nSubject: [HACKERS] Psql in cluster-machines\n\n\nIs postgres prepared to run in cluster, or is there any project around\nit?\nThanks in advance\n\n\n---------------------------(end of broadcast)---------------------------\nTIP 6: Have you searched our list archives?\n\nhttp://archives.postgresql.org\n", "msg_date": "Tue, 15 Jan 2002 09:52:25 -0500", "msg_from": "Alex Avriette <a_avriette@acs.org>", "msg_from_op": true, "msg_subject": "Re: Psql in cluster-machines" }, { "msg_contents": "Alex Avriette wrote:\n\n> What sort of cluster?\n>\n> -----Original Message-----\n> From: Luis Amigo [mailto:lamigo@atc.unican.es]\n> Sent: Tuesday, January 15, 2002 6:19 AM\n> To: pgsql-hackers@postgresql.org\n> Subject: [HACKERS] Psql in cluster-machines\n>\n> Is postgres prepared to run in cluster, or is there any project around\n> it?\n> Thanks in advance\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n>\n> http://archives.postgresql.org\n\nLinux clusters and GRID machines\n\n", "msg_date": "Wed, 16 Jan 2002 08:48:42 +0100", "msg_from": "Luis Amigo <lamigo@atc.unican.es>", "msg_from_op": false, "msg_subject": "Re: Psql in cluster-machines" } ]
[ { "msg_contents": " \n> NOTICE: LockRelease: no such lock\n> \n> I'm afraid now the locking is broken. Will look into more.\n\nNext try would be _check_lock (found in sys/atomic_op.h):\n\nDescription (from man page)\n\nThe _check_lock subroutine performs an atomic (uninterruptible) sequence of\noperations. The compare_and_swap subroutine is similar, but does not issue\nsynchronization instructions and therefore is inappropriate for updating lock\nwords.\n\nreplace the TAS define with:\n#define TAS(lock) _check_lock(lock, 0, 1)\n\n> with LinuxPPC asm: \t2m9.340s\n> with cs:\t\t\t10m11.15s\n> with fetch_and_or:\t3m55.19s\n\nwith _check_lock:\t\t3m29.990s\n\nI think that the culprit may also be the S_UNLOCK (use _clear_lock) ?\n\nAndreas\n", "msg_date": "Tue, 15 Jan 2002 18:14:12 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> I think that the culprit may also be the S_UNLOCK (use _clear_lock) ?\n\nIf isync is anything like the MB instruction on Alpha (ie, force memory\nupdates to occur before proceeding), then it must be used in S_UNLOCK\nas well as S_LOCK. All updates done within the spinlocked section must\nreach memory before another processor is allowed to acquire the lock.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 Jan 2002 12:34:24 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " }, { "msg_contents": "> > NOTICE: LockRelease: no such lock\n> > \n> > I'm afraid now the locking is broken. Will look into more.\n> \n> Next try would be _check_lock (found in sys/atomic_op.h):\n> \n> Description (from man page)\n> \n> The _check_lock subroutine performs an atomic (uninterruptible) sequence of\n> operations. The compare_and_swap subroutine is similar, but does not issue\n> synchronization instructions and therefore is inappropriate for updating lock\n> words.\n> \n> replace the TAS define with:\n> #define TAS(lock) _check_lock(lock, 0, 1)\n> \n> > with LinuxPPC asm: \t2m9.340s\n> > with cs:\t\t\t10m11.15s\n> > with fetch_and_or:\t3m55.19s\n> \n> with _check_lock:\t\t3m29.990s\n> \n> I think that the culprit may also be the S_UNLOCK (use _clear_lock) ?\n\nThanks. I will try with it.\n\nBTW, I'm still wondering why 7.2 is slower than 7.1 on AIX. Tom said\ncs() is responsible for that. But not only 7.2 but 7.1 uses cs(). It\nseems cs() does not explain the difference of the performance.\n--\nTatsuo Ishii\n", "msg_date": "Wed, 16 Jan 2002 09:58:21 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " }, { "msg_contents": "> Thanks. I will try with it.\n> \n> BTW, I'm still wondering why 7.2 is slower than 7.1 on AIX. Tom said\n> cs() is responsible for that. But not only 7.2 but 7.1 uses cs(). It\n> seems cs() does not explain the difference of the performance.\n\ncs() may be used more heavily on 7.2 --- not sure.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 15 Jan 2002 21:15:33 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n>> BTW, I'm still wondering why 7.2 is slower than 7.1 on AIX. Tom said\n>> cs() is responsible for that. But not only 7.2 but 7.1 uses cs(). It\n>> seems cs() does not explain the difference of the performance.\n\n> cs() may be used more heavily on 7.2 --- not sure.\n\nMost of the places that were SpinLockAcquire ... SpinRelease on 7.1 are\nnow LWLockAcquire ... LWLockRelease on 7.2. And each of LWLockAcquire\nand LWLockRelease does a SpinLockAcquire + SpinRelease + some other\ncomputation. So there's no doubt that we expend more cycles; cycles\nthat are wasted in a pure-single-backend scenario. However, if the\nspinlock operations are as cheap as they should be, it's hard to believe\nthat the extra cost would be enough to notice. And indeed we haven't\nbeen able to measure any penalty on Linux, HPUX, nor BSD (right Bruce?).\nSo I'm still suspicious that our cs()-based spinlock for AIX is carrying\nsome unexpected cost.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 00:22:13 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L " }, { "msg_contents": "> that the extra cost would be enough to notice. And indeed we haven't\n> been able to measure any penalty on Linux, HPUX, nor BSD (right Bruce?).\n\nRight.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 16 Jan 2002 00:23:37 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L" }, { "msg_contents": "\nAdded to TODO:\n\n* Evaluate AIX cs() spinlock macro for performance optimizations (Tatsuo)\n\n---------------------------------------------------------------------------\n\nTatsuo Ishii wrote:\n> > > NOTICE: LockRelease: no such lock\n> > > \n> > > I'm afraid now the locking is broken. Will look into more.\n> > \n> > Next try would be _check_lock (found in sys/atomic_op.h):\n> > \n> > Description (from man page)\n> > \n> > The _check_lock subroutine performs an atomic (uninterruptible) sequence of\n> > operations. The compare_and_swap subroutine is similar, but does not issue\n> > synchronization instructions and therefore is inappropriate for updating lock\n> > words.\n> > \n> > replace the TAS define with:\n> > #define TAS(lock) _check_lock(lock, 0, 1)\n> > \n> > > with LinuxPPC asm: \t2m9.340s\n> > > with cs:\t\t\t10m11.15s\n> > > with fetch_and_or:\t3m55.19s\n> > \n> > with _check_lock:\t\t3m29.990s\n> > \n> > I think that the culprit may also be the S_UNLOCK (use _clear_lock) ?\n> \n> Thanks. I will try with it.\n> \n> BTW, I'm still wondering why 7.2 is slower than 7.1 on AIX. Tom said\n> cs() is responsible for that. But not only 7.2 but 7.1 uses cs(). It\n> seems cs() does not explain the difference of the performance.\n> --\n> Tatsuo Ishii\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 18:35:12 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1 vs. 7.2 on AIX 5L" } ]
[ { "msg_contents": "Based on my experience with the 7.1.3 user defined type API, here are \nseveral wishlist items. (They don't seem to be in 7.2b4 either.)\n\n1) load/unload functions\n\nSome user-defined types and functions require initialization of\nglobal structures. This can be handled by code like\n\n static int initialize()\n {\n static int initialized = 0;\n\n if (!initialized) {\n //... do global initialization\n initialized = 1;\n }\n }\n\nbut this requires that every user-defined function call this \nroutine.\n\nBut more importantly, there's no way to free resources when the \ndatabase shuts down or loads the shared library. A memory leak may \nbe acceptable, but it's not acceptable for physical or virtual devices\nto remain locked.\n\nProposed solution: define a new data structure that contains\ninformation about the user-defined types/function module. This\nstructure would contain routines that are called when the shared\nlibrary is loaded or unloaded. Something like:\n\n typedef struct {\n char *name;\n int (*load)();\t // returns nonzero on error\n int (*unload)();\n ...\n } PG_USER_TYPE_INFO;\n \n2) autoconfiguring functions\n\nIt should be possible for a user-defined type to define itself,\nperhaps via a \"bootstrap\" procedure in the structure mentioned \nabove. The bootstrap procedure could use SPI calls to define \nits own types, functions, operators and secondary indexes.\n\nAll but the last item can be done by a SQL script, of course,\nbut this provides a cleaner mechanism for complex packages. \n(My libpkixpq script, for instance, is over 1000 lines long!)\n\nThis function would probably take one or two single arguments,\nthe path to the shared library being bootstrapped and possibly\nthe name of the database\n\n3) context information\n\nThe final wishlist item, which may not be doable, is to have\nsome context for the query. I know that the fcinfo structure\ndoes have a \"context\" field, but what I would really like to\nhave is a clean way to determine:\n\n 1) the current database\n\n 2) the target relation, or NULL if it's a freestanding select clause.\n\nThe purpose is to allow the user-defined functions to pull out\nmetadata maintained elsewhere. E.g., I might define a catalogue\ncontaining public encryption encryption keys to use when writing\ndata into certain tables. My encryption routines could pull this\ninformation out of the database with SPI... if I knew the name of\nthe table that was the target of the insert or update.\n\n", "msg_date": "Tue, 15 Jan 2002 14:48:22 -0700 (MST)", "msg_from": "Bear Giles <bear@coyotesong.com>", "msg_from_op": true, "msg_subject": "user types API wish list" }, { "msg_contents": "Bear Giles <bear@coyotesong.com> writes:\n> Based on my experience with the 7.1.3 user defined type API, here are \n> several wishlist items. (They don't seem to be in 7.2b4 either.)\n\n> 1) load/unload functions\n\n> But more importantly, there's no way to free resources when the \n> database shuts down or loads the shared library.\n\nYou can add an on_shmem_exit or on_proc_exit callback, though I agree\nthis doesn't cover the scenario of a forcible LOAD replacing an existing\ncopy of your shlib.\n\n> It should be possible for a user-defined type to define itself,\n> perhaps via a \"bootstrap\" procedure in the structure mentioned \n> above. The bootstrap procedure could use SPI calls to define \n> its own types, functions, operators and secondary indexes.\n\n> All but the last item can be done by a SQL script, of course,\n> but this provides a cleaner mechanism for complex packages. \n\nMph. I think the script approach is better, mainly because it\nseems more configurable for mere-mortal end users. Stuffing things\ndown into C code doesn't make life easier for anyone.\n\n> The final wishlist item, which may not be doable, is to have\n> some context for the query. I know that the fcinfo structure\n> does have a \"context\" field, but what I would really like to\n> have is a clean way to determine:\n\n> 1) the current database\n\nThere's a global variable to tell you that.\n\n> 2) the target relation, or NULL if it's a freestanding select clause.\n\nI do not understand what this means. What is the \"target\" of\nSELECT ... FROM a JOIN b ?\n\n> The purpose is to allow the user-defined functions to pull out\n> metadata maintained elsewhere. E.g., I might define a catalogue\n> containing public encryption encryption keys to use when writing\n> data into certain tables. My encryption routines could pull this\n> information out of the database with SPI... if I knew the name of\n> the table that was the target of the insert or update.\n\nThis strikes me as broken by design. Why should the datatype depend on\nthe location in which it is stored? What happens if the intended target\nis diverted by a rule or trigger; does that invalidate what you did?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 15:16:39 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: user types API wish list " } ]
[ { "msg_contents": "I asked a while back, is anyone managing this project? It has scripts that just\nplain don't work.\n", "msg_date": "Tue, 15 Jan 2002 17:21:08 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": true, "msg_subject": "RServ replication" }, { "msg_contents": ">>>>> \"mlw\" == mlw <markw@mohawksoft.com> writes:\n\n mlw> I asked a while back, is anyone managing this project? It has\n mlw> scripts that just plain don't work.\n\nIt works. Not like a charm, but it works. Also, it's a nightmare to setup.\n\n-- \n Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just \n ^^^^^ / /(_)_ __ _ ___ __ selective about who its friends are \n / / | | '_ \\| | | \\ \\/ / Debian Certified Linux Developer \n _ /// / /__| | | | | |_| |> < Turbo Fredriksson turbo@bayour.com\n \\\\\\/ \\____/_|_| |_|\\__,_/_/\\_\\ Gothenburg/Sweden\n\n[Hello to all my fans in domestic surveillance] Uzi assassination\nNoriega Iran Cocaine NORAD Albanian ammonium KGB nitrate security\nSouth Africa FBI congress\n[See http://www.aclu.org/echelonwatch/index.html for more about this]\n", "msg_date": "16 Jan 2002 16:48:55 +0100", "msg_from": "Turbo Fredriksson <turbo@bayour.com>", "msg_from_op": false, "msg_subject": "Re: RServ replication" }, { "msg_contents": "Hi all,\n\nDoes anyone want to write a setup guide for this (RServ), to go into the\n\"Installation Guides\" section on techdocs.postgresql.org?\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\n\nTurbo Fredriksson wrote:\n> \n> >>>>> \"mlw\" == mlw <markw@mohawksoft.com> writes:\n> \n> mlw> I asked a while back, is anyone managing this project? It has\n> mlw> scripts that just plain don't work.\n> \n> It works. Not like a charm, but it works. Also, it's a nightmare to setup.\n> \n> --\n> Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just\n> ^^^^^ / /(_)_ __ _ ___ __ selective about who its friends are\n> / / | | '_ \\| | | \\ \\/ / Debian Certified Linux Developer\n> _ /// / /__| | | | | |_| |> < Turbo Fredriksson turbo@bayour.com\n> \\\\\\/ \\____/_|_| |_|\\__,_/_/\\_\\ Gothenburg/Sweden\n> \n> [Hello to all my fans in domestic surveillance] Uzi assassination\n> Noriega Iran Cocaine NORAD Albanian ammonium KGB nitrate security\n> South Africa FBI congress\n> [See http://www.aclu.org/echelonwatch/index.html for more about this]\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Thu, 17 Jan 2002 05:28:51 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: RServ replication" }, { "msg_contents": "Turbo Fredriksson wrote:\n> \n> Quoting mlw <markw@mohawksoft.com>:\n> \n> > Turbo Fredriksson wrote:\n> > >\n> > > >>>>> \"mlw\" == mlw <markw@mohawksoft.com> writes:\n> > >\n> > > mlw> I asked a while back, is anyone managing this project? It has\n> > > mlw> scripts that just plain don't work.\n> > >\n> > > It works. Not like a charm, but it works. Also, it's a nightmare to setup.\n> >\n> > The ApplySnapshot script doesn't work at all. It is a mess.\n> \n> It works, it's just _VERY_ (!!!) picky about the system is correctly setup...\n> \n> I'll send you my 'rServ setup script' (kind'a), and you can see how I do it...\n>\n\nFor instance, (in ApplySnapshot.in) the line:\n\nmy $conn = Pg::connectdb(sinfo); \n\nShould be:\n\nmy $conn = Pg::connectdb($sinfo); \n\nThere are a lot of these errors. The snapshot file parameter is not used\nin all the scripts, the server string is always zero, and so on. It\nreally is a mess.\n\nThe trigger function and the internal stuff works well enough.\n\nI have actually got the \"Replacate\" script working but I need to\nreplicatate to multiple servers. I was contemplating using\n\"PrepareSnapshot\" followed by multiple \"ApllySnapshot\" calls.\n\nI am spending a few hours rewriting \"RServ.pm\" in C++ to make a daemon\nwhich will automatically replicate out to multiple servers. (I can't\nstand perl)\n", "msg_date": "Wed, 16 Jan 2002 15:59:27 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": true, "msg_subject": "Re: RServ replication" } ]
[ { "msg_contents": "The tuple toaster currently fetches toast-table rows using SnapshotAny.\nThis is quite uncool, because it will in fact find *any* row. Including\ndead rows resulting from an aborted (or, in 7.2, still-in-progress)\nVACUUM.\n\nI believe this is the explanation for a problem report I'm currently\nchasing from Joshua Drake:\n\ndigivision2=# select * from change_log;\nERROR: chunk 1 for toast value 3388774 appears multiple times\n\n(there are some thousands of rows with similar problems)\n\nI suggest SnapshotSelf instead. Comments anyone?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 15 Jan 2002 18:46:48 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "\"Command Prompt, Inc.\" <pgsql-hackers@commandprompt.com> writes:\n> Josh Drake here: Although I know that development has pretty much ceased\n> on the 7.1 series. This bug, is potentially very serious for those who\n> have the problem.\n\nWell, based on our experiments last night, recovery is pretty simple:\nvacuum the affected table. So it doesn't qualify as a critical problem\nin my eyes, although surely it's a \"must fix\" for 7.2.\n\n> The last time this came up (that I can find) is in August of 2001, so the\n> bug is not frequent that we are aware of. However, as it appears the fix\n> is simple should we apply a 7.1.3.1 or 7.1.4 that fixes this issue?\n\nI don't think anyone has the energy to put out a 7.1.4. We seem to have\nenough trouble getting 7.2 out the door.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 12:10:52 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "\nJosh Drake here: Although I know that development has pretty much ceased\non the 7.1 series. This bug, is potentially very serious for those who\nhave the problem.\n\nThe last time this came up (that I can find) is in August of 2001, so the\nbug is not frequent that we are aware of. However, as it appears the fix\nis simple should we apply a 7.1.3.1 or 7.1.4 that fixes this issue?\n\n\nJ\n\n\n> On Tue, 15 Jan 2002, Tom Lane wrote:\n\n> The tuple toaster currently fetches toast-table rows using SnapshotAny.\n> This is quite uncool, because it will in fact find *any* row. Including\n> dead rows resulting from an aborted (or, in 7.2, still-in-progress)\n> VACUUM.\n>\n> I believe this is the explanation for a problem report I'm currently\n> chasing from Joshua Drake:\n>\n> digivision2=# select * from change_log;\n> ERROR: chunk 1 for toast value 3388774 appears multiple times\n>\n> (there are some thousands of rows with similar problems)\n>\n> I suggest SnapshotSelf instead. Comments anyone?\n>\n> \t\t\tregards, tom lane\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n>\n\n-- \nby way of pgsql-hackers@commandprompt.com\n\n", "msg_date": "Wed, 16 Jan 2002 09:46:32 -0800 (PST)", "msg_from": "\"Command Prompt, Inc.\" <pgsql-hackers@commandprompt.com>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Tom Lane wrote:\n> The tuple toaster currently fetches toast-table rows using SnapshotAny.\n> This is quite uncool, because it will in fact find *any* row. Including\n> dead rows resulting from an aborted (or, in 7.2, still-in-progress)\n> VACUUM.\n\n Really? So what you're saying means that while vacuum is\n running there's a window where one tuple can exist multiple\n times and just the fact that other backends can see the\n vacuum transaction alive prevents them from showing up? That\n doesn't sound really good to me.\n\n\nJan\n\n>\n> I believe this is the explanation for a problem report I'm currently\n> chasing from Joshua Drake:\n>\n> digivision2=# select * from change_log;\n> ERROR: chunk 1 for toast value 3388774 appears multiple times\n>\n> (there are some thousands of rows with similar problems)\n>\n> I suggest SnapshotSelf instead. Comments anyone?\n>\n> regards, tom lane\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n>\n\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Wed, 16 Jan 2002 13:16:40 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Jan Wieck <janwieck@yahoo.com> writes:\n> Really? So what you're saying means that while vacuum is\n> running there's a window where one tuple can exist multiple\n> times\n\nMoving a tuple in VACUUM isn't fundamentally different from an UPDATE.\nYou need a visibility rule to tell you which version of the tuple to\npay attention to. Right now, TOAST hasn't got one.\n\nPer later discussion, Andreas is right that SnapshotSelf won't do.\nI think we need a new tqual.c routine just for TOAST. (The alternative\nwould be for TOAST to know which snapshot was used to find the main-\ntable tuple, but that doesn't seem workable.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 13:30:30 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " } ]
[ { "msg_contents": "For the next release, I'd like to implement permissions for procedural\nlanguages. It would be one permission called USAGE, which allows the user\nto create a function using that language. I will reuse the aclitem[]\napproach, in the same way as I'm already doing for functions.\n\nThe first consequence is that we could get rid of createlang as the\nprimary means of access control to languages. I would like to install all\nlanguages by default (excluding only those that haven't been included by\n\"configure\"). Would people be afraid if we made the trusted languages\navailable to all users by default? That would really be a lot more\nconvenient.\n\nThe \"trusted\" flag could be done away with. However, the current\nuntrusted languages (pltclu and plperlu) actually use the trusted flag\nboth as an external access control and internally to decide how to behave.\nWe could keep the latter use for now, until perhaps someone invents a\ngeneric language configuration mechanism.\n\nFurthermore, we can conveniently eliminate the problems related to finding\nall the language handlers as shared libraries. Since all languages are\ninstalled by default we can just link the handlers right into the\npostmaster, for which we don't need shared libraries. That should give a\ngreat boost to languages that are currently hard to build, i.e., PL/Perl\nand PL/Python. And the build system would become a lot simpler and more\nportable.\n\nAny comments on these points?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Tue, 15 Jan 2002 22:09:17 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Procedural language permissions and consequences" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n\n> Furthermore, we can conveniently eliminate the problems related to finding\n> all the language handlers as shared libraries. Since all languages are\n> installed by default we can just link the handlers right into the\n> postmaster, for which we don't need shared libraries. That should give a\n> great boost to languages that are currently hard to build, i.e., PL/Perl\n> and PL/Python. And the build system would become a lot simpler and more\n> portable.\n> \n> Any comments on these points?\n\nJust that I imagine it's quite useful, while hacking on a procedural\nlanguage, to be able to restart the postmaster and reload the library,\nrather than relinking and reinstalling the postmaster binary. So\nkeeping the option for PLs in shared libraries is probably a good\nidea, though having the \"standard\" ones compiled in makes some sense.\n\nWouldn't a postmaster statically linked with libperl.a and libpyhon.a\nbe pretty big? Would that cause problems?\n\n-Doug\n-- \nLet us cross over the river, and rest under the shade of the trees.\n --T. J. Jackson, 1863\n", "msg_date": "15 Jan 2002 22:36:57 -0500", "msg_from": "Doug McNaught <doug@wireboard.com>", "msg_from_op": false, "msg_subject": "Re: Procedural language permissions and consequences" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> The first consequence is that we could get rid of createlang as the\n> primary means of access control to languages. I would like to install all\n> languages by default (excluding only those that haven't been included by\n> \"configure\"). Would people be afraid if we made the trusted languages\n> available to all users by default?\n\nThe arguments against this seem pretty thin on review. I would like to\nbe able to remove a language I don't want --- but I have no objection\nto reversing the default.\n\n> Furthermore, we can conveniently eliminate the problems related to finding\n> all the language handlers as shared libraries. Since all languages are\n> installed by default we can just link the handlers right into the\n> postmaster, for which we don't need shared libraries. That should give a\n> great boost to languages that are currently hard to build, i.e., PL/Perl\n> and PL/Python. And the build system would become a lot simpler and more\n> portable.\n\nThis I do *not* like. plpgsql is the single thing keeping us honest\non portability of shlib extensions. If the default and only tested\nbehavior is for statically-linked PL extensions, you can be sure that\ndynamically-linked extensions will be suffering bit rot very soon.\n\nAnd I do not see it as our problem that perl and python make life\nunnecessarily difficult for those who would include them as libraries.\nTcl showed the way years ago; it's past time for those guys to see the\nlight, if they'd like to be adopted more widely.\n\nSee also Doug's points, nearby.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 00:37:46 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Procedural language permissions and consequences " }, { "msg_contents": "[Hi all! Time for an introduction: I'm just a postgresql user with an\ninterest for the theory behind it (cs student), so I've started to read\nhackers a while back. As the most frequent reason for me being annoyed\nabout Linux is the Packaging system I just wanted to throw this in\nhere:]\n\nOn Wed, 2002-01-16 at 04:09, Peter Eisentraut wrote:\n\n> Furthermore, we can conveniently eliminate the problems related to finding\n> all the language handlers as shared libraries. Since all languages are\n> installed by default we can just link the handlers right into the\n> postmaster, for which we don't need shared libraries. That should give a\n> great boost to languages that are currently hard to build, i.e., PL/Perl\n> and PL/Python. And the build system would become a lot simpler and more\n> portable.\n\nA reason against this not addressed by the others: Doing the languages\nas shared libraries opened only at runtime enables for more easy\npackaging - psotgresql core pkg with optional psql-tcl, psql-perl,...\npackages. Linking the libraries in requires packagers to do postgresql,\npostgresql-perl, postgresql-tcl, postgresql-perl+tcl etc. packages.\n\n(I don't know exactly if packagers currently use this possibility. It's\nbeen a while since I last installed postgres)\n\nGreets\n-- vbi\n\n\n", "msg_date": "16 Jan 2002 09:26:18 +0100", "msg_from": "\"Adrian 'Dagurashibanipal' von Bidder\" <avbidder@fortytwo.ch>", "msg_from_op": false, "msg_subject": "Re: Procedural language permissions and consequences" }, { "msg_contents": "Doug McNaught writes:\n\n> Just that I imagine it's quite useful, while hacking on a procedural\n> language, to be able to restart the postmaster and reload the library,\n> rather than relinking and reinstalling the postmaster binary. So\n> keeping the option for PLs in shared libraries is probably a good\n> idea, though having the \"standard\" ones compiled in makes some sense.\n\nPLs work just like user-defined C functions, so the possibility to load\nyour own is not going anywhere.\n\n> Wouldn't a postmaster statically linked with libperl.a and libpyhon.a\n> be pretty big? Would that cause problems?\n\nI wouldn't think so. First, if you link statically you only get the code\nyou actually use (more or less). Second, even if you get most of it, code\nis only loaded into memory if you actually use it. Third, if you don't\nlike it you should provide the appropriate shared libraries and the linker\nshould use them automatically.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 16 Jan 2002 11:23:42 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Re: Procedural language permissions and consequences" }, { "msg_contents": "Tom Lane writes:\n\n> This I do *not* like. plpgsql is the single thing keeping us honest\n> on portability of shlib extensions.\n\nThat is not correct. The regression tests load and use all kinds of other\nshared library extensions.\n\nI certainly don't like the notion you suggest that we should create or\nkeep arbitrary detours in the common usage path just to prove that those\ndetours still work. That is what test suites are for, and I'd be happy to\nprovide more tests if what we currently have doesn't satisfy you\n(including a dummy dynamically loaded language handler?).\n\nI could see a build-time option to determine in which way the PL handlers\nare linked, but I really don't buy this argument.\n\n> And I do not see it as our problem that perl and python make life\n> unnecessarily difficult for those who would include them as libraries.\n\nIn a sense it is our problem, because we are providing features that are\nbased on interfaces that don't officially exist, and we are making life\nmore difficult for users that way. Years of Apache/mod_perl didn't\nconvince anybody to provide a shared libperl, so what makes you think\nsomeone is going to start on our say-so?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 16 Jan 2002 11:41:39 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Re: Procedural language permissions and consequences " } ]
[ { "msg_contents": "hello,\n\n I wanted to know about how good when we use\npostgresql when compared to oracle.Does 10 MB\nPostgresql Software Be Comparable to around 500 MB\nOracle 7.3 Software?Does it supports and provides same\nsort of security,redundancy,robustnessand fine tuning\nof Oracle?.\n\n__________________________________________________\nDo You Yahoo!?\nSend FREE video emails in Yahoo! Mail!\nhttp://promo.yahoo.com/videomail/\n", "msg_date": "Tue, 15 Jan 2002 23:48:54 -0800 (PST)", "msg_from": "erigeneni srinivasulu <srinuchowdary@yahoo.com>", "msg_from_op": true, "msg_subject": "Oracle to Postgres comparision" }, { "msg_contents": "erigeneni srinivasulu wrote:\n> \n> hello,\n> \n> I wanted to know about how good when we use\n> postgresql when compared to oracle.Does 10 MB\n> Postgresql Software Be Comparable to around 500 MB\n> Oracle 7.3 Software?Does it supports and provides same\n> sort of security,redundancy,robustnessand fine tuning\n> of Oracle?.\n\nAt my company we use both Oracle and PostgreSQL. Since My most recent\nexperience is with Oracle 8.1 and PostgreSQL 7.1/7.2 here is what I see:\n\nPostgreSQL is pretty fast. Some of our queries go faster on PostgreSQL on a\ndual PIII system than our Oracle Solaris box.\n\nPostgreSQL is \"easier\" to use, but perhaps less efficient. Oracle's \"Prepare\nstatement\" step is not needed, nor is the bind variables, when using the API\ninterfaces.\n\nPostgreSQL is currently a much simpler system, deploying it is very easy\ncompared to Oracle.\n\nThere are comparitively few tuning parameters for PostgreSQL, few have much to\ndo with performance, fewer still make a great impact. Tuning PostgreSQL is\nreally just sizing it right, and it will work pretty well. Oracle is some\nastounding number of tuning parameters, all of which do something important.\nOracle reqires fine tuning to perform well.\n\nRobustness, I have to give it to PostgreSQL here. I have seen Oracle fail\nseveral times, we have yet to have a PostgreSQL death since 7.1. I am, however,\nmore confident in Oracle's ability to recover from a catestrophic falure\nbecause I have seen it do so.\n\nRedundency, PostgreSQL has none to speak of.\n\nSecurity? I haven't had much experience. Our servers are behind a firewall and\nare used mostly by applications.\n\nI would choose PostgreSQL over oracle in almost every application, except for\none. An application where one or more tables in which rows are constantly being\nupdated or deleted. This is PostgreSQL's weak spot and can cause performance\nissues.\n", "msg_date": "Wed, 16 Jan 2002 07:35:01 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: Oracle to Postgres comparision" } ]
[ { "msg_contents": "Peter, \n\nrunning \"make update-po\" in backend/po/ I'm always getting very short .po\nfiles and the .pot file is also about 7K. It seems to be the fact that\nxgettext gets text only from postgres.c and postmaster.c. What's the\nproblem? Version: beta3 and beta5 (I didn't try beta4 but it's certainly\nthe same).\n\nRegards, Zoltan\n\n-- \n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Wed, 16 Jan 2002 15:09:07 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": true, "msg_subject": "backend/po, make update-po works strange" }, { "msg_contents": "Kovacs Zoltan writes:\n\n> running \"make update-po\" in backend/po/ I'm always getting very short .po\n> files and the .pot file is also about 7K. It seems to be the fact that\n> xgettext gets text only from postgres.c and postmaster.c. What's the\n> problem? Version: beta3 and beta5 (I didn't try beta4 but it's certainly\n> the same).\n\nSince the postgres.pot file has nearly 400 dependency files (all backend\nsource files), it is currently handled in an odd way. Observe this:\n\npeter ~/pgsql/src/backend/po$ make init-po\nfind ./.. -name '*.c' -print >gettext-files\nxgettext --foreign-user -ctranslator -D . -n -kelog:2 -kpostmaster_error -f gettext-files\nmv messages.po postgres.pot\n\nIf the \"find\" somehow messes up you will get an incomplete .pot file.\nAlso note that there are no prerequisites declared for the file\n\"gettext-files\". That is, if it's wrong or outdated you need to remove it\nfirst.\n\nSuggestions for improvement welcome.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 16 Jan 2002 12:40:10 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: backend/po, make update-po works strange" }, { "msg_contents": "On Wed, 16 Jan 2002, Peter Eisentraut wrote:\n\n> Kovacs Zoltan writes:\n> \n> > running \"make update-po\" in backend/po/ I'm always getting very short .po\n> > files and the .pot file is also about 7K. It seems to be the fact that\n> > xgettext gets text only from postgres.c and postmaster.c. What's the\n> > problem? Version: beta3 and beta5 (I didn't try beta4 but it's certainly\n> > the same).\n> \n> Since the postgres.pot file has nearly 400 dependency files (all backend\n> source files), it is currently handled in an odd way. Observe this:\n> \n> peter ~/pgsql/src/backend/po$ make init-po\n> find ./.. -name '*.c' -print >gettext-files\n> xgettext --foreign-user -ctranslator -D . -n -kelog:2 -kpostmaster_error -f gettext-files\n> mv messages.po postgres.pot\n> \n> If the \"find\" somehow messes up you will get an incomplete .pot file.\n> Also note that there are no prerequisites declared for the file\n> \"gettext-files\". That is, if it's wrong or outdated you need to remove it\n> first.\n> \n> Suggestions for improvement welcome.\n\nI'm afraid the problem is that there are too few `gettext(...)'s in the\nwhole code in backend/. The file \"gettext-files\" is quite big: 10106 bytes\nafter each run of \"make\". I got the same result with \"make init-po\" and\n\"make update-po\" (after \"make maintainer-clean\", of course). Perhaps the\noriginal (>250K) .pot file was created with a different method...?\n\nAn example: parser/parse_agg.c contains an elog error at line 111 without\nany gettext call. In opposite, postmaster/postmaster.c at line 290\ncontains an fprintf with a gettext call. Why the difference? Of course,\nthe second string will appear in postgres.pot and the first one\nwon't. File \"gettext-files\" contains both file.\n\nUnfortunately this is only the first day I started to read the docs about\ngettext, sorry...\n\nTIA, Zoltan\n\n-- \n Kov\\'acs, Zolt\\'an\n kovacsz@pc10.radnoti-szeged.sulinet.hu\n http://www.math.u-szeged.hu/~kovzol\n ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz\n\n", "msg_date": "Wed, 16 Jan 2002 21:00:54 +0100 (CET)", "msg_from": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>", "msg_from_op": true, "msg_subject": "Re: backend/po, make update-po works strange" }, { "msg_contents": "Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:\n> An example: parser/parse_agg.c contains an elog error at line 111 without\n> any gettext call. In opposite, postmaster/postmaster.c at line 290\n> contains an fprintf with a gettext call. Why the difference? Of course,\n> the second string will appear in postgres.pot and the first one\n> won't. File \"gettext-files\" contains both file.\n\nThe elog() strings are supposed to be picked up without any additional\nmarking. Sounds like you are using the wrong procedure for extracting\nthe strings. But I dunno what the right procedure is ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 15:18:48 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: backend/po, make update-po works strange " }, { "msg_contents": "Kovacs Zoltan writes:\n\n> An example: parser/parse_agg.c contains an elog error at line 111 without\n> any gettext call. In opposite, postmaster/postmaster.c at line 290\n> contains an fprintf with a gettext call. Why the difference? Of course,\n> the second string will appear in postgres.pot and the first one\n> won't. File \"gettext-files\" contains both file.\n\nAh, you need to have GNU gettext 0.10.36 or later.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 16 Jan 2002 16:01:35 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: backend/po, make update-po works strange" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Also note that there are no prerequisites declared for the file\n> \"gettext-files\". That is, if it's wrong or outdated you need to remove it\n> first.\n\n> Suggestions for improvement welcome.\n\nSeems like it would be somewhat better if a plain \"make clean\" removes\ngettext-files, not only maintainer-clean. It's not like anyone hasn't\ngot \"find\", or even that \"find\" takes unreasonably long ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 16:30:54 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: backend/po, make update-po works strange " } ]
[ { "msg_contents": "\n> The tuple toaster currently fetches toast-table rows using SnapshotAny.\n> This is quite uncool, because it will in fact find *any* row.\n\nWell, doesn't it need to find *any* row, since the accesses to heap and toast\nare not \"atomic\" (not interlocked) ?\n\n> Including dead rows resulting from an aborted\n\nBut then also the heap tuple is aborted, and thus a normal select will not\nselect that toast anyway.\n\n> (or, in 7.2, still-in-progress)\n> VACUUM.\n\nI thought new vacuum did not move tuples ? Why should it then produce \ntwo rows ? And VACUUM FULL locks the table so ...\n\nI think SnapshotSelf could have concurrency problems (not see a toast\nthat someone else committed between our heap read and toast read)\nIIRC, at the time at least SnapshotAny was chosen on purpose.\n\nMight it be a problem, that VACUUM sets xids to FrozenXid, and we always\nconsider that one Valid, even if that vacuum is still in progress ? \n\nI can only see a problem with a partway through vacuum full, that aborted.\n\nAndreas\n\nPS: short desc between Any and Self, anybody ?\n", "msg_date": "Wed, 16 Jan 2002 18:24:53 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n>> The tuple toaster currently fetches toast-table rows using SnapshotAny.\n>> This is quite uncool, because it will in fact find *any* row.\n\n> Well, doesn't it need to find *any* row, since the accesses to heap and toast\n> are not \"atomic\" (not interlocked) ?\n\nNo; it needs to *not* find dead rows resulting from a failed vacuum.\nYou are right that for the most part TOAST relies on time qualification\nof the main-table row, and no doubt that was why Jan thought he could\ncode it like this; but vacuuming the TOAST table is not an operation\nthat affects the main table.\n\n>> Including dead rows resulting from an aborted\n\n> But then also the heap tuple is aborted, and thus a normal select will not\n> select that toast anyway.\n\nWrong; see above. We are talking about reshuffling rows in the TOAST\ntable that belong (presumably) to a live row in the main table. During\nthe VACUUM there will be more than one copy of such rows.\n\n>> (or, in 7.2, still-in-progress)\n>> VACUUM.\n\n> I thought new vacuum did not move tuples ? Why should it then produce \n> two rows ? And VACUUM FULL locks the table so ...\n\nYou're right, lazy VACUUM doesn't create this issue. My mistake.\nBut VACUUM FULL does.\n\n> I can only see a problem with a partway through vacuum full, that aborted.\n\nExactly.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 12:29:45 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " } ]
[ { "msg_contents": "\n> You're right, lazy VACUUM doesn't create this issue. My mistake.\n> But VACUUM FULL does.\n> \n> > I can only see a problem with a partway through vacuum \n> full, that aborted.\n> \n> Exactly.\n\nCan you try give me a hint, why an aborted VACUUM FULL will not allways be \na problem (also for other operations) until you run another VACUUM FULL\nthat succeeds ?\n\nHow do we know, that a (newly) FrozenXid tuple does not still have \na (visible) duplicate ?\n\nAndreas\n", "msg_date": "Wed, 16 Jan 2002 18:40:25 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> Can you try give me a hint, why an aborted VACUUM FULL will not allways be \n> a problem (also for other operations) until you run another VACUUM FULL\n> that succeeds ?\n\nBecause noplace else uses SnapshotAny, basically. The only really\nlegitimate use I can see for it is in Tatsuo's contrib/pgstattuple\nhack: that wants to count both visible and invisible tuples.\n\n> How do we know, that a (newly) FrozenXid tuple does not still have \n> a (visible) duplicate ?\n\nIt's *not* visible, if you are applying any visibility checks whatever.\nBut SnapshotAny bypasses all visibility checking.\n\nI forgot to answer your question about what these mean. See \nsrc/backend/utils/time/tqual.c for the gory details, but if you\nare willing to accept the summary comments in that file:\n\nAny\t\tNo visibility check whatever\n\nSelf\t\tOther committed xacts + effects of this xact up to\n\t\t*and including* current command\n\nNow\t\tOther committed xacts + effects of this xact up to\n\t\t*but not including* current command\n\nDirty\t\tlike Self, but can see effects of other in-progress\n\t\txacts too\n\nSnapshot\tlike Now, but specified other xacts are considered\n\t\tuncommitted even if they've actually committed by now\n\nThere are also special visibility rules for Update and Vacuum, which\nare not really different from the normal rules, they just return more\ninformation than \"visible\" or \"not visible\". (Dirty returns some\nside information too.)\n\nHmm. Now that I look at it, Self probably isn't quite right either;\nif we are reading a main-table tuple that's committed dead but is\nstill visible according to our snapshot, we need to be able to see\nits toast tuples too; but they're committed dead as well. Sigh.\nI think we need a special visibility rule for TOAST, that only\nchecks for HEAP_MOVED_IN/HEAP_MOVED_OFF (the bits that take care\nof VACUUM moves).\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 13:06:01 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "\nI have added more comments to tqual.c to the stuff Tom just added. I\nadded visibility items to the top of each function comment.\n\n---------------------------------------------------------------------------\n\nTom Lane wrote:\n> \"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> > Can you try give me a hint, why an aborted VACUUM FULL will not allways be \n> > a problem (also for other operations) until you run another VACUUM FULL\n> > that succeeds ?\n> \n> Because noplace else uses SnapshotAny, basically. The only really\n> legitimate use I can see for it is in Tatsuo's contrib/pgstattuple\n> hack: that wants to count both visible and invisible tuples.\n> \n> > How do we know, that a (newly) FrozenXid tuple does not still have \n> > a (visible) duplicate ?\n> \n> It's *not* visible, if you are applying any visibility checks whatever.\n> But SnapshotAny bypasses all visibility checking.\n> \n> I forgot to answer your question about what these mean. See \n> src/backend/utils/time/tqual.c for the gory details, but if you\n> are willing to accept the summary comments in that file:\n> \n> Any\t\tNo visibility check whatever\n> \n> Self\t\tOther committed xacts + effects of this xact up to\n> \t\t*and including* current command\n> \n> Now\t\tOther committed xacts + effects of this xact up to\n> \t\t*but not including* current command\n> \n> Dirty\t\tlike Self, but can see effects of other in-progress\n> \t\txacts too\n> \n> Snapshot\tlike Now, but specified other xacts are considered\n> \t\tuncommitted even if they've actually committed by now\n> \n> There are also special visibility rules for Update and Vacuum, which\n> are not really different from the normal rules, they just return more\n> information than \"visible\" or \"not visible\". (Dirty returns some\n> side information too.)\n> \n> Hmm. Now that I look at it, Self probably isn't quite right either;\n> if we are reading a main-table tuple that's committed dead but is\n> still visible according to our snapshot, we need to be able to see\n> its toast tuples too; but they're committed dead as well. Sigh.\n> I think we need a special visibility rule for TOAST, that only\n> checks for HEAP_MOVED_IN/HEAP_MOVED_OFF (the bits that take care\n> of VACUUM moves).\n> \n> Comments?\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 16 Jan 2002 18:10:06 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" } ]
[ { "msg_contents": "select now() + cast('71 minutes' as interval) as case1\n , cast('71 minutes' as interval) + now() as case2\n , now() + cast('5 minutes' as interval) as case3\n , cast('5 minutes' as interval) + now() as case4\n , now();\n\n\nThe above works as expected in 7.1, but in 7.2 case1 and case2 have \ndifferent values. Appears hours to seconds are ignored if it's \ninterval + timestamp rather than timestamp + interval.\n", "msg_date": "Wed, 16 Jan 2002 14:26:51 -0500", "msg_from": "rbt@barchord.com", "msg_from_op": true, "msg_subject": "Error in 7.2" }, { "msg_contents": "rbt@barchord.com writes:\n> select now() + cast('71 minutes' as interval) as case1\n> , cast('71 minutes' as interval) + now() as case2\n> , now() + cast('5 minutes' as interval) as case3\n> , cast('5 minutes' as interval) + now() as case4\n> , now();\n\n> The above works as expected in 7.1, but in 7.2 case1 and case2 have \n> different values.\n\nNo, it doesn't behave the way I'd expect in 7.1, either:\n\ntest71=# select version();\n version\n------------------------------------------------------------------\n PostgreSQL 7.1.3 on hppa2.0-hp-hpux10.20, compiled by GCC 2.95.3\n(1 row)\n\ntest71=# select now() + cast('71 minutes' as interval) as case1;\n case1\n------------------------\n 2002-01-16 16:44:58-05\n(1 row)\n\ntest71=# select cast('71 minutes' as interval) + now() as case2;\n case2\n----------\n 16:45:06\n(1 row)\n\nThe operator being selected in the second case is interval_pl_time;\napparently we don't have interval + timestamp, and that's as close\nas 7.1 can find. Of course the result of now() is first converted\nto time.\n\nIn current sources I get\n\nregression=# select version();\n version\n---------------------------------------------------------------\n PostgreSQL 7.2b5 on hppa-hp-hpux10.20, compiled by GCC 2.95.3\n(1 row)\n\nregression=# select now() + cast('71 minutes' as interval) as case1;\n case1\n------------------------------\n 2002-01-16 16:46:45.37056-05\n(1 row)\n\nregression=# select cast('71 minutes' as interval) + now() as case2;\n case2\n---------------------\n 2002-01-16 01:11:00\n(1 row)\n\nThe operator being selected here is timedate_pl, which seems a peculiar\nchoice also. (now() is coerced to date, natch.) I'd say this is\nmarginally better than 7.1's choice, but why the change in behavior?\n\nOf course the real problem is the lack of specific interval + timestamp\naddition operators. I don't think we should hold up 7.2 release (and\nforce another initdb) to fix this, considering that 7.1 wasn't any\nbetter. Put it on TODO for 7.3, instead.\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 15:44:36 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Error in 7.2 " }, { "msg_contents": "heh.. Your right. With the 7.1 results I didn't notice the date was\nmissing.\n--\nRod Taylor\n\nThis message represents the official view of the voices in my head\n\n----- Original Message -----\nFrom: \"Tom Lane\" <tgl@sss.pgh.pa.us>\nTo: <rbt@barchord.com>\nCc: <pgsql-hackers@postgresql.org>; \"Thomas Lockhart\"\n<lockhart@fourpalms.org>\nSent: Wednesday, January 16, 2002 3:44 PM\nSubject: Re: [HACKERS] Error in 7.2\n\n\n> rbt@barchord.com writes:\n> > select now() + cast('71 minutes' as interval) as case1\n> > , cast('71 minutes' as interval) + now() as case2\n> > , now() + cast('5 minutes' as interval) as case3\n> > , cast('5 minutes' as interval) + now() as case4\n> > , now();\n>\n> > The above works as expected in 7.1, but in 7.2 case1 and case2\nhave\n> > different values.\n>\n> No, it doesn't behave the way I'd expect in 7.1, either:\n>\n> test71=# select version();\n> version\n> ------------------------------------------------------------------\n> PostgreSQL 7.1.3 on hppa2.0-hp-hpux10.20, compiled by GCC 2.95.3\n> (1 row)\n>\n> test71=# select now() + cast('71 minutes' as interval) as case1;\n> case1\n> ------------------------\n> 2002-01-16 16:44:58-05\n> (1 row)\n>\n> test71=# select cast('71 minutes' as interval) + now() as case2;\n> case2\n> ----------\n> 16:45:06\n> (1 row)\n>\n> The operator being selected in the second case is interval_pl_time;\n> apparently we don't have interval + timestamp, and that's as close\n> as 7.1 can find. Of course the result of now() is first converted\n> to time.\n>\n> In current sources I get\n>\n> regression=# select version();\n> version\n> ---------------------------------------------------------------\n> PostgreSQL 7.2b5 on hppa-hp-hpux10.20, compiled by GCC 2.95.3\n> (1 row)\n>\n> regression=# select now() + cast('71 minutes' as interval) as case1;\n> case1\n> ------------------------------\n> 2002-01-16 16:46:45.37056-05\n> (1 row)\n>\n> regression=# select cast('71 minutes' as interval) + now() as\ncase2;\n> case2\n> ---------------------\n> 2002-01-16 01:11:00\n> (1 row)\n>\n> The operator being selected here is timedate_pl, which seems a\npeculiar\n> choice also. (now() is coerced to date, natch.) I'd say this is\n> marginally better than 7.1's choice, but why the change in behavior?\n>\n> Of course the real problem is the lack of specific interval +\ntimestamp\n> addition operators. I don't think we should hold up 7.2 release\n(and\n> force another initdb) to fix this, considering that 7.1 wasn't any\n> better. Put it on TODO for 7.3, instead.\n>\n> Comments?\n>\n> regards, tom lane\n>\n\n", "msg_date": "Wed, 16 Jan 2002 16:12:32 -0500", "msg_from": "\"Rod Taylor\" <rbt@barchord.com>", "msg_from_op": false, "msg_subject": "Re: Error in 7.2 " } ]
[ { "msg_contents": "> -----Original Message-----\n> From: Daniel Kalchev [mailto:daniel@digsys.bg]\n> \n> Well, we already played around this by first creating new table \n> ordered by \n> random().\n\nThis seem to have little meaing if there's only one ipdate value\nwhich satisfies the WHERE clause and the index order matches\nthe physical order of heap tuples.\n\nI tried a very simple test case.\nI have a table which has 100000 tuples and made a index on a\ncolumn whose value is always ''(i.e the same value).\nDifferent from my expectation CREATE INDEX doesn't seem to\npreserve the physical(input) order. However it seems sufficiently\nordered and probably we could expect the scan using the index\nis as fast as sequential scan.\n\nThe result(distribution of corrsponding CTIDs) is as follows.\n\n(3448, 17)\n(3542, 26) -- (5172, 24) consecutive 94539 tuples \n(3542, 25) -- (3448, 18) consecutive 5460 tuples\n\nregards,\nHiroshi Inoue\n", "msg_date": "Thu, 17 Jan 2002 04:55:46 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": true, "msg_subject": "Re: again on index usage " } ]
[ { "msg_contents": "Hey, I decided to download and run beta5 through a few paces, and just ran \ninto something that I wouldn't think it good, but maybe it's expected.\n\nI loaded a decent size database that we support. From within psql, I \nperformed a \"select * from quesresp\" which has 4.6 million rows. After doing \nthat, psql just started comsuming more and more memory until both my RAM, and \nall my swap were full. I killed the query before I had any big problems. \n>From top I could see that psql was using close to 500M.\n\nIs this expected behaviour?\n\nAdditional possibly relevant information.\n\ntestlang=# \\d quesresp\n Table \"quesresp\"\n Column | Type | Modifiers\n---------------+------------------------+---------------------------------------------------\n id | integer | not null default \nnextval('quesresp_id_seq'::text)\n applicationid | integer | not null\n questionid | integer | not null\n answerid | integer | not null\n freeformresp | character varying(255) |\n skillorder | integer |\nUnique keys: quesresp_app_ques_ans_sk_ndx,\n quesresp_pkey\n\ntestlang=# select version();\n version\n-------------------------------------------------------------\n PostgreSQL 7.2b5 on i686-pc-linux-gnu, compiled by GCC 2.96\n(1 row)\n\nStock Redhat 7.2 with all patches installed (2.4.9 kernel etc...)\n\nThanks much,\n\nMatt O'Connor\n", "msg_date": "Wed, 16 Jan 2002 16:26:25 -0600", "msg_from": "\"Matthew T. O'Connor\" <matthew@zeut.net>", "msg_from_op": true, "msg_subject": "question with beta5" }, { "msg_contents": "\"Matthew T. O'Connor\" <matthew@zeut.net> writes:\n> I loaded a decent size database that we support. From within psql, I\n> performed a \"select * from quesresp\" which has 4.6 million rows.\n> After doing that, psql just started comsuming more and more memory\n> until both my RAM, and all my swap were full.\n\nIt's always done that...\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 16 Jan 2002 18:03:59 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: question with beta5 " } ]
[ { "msg_contents": "You said ignore this one, but I would like to ask a question :)\n\nTrafic on news.postgresql.org is really low lately...\nI used see Tom's posts everywhere, but I don't see his post\nanyhwere now.\n\nIs news server having problems?\nShould I actually read mail list?\n\nThank you.\n\n-- \nYasuo Ohgaki\n\n", "msg_date": "Thu, 17 Jan 2002 09:46:17 +0900", "msg_from": "Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>", "msg_from_op": true, "msg_subject": "Re: Ignore this one ..." } ]
[ { "msg_contents": "Hi\nI am using PostgreSQl for the first time.I need to understand the source\ncode of PostGreSql inorder to extend it.\nI read your poston the net regarding PostGresql. Can u let me know how I\nshould go about studying the source code of Postgresql? Is there is a good\nbook or docs or website available for this purpose?\nPlease let me know\n\nthanks\nd'laila\n\n\n", "msg_date": "Wed, 16 Jan 2002 20:28:14 -0600", "msg_from": "\"D'laila Pereira\" <dpereira@students.uiuc.edu>", "msg_from_op": true, "msg_subject": "help regarding Postgresql?" }, { "msg_contents": "D'laila,\n\nIf you haven't seen it already the developers FAQ might be a good place to\nstart.\n\nhttp://www.ca.postgresql.org/docs/faq-dev-english.html\n\nregards\n\nsteve boyle\n\n\n\"D'laila Pereira\" <dpereira@students.uiuc.edu> wrote in message\nnews:Pine.GSO.4.31.0201162027490.8962-100000@ux11.cso.uiuc.edu...\n> Hi\n> I am using PostgreSQl for the first time.I need to understand the source\n> code of PostGreSql inorder to extend it.\n> I read your poston the net regarding PostGresql. Can u let me know how I\n> should go about studying the source code of Postgresql? Is there is a good\n> book or docs or website available for this purpose?\n> Please let me know\n>\n> thanks\n> d'laila\n>\n>\n\n\n", "msg_date": "Fri, 18 Jan 2002 14:59:20 -0000", "msg_from": "\"steve boyle\" <boylesa@dial.pipex.com>", "msg_from_op": false, "msg_subject": "Re: help regarding Postgresql?" } ]
[ { "msg_contents": "Are we prepared for RC1? Can we set a day for it? Friday?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 01:15:59 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "RC1 date?" }, { "msg_contents": "\nFriday was the last date that was decided on, pending any problems with\nbeta5 ... *nod*\n\nOn Thu, 17 Jan 2002, Bruce Momjian wrote:\n\n> Are we prepared for RC1? Can we set a day for it? Friday?\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (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> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n>\n\n", "msg_date": "Thu, 17 Jan 2002 08:59:16 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: RC1 date?" }, { "msg_contents": "Friday's good time for testing.. you can essentialy junk your weekend and \nspend at least two intimate and rewarding days with your 102+ key lover. <grin>\n\nDaniel\n\n>>>\"Marc G. Fournier\" said:\n > \n > Friday was the last date that was decided on, pending any problems with\n > beta5 ... *nod*\n > \n > On Thu, 17 Jan 2002, Bruce Momjian wrote:\n > \n > > Are we prepared for RC1? Can we set a day for it? Friday?\n > >\n > > --\n > > Bruce Momjian | http://candle.pha.pa.us\n > > pgman@candle.pha.pa.us | (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 > > ---------------------------(end of broadcast)---------------------------\n > > TIP 3: if posting/reading through Usenet, please send an appropriate\n > > subscribe-nomail command to majordomo@postgresql.org so that your\n > > message can get through to the mailing list cleanly\n > >\n > \n > \n > ---------------------------(end of broadcast)---------------------------\n > TIP 4: Don't 'kill -9' the postmaster\n\n\n", "msg_date": "Thu, 17 Jan 2002 15:16:34 +0200", "msg_from": "Daniel Kalchev <daniel@digsys.bg>", "msg_from_op": false, "msg_subject": "Re: RC1 date? " } ]
[ { "msg_contents": "Dear community, dear friends,\n\nI know it is feature freeze, so forgive me for this (ancien) question : would \nit possible to add CREATE OR REPLACE VIEW and CREATE OR REPLACE TRIGGER in \ncurrent PostgreSQL 7.2 release? Otherwise, it will take another year before \nthese long-needed features are added.\n\nIs this really a difficult hack? \n\nIf not possible, we will be obliged to hack pgAdmin II to add virtual create \n/ drop statements. And hack it back when the features are added natively to \nPostgreSQL. This is not the way we should do it.\n\nPlease help :)\n\nThere can be up to 4000 download of pgAdmin a month. If pgAdmin II were \npublished on public download sites, possibly bundled with a Cygwin PostgreSQL \ninstaller, the number could easily reach 10.000 a month. Maybe more.\n\nSo please consider CREATE OR REPLACE VIEW / TRIGGER are important features \nfor 7.2, not 7.3.\n\nBest regards,\nJean-Michel POURE\n", "msg_date": "Thu, 17 Jan 2002 10:06:41 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": true, "msg_subject": "CREATE OR REPLACE VIEW / TRIGGER" }, { "msg_contents": "Jean-Michel POURE wrote:\n[Charset iso-8859-15 unsupported, filtering to ASCII...]\n> Dear community, dear friends,\n>\n> I know it is feature freeze, so forgive me for this (ancien) question : would\n> it possible to add CREATE OR REPLACE VIEW and CREATE OR REPLACE TRIGGER in\n> current PostgreSQL 7.2 release? Otherwise, it will take another year before\n> these long-needed features are added.\n>\n> Is this really a difficult hack?\n\n If difficult or not doesn't matter. It is not the way we do\n development in the PostgreSQL team.\n\n We are right now in BETA5 and Release Candidate 1 is\n scheduled for tomorrow. Plus v7.2 is overdue, long waited\n for.\n\n No chance, sorry. v7.2 will go out the door without these\n features. But you are more than welcome to provide patches\n for v7.3 that implement them.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 17 Jan 2002 10:04:26 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] CREATE OR REPLACE VIEW / TRIGGER" }, { "msg_contents": "Jean-Michel POURE <jm.poure@freesurf.fr> writes:\n> I know it is feature freeze, so forgive me for this (ancien) question : would\n> it possible to add CREATE OR REPLACE VIEW and CREATE OR REPLACE TRIGGER in \n> current PostgreSQL 7.2 release?\n\nNo. RC1 is *tomorrow*, and we're not pushing it back to add features.\n\n> Otherwise, it will take another year before \n> these long-needed features are added.\n\nI'd like to ask people not to adopt the mindset that PG releases are a\nyear apart. I know it's been that way for the last two, but the project\ngoals are still to have a release every four-to-six months. If we go\ninto the development cycle with the notion that the next release is a\nyear out, it will be a self-fulfilling prophecy.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 10:33:24 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [ADMIN] CREATE OR REPLACE VIEW / TRIGGER " } ]
[ { "msg_contents": "I was reassigned (temporarily thank you very much! :) to the test\ndepartment at work to do some performance tests on our PostgreSQL\n(v 7.1.3) database.\n\nI've seen quite a number of test/benchmark programs on the 'Net, but\nnone that fits the purpose...\n\nWe all know that 'there is no problem with speed on a PostgreSQL database',\nbut still the other developers at work is pointing fingers at PostgreSQL...\n\nNow, _I_ say that it have something to do with the _USE_ of PostgreSQL, not\nthe actual database per see.\n\nThe question is, how do I test _OUR_ database? That is, with our database\nschema, function etc in a 'compliant' way? Some people keep talking about\nmeasuring the CPU load, but I keep telling them that that's moot information!\nThe values is basicly useless (for a number of reasons).\n\n\nOur setup is based on three components, called 'The VXIS', 'The VSUS' and\nthe database. It have to do with SMS (I can't tell you much more than that).\n\nAnyway, the SMS is arriving from the cell phone to the VSUS which stores the\nSMS in the database. The VXIS is retrieving the SMS and delivers it to the\nSMS Central.\n\nThere can be a number of VXIS' and a number of VSUS', depending on requested\nperformance. Now, we have tested to send SMS'es between two VXIS' and we\nare getting around 7000 SMS/sec. That's by _NOT_ going through the database.\nBut when we add the database, it drops down to 100 SMS/sec one way, and 40\nSMS/sec the other way!!\n\nWhat we now have to do is figuring out _EXACTLY_ where the problem lies. Is\nit because of stupid/slow queries? PostgreSQL setup/compiled wrong? Etc, etc.\nI keep telling everyone that it CAN'T be a problem in PostgreSQL, but have to\nbe somewhere else. But my bosses don't care, they need number (darn PHB's ! :)\n\n\nBut I need a 'correct number' to compare the different tests - Did the change\ndo any improvement?\n\nHow do I arrive at this 'correct number'?\n\nAs you can hear, I'm no competent tester, I'm a developer. I usually don't have\nto test my product that much. I always leave that to the user :) Could anyone \nshare there wisdom, and give me some pointers?\n\n-- \n Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just \n ^^^^^ / /(_)_ __ _ ___ __ selective about who its friends are \n / / | | '_ \\| | | \\ \\/ / Debian Certified Linux Developer \n _ /// / /__| | | | | |_| |> < Turbo Fredriksson turbo@bayour.com\n \\\\\\/ \\____/_|_| |_|\\__,_/_/\\_\\ Gothenburg/Sweden\n\ngenetic smuggle NSA FSF Peking cryptographic Cuba fissionable Rule\nPsix Qaddafi CIA Serbian World Trade Center Clinton colonel\n[See http://www.aclu.org/echelonwatch/index.html for more about this]\n", "msg_date": "17 Jan 2002 13:25:07 +0100", "msg_from": "Turbo Fredriksson <turbo@bayour.com>", "msg_from_op": true, "msg_subject": "Performance" } ]
[ { "msg_contents": "\n> > How do we know, that a (newly) FrozenXid tuple does not still have \n> > a (visible) duplicate ?\n> \n> It's *not* visible, if you are applying any visibility checks whatever.\n> But SnapshotAny bypasses all visibility checking.\n\nI am concerned about the case where VACUUM FULL:\n1. inserts heap tuple to new location using FrozenXid\n2. updates original heap tuples's xmax\n\nWhat if we crash/abort between step 1 and 2 but we used FrozenXid for 1.\nDon't know if we actually do this, but imho we are only allowed \nto use FrozenXid for an inplace vacuum operation.\n\nAndreas\n", "msg_date": "Thu, 17 Jan 2002 14:03:35 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> I am concerned about the case where VACUUM FULL:\n> 1. inserts heap tuple to new location using FrozenXid\n> 2. updates original heap tuples's xmax\n\nIt doesn't matter whether it's FrozenXid or not. The tuple is not\nvisible if it's got the wrong setting of HEAP_MOVED_OFF/IN.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 09:08:03 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " } ]
[ { "msg_contents": "Hi,\nwhen I'm trying to access database from the remote host using jdbc I'll\n\nget following error message:\n\n----------------------------------\nPostgreSQL basic test v6.3 rev 1\n\nConnecting to Database URL = jdbc:postgresql://polaris:5432/coda_lg_db\nException caught.\nSomething unusual has occured to cause the driver to fail. Please report\n\nthis exception: Exception: java.sql.SQLException: No pg_hba.conf entry\nfor host 129.57.33.170, user coda, database coda_lg_db\nStack Trace:\n\njava.sql.SQLException: No pg_hba.conf entry for host 129.57.33.170, user\n\ncoda, database coda_lg_db\n at org.postgresql.Connection.openConnection(Unknown Source)\n at org.postgresql.Driver.connect(Unknown Source)\n at java.sql.DriverManager.getConnection(DriverManager.java:517)\n at java.sql.DriverManager.getConnection(DriverManager.java:177)\n at basic.<init>(basic.java:37)\n at basic.main(basic.java:197)\nEnd of Stack Trace\n\n---------------------------\n\nPlease help me to solve this problem.\nThanking you in advance ,\nvardan\n\n\n\n\n", "msg_date": "Thu, 17 Jan 2002 08:04:26 -0500", "msg_from": "Vardan Gyurjyan <gurjyan@jlab.org>", "msg_from_op": true, "msg_subject": "jdbc:postgresql problem" }, { "msg_contents": "On Thu, Jan 17, 2002 at 08:04:26AM -0500, Vardan Gyurjyan wrote:\n> java.sql.SQLException: No pg_hba.conf entry for host 129.57.33.170, user\n\npg_hba.conf is the configuration file for PostgreSQL's Host Based\nAccess control. The message means, that you're not allowed to access\nPostgreSQL from the host you're using. Make the amendments needed in\npg_hba.conf. The comments in pg_hba.conf should help you.\n\nPS.: Actually I think your question should go to the pgsql-general list,\nnot to pgsql-hackers. \n\n-- \nHolger Krug\nhkrug@rationalizer.com\n", "msg_date": "Mon, 21 Jan 2002 08:32:59 +0100", "msg_from": "Holger Krug <hkrug@rationalizer.com>", "msg_from_op": false, "msg_subject": "Re: jdbc:postgresql problem" } ]
[ { "msg_contents": "\n> > I am concerned about the case where VACUUM FULL:\n> > 1. inserts heap tuple to new location using FrozenXid\n> > 2. updates original heap tuples's xmax\n> \n> It doesn't matter whether it's FrozenXid or not. The tuple is not\n> visible if it's got the wrong setting of HEAP_MOVED_OFF/IN.\n\nBut the FrozenXid tuple has HEAP_MOVED_IN and the original has\nnot yet been altered to HEAP_MOVED_OFF because of abort.\nIs the HEAP_MOVED_IN tuple not visible ?\n\nAndreas\n", "msg_date": "Thu, 17 Jan 2002 15:12:52 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n>> It doesn't matter whether it's FrozenXid or not. The tuple is not\n>> visible if it's got the wrong setting of HEAP_MOVED_OFF/IN.\n\n> But the FrozenXid tuple has HEAP_MOVED_IN and the original has\n> not yet been altered to HEAP_MOVED_OFF because of abort.\n> Is the HEAP_MOVED_IN tuple not visible ?\n\nRight. Actually it doesn't matter whether the old tuple has\nHEAP_MOVED_OFF or not; it's still visible *until* the VACUUM commits.\nThe commit atomically switches us from the state where the unmoved\ntuples are good to the state where the moved ones are good.\n\nThis is all exactly the same whether FrozenXid is involved or not.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 09:22:36 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "Tom Lane wrote:\n> \"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> >> It doesn't matter whether it's FrozenXid or not. The tuple is not\n> >> visible if it's got the wrong setting of HEAP_MOVED_OFF/IN.\n>\n> > But the FrozenXid tuple has HEAP_MOVED_IN and the original has\n> > not yet been altered to HEAP_MOVED_OFF because of abort.\n> > Is the HEAP_MOVED_IN tuple not visible ?\n>\n> Right. Actually it doesn't matter whether the old tuple has\n> HEAP_MOVED_OFF or not; it's still visible *until* the VACUUM commits.\n> The commit atomically switches us from the state where the unmoved\n> tuples are good to the state where the moved ones are good.\n>\n> This is all exactly the same whether FrozenXid is involved or not.\n\n Originally I added SnapshotAny only to solve the problem that\n the lookup of the toast table happens independant from the\n access to the main tuple, and that in fact the main tuple\n could have been deleted by the own transaction in between.\n\n Would changing SnapshotAny to honor HEAP_MOVED_* fix the\n problem? If nothing else by now uses this snapshot, it could\n be done in place.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 17 Jan 2002 13:11:24 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Jan Wieck <janwieck@yahoo.com> writes:\n> Originally I added SnapshotAny only to solve the problem that\n> the lookup of the toast table happens independant from the\n> access to the main tuple, and that in fact the main tuple\n> could have been deleted by the own transaction in between.\n\n> Would changing SnapshotAny to honor HEAP_MOVED_* fix the\n> problem? If nothing else by now uses this snapshot, it could\n> be done in place.\n\nWhat I've done is add an additional snapshot class SnapshotToast\nthat behaves that way. There are a couple other uses of SnapshotAny\nthat I didn't think I wanted to mess with.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 16:47:28 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "Tom Lane wrote:\n> \n> Jan Wieck <janwieck@yahoo.com> writes:\n> > Originally I added SnapshotAny only to solve the problem that\n> > the lookup of the toast table happens independant from the\n> > access to the main tuple, and that in fact the main tuple\n> > could have been deleted by the own transaction in between.\n> \n> > Would changing SnapshotAny to honor HEAP_MOVED_* fix the\n> > problem? If nothing else by now uses this snapshot, it could\n> > be done in place.\n> \n> What I've done is add an additional snapshot class SnapshotToast\n> that behaves that way. There are a couple other uses of SnapshotAny\n> that I didn't think I wanted to mess with.\n\nAFAIR SnapshotAny was introduced for Foreign Key stuff.\nSnapshotToast doesn't seem a proper solution to me but\n7.2 should be released ASAP anyway.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 18 Jan 2002 10:55:44 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> SnapshotToast doesn't seem a proper solution to me\n\nDo you have a better idea in mind?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 21:07:55 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "Tom Lane wrote:\n> \n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > SnapshotToast doesn't seem a proper solution to me\n> \n> Do you have a better idea in mind?\n\nThe same snapshot for both the main and the toast table\nseems better though I don't know how it's difficult to\nchange. For example is it possible to update a toast\nchunk partially using SnapshotToast ?\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 18 Jan 2002 11:27:23 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> The same snapshot for both the main and the toast table\n> seems better though I don't know how it's difficult to\n> change.\n\nThat would be cleaner but I don't see any way to do it. The toasted\nvalue gets passed all over the system, potentially, before someone asks\nto detoast it. At that point you really don't have a good way to know\nwhich snapshot was used to fetch the main-table row.\n\n> For example is it possible to update a toast\n> chunk partially using SnapshotToast ?\n\nAs things stand (with either SnapshotToast or the old SnapshotAny way)\nit is never possible to update an individual toast value, either\npartially or wholly. All you can do is lay down a new toast value (with\na new identifying OID) and then delete the old one.\n\nBut I'm not sure that this is wrong, or fixable. Trying to update part\nof a toasted value is very much like wanting to update part of an\nexisting row in-place, which we cannot possibly do. We have to lay down\na whole new row whenever any part of it is updated.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 22:12:28 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "Tom Lane wrote:\n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > The same snapshot for both the main and the toast table\n> > seems better though I don't know how it's difficult to\n> > change.\n>\n> That would be cleaner but I don't see any way to do it. The toasted\n> value gets passed all over the system, potentially, before someone asks\n> to detoast it. At that point you really don't have a good way to know\n> which snapshot was used to fetch the main-table row.\n\n That's IMHO not the point. The design of toast is that if a\n main heap tuple points to a toast id, and the heap tuple at\n scan time was visible, then no matter what, the value is\n readable. Regardless of any isolation level or command\n counter or whatnot. That's achieved by allways assigning a\n new toast ID on change of a toasted value. So if the columns\n value changed, the old and new rows point to different toast\n values not by visibility but by toast id. If it did not\n change, they point to the same.\n\n The problem arises only because SnapshotAny is *too* blind\n and ignores the special vacuum HEAP_MOVED_* states, so that a\n scan after a crashed vacuum full, that left yet unborn moved-\n in tuples in the toast table, can see them.\n\n Since the design of toast is NO NEED to care about snapshots\n during toast value fetching, I don't see why doing so now\n would be a cleaner solution.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 17 Jan 2002 22:55:17 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Tom Lane wrote:\n> \n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> \n> > For example is it possible to update a toast\n> > chunk partially using SnapshotToast ?\n> \n> As things stand (with either SnapshotToast or the old SnapshotAny way)\n> it is never possible to update an individual toast value, either\n> partially or wholly. All you can do is lay down a new toast value (with\n> a new identifying OID) and then delete the old one.\n> \n> But I'm not sure that this is wrong, or fixable. Trying to update part\n> of a toasted value is very much like wanting to update part of an\n> existing row in-place, which we cannot possibly do.\n\nBytea seems to be considered as a candidate for BLOB\nthough I think the entirely new type is preferable.\nIt seems impossible to implement a functionality like\ninv_write using bytea which the current large object\nstuff has.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 18 Jan 2002 13:00:21 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "> Tom Lane wrote:\n> > \n> > Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > \n> > > For example is it possible to update a toast\n> > > chunk partially using SnapshotToast ?\n> > \n> > As things stand (with either SnapshotToast or the old SnapshotAny way)\n> > it is never possible to update an individual toast value, either\n> > partially or wholly. All you can do is lay down a new toast value (with\n> > a new identifying OID) and then delete the old one.\n> > \n> > But I'm not sure that this is wrong, or fixable. Trying to update part\n> > of a toasted value is very much like wanting to update part of an\n> > existing row in-place, which we cannot possibly do.\n> \n> Bytea seems to be considered as a candidate for BLOB\n> though I think the entirely new type is preferable.\n> It seems impossible to implement a functionality like\n> inv_write using bytea which the current large object\n> stuff has.\n\nAgreed. I think that was the reason we kept TOAST and large objects,\nbecause large objects were designed for random read-write. If we can\nget large objects to auto-delete, probably with pg_depend, we can then\nuse them seamlessly with BLOB I/O routines.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:20:01 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > Tom Lane wrote:\n> > >\n> > > Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > >\n> > > > For example is it possible to update a toast\n> > > > chunk partially using SnapshotToast ?\n> > >\n> > > As things stand (with either SnapshotToast or the old SnapshotAny way)\n> > > it is never possible to update an individual toast value, either\n> > > partially or wholly. All you can do is lay down a new toast value (with\n> > > a new identifying OID) and then delete the old one.\n> > >\n> > > But I'm not sure that this is wrong, or fixable. Trying to update part\n> > > of a toasted value is very much like wanting to update part of an\n> > > existing row in-place, which we cannot possibly do.\n> >\n> > Bytea seems to be considered as a candidate for BLOB\n> > though I think the entirely new type is preferable.\n> > It seems impossible to implement a functionality like\n> > inv_write using bytea which the current large object\n> > stuff has.\n> \n> Agreed. I think that was the reason we kept TOAST and large objects,\n> because large objects were designed for random read-write. If we can\n> get large objects to auto-delete, probably with pg_depend, we can then\n> use them seamlessly with BLOB I/O routines.\n\nOops I seem to have missed the discussion about excluding\nbytea from the candidate from BLOB. Yes now we seem to have\na good reason to exclude existent type from the candidate\nof BLOB.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 18 Jan 2002 14:10:15 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "> > Agreed. I think that was the reason we kept TOAST and large objects,\n> > because large objects were designed for random read-write. If we can\n> > get large objects to auto-delete, probably with pg_depend, we can then\n> > use them seamlessly with BLOB I/O routines.\n> \n> Oops I seem to have missed the discussion about excluding\n> bytea from the candidate from BLOB. Yes now we seem to have\n> a good reason to exclude existent type from the candidate\n> of BLOB.\n\nWell, we had the discussion when Jan was adding TOAST, and Jan was\nsaying we still need large objects for I/O purposes and for very large\nitems.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 00:12:23 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Bruce Momjian wrote:\n>\n> Agreed. I think that was the reason we kept TOAST and large objects,\n> because large objects were designed for random read-write. If we can\n> get large objects to auto-delete, probably with pg_depend, we can then\n> use them seamlessly with BLOB I/O routines.\n\n Not entirely. BLOB's should have copy semantics, so that\n doing\n\n INSERT INTO tab1 SELECT id, blob_column FROM tab2 ...\n\n and subsequently changing the blob in either tab1 or tab2\n does NOT change the blob in the other table. Currently, even\n if you make the pg_depend stuff smart enough to let the blob\n live until all references are gone, the two tables would\n share the same blob. And that's not only IMHO wrong, it's\n also incompatible to Oracle :-)\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Fri, 18 Jan 2002 00:21:26 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Jan Wieck wrote:\n> Bruce Momjian wrote:\n> >\n> > Agreed. I think that was the reason we kept TOAST and large objects,\n> > because large objects were designed for random read-write. If we can\n> > get large objects to auto-delete, probably with pg_depend, we can then\n> > use them seamlessly with BLOB I/O routines.\n> \n> Not entirely. BLOB's should have copy semantics, so that\n> doing\n> \n> INSERT INTO tab1 SELECT id, blob_column FROM tab2 ...\n> \n> and subsequently changing the blob in either tab1 or tab2\n> does NOT change the blob in the other table. Currently, even\n> if you make the pg_depend stuff smart enough to let the blob\n> live until all references are gone, the two tables would\n> share the same blob. And that's not only IMHO wrong, it's\n> also incompatible to Oracle :-)\n\nYes, we have to add duplication large object stuff hard-wired to that new data\ntype.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 00:27:10 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Well, we had the discussion when Jan was adding TOAST, and Jan was\n> saying we still need large objects for I/O purposes and for very large\n> items.\n\nYeah. I hadn't realized until this conversation that TOAST couldn't\nsupport partial updates of huge values. That is a definite problem for\nsupporting lo_read/lo_write-type operations.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 00:27:50 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny " }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > > Agreed. I think that was the reason we kept TOAST and large objects,\n> > > because large objects were designed for random read-write. If we can\n> > > get large objects to auto-delete, probably with pg_depend, we can then\n> > > use them seamlessly with BLOB I/O routines.\n> >\n> > Oops I seem to have missed the discussion about excluding\n> > bytea from the candidate from BLOB. Yes now we seem to have\n> > a good reason to exclude existent type from the candidate\n> > of BLOB.\n> \n> Well, we had the discussion when Jan was adding TOAST, and Jan was\n> saying we still need large objects for I/O purposes and for very large\n> items.\n\nThough I've often seen the reference to bytea BLOB\nI remember no clear negation. Don't we have to negate\nit clearly from the first ?\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 18 Jan 2002 14:45:47 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "> > Well, we had the discussion when Jan was adding TOAST, and Jan was\n> > saying we still need large objects for I/O purposes and for very large\n> > items.\n> \n> Though I've often seen the reference to bytea BLOB\n> I remember no clear negation. Don't we have to negate\n> it clearly from the first ?\n\nAs I remember, we only mention BLOB when people ask. We don't refer to\neither as BLOB, only as TOAST/bytea and large objects.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 00:53:25 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Hiroshi Inoue wrote:\n[Charset iso-2022-jp unsupported, skipping...]\n> Though I've often seen the reference to bytea BLOB\n> I remember no clear negation. Don't we have to negate\n> it clearly from the first ?\n\n Any datatype that has the potential to be loaded into memory\n entirely by the backend is dangerous. It leads to problems\n like \"out of swapspace\", which aren't really funny in\n production.\n\n We need something that is restricted to streaming access\n only. Yet, it needs to have copy semantics.\n\n That means to me, that this will not only be a new datatype,\n but some more infrastructure too. We need INSERT ...\n RETURNING ... where the values for BLOBs are given as\n NEW_BLOB() and the returned identifier is subsequently used\n to open the created BLOBs for writing and pump the data in.\n\n We need heap access level tuple support to duplicate those\n values on INSERT ... SELECT, to remove them on DELETE and to\n manipulate them on UPDATE.\n\n We need new functionality in procedural languages to support\n streaming in and out of these guy's, where the actual data is\n buffered in temp files and only blob identifiers passed\n around.\n\n I see the final storage of blob data to happen in the toast\n table, sliced, diced and handy (most probably not\n compressed). But I don't see an easy way to abuse the bytea\n datatype for real blob support.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Fri, 18 Jan 2002 01:06:11 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Hiroshi Inoue wrote:\n\n> Though I've often seen the reference to bytea BLOB\n> I remember no clear negation. Don't we have to negate\n> it clearly from the first ?\n> \n> regards,\n> Hiroshi Inoue\n\n\nWith the changes in 7.2, bytea is actually very close to matching the\nSQL99 definition of binary strings, which it also refers to as BLOB.\nBLOBS should include support for (section 4.3):\n\n<comparison predicate> - yes\n<blob concatenation> - yes\n<blob substring function> - yes\n<blob overlay function> - no\n<trim function> - yes\n<length expression> - yes\n<position expression> - yes\n<like predicate> - yes\n\nOther than the overlay function, the primary thing missing is the use of\n hex as the I/O representation.\n\nSee table 3-9 at\nhttp://candle.pha.pa.us/main/writings/pgsql/sgml/datatype-binary.html\nfor more info.\n\nJoe\n\n\n\n", "msg_date": "Thu, 17 Jan 2002 22:16:34 -0800", "msg_from": "Joe Conway <jconway@cox.net>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Jan Wieck wrote:\n\n> \n> Any datatype that has the potential to be loaded into memory\n> entirely by the backend is dangerous. It leads to problems\n> like \"out of swapspace\", which aren't really funny in\n> production.\n> \n> We need something that is restricted to streaming access\n> only. Yet, it needs to have copy semantics.\n> \n> That means to me, that this will not only be a new datatype,\n> but some more infrastructure too. We need INSERT ...\n> RETURNING ... where the values for BLOBs are given as\n> NEW_BLOB() and the returned identifier is subsequently used\n> to open the created BLOBs for writing and pump the data in.\n> \n> We need heap access level tuple support to duplicate those\n> values on INSERT ... SELECT, to remove them on DELETE and to\n> manipulate them on UPDATE.\n> \n> We need new functionality in procedural languages to support\n> streaming in and out of these guy's, where the actual data is\n> buffered in temp files and only blob identifiers passed\n> around.\n> \n> I see the final storage of blob data to happen in the toast\n> table, sliced, diced and handy (most probably not\n> compressed). But I don't see an easy way to abuse the bytea\n> datatype for real blob support.\n> \n\nAll this may be needed for BLOBs that are *huge*, but there are at least \ntwo classes of BLOB data that are not typically huge in practice. One is \nencrypted or hashed data, the other is image data for web pages. Either \nof these work very well with the current bytea support.\n\nJoe\n\n\n", "msg_date": "Thu, 17 Jan 2002 22:36:09 -0800", "msg_from": "Joe Conway <jconway@cox.net>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" }, { "msg_contents": "Joe Conway wrote:\n> \n> Hiroshi Inoue wrote:\n> \n> > Though I've often seen the reference to bytea BLOB\n> > I remember no clear negation. Don't we have to negate\n> > it clearly from the first ?\n> >\n> > regards,\n> > Hiroshi Inoue\n> \n> With the changes in 7.2, bytea is actually very close to matching the\n> SQL99 definition of binary strings, which it also refers to as BLOB.\n> BLOBS should include support for (section 4.3):\n> \n> <comparison predicate> - yes\n> <blob concatenation> - yes\n> <blob substring function> - yes\n> <blob overlay function> - no\n> <trim function> - yes\n> <length expression> - yes\n> <position expression> - yes\n> <like predicate> - yes\n\n> Other than the overlay function, \n\nIt seems good as long as they are not large(huge ?).\nIt seems a significant flaw for bytea to have no\npossibility of partial update.\n\n> the primary thing missing is the use of\n> hex as the I/O representation.\n\nI don't love the current I/O representation of bytea.\nIt seems worth adding a new data type only to change the \nbinary I/O representation.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 18 Jan 2002 16:48:10 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: tuptoaster.c must *not* use SnapshotAny" } ]
[ { "msg_contents": "I am getting a NOTICE in logs about once a day:\n\nNOTICE: Rel s: TID 212/16: DeleteTransactionInProgress 0 - can't\nshrink relation\n\nThis is generated by vacuum. This does not happen after removing the\ncontents of the relation and re-inserting the data. I noticed this kind of\nerror in relation to a post on pg-general. Moreover, this error is\noccuring in the same database I reported as saying 'Relation pg_shadow\ndoes not exist' the other day.\n\noup=# select version();\n version\n---------------------------------------------------------------------\n PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66\n(1 row)\n\nRunning on Linux 2.2 series kernel. The system has not crashed recently,\nno disk failures, etc. In fact, postgres had been up since a few days\nafter 7.1.3 was released.\n\nThanks in advance,\n\nGavin\n\n", "msg_date": "Fri, 18 Jan 2002 01:50:47 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": true, "msg_subject": "can't shrink relation" }, { "msg_contents": "Gavin Sherry <swm@linuxworld.com.au> writes:\n> I am getting a NOTICE in logs about once a day:\n> NOTICE: Rel s: TID 212/16: DeleteTransactionInProgress 0 - can't\n> shrink relation\n\nAFAICT, the only way to get that message is if you have a tuple with\ngood (committed) t_xmin, but t_xmax is 0, and yet HEAP_XMAX_INVALID\nis not set. Bizarre. Does the tuple appear valid otherwise?\n(Try \"select * from s where ctid = '(212,16)'\" to view it.)\n\n> Moreover, this error is occuring in the same database I reported as\n> saying 'Relation pg_shadow does not exist' the other day.\n\nYou've got something mighty weird going on there. Possibly time for\na dump/initdb/reload. Possibly time to run some memory & disk\ndiagnostics.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 10:16:05 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: can't shrink relation " } ]
[ { "msg_contents": "I am seeing a bug in CVS in pg_dump/pg_restore with -o:\n\n $ dropdb test\n $ createdb test\n $ pg_dump -Fc -b -o test > /bjm/out\n $ dropdb test\n $ createdb test\n $ pg_restore -v -d test /bjm/out\n pg_restore: connecting to database for restore\n pg_restore: creating <Init> Max OID\n pg_restore: [archiver (db)] could not execute query: no result from server\n pg_restore: *** aborted because of error\n\nIt fails even on an empty database. It appears to be the setting of the\nmax oid:\n\t\n\tCREATE TEMPORARY TABLE pgdump_oid (dummy int4);\n\tCOPY pgdump_oid WITH OIDS FROM stdin;\n\t16612\t0\n\t\\.\n\tDROP TABLE pgdump_oid;\n\nIt seems the -Fc format is somehow misinterpreting this. I am\nresearching this now but if someone has a clue, I could use it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 12:49:29 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Bug in pg_dump/restore -o" }, { "msg_contents": "[2002-01-17 12:49] Bruce Momjian said:\n\n| It seems the -Fc format is somehow misinterpreting this. I am\n| researching this now but if someone has a clue, I could use it.\n\nBreakpoint 1, ExecuteSqlCommandBuf (AH=0x8056758, qryv=0x80614d0, bufLen=121)\n at pg_backup_db.c:653\n653 for (pos = 0; pos < (eos - qry); pos++)\n(gdb) next\n655 appendPQExpBufferChar(AH->sqlBuf, qry[pos]);\n(gdb) \n658 switch (AH->sqlparse.state)\n(gdb) print *AH->sqlBuf\n$9 = {\n data = 0x8056a10 \"--\\n-- Selected TOC Entries:\\n--\\n--\\n-- TOC Entry ID 2 (OID 0)\\n--\\n-- Name: Max OID Type: <Init> Owner: \\n-- Data Pos: 0 (Length 0)\\n--\\n\\nC\", len = 132, maxlen = 256}\n(gdb) cont\nContinuing.\npg_restore: [archiver (db)] could not execute query: no result from server\npg_restore: *** aborted because of error\n\nNotice the 'C' at the end of the AH->sqlBuf->data. Looks like a\nbad count somewhere. I won't have time to dig any more til after\nwork to(day|nignt).\n\nhth.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Thu, 17 Jan 2002 13:25:30 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "\nI think I see the cause. I created a simple table and then generated\nthe dump. I found this that the normal table had its COPY data in\nbinary format while the max oid dump was pure ASCII. My guess is that\nthe max oid dump code isn't calling the right routine to dump its data.\n\n---------------------------------------------------------------------------\n\nBrent Verner wrote:\n> [2002-01-17 12:49] Bruce Momjian said:\n> \n> | It seems the -Fc format is somehow misinterpreting this. I am\n> | researching this now but if someone has a clue, I could use it.\n> \n> Breakpoint 1, ExecuteSqlCommandBuf (AH=0x8056758, qryv=0x80614d0, bufLen=121)\n> at pg_backup_db.c:653\n> 653 for (pos = 0; pos < (eos - qry); pos++)\n> (gdb) next\n> 655 appendPQExpBufferChar(AH->sqlBuf, qry[pos]);\n> (gdb) \n> 658 switch (AH->sqlparse.state)\n> (gdb) print *AH->sqlBuf\n> $9 = {\n> data = 0x8056a10 \"--\\n-- Selected TOC Entries:\\n--\\n--\\n-- TOC Entry ID 2 (OID 0)\\n--\\n-- Name: Max OID Type: <Init> Owner: \\n-- Data Pos: 0 (Length 0)\\n--\\n\\nC\", len = 132, maxlen = 256}\n> (gdb) cont\n> Continuing.\n> pg_restore: [archiver (db)] could not execute query: no result from server\n> pg_restore: *** aborted because of error\n> \n> Notice the 'C' at the end of the AH->sqlBuf->data. Looks like a\n> bad count somewhere. I won't have time to dig any more til after\n> work to(day|nignt).\n> \n> hth.\n> brent\n> \n> -- \n> \"Develop your talent, man, and leave the world something. Records are \n> really gifts from people. To think that an artist would love you enough\n> to share his music with anyone is a beautiful thing.\" -- Duane Allman\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 13:38:32 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> I think I see the cause. I created a simple table and then generated\n> the dump. I found this that the normal table had its COPY data in\n> binary format while the max oid dump was pure ASCII. My guess is that\n> the max oid dump code isn't calling the right routine to dump its data.\n\nIndeed, the max oid dump code doesn't look like it's been clued at all\nabout interoperating with the new pg_dump output code. It can't just\nintermix commands and data into one string and expect pg_restore to cope.\nCompare what happens in dumpClasses/dumpClasses_nodumpData to what's\nbeing done in setMaxOid.\n\nPhilip, you're probably the best-qualified to fix this, but if you don't\nhave time today then I can work on it. I don't want to delay RC1 for\nthis...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 17:27:05 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > I think I see the cause. I created a simple table and then generated\n> > the dump. I found this that the normal table had its COPY data in\n> > binary format while the max oid dump was pure ASCII. My guess is that\n> > the max oid dump code isn't calling the right routine to dump its data.\n> \n> Indeed, the max oid dump code doesn't look like it's been clued at all\n> about interoperating with the new pg_dump output code. It can't just\n> intermix commands and data into one string and expect pg_restore to cope.\n> Compare what happens in dumpClasses/dumpClasses_nodumpData to what's\n> being done in setMaxOid.\n> \n> Philip, you're probably the best-qualified to fix this, but if you don't\n> have time today then I can work on it. I don't want to delay RC1 for\n> this...\n\nI am told this was broken in 7.1 too.\n\nAttached is a diff that shows a possible direction for a solution. What\nI did was instead of doing the COPY myself, I am keeping the temp table\nI just created and passing that table name to the standard dump routines\nto do the COPY.\n\nOne problem is that there is no TableInfo for the table, but I can call\ngetTables() with the temp table name. Also, it is a temp table and I am\nnot sure if it is going to like that.\n\nAnyway, this is not completed code but just a possible solution.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: src/bin/pg_dump/pg_dump.c\n===================================================================\nRCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v\nretrieving revision 1.237\ndiff -c -r1.237 pg_dump.c\n*** src/bin/pg_dump/pg_dump.c\t2002/01/11 23:21:55\t1.237\n--- src/bin/pg_dump/pg_dump.c\t2002/01/17 23:35:46\n***************\n*** 4545,4551 ****\n setMaxOid(Archive *fout)\n {\n \tPGresult *res;\n- \tOid\t\t\tmax_oid;\n \tchar\t\tsql[1024];\n \n \tres = PQexec(g_conn, \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4)\");\n--- 4542,4547 ----\n***************\n*** 4563,4575 ****\n \t\twrite_msg(NULL, \"could not insert into pgdump_oid table: %s\", PQerrorMessage(g_conn));\n \t\texit_nicely();\n \t}\n- \tmax_oid = PQoidValue(res);\n- \tif (max_oid == 0)\n- \t{\n- \t\twrite_msg(NULL, \"inserted invalid oid\\n\");\n- \t\texit_nicely();\n- \t}\n \tPQclear(res);\n \tres = PQexec(g_conn, \"DROP TABLE pgdump_oid;\");\n \tif (!res ||\n \t\tPQresultStatus(res) != PGRES_COMMAND_OK)\n--- 4559,4577 ----\n \t\twrite_msg(NULL, \"could not insert into pgdump_oid table: %s\", PQerrorMessage(g_conn));\n \t\texit_nicely();\n \t}\n \tPQclear(res);\n+ \tstrcpy(sql, \"COPY pgdump_oid WITH OIDS FROM stdin;\\n\");\n+ \n+ \t\t\tdumpCtx = (DumpContext *) malloc(sizeof(DumpContext));\n+ \t\t\tdumpCtx->tblinfo = (TableInfo *) tblinfo;\n+ \t\t\tdumpCtx->tblidx = 0;\n+ \t\t\tdumpCtx->oids = true;\n+ \n+ \t\t\tdumpFn = dumpClasses_nodumpData;\n+ \n+ \tArchiveEntry(fout, \"0\", \"Max OID\", \"<Init>\", NULL, sql, \"\", \"\", \"\",\n+ \t\t\t\t dumpCtx, dumpFn);\n+ \n \tres = PQexec(g_conn, \"DROP TABLE pgdump_oid;\");\n \tif (!res ||\n \t\tPQresultStatus(res) != PGRES_COMMAND_OK)\n***************\n*** 4578,4594 ****\n \t\texit_nicely();\n \t}\n \tPQclear(res);\n- \tif (g_verbose)\n- \t\twrite_msg(NULL, \"maximum system oid is %u\\n\", max_oid);\n- \tsnprintf(sql, 1024,\n- \t\t\t \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4);\\n\"\n- \t\t\t \"COPY pgdump_oid WITH OIDS FROM stdin;\\n\"\n- \t\t\t \"%u\\t0\\n\"\n- \t\t\t \"\\\\.\\n\"\n- \t\t\t \"DROP TABLE pgdump_oid;\\n\",\n- \t\t\t max_oid);\n- \n- \tArchiveEntry(fout, \"0\", \"Max OID\", \"<Init>\", NULL, sql, \"\", \"\", \"\", NULL, NULL);\n }\n \n /*\n--- 4580,4585 ----", "msg_date": "Thu, 17 Jan 2002 18:43:25 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> I am told this was broken in 7.1 too.\n\nGood point. That probably means it's not a \"must fix\" for 7.2, but\nstill, it'd be nice to have a solution.\n\nAttached is a diff that seems to actually work in all three pgdump modes\n(script output, -Fc, -Ft). A disadvantage of this approach is that\nthere doesn't seem to be any clean way to issue a DROP for the temp\ntable, so it will persist in the target database until we finish the\npsql script or pg_restore run (or at least until we have to do a\n\\connect). This would create a problem if the name pgdump_oid\nconflicted with any actual table name being restored. We could choose\nsome more bizarre name to reduce the probability of such a conflict.\n\nA potentially more serious problem is that if the archiving code chooses\nto issue other operations between the schema restore and data restore\nfor the temp table, we might do a \\connect and lose the temp table.\nCome to think of it, a data-only restore request won't work either.\n\nI had originally tried a single data-only archive entry with copy\ncommand CREATE... COPY. This would avoid the latter two problems.\nHowever, while it seemed to work okay in -Fc mode, -Ft blew up:\n\n$ pg_dump -Ft -b -o test >/tmp/dump.tar\npg_dump: [tar archiver] bad COPY statement - could not find \"copy\" in string \"cr\neate temporary table pgdump_oid (dummy int4);\ncopy pgdump_oid with oids from stdin;\n\nPhilip, is this a fundamental problem, or do we just need to make\nthe tar archiver a little smarter about looking at the COPY strings?\n\n\t\t\tregards, tom lane\n\n*** src/bin/pg_dump/pg_dump.c.orig\tFri Jan 11 18:21:55 2002\n--- src/bin/pg_dump/pg_dump.c\tThu Jan 17 20:51:50 2002\n***************\n*** 89,94 ****\n--- 89,95 ----\n static Oid\tfindLastBuiltinOid_V71(const char *);\n static Oid\tfindLastBuiltinOid_V70(void);\n static void setMaxOid(Archive *fout);\n+ static int\tsetMaxOid_dumper(Archive *fout, char *oid, void *dctxv);\n \n static void AddAcl(char *aclbuf, const char *keyword);\n static char *GetPrivileges(Archive *AH, const char *s);\n***************\n*** 4538,4552 ****\n \n /*\n * setMaxOid -\n! * find the maximum oid and generate a COPY statement to set it\n! */\n \n static void\n setMaxOid(Archive *fout)\n {\n \tPGresult *res;\n \tOid\t\t\tmax_oid;\n- \tchar\t\tsql[1024];\n \n \tres = PQexec(g_conn, \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4)\");\n \tif (!res ||\n--- 4539,4568 ----\n \n /*\n * setMaxOid -\n! * find the maximum oid and generate commands to reproduce it in the target\n! */\n \n static void\n setMaxOid(Archive *fout)\n {\n+ \tArchiveEntry(fout, \"0\", \"Max OID\",\n+ \t\t\t\t \"<Init>\", NULL,\n+ \t\t\t\t \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4);\\n\",\n+ \t\t\t\t \"\", \"\", \"\",\n+ \t\t\t\t NULL, NULL);\n+ \n+ \tArchiveEntry(fout, \"0\", \"Max OID\",\n+ \t\t\t\t \"<Init Data>\", NULL, \"\", \"\",\n+ \t\t\t\t \"COPY pgdump_oid WITH OIDS FROM stdin;\\n\",\n+ \t\t\t\t \"\",\n+ \t\t\t\t setMaxOid_dumper, NULL);\n+ }\n+ \n+ static int\n+ setMaxOid_dumper(Archive *fout, char *oid, void *dctxv)\n+ {\n \tPGresult *res;\n \tOid\t\t\tmax_oid;\n \n \tres = PQexec(g_conn, \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4)\");\n \tif (!res ||\n***************\n*** 4578,4594 ****\n \t\texit_nicely();\n \t}\n \tPQclear(res);\n \tif (g_verbose)\n \t\twrite_msg(NULL, \"maximum system oid is %u\\n\", max_oid);\n- \tsnprintf(sql, 1024,\n- \t\t\t \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4);\\n\"\n- \t\t\t \"COPY pgdump_oid WITH OIDS FROM stdin;\\n\"\n- \t\t\t \"%u\\t0\\n\"\n- \t\t\t \"\\\\.\\n\"\n- \t\t\t \"DROP TABLE pgdump_oid;\\n\",\n- \t\t\t max_oid);\n \n! \tArchiveEntry(fout, \"0\", \"Max OID\", \"<Init>\", NULL, sql, \"\", \"\", \"\", NULL, NULL);\n }\n \n /*\n--- 4594,4609 ----\n \t\texit_nicely();\n \t}\n \tPQclear(res);\n+ \n \tif (g_verbose)\n \t\twrite_msg(NULL, \"maximum system oid is %u\\n\", max_oid);\n \n! \tarchprintf(fout,\n! \t\t\t \"%u\\t0\\n\"\n! \t\t\t \"\\\\.\\n\",\n! \t\t\t max_oid);\n! \n! \treturn 1;\n }\n \n /*", "msg_date": "Thu, 17 Jan 2002 21:05:15 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "At 17:27 17/01/02 -0500, Tom Lane wrote:\n>\n>Philip, you're probably the best-qualified to fix this, but if you don't\n>have time today then I can work on it. I don't want to delay RC1 for\n>this...\n>\n\nI'm around now; do you still want me to look into this?\n\n\n>A potentially more serious problem is that if the archiving code chooses\n>to issue other operations between the schema restore and data restore\n>for the temp table, we might do a \\connect and lose the temp table.\n>Come to think of it, a data-only restore request won't work either.\n\nThis leads me to the question: when should the OID restoration be performed\n- in the SCHEMA or DATA phase? ISTM that it is part of the data, and should\nbe performed after data restoration. But perhaps I misunderstand what it is\nfor.\n\n\n>Philip, is this a fundamental problem, or do we just need to make\n>the tar archiver a little smarter about looking at the COPY strings?\n\nI need to look into this; there should be no difference.\n\n\n>pg_dump: [tar archiver] bad COPY statement - could not find \"copy\" in\nstring \"cr\n>eate temporary table pgdump_oid (dummy int4);\n>copy pgdump_oid with oids from stdin;\n\nI'm not sure, from your patch code, how it got the CREATE and COPY\nstatements in the one string - did you by any chance use an defective dump\nfile from a previous patch attempt? \n\n\nBye for now,\n\nPhilip.\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Fri, 18 Jan 2002 14:46:34 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "At 21:05 17/01/02 -0500, Tom Lane wrote:\n>\n>A potentially more serious problem is that if the archiving code chooses\n>to issue other operations between the schema restore and data restore\n>for the temp table, we might do a \\connect and lose the temp table.\n\nWhy is this a problem - I presume I don't understand the OID allocation stuff.\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Fri, 18 Jan 2002 14:50:11 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n> I'm around now; do you still want me to look into this?\n\nYup.\n\n>> pg_dump: [tar archiver] bad COPY statement - could not find \"copy\" in\n> string \"cr\n>> eate temporary table pgdump_oid (dummy int4);\n>> copy pgdump_oid with oids from stdin;\n\n> I'm not sure, from your patch code, how it got the CREATE and COPY\n> statements in the one string - did you by any chance use an defective dump\n> file from a previous patch attempt? \n\nSorry that I wasn't clearer. This message did not come from the given\npatch. What I had tried to do was issue a single ArchiveEntry call with\nthe CREATE TABLE/COPY both in the copyStmt string of the one archive\nentry. I don't have that code handy anymore, but it was approximately\n\n ArchiveEntry(fout, \"0\", \"Max OID\",\n \"<Init>\", NULL, \"\", \"\",\n \"CREATE TEMPORARY TABLE pgdump_oid (dummy int4);\\n\"\n \"COPY pgdump_oid WITH OIDS FROM stdin;\\n\",\n \"\",\n setMaxOid_dumper, NULL);\n\nin setMaxOid, and the same code as given in the patch for \nsetMaxOid_dumper.\n\n\n> This leads me to the question: when should the OID restoration be performed\n> - in the SCHEMA or DATA phase? ISTM that it is part of the data, and should\n> be performed after data restoration. But perhaps I misunderstand what it is\n> for.\n\nWell, that's an interesting question. I thought it was data too, when I\nwas making these patches. But I just got off the horn from a long\nconversation with Bruce, who put in this max-oid-setting code to begin\nwith, and what he says is that the original intention was to force up\nthe OID counter *before* loading any schema information *or* data. The\nidea being that if you believe that OIDs are unique across your whole\ndatabase, then you want the OIDs assigned to tables, sequences, rules,\netc etc to be disjoint from those assigned to your user data rows.\nSince we can't directly restore the original OIDs of these constructs,\nthe best we can do is ensure they will be assigned OIDs beyond the ones\nbeing loaded into data rows.\n\nOf course this whole concept collapses in the face of OID wraparound,\nnot to mention the current idea that we should change to generating OIDs\nfrom per-table counters instead of globally. So one possible answer is\nto say \"forget it, we don't guarantee that anymore\" and just rip out\nthe setMaxOid code entirely. But since we don't have per-table OID\ncounters yet, that seems a bit premature to both me and Bruce.\n\nIf we do want to try to maintain the original concept, it seems that the\nOID-setting code needs to be emitted in a way that would cause it to be\nexecuted *first* and in *all* restore modes: schema only, data only, or\nschema+data. Not sure if that's even possible given the current design\nof the archiver, but you'd know better than I.\n\n>>A potentially more serious problem is that if the archiving code chooses\n>>to issue other operations between the schema restore and data restore\n>>for the temp table, we might do a \\connect and lose the temp table.\n\n>Why is this a problem - I presume I don't understand the OID allocation stuff.\n\nCREATE TEMP TABLE pgdump_oids (...);\n\n\\connect - otheruser\nCREATE TABLE someothertable;\n\n...\n\n\\connect - postgres\nCOPY pgdump_oids FROM stdin;\nERROR: pgdump_oids doesn't exist\n\nSince \\connect starts a fresh connection, the temp table will disappear.\n\nAFAICS, the only way to work around this is to be certain that no other\narchive TOC entries will be emitted between the schema and data for\npgdump_oids (if these are separate TOC entries). I'd prefer a solution\nin which they are only one TOC entry, since that seems less likely to\nbreak in the future...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 23:08:14 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Philip Warner wrote:\n> At 17:27 17/01/02 -0500, Tom Lane wrote:\n> >\n> >Philip, you're probably the best-qualified to fix this, but if you don't\n> >have time today then I can work on it. I don't want to delay RC1 for\n> >this...\n> >\n> \n> I'm around now; do you still want me to look into this?\n\nYep. :-)\n\n> >A potentially more serious problem is that if the archiving code chooses\n> >to issue other operations between the schema restore and data restore\n> >for the temp table, we might do a \\connect and lose the temp table.\n> >Come to think of it, a data-only restore request won't work either.\n> \n> This leads me to the question: when should the OID restoration be performed\n> - in the SCHEMA or DATA phase? ISTM that it is part of the data, and should\n> be performed after data restoration. But perhaps I misunderstand what it is\n> for.\n\nI believe it should be performed only as part of a data dump. Saving\nthe oid during as part of the schema makes no sense because the schema\ndump doesn't have any reference to oid's.\n\n> >Philip, is this a fundamental problem, or do we just need to make\n> >the tar archiver a little smarter about looking at the COPY strings?\n> \n> I need to look into this; there should be no difference.\n\nOK.\n\n> >pg_dump: [tar archiver] bad COPY statement - could not find \"copy\" in\n> string \"cr\n> >eate temporary table pgdump_oid (dummy int4);\n> >copy pgdump_oid with oids from stdin;\n> \n> I'm not sure, from your patch code, how it got the CREATE and COPY\n> statements in the one string - did you by any chance use an defective dump\n> file from a previous patch attempt? \n\nWell, the problem is that the -Fc format has the CREATE/COPY in the dump\nfile, but the COPY data is non-compressed, e.g. 12323<tab>0.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:10:32 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "At 23:08 17/01/02 -0500, Tom Lane wrote:\n>AFAICS, the only way to work around this is to be certain that no other\n>archive TOC entries will be emitted between the schema and data for\n>pgdump_oids (if these are separate TOC entries). I'd prefer a solution\n>in which they are only one TOC entry, since that seems less likely to\n>break in the future...\n\nA sigle TOC entry, with both CREATE and COPY run at the start no matter\nwhat kind of dump/restore, seems like the solution. I'll look into it.\n\n \n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Fri, 18 Jan 2002 15:13:15 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Philip Warner wrote:\n> At 21:05 17/01/02 -0500, Tom Lane wrote:\n> >\n> >A potentially more serious problem is that if the archiving code chooses\n> >to issue other operations between the schema restore and data restore\n> >for the temp table, we might do a \\connect and lose the temp table.\n> \n> Why is this a problem - I presume I don't understand the OID allocation stuff.\n\nThe problem is that if you split the creation of the temp table from the\nactual COPY that loads the data, and there is a reconnection to the\nserver in between, the temp table is automatically deleted, causing the\nCOPY to fail.\n\nThe trick with this oid setting is the temp table COPY should happen\n_before_ the schema is created. This way, the pg_class.oid of the newly\ncreated schema doesn't match any of the loaded oid's. Now, you can say\nthat the oid counter could wrap around, and that is true, but until we\ngo with the pg_class.oid/table.oid 8-byte unique oid, I would like to\nkeep the oid unique if possible.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:14:03 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "> If we do want to try to maintain the original concept, it seems that the\n> OID-setting code needs to be emitted in a way that would cause it to be\n> executed *first* and in *all* restore modes: schema only, data only, or\n> schema+data. Not sure if that's even possible given the current design\n> of the archiver, but you'd know better than I.\n\nMy only comment here is that I don't see a need to set the oid counter\nfor a schema-only restore because there are no oid's in the schema dump\nanyway.\n\nNow, if you then do a data-only restore, you would have a problem with\nthe oid counter but it seems counter-intuitive for the schema-only\nrestore to set the oid counter. Comments, Tom?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:16:53 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Philip Warner <pjw@rhyme.com.au> writes:\n> A sigle TOC entry, with both CREATE and COPY run at the start no matter\n> what kind of dump/restore, seems like the solution. I'll look into it.\n\nOkay. Keep in mind that given where we are in the release cycle, any\npatch applied now has got to be minimal and easily checked. If what\nyou are thinking of involves any extensive changes, it'd probably be\nbetter to let the problem go till 7.3, rather than risk introducing\nworse breakage in 7.2. Especially since this problem isn't that major\nin the big scheme of things (if it were, it'd have been found sooner).\n\nOne stopgap answer Bruce and I discussed on the phone was to temporarily\nadd a couple lines of code to pg_dump to reject the combination of -o\nwith -Fc or -Ft. That would prevent people from shooting themselves in\nthe foot in 7.2 until a proper solution can be devised for 7.3.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 23:24:29 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> My only comment here is that I don't see a need to set the oid counter\n> for a schema-only restore because there are no oid's in the schema dump\n> anyway.\n\nGiven a pg_dump archive containing OIDs, I would expect a schema-only\npg_restore followed by a data-only pg_restore to produce the same end\nresult as a schema+data restore, no?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 23:26:11 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > My only comment here is that I don't see a need to set the oid counter\n> > for a schema-only restore because there are no oid's in the schema dump\n> > anyway.\n> \n> Given a pg_dump archive containing OIDs, I would expect a schema-only\n> pg_restore followed by a data-only pg_restore to produce the same end\n> result as a schema+data restore, no?\n\nThat is the big question, if they are doing a schema-only restore, will\nthen then do a data-only restore, or will they not. My guess is that\nthey will not or they would have just restored the whole thing.\n\nThe downside of setting the oid counter on schema-only is that you have\nset the counter much higher than they may have wanted, especially if\nthey are doing the schema-only restore to somehow get the counter down\nagain. The downside of _not_ setting the oid counter on schema-only is\nthat they may have duplicate oids between system and user tables. That\nseems less of a risk than the former, and much less likely to happen.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:30:43 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Tom Lane wrote:\n>> Given a pg_dump archive containing OIDs, I would expect a schema-only\n>> pg_restore followed by a data-only pg_restore to produce the same end\n>> result as a schema+data restore, no?\n\n> That is the big question, if they are doing a schema-only restore, will\n> then then do a data-only restore, or will they not. My guess is that\n> they will not or they would have just restored the whole thing.\n\n> The downside of setting the oid counter on schema-only is that you have\n> set the counter much higher than they may have wanted, especially if\n> they are doing the schema-only restore to somehow get the counter down\n> again. The downside of _not_ setting the oid counter on schema-only is\n> that they may have duplicate oids between system and user tables. That\n> seems less of a risk than the former, and much less likely to happen.\n\nGood points. So I guess you are saying it would be okay to treat the\nsetMaxOid TOC item as data, and have it appear only in schema+data or\ndata-only restores. In that case, back to plan A.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 23:34:09 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Tom Lane wrote:\n> >> Given a pg_dump archive containing OIDs, I would expect a schema-only\n> >> pg_restore followed by a data-only pg_restore to produce the same end\n> >> result as a schema+data restore, no?\n> \n> > That is the big question, if they are doing a schema-only restore, will\n> > then then do a data-only restore, or will they not. My guess is that\n> > they will not or they would have just restored the whole thing.\n> \n> > The downside of setting the oid counter on schema-only is that you have\n> > set the counter much higher than they may have wanted, especially if\n> > they are doing the schema-only restore to somehow get the counter down\n> > again. The downside of _not_ setting the oid counter on schema-only is\n> > that they may have duplicate oids between system and user tables. That\n> > seems less of a risk than the former, and much less likely to happen.\n> \n> Good points. So I guess you are saying it would be okay to treat the\n> setMaxOid TOC item as data, and have it appear only in schema+data or\n> data-only restores. In that case, back to plan A.\n\nYes, that was my proposal. I was consindering a case where the load the\nschema just to populate a fresh database that is to be used by the\napplication. In such cases, setting the oid makes little sense.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:36:32 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "At 23:36 17/01/02 -0500, Bruce Momjian wrote:\n>\n>Yes, that was my proposal. I was consindering a case where the load the\n>schema just to populate a fresh database that is to be used by the\n>application. In such cases, setting the oid makes little sense.\n>\n\nHere's a patch that seems to do the trick. It may seem large, but it is\nprimarily a reorganization of existing code in pg_backup_db.c to make the\ncode a little clearer and to facilitate the swapping around of some loops.\n\nLet me know how you go...\n\nBye for now,\n\nPhilip.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/", "msg_date": "Fri, 18 Jan 2002 17:28:21 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Philip Warner wrote:\n> At 23:36 17/01/02 -0500, Bruce Momjian wrote:\n> >\n> >Yes, that was my proposal. I was consindering a case where the load the\n> >schema just to populate a fresh database that is to be used by the\n> >application. In such cases, setting the oid makes little sense.\n> >\n> \n> Here's a patch that seems to do the trick. It may seem large, but it is\n> primarily a reorganization of existing code in pg_backup_db.c to make the\n> code a little clearer and to facilitate the swapping around of some loops.\n> \n> Let me know how you go...\n\nI hate to say it but I think this is too risky for 7.2. We have a\nproblem that needs fixing, but seeing as it was broken in 7.1.X as well,\nand we are just now realizing it, I think the best bet would be to put\nin some code to throw an error for invalid combinations of -F and -o and\nkeep this for 7.3.\n\nI will wait to see what others say.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 01:31:49 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "At 01:31 18/01/02 -0500, Bruce Momjian wrote:\n>\n>I hate to say it but I think this is too risky for 7.2. ...\n>...and keep this for 7.3.\n>\n>I will wait to see what others say.\n\nTry 7.2.1. If you compare the patched Vs unpatched file, you will see that\nthey are not substantially different (despite the size of the patch). But I\ndon't have any attachment to this going in 7.2 (but it should be in 7.2.1).\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Fri, 18 Jan 2002 17:42:51 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Philip Warner wrote:\n>> Here's a patch that seems to do the trick. It may seem large, but it is\n>> primarily a reorganization of existing code in pg_backup_db.c to make the\n>> code a little clearer and to facilitate the swapping around of some loops.\n\n> I hate to say it but I think this is too risky for 7.2.\n\nIt does seem a rather large diff ... however, if I understand it right,\nwhat Philip has done here is to hack pg_restore so that it will do the\nright thing with an unmodified 7.1 dump file. This is much superior to\nhacking pg_dump to change the emitted dump data. Weren't you telling me\nthat we might need a solution for someone who had already done pg_dump\n-o -Ft and then wiped their 7.1 database?\n\nI think we should scrutinize this as carefully as we can, but apply it\nif at all possible.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 11:24:02 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Philip Warner wrote:\n> >> Here's a patch that seems to do the trick. It may seem large, but it is\n> >> primarily a reorganization of existing code in pg_backup_db.c to make the\n> >> code a little clearer and to facilitate the swapping around of some loops.\n> \n> > I hate to say it but I think this is too risky for 7.2.\n> \n> It does seem a rather large diff ... however, if I understand it right,\n> what Philip has done here is to hack pg_restore so that it will do the\n> right thing with an unmodified 7.1 dump file. This is much superior to\n> hacking pg_dump to change the emitted dump data. Weren't you telling me\n> that we might need a solution for someone who had already done pg_dump\n> -o -Ft and then wiped their 7.1 database?\n> \n> I think we should scrutinize this as carefully as we can, but apply it\n> if at all possible.\n\nInteresting solution. I defer to your opinion on this.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 12:02:31 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n>> I think we should scrutinize this as carefully as we can, but apply it\n>> if at all possible.\n\n> Interesting solution. I defer to your opinion on this.\n\nOkay, I've applied it ;-). I studied the code carefully and also\nexercised as many combinations as I could think of. I think it's okay.\n\nYou might want to run pg_indent on pg_backup_db.c however ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 12:15:51 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bug in pg_dump/restore -o " }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> >> I think we should scrutinize this as carefully as we can, but apply it\n> >> if at all possible.\n> \n> > Interesting solution. I defer to your opinion on this.\n> \n> Okay, I've applied it ;-). I studied the code carefully and also\n> exercised as many combinations as I could think of. I think it's okay.\n> \n> You might want to run pg_indent on pg_backup_db.c however ...\n\nDone.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 14:15:14 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: Bug in pg_dump/restore -o" } ]
[ { "msg_contents": "I was playing around with adding a couple new SET commands (REAL_FORMAT\nand DOUBLE_PRECISION_FORMAT as per todo list item) and I ended up\nplaying with GUC a bit.\n\nI've cleaned it up a bit - most of the changes should be fairly\nself-explanitory from the patch. Some of the configuration options\nhandled in variable.c (so far, server_encoding and seed) have been moved\ninto guc.c and are handled by GUC. Moving them in required adding a\ncouple of fields to config_generic and friends - a read_only field and a\ndisplay_proc field (hook for custom SHOW messages). I've removed\nGetConfigOption() and replaced it with ShowConfigOption() which does an\nelog(NOTICE) instead of returning a string.\n\nWhen setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style\nformat string should be checked for certain things: \n\n - field width of \"*\" is not allowed\n - precision of \".*\" is not allowed\n - all conversion specifiers except \"s\" and \"n\" are allowed\n - only one conversion specification other than %% and variations is\n allowed\n\nDoes this seem reasonable to people? I haven't written a function to\ncheck those yet.. will do soon.\n\nThis patch isn't complete yet so don't append it to the pending patches\nlist, Bruce.\n\nLiam\n\n-- \nLiam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com", "msg_date": "Thu, 17 Jan 2002 16:54:34 -0500", "msg_from": "Liam Stewart <liams@redhat.com>", "msg_from_op": true, "msg_subject": "guc" }, { "msg_contents": "Liam Stewart writes:\n\n> I've removed\n> GetConfigOption() and replaced it with ShowConfigOption() which does an\n> elog(NOTICE) instead of returning a string.\n\nI certainly don't like that. I want to be able to get at the\nconfiguration setting without any notice going off.\n\n> When setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style\n> format string should be checked for certain things:\n\nI wouldn't use a printf format string at all. It's not user-friendly --\nnot everyone is a C programmer, in fact most people aren't. It leaves\nopen too many ways to shoot yourself in the foot. And if you plan to\nclose all those ways you end up with a crippled system that is still\ncomplex to understand for many.\n\nWhat I would like to get out of the configurability of floating-point\nnumbers is:\n\n1. The ability to dump them in binary or hex format for lossless\n dump/reload. (printf(\"%a\") does that.) That could be a boolean\n setting.\n\n2. To have (at least as an option) the same output format on all platforms.\n Not sure how to approach that, perhaps it has nothing to do with\n configurability.\n\nSome people will also suggest\n\n3. Be able to set the number of significant digits that are shown.\n\nto allow simplifying the regression tests, but I do not think that that is\na good idea, because\n\na. If platforms behave differently, the test suite should not paint over\n that; it might be important information.\n\nb. If we actually break floating-point operations one day, we might miss\n it.\n\nc. Types represent data, data is altered by functions (round? truncate?).\n Global side-effects are evil.\n\nd. Input and output would not be inverses anymore.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Thu, 17 Jan 2002 17:35:24 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Liam Stewart writes:\n>> I've removed\n>> GetConfigOption() and replaced it with ShowConfigOption() which does an\n>> elog(NOTICE) instead of returning a string.\n\n> I certainly don't like that. I want to be able to get at the\n> configuration setting without any notice going off.\n\nI agree with Peter --- better to separate the getting of the string\nfrom displaying it. What's the reason for collapsing them together?\n\n>> When setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style\n>> format string should be checked for certain things:\n\n> I wouldn't use a printf format string at all.\n\nGood point. If we have to set up a checking mechanism then we should\nask ourselves why we're bothering to use printf representation.\n\n> What I would like to get out of the configurability of floating-point\n> numbers is:\n> 1. The ability to dump them in binary or hex format for lossless\n> dump/reload. (printf(\"%a\") does that.)\n\nOn some platforms... I'd be happier with this if it were more portable...\n\n> Some people will also suggest\n> 3. Be able to set the number of significant digits that are shown.\n\n> to allow simplifying the regression tests, but I do not think that that is\n> a good idea,\n\n[ raises eyebrow ] To my mind that was one of the principal reasons\nfor working on such a thing at all. If you don't want to allow this,\nthen what alternative solution do you have for our geometry regression\ntest mess? (Defining it as not a mess won't fly.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 17:57:29 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc " }, { "msg_contents": "> > Some people will also suggest\n> > 3. Be able to set the number of significant digits that are shown.\n> \n> > to allow simplifying the regression tests, but I do not think that that is\n> > a good idea,\n> \n> [ raises eyebrow ] To my mind that was one of the principal reasons\n> for working on such a thing at all. If you don't want to allow this,\n> then what alternative solution do you have for our geometry regression\n> test mess? (Defining it as not a mess won't fly.)\n\nYes, I doubt the current regression are tests are input/output\nreversable because of the rounding anyway.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 18:12:21 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc" }, { "msg_contents": "Tom Lane writes:\n\n> [ raises eyebrow ] To my mind that was one of the principal reasons\n> for working on such a thing at all. If you don't want to allow this,\n> then what alternative solution do you have for our geometry regression\n> test mess? (Defining it as not a mess won't fly.)\n\nI did some investigation and noticed that the different geometry expected\nfiles differ in the same 5 groups of places (or less), and in 4 of those\nplaces there are only two possible variations. So that at least gives me\nthe idea that perhaps the geometry test could be split up in two or three\ntests, and that would probably reduce the relative number of \"nonstandard\"\nexpected files we'd need.\n\nOne difference case is a system failing to implement negative zeros.\nSetting the output precision won't fix that.\n\nActually, I just took a peak into include/utils/geo_decls.h, and the\ndefiniton of EPSILON at the top leaves me to think that printing out\nanything more than 6 significant digits is nonsense anyway. Numerical\nanalysts would probably shudder.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 18 Jan 2002 00:17:57 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Actually, I just took a peak into include/utils/geo_decls.h, and the\n> definiton of EPSILON at the top leaves me to think that printing out\n> anything more than 6 significant digits is nonsense anyway. Numerical\n> analysts would probably shudder.\n\nIndeed. Does that mean you'd be happy with restricting the number of\ndigits printed for geometrical types only?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 00:21:02 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc " }, { "msg_contents": "Tom Lane writes:\n\n> Indeed. Does that mean you'd be happy with restricting the number of\n> digits printed for geometrical types only?\n\nNot really. I'd much rather see the EPSILON removed/revised. I don't\nclaim to understand numerical analysis, but that thing is completely\nbogus. I can see how the error would be controllable when you just add\nnumbers, but once you start multiplying or run trigonometric functions, a\nfixed epsilon just doesn't cut it.\n\nIf you want to limit the number of digits, why not just reimplement the\ngeometric types as single precision?\n\nAnd if we think that an epsilon-based float comparison is important, why\ndon't we do it everywhere?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 18 Jan 2002 00:48:46 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Not really. I'd much rather see the EPSILON removed/revised. I don't\n> claim to understand numerical analysis, but that thing is completely\n> bogus.\n\nYeah, and there's even the handy comment:\n\n *\t XXX These routines were not written by a numerical analyst.\n\nto remind you that this stuff was written by someone who was studying\ndatabases not numerical analysis.\n\nIn my eyes, all of our geometric datatypes are firmly in the \"academic\ntoy prototype\" category. They could use a thorough overhaul, but in\nview of the existence of the PostGIS project I doubt they'll ever get\none. Anyone who might have both the ability and the motivation to\nimprove these datatypes will probably go use/work on PostGIS instead.\n\nI could make an argument that we should just yank these types from the\ndistribution and leave the field clear for PostGIS. I don't really want\nto take that line; the types do have usefulness for simple applications,\nand what's probably more important is they help keep us honest on\ndatatype extensibility concerns. But I have a hard time justifying\nspending any core development time on them.\n\nBasically what I want is some fairly simple answer that will let us stop\nwasting quite so much maintenance effort on the geometry regression\ntest. Because, frankly, that code is nowhere near good enough to\njustify our expending much time on it.\n\nIn that context, trimming the number of displayed decimal places seems\nlike a great solution. Whether it's the \"right thing\" from a purist's\nviewpoint doesn't concern me a whole lot.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 01:31:42 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Geometric types (was Re: [PATCHES] guc)" }, { "msg_contents": "On Thu, Jan 17, 2002 at 05:57:29PM -0500, Tom Lane wrote:\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Liam Stewart writes:\n> >> I've removed\n> >> GetConfigOption() and replaced it with ShowConfigOption() which does an\n> >> elog(NOTICE) instead of returning a string.\n> \n> > I certainly don't like that. I want to be able to get at the\n> > configuration setting without any notice going off.\n> \n> I agree with Peter --- better to separate the getting of the string\n> from displaying it. What's the reason for collapsing them together?\n\nI ended up thinking that GetConfigOption was a bit useless right now\nsince, with the redone GetPGVariable, there's currently nothing that\nwould use it. I can see some use for it since not all guc options have\nan associated variable but still have a value (e.g.: seed,\nserver_encoding). How about I add GetConfigOption back in and change\nShowConfigOption to use it. display_proc hooks would return a char *;\nGetConfigOption would use a variable's display_proc hook if it is\nnon-null instead of doing its own thing. ShowConfigOption would no\nlonger call a variable's display_proc hook.\n\n> > I wouldn't use a printf format string at all.\n> \n> Good point. If we have to set up a checking mechanism then we should\n> ask ourselves why we're bothering to use printf representation.\n\nI was going on the fact that printf format string was on the todo and\nthat Tom suggested using them last February. When thinking about parsing\nprintf strings, I realized how not nice it would be, so I'm alright\nwith a new representation.\n\n> > What I would like to get out of the configurability of floating-point\n> > numbers is:\n> > 1. The ability to dump them in binary or hex format for lossless\n> > dump/reload. (printf(\"%a\") does that.)\n> \n> On some platforms... I'd be happier with this if it were more portable...\n\nRoll our own? %a and %A are C99 so are much less portable than most\nother printf conversion specifiers.\n\nLiam\n\n-- \nLiam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com\n", "msg_date": "Fri, 18 Jan 2002 12:00:59 -0500", "msg_from": "Liam Stewart <liams@redhat.com>", "msg_from_op": true, "msg_subject": "Re: [PATCHES] guc" }, { "msg_contents": "Liam Stewart <liams@redhat.com> writes:\n>>> What I would like to get out of the configurability of floating-point\n>>> numbers is:\n>>> 1. The ability to dump them in binary or hex format for lossless\n>>> dump/reload. (printf(\"%a\") does that.)\n>> \n>> On some platforms... I'd be happier with this if it were more portable...\n\n> Roll our own? %a and %A are C99 so are much less portable than most\n> other printf conversion specifiers.\n\nHmm ... rolling our own might actually not be too unreasonable ...\nand the lack of lossless dump/reload for floats has certainly been\na sore point for a long time, so expending some effort here is\njustified.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 12:19:59 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] guc " }, { "msg_contents": "\nThread has been saved for the 7.3 release:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches2\n\n---------------------------------------------------------------------------\n\nLiam Stewart wrote:\n> \n> I was playing around with adding a couple new SET commands (REAL_FORMAT\n> and DOUBLE_PRECISION_FORMAT as per todo list item) and I ended up\n> playing with GUC a bit.\n> \n> I've cleaned it up a bit - most of the changes should be fairly\n> self-explanitory from the patch. Some of the configuration options\n> handled in variable.c (so far, server_encoding and seed) have been moved\n> into guc.c and are handled by GUC. Moving them in required adding a\n> couple of fields to config_generic and friends - a read_only field and a\n> display_proc field (hook for custom SHOW messages). I've removed\n> GetConfigOption() and replaced it with ShowConfigOption() which does an\n> elog(NOTICE) instead of returning a string.\n> \n> When setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style\n> format string should be checked for certain things: \n> \n> - field width of \"*\" is not allowed\n> - precision of \".*\" is not allowed\n> - all conversion specifiers except \"s\" and \"n\" are allowed\n> - only one conversion specification other than %% and variations is\n> allowed\n> \n> Does this seem reasonable to people? I haven't written a function to\n> check those yet.. will do soon.\n> \n> This patch isn't complete yet so don't append it to the pending patches\n> list, Bruce.\n> \n> Liam\n> \n> -- \n> Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com\n\n[ Attachment, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 21:09:37 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: guc" }, { "msg_contents": "\nThis patch was rejected. Please continue discussion on the hackers\nlist.\n\n\n---------------------------------------------------------------------------\n\nLiam Stewart wrote:\n> \n> I was playing around with adding a couple new SET commands (REAL_FORMAT\n> and DOUBLE_PRECISION_FORMAT as per todo list item) and I ended up\n> playing with GUC a bit.\n> \n> I've cleaned it up a bit - most of the changes should be fairly\n> self-explanitory from the patch. Some of the configuration options\n> handled in variable.c (so far, server_encoding and seed) have been moved\n> into guc.c and are handled by GUC. Moving them in required adding a\n> couple of fields to config_generic and friends - a read_only field and a\n> display_proc field (hook for custom SHOW messages). I've removed\n> GetConfigOption() and replaced it with ShowConfigOption() which does an\n> elog(NOTICE) instead of returning a string.\n> \n> When setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style\n> format string should be checked for certain things: \n> \n> - field width of \"*\" is not allowed\n> - precision of \".*\" is not allowed\n> - all conversion specifiers except \"s\" and \"n\" are allowed\n> - only one conversion specification other than %% and variations is\n> allowed\n> \n> Does this seem reasonable to people? I haven't written a function to\n> check those yet.. will do soon.\n> \n> This patch isn't complete yet so don't append it to the pending patches\n> list, Bruce.\n> \n> Liam\n> \n> -- \n> Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com\n\n[ Attachment, skipping... ]\n\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sun, 24 Feb 2002 22:55:54 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: guc" } ]
[ { "msg_contents": "Folks,\n\nI have a database that contains a chronological journal of activity. For\n various reasons, this journal contains both complete and incomplete records,\n and while all records are timestamped, the primary key is not strictly ordered\n by timestamp.\n\nWhat I want to do is update each incomplete record with the contents of the\n last previous complete record. As a simple-minded test case:\n\nCREATE TABLE history AS (\nhistory_id SERIAL PRIMARY KEY,\nperiod_date TIMESTAMP,\nfieldA VARCHAR(30),\nfieldB INT4 );\n\nCREATE VIEW complete_history_records AS\nSELECT history.*\nFROM history WHERE fieldA IS NOT NULL\n and fieldB IS NOT NULL\n\nUPDATE history SET fieldA = chr.fieldA\n fieldB = chr.fieldB\nFROM (SELECT complete_history_records.*\n WHERE ??? ) chr\nWHERE (history.fieldA IS NULL or \n history.fieldB IS NULL);\n\nThe problem is that I cannot figure out a subselect that will allow me to\n select the last complete history record prior to the one being updated. It\n seems like I need to reference a field in the main query in the subselect,\n which can't be done.\n\nTo further hamper things, for portability reasons, I can use neither SELECT\n DISTINCT ON nor custom functions. \n\nI'm stumped. Please offer suggestions!\n\n-Josh Berkus\n\n______AGLIO DATABASE SOLUTIONS___________________________\n Josh Berkus\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Thu, 17 Jan 2002 16:55:43 -0800", "msg_from": "\"Josh Berkus\" <josh@agliodbs.com>", "msg_from_op": true, "msg_subject": "UPDATE Query problem" }, { "msg_contents": "\"Josh Berkus\" <josh@agliodbs.com> writes:\n> The problem is that I cannot figure out a subselect that will allow me to\n> select the last complete history record prior to the one being\n> updated.\n\nSure you can. You can't alias history in the UPDATE, but you can alias\nit in the subselect, so:\n\nUPDATE history SET fieldA =\n (SELECT fieldA FROM history older\n WHERE older.key = history.key AND\n older.fieldA IS NOT NULL AND older.fieldB IS NOT NULL AND\n older.timestamp =\n (SELECT max(timestamp) FROM history oldest\n WHERE oldest.key = history.key AND\n oldest.fieldA IS NOT NULL AND oldest.fieldB IS NOT NULL)),\nfieldB = (SELECT fieldB FROM ... repeat entire subselect above ...)\nWHERE (history.fieldA IS NULL or \n history.fieldB IS NULL);\n\nThis will work and (AFAIK) is fully SQL-compliant, but it will be\nslower than the dickens because of all those subselects :-(. Might\nbe tolerable if the key field is near-unique and is indexed, but\nheaven help you if not.\n\n> To further hamper things, for portability reasons, I can use neither SELECT\n> DISTINCT ON nor custom functions. \n\nToo bad. SELECT DISTINCT ON would let you get rid of the bottom SELECT\nmax() and would let you exploit an index on (key,timestamp). By the\ntime the query above finishes running, very likely you could talk your\nboss into accepting a nonstandard solution ;-)\n\nAlso, just because PG can handle the above doesn't mean every RDBMS does\n(do I need to name names?). What products do you really need it to\nbe portable to?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 20:20:00 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: UPDATE Query problem " }, { "msg_contents": "On Thu, 17 Jan 2002, Josh Berkus wrote:\n\n> Folks,\n>\n> I have a database that contains a chronological journal of activity. For\n> various reasons, this journal contains both complete and incomplete records,\n> and while all records are timestamped, the primary key is not strictly ordered\n> by timestamp.\n>\n> What I want to do is update each incomplete record with the contents of the\n> last previous complete record. As a simple-minded test case:\n>\n> CREATE TABLE history AS (\n> history_id SERIAL PRIMARY KEY,\n> period_date TIMESTAMP,\n> fieldA VARCHAR(30),\n> fieldB INT4 );\n>\n> CREATE VIEW complete_history_records AS\n> SELECT history.*\n> FROM history WHERE fieldA IS NOT NULL\n> and fieldB IS NOT NULL\n>\n> UPDATE history SET fieldA = chr.fieldA\n> fieldB = chr.fieldB\n> FROM (SELECT complete_history_records.*\n> WHERE ??? ) chr\n> WHERE (history.fieldA IS NULL or\n> history.fieldB IS NULL);\n>\n> The problem is that I cannot figure out a subselect that will allow me to\n> select the last complete history record prior to the one being updated. It\n> seems like I need to reference a field in the main query in the subselect,\n> which can't be done.\n>\n> To further hamper things, for portability reasons, I can use neither SELECT\n> DISTINCT ON nor custom functions.\n\nIsn't update...from already an extension?\n\nIn any case, is performance really important? I think something like:\nupdate history set fieldA=chr.fieldA, fieldB=chr.fieldB from\ncomplete_history_records chr where (history.fieldA is null or\nhistory.fieldB is null) and chr.period_date=(select max(period_date)\nfrom complete_history_records where period_date<history.period_date);\n\nmight work if really slow.\n\n\n", "msg_date": "Thu, 17 Jan 2002 17:20:59 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: UPDATE Query problem" }, { "msg_contents": "Tom,\n\n> Sure you can. You can't alias history in the UPDATE, but you can alias\n> it in the subselect, so:\n> \n> UPDATE history SET fieldA =\n> (SELECT fieldA FROM history older\n> WHERE older.key = history.key AND\n> older.fieldA IS NOT NULL AND older.fieldB IS NOT NULL AND\n> older.timestamp =\n> (SELECT max(timestamp) FROM history oldest\n> WHERE oldest.key = history.key AND\n> oldest.fieldA IS NOT NULL AND oldest.fieldB IS NOT NULL)),\n> fieldB = (SELECT fieldB FROM ... repeat entire subselect above ...)\n> WHERE (history.fieldA IS NULL or \n> history.fieldB IS NULL);\n\nInteresting. however, it appears to give me the most recent record with\n non-NULL values. What I want is the most recent record with non-NULL values\n *before* the record I'm trying to update. In other words, if I have the\n following data:\n\nhistory\nid\ttimestamp\tfieldA\tfieldB\n1341\t6/30/00\t\tKCKG\t1\n1345\t7/31/00\t\tKC\t1\n1402\t8/31/00\t\tNULL\tNULL\n2799\t9/30/00\t\tNULL\tNULL\n1581\t10/31/00\tKC\t2\n1673\t11/30/00\tKC\t2\n\nI want records 1402 and 2799 to be updated from record 1345, not from record\n 1673.\n\n> This will work and (AFAIK) is fully SQL-compliant, but it will be\n> slower than the dickens because of all those subselects :-(. Might\n> be tolerable if the key field is near-unique and is indexed, but\n> heaven help you if not.\n\nThe key field is unique. And slow is OK ... the history-correction program\n runs overnight. I just can't afford to take a procedural approach and correct\n one record at a time ... there are 200,000 records and growing at a rate of\n 8,000 records per month.\n\n> Also, just because PG can handle the above doesn't mean every RDBMS does\n> (do I need to name names?). What products do you really need it to\n> be portable to?\n\nYeah, you guessed it ... MS SQL Server 7. Which kills custom functions or\n custom aggregates, something that would make this whole process a lot easier.\n\nThanks for the help!\n\n-Josh Berkus\n\n______AGLIO DATABASE SOLUTIONS___________________________\n Josh Berkus\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Thu, 17 Jan 2002 19:59:27 -0800", "msg_from": "\"Josh Berkus\" <josh@agliodbs.com>", "msg_from_op": true, "msg_subject": "Re: UPDATE Query problem " }, { "msg_contents": "\"Josh Berkus\" <josh@agliodbs.com> writes:\n> Interesting. however, it appears to give me the most recent record with\n> non-NULL values. What I want is the most recent record with non-NULL values\n> *before* the record I'm trying to update.\n\nOh, I'm sorry: forgot the extra qualification on the innermost SELECT:\n\n\tAND oldest.timestamp < history.timestamp\n\n> Yeah, you guessed it ... MS SQL Server 7.\n\nI dunno, how good is SQL Server on subselects?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 17 Jan 2002 23:14:18 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: UPDATE Query problem " }, { "msg_contents": "Tom,\n\n> Oh, I'm sorry: forgot the extra qualification on the innermost SELECT:\n> \n> AND oldest.timestamp < history.timestamp\n\nHmmm ... I'll try both solutions tommorrow. That is, I'll see if they port\n across databases ...\n \n> > Yeah, you guessed it ... MS SQL Server 7.\n> \n> I dunno, how good is SQL Server on subselects?\n\nNot very good. A lot of stuff, like subselects in the SELECT line, is not\n supported. And MS has gotten further from the SQL standard with each update\n since SQL Server 7.0 ...\n\n-Josh\n\n\n______AGLIO DATABASE SOLUTIONS___________________________\n Josh Berkus\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Thu, 17 Jan 2002 21:18:27 -0800", "msg_from": "\"Josh Berkus\" <josh@agliodbs.com>", "msg_from_op": true, "msg_subject": "Re: UPDATE Query problem " }, { "msg_contents": "\nI try this code\n\nCREATE FUNCTION pltclu_call_handler() RETURNS OPAQUE AS \n'/usr/lib/postgresql/pltcl.so' LANGUAGE 'C';\n\nand get this error\n\nERROR: Load of file /usr/lib/postgresql/pltcl.so failed: \n/usr/lib/postgresql/pltcl.so: undefined symbol: pg_get_enconv_by_encoding\n\nanyone help me with this?\n\nmurray hobbs\n\nps here's my .configure command\n\n./configure --enable-multibyte=UNICODE --enable-unicode-conversion --enable-locale --bindir=/usr/local/bin --libdir=/usr/lib --includedir=/usr/include --mandir=/usr/local/man --with-tcl --enable-odbc --with-unixodbc --enable-syslog\n\n\n\n\n", "msg_date": "Sat, 19 Jan 2002 00:37:59 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "pltlc and pltlcu problems" }, { "msg_contents": "Murray Prior Hobbs <murray@efone.com> writes:\n> ERROR: Load of file /usr/lib/postgresql/pltcl.so failed: \n> /usr/lib/postgresql/pltcl.so: undefined symbol: pg_get_enconv_by_encoding\n\nLooks like a multibyte-enabled pltcl and a non-multibyte-enabled\nbackend. Given that they were clearly built at different times and\nwith different configurations, one might also wonder if they're even\nthe same Postgres version.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 10:04:41 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "\nyou are so right\n\nbugga, and i thought i was being both so clever and so careful\n\nm\n\nTom Lane wrote:\n\n>Murray Prior Hobbs <murray@efone.com> writes:\n>\n>>ERROR: Load of file /usr/lib/postgresql/pltcl.so failed: \n>>/usr/lib/postgresql/pltcl.so: undefined symbol: pg_get_enconv_by_encoding\n>>\n>\n>Looks like a multibyte-enabled pltcl and a non-multibyte-enabled\n>backend. Given that they were clearly built at different times and\n>with different configurations, one might also wonder if they're even\n>the same Postgres version.\n>\n>\t\t\tregards, tom lane\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 4: Don't 'kill -9' the postmaster\n>\n\n\n\n", "msg_date": "Sat, 19 Jan 2002 07:17:31 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Tom, Stephan,\n\nWell, you'll be interested to know that Stephan's solution worked for both\n PostgreSQL and MS SQL Server ... as far as parsing goes. On PostgreSQL, the\n query took 14 minutes to complete. \n\nOn MS SQL Server, it never completed at all. Looks like I will have to take a\n semi-procedural approach with MS SQL Server after all. Just another evidence\n of the superiority of Postgres ...\n\n-Josh Berkus\n\n______AGLIO DATABASE SOLUTIONS___________________________\n Josh Berkus\n Complete information technology josh@agliodbs.com\n and data management solutions (415) 565-7293\n for law firms, small businesses fax 621-2533\n and non-profit organizations. San Francisco\n", "msg_date": "Fri, 18 Jan 2002 15:02:23 -0800", "msg_from": "\"Josh Berkus\" <josh@agliodbs.com>", "msg_from_op": true, "msg_subject": "Re: UPDATE Query problem " }, { "msg_contents": "after i have succesfully used createlan script to load both the trusted and untrusted tlc languages i try some tests\n\n\ni create a test function (right out of the docs)\n\n\n\tCREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '\n\t if {$1 > $2} {return $1}\n\t return $2\n\t' LANGUAGE 'pltclu';\n\n\n\nand i try to run this stest\n\n\tselect tcl_max(4,6);\n\nbut i get\n\n\n\tERROR: fmgr_info: function 17020: cache lookup failed\n\nso i create trusted version\n\n\n\tCREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '\n\t if {$1 > $2} {return $1}\n\t return $2\n\t' LANGUAGE 'pltcl';\n\nand i again try to run this stest\n\n\tselect tcl_max(4,6);\n\nbut i get instead\n\n\tserver closed the connection unexpectedly\n\t This probably means the server terminated abnormally\n\t before or while processing the request.\n\tconnection to server was lost\n\n\nand if i look at the log\n\npostgres: murray kale [local] SELECT: error while loading shared libraries: /usr/lib/postgresql/pltcl.so: undefined symbol: Tcl_CreateInterp\nDEBUG: server process (pid 18415) exited with exit code 127\nDEBUG: terminating any other active server processes\nDEBUG: all server processes terminated; reinitializing shared memory and semaphores\nDEBUG: database system was interrupted at 2002-01-19 15:01:29 EST\nDEBUG: checkpoint record is at 0/4BAD10\nDEBUG: redo record is at 0/4BAD10; undo record is at 0/0; shutdown TRUE\nDEBUG: next transaction id: 2120; next oid: 49324\nDEBUG: database system was not properly shut down; automatic recovery in progress\nDEBUG: redo starts at 0/4BAD50\nDEBUG: ReadRecord: record with zero length at 0/4C0FB4\nDEBUG: redo done at 0/4C0F90\nDEBUG: database system is ready\n\n\nso what do i do now?\n\nlog it as a bug?\n\n\nmurray\n\n\n\nso ok i go to the sources looking for test of pl/tlc or pl/tlcu (untrusted)\n\n\n\n\n\nTom Lane wrote:\n\n>Murray Prior Hobbs <murray@efone.com> writes:\n>\n>>ERROR: Load of file /usr/lib/postgresql/pltcl.so failed: \n>>/usr/lib/postgresql/pltcl.so: undefined symbol: pg_get_enconv_by_encoding\n>>\n>\n>Looks like a multibyte-enabled pltcl and a non-multibyte-enabled\n>backend. Given that they were clearly built at different times and\n>with different configurations, one might also wonder if they're even\n>the same Postgres version.\n>\n>\t\t\tregards, tom lane\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 4: Don't 'kill -9' the postmaster\n>\n\n\n\n\n\n\n\nafter i have succesfully used createlan script to load both the trusted and untrusted tlc languages i try some testsi create a test function (right out of the docs)\tCREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '\n\t if {$1 > $2} {return $1}\n\t return $2\n\t' LANGUAGE 'pltclu';\n\nand i try to run this stest\tselect tcl_max(4,6);\nbut i get\tERROR: fmgr_info: function 17020: cache lookup failedso i create trusted version\tCREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '\n\t if {$1 > $2} {return $1}\n\t return $2\n\t' LANGUAGE 'pltcl';and i again try to run this stest\tselect tcl_max(4,6);\nbut i get instead\tserver closed the connection unexpectedly\n\t This probably means the server terminated abnormally\n\t before or while processing the request.\n\tconnection to server was lost\n\nand if i look at the logpostgres: murray kale [local] SELECT: error while loading shared libraries: /usr/lib/postgresql/pltcl.so: undefined symbol: Tcl_CreateInterpDEBUG: server process (pid 18415) exited with exit code 127\nDEBUG: terminating any other active server processes\nDEBUG: all server processes terminated; reinitializing shared memory and semaphores\nDEBUG: database system was interrupted at 2002-01-19 15:01:29 EST\nDEBUG: checkpoint record is at 0/4BAD10\nDEBUG: redo record is at 0/4BAD10; undo record is at 0/0; shutdown TRUE\nDEBUG: next transaction id: 2120; next oid: 49324\nDEBUG: database system was not properly shut down; automatic recovery in progress\nDEBUG: redo starts at 0/4BAD50\nDEBUG: ReadRecord: record with zero length at 0/4C0FB4\nDEBUG: redo done at 0/4C0F90\nDEBUG: database system is readyso what do i do now?log it as a bug?murray\nso ok i go to the sources looking for test of pl/tlc or pl/tlcu (untrusted)\n\n\n\n\n\nTom Lane wrote:\n\nMurray Prior Hobbs <murray@efone.com> writes:\n\nERROR: Load of file /usr/lib/postgresql/pltcl.so failed: /usr/lib/postgresql/pltcl.so: undefined symbol: pg_get_enconv_by_encoding\n\nLooks like a multibyte-enabled pltcl and a non-multibyte-enabledbackend. Given that they were clearly built at different times andwith different configurations, one might also wonder if they're eventhe same Postgres version.\t\t\tregards, tom lane---------------------------(end of broadcast)---------------------------TIP 4: Don't 'kill -9' the postmaster", "msg_date": "Sat, 19 Jan 2002 15:09:22 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Murray Prior Hobbs <murray@efone.com> writes:\n> postgres: murray kale [local] SELECT: error while loading shared libraries: /usr/lib/postgresql/pltcl.so: undefined symbol: Tcl_CreateInterp\n> DEBUG: server process (pid 18415) exited with exit code 127\n\nKinda looks like your dynamic loader doesn't know where to find\nlibtcl.so (and thinks that the appropriate way to fail is a hard exit(),\nwhich is not my idea of friendly).\n\n> so what do i do now?\n\n> log it as a bug?\n\nIt's not a Postgres bug; you need to twiddle your shlib configuration.\nBut since you didn't mention your platform, I can't offer any pointers\nbeyond\nhttp://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/install-post.html#AEN11747\n(note that this is talking about finding Postgres' libraries; alter\nto suit wherever libtcl lives).\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 23:12:13 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "\nThanks tom but i think there's more to it\n\nerror while loading shared libraries: /usr/lib/postgresql/pltcl.so: undefined symbol: Tcl_CreateInterp\n\nas you can see it knows where the library is - what i think it's \ncomplaining about is the undefined symbol\n\nso i do a grep through the sources and find the call - the only call - \nbut there's no function declaration in the sources\n\ni did follow your link and i had read the page before - i'm on RedHat \n7.2 so should not have needed to do that - but i did anyway - it made no \ndifference\n\nis there meant to be Tcl_CreateInterp anywhere in the sources?\n\nmurray\n\n\n\n\nTom Lane wrote:\n\n>Murray Prior Hobbs <murray@efone.com> writes:\n>\n>>postgres: murray kale [local] SELECT: error while loading shared libraries: /usr/lib/postgresql/pltcl.so: undefined symbol: Tcl_CreateInterp\n>>DEBUG: server process (pid 18415) exited with exit code 127\n>>\n>\n>Kinda looks like your dynamic loader doesn't know where to find\n>libtcl.so (and thinks that the appropriate way to fail is a hard exit(),\n>which is not my idea of friendly).\n>\n>>so what do i do now?\n>>\n>\n>>log it as a bug?\n>>\n>\n>It's not a Postgres bug; you need to twiddle your shlib configuration.\n>But since you didn't mention your platform, I can't offer any pointers\n>beyond\n>http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/install-post.html#AEN11747\n>(note that this is talking about finding Postgres' libraries; alter\n>to suit wherever libtcl lives).\n>\n>\t\t\tregards, tom lane\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 6: Have you searched our list archives?\n>\n>http://archives.postgresql.org\n>\n\n\n\n", "msg_date": "Sat, 19 Jan 2002 18:58:54 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "[2002-01-19 18:58] Murray Prior Hobbs said:\n| \n| Thanks tom but i think there's more to it\n| \n| error while loading shared libraries: /usr/lib/postgresql/pltcl.so: \n| undefined symbol: Tcl_CreateInterp\n| \n| as you can see it knows where the library is - what i think it's \n| complaining about is the undefined symbol\n| \n| so i do a grep through the sources and find the call - the only call - \n| but there's no function declaration in the sources\n| \n| i did follow your link and i had read the page before - i'm on RedHat \n| 7.2 so should not have needed to do that - but i did anyway - it made no \n| difference\n| \n| is there meant to be Tcl_CreateInterp anywhere in the sources?\n\nNo. This is provided by the tcl library:\n\n bash$ grep Tcl_CreateInter /usr/include/tcl8.3/tclDecls.h \n EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));\n\nThe problem is, as Tom said, that your tcl library is not being\nfound by the system's linker. Try this:\n\n bash$ ldd /usr/lib/postgresql/pltcl.so\n\nI suspect you'll see a line containing \"not found\".\n\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Sat, 19 Jan 2002 03:19:17 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "\ni have had no trouble loading and using the pgpgsql language - and it \nlives in exactly the same place\n\ni've done as you suggested though - here is the output\n\n[murray@localhost dbSources]$ ldd /usr/lib/postgresql/pltcl.so\n libdl.so.2 => /lib/libdl.so.2 (0x40020000)\n libm.so.6 => /lib/i686/libm.so.6 (0x40024000)\n libc.so.6 => /lib/i686/libc.so.6 (0x40047000)\n /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)\n\nmurray\n\n\n\n\n\n\nBrent Verner wrote:\n\n\n>\n>No. This is provided by the tcl library:\n>\n> bash$ grep Tcl_CreateInter /usr/include/tcl8.3/tclDecls.h \n> EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));\n>\n>The problem is, as Tom said, that your tcl library is not being\n>found by the system's linker. Try this:\n>\n> bash$ ldd /usr/lib/postgresql/pltcl.so\n>\n>I suspect you'll see a line containing \"not found\".\n>\n> brent\n>\n\n[2002-01-19 18:58] Murray Prior Hobbs said:\n| \n| Thanks tom but i think there's more to it\n| \n| error while loading shared libraries: /usr/lib/postgresql/pltcl.so: \n| undefined symbol: Tcl_CreateInterp\n| \n| as you can see it knows where the library is - what i think it's \n| complaining about is the undefined symbol\n| \n| so i do a grep through the sources and find the call - the only call - \n| but there's no function declaration in the sources\n| \n| i did follow your link and i had read the page before - i'm on RedHat \n| 7.2 so should not have needed to do that - but i did anyway - it made no \n| difference\n| \n| is there meant to be Tcl_CreateInterp anywhere in the sources?\n\n\n\n", "msg_date": "Sat, 19 Jan 2002 19:40:32 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "\nmaybe this is a dumb question\n\nbut are not all the tcl sources part of the source distribution?\n\nlike - am i to assume then that there are binaries in the distribution \nfor which there is no code?\n\nlike - if i go looking for somethng in the code should not i find it?\n\nmurray\n\n\nBrent Verner wrote:\n\n>\n>No. This is provided by the tcl library:\n>\n> bash$ grep Tcl_CreateInter /usr/include/tcl8.3/tclDecls.h \n> EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));\n>\n>The problem is, as Tom said, that your tcl library is not being\n>found by the system's linker. Try this:\n>\n> bash$ ldd /usr/lib/postgresql/pltcl.so\n>\n>I suspect you'll see a line containing \"not found\".\n>\n> brent\n>\n\n[2002-01-19 18:58] Murray Prior Hobbs said:\n| \n| Thanks tom but i think there's more to it\n| \n| error while loading shared libraries: /usr/lib/postgresql/pltcl.so: \n| undefined symbol: Tcl_CreateInterp\n| \n| as you can see it knows where the library is - what i think it's \n| complaining about is the undefined symbol\n| \n| so i do a grep through the sources and find the call - the only call - \n| but there's no function declaration in the sources\n| \n| i did follow your link and i had read the page before - i'm on RedHat \n| 7.2 so should not have needed to do that - but i did anyway - it made no \n| difference\n| \n| is there meant to be Tcl_CreateInterp anywhere in the sources?\n\n\n\n", "msg_date": "Sat, 19 Jan 2002 20:09:21 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Murray Prior Hobbs <murray@efone.com> writes:\n> maybe this is a dumb question\n> but are not all the tcl sources part of the source distribution?\n\nI'm only going to say this one more time: Tcl is not part of Postgres.\n\npltcl depends on libtcl (note difference), and the loader is evidently\nnot finding libtcl.so. Which will absolutely NOT be in\n/usr/lib/postgresql. The question for you is where it actually lives\n(if it's installed at all), and next why the dynamic loader search path\nisn't finding it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 19 Jan 2002 12:36:31 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "ok ok - so i went off and read a LOT about Tcl - cool what a nice tool\n\nand then i downloaded the tcl/tk sources and built with appropriate \nconfigure options and installed it - in approprate places (in /usr/bin - \nover the old copies that were already there) and ran the tests and \ndowloaded some TCl samples and played with the apps\n\nas i had been using the postgres 7.2 beta i reinstalled 7.13 over the \ntop - right from the start, reconfigured, recompiled, reinstalled, \nreinitialised\n\nand tried to call a tcl function yet again - but now i get this error\n\nERROR: pltcl: internal error - cannot create 'normal' interpreter\n\nbut hmm, that's further than i got before and at least the database does \nnot restart itself in the process\n\nand in the code i have got one step further\n\nany clues?\n\nmurray\n\n if ((pltcl_hold_interp = Tcl_CreateInterp()) == NULL)\n {\n elog(ERROR, \"pltcl: internal error - cannot create 'hold' \"\n \"interpreter\");\n }\n\n /************************************************************\n * Create the two interpreters\n ************************************************************/\n if ((pltcl_norm_interp =\n Tcl_CreateSlave(pltcl_hold_interp, \"norm\", 0)) == NULL)\n {\n elog(ERROR,\n \"*pltcl: internal error - cannot create 'normal' interpreter*\");\n }\n\n\n\n\n\n\n\nmurray\n\n\n\n\n\n\nTom Lane wrote:\n\n>Murray Prior Hobbs <murray@efone.com> writes:\n>\n>>maybe this is a dumb question\n>>but are not all the tcl sources part of the source distribution?\n>>\n>\n>I'm only going to say this one more time: Tcl is not part of Postgres.\n>\n>pltcl depends on libtcl (note difference), and the loader is evidently\n>not finding libtcl.so. Which will absolutely NOT be in\n>/usr/lib/postgresql. The question for you is where it actually lives\n>(if it's installed at all), and next why the dynamic loader search path\n>isn't finding it.\n>\n>\t\t\tregards, tom lane\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 5: Have you checked our extensive FAQ?\n>\n>http://www.postgresql.org/users-lounge/docs/faq.html\n>\n\n\n\n\n\n\n\n\nok ok - so i went off and read a LOT about Tcl - cool what a nice tool\n\nand then i downloaded the tcl/tk sources and built with appropriate configure\noptions and installed it - in approprate places (in /usr/bin - over the old\ncopies that were already there) and ran the tests and dowloaded some TCl\nsamples and played with the apps \n\nas i had been using the postgres 7.2 beta i reinstalled 7.13 over the top\n - right from the start, reconfigured, recompiled, reinstalled, reinitialised\n\nand tried to call a tcl function yet again - but now i get this error\n\nERROR: pltcl: internal error - cannot create 'normal' interpreter\nbut hmm, that's further than i got before and at least the database does\nnot restart itself in the process\n\nand in the code i have got one step further\n\nany clues?\n\nmurray\n if ((pltcl_hold_interp = Tcl_CreateInterp()) == NULL) { elog(ERROR, \"pltcl: internal error - cannot create 'hold' \" \"interpreter\"); } /************************************************************ * Create the two interpreters ************************************************************/ if ((pltcl_norm_interp = Tcl_CreateSlave(pltcl_hold_interp, \"norm\", 0)) == NULL) { elog(ERROR, \"pltcl: internal error - cannot create 'normal' interpreter\"); }\n\n\n\n\nmurray\n\n\n\n\n\n\nTom Lane wrote:\n\nMurray Prior Hobbs <murray@efone.com> writes:\n\nmaybe this is a dumb questionbut are not all the tcl sources part of the source distribution?\n\nI'm only going to say this one more time: Tcl is not part of Postgres.pltcl depends on libtcl (note difference), and the loader is evidentlynot finding libtcl.so. Which will absolutely NOT be in/usr/lib/postgresql. The question for you is where it actually lives(if it's installed at all), and next why the dynamic loader search pathisn't finding it.\t\t\tregards, tom lane---------------------------(end of broadcast)---------------------------TIP 5: Have you checked our extensive FAQ?http://www.postgresql.org/users-lounge/docs/faq.html", "msg_date": "Sun, 20 Jan 2002 18:57:37 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "[2002-01-19 19:40] Murray Prior Hobbs said:\n| \n| i have had no trouble loading and using the pgpgsql language - and it \n| lives in exactly the same place\n| \n| i've done as you suggested though - here is the output\n\nIndeed. I just got finished installing a chroot image of \nredhat-7.2 to test this. I am seeing the same Tcl_CreateInterp\nproblem you mentioned earlier. The pltcl language does not work \neven from the 7.2b3 rpms. Can someone verify that pltcl works on\ntheir stock redhat 7.2 system?\n\nAre there a known bugs in the stock 7.2 binutils or any other part\nof the toolchain that might be causing this problem? Most notably\nis the absence of pltcl.so being linked to libtcl.so. Could this\nbe a problem with redhat's tcl package?\n\nMonty, are you by chance running in a chroot?\n\nconfounded,\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Sun, 20 Jan 2002 06:59:29 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "[2002-01-20 23:24] Murray Prior Hobbs said:\n| Brent Verner wrote:\n| \n| >[2002-01-19 19:40] Murray Prior Hobbs said:\n| >| \n| >| i have had no trouble loading and using the pgpgsql language - and it \n| >| lives in exactly the same place\n| >| \n| >| i've done as you suggested though - here is the output\n| >\n| >Indeed. I just got finished installing a chroot image of \n| >redhat-7.2 to test this. I am seeing the same Tcl_CreateInterp\n| >problem you mentioned earlier. The pltcl language does not work \n| >even from the 7.2b3 rpms. Can someone verify that pltcl works on\n| >their stock redhat 7.2 system?\n| >\n| >Are there a known bugs in the stock 7.2 binutils or any other part\n| >of the toolchain that might be causing this problem? Most notably\n| >is the absence of pltcl.so being linked to libtcl.so. Could this\n| >be a problem with redhat's tcl package?\n| >\n| >Monty, are you by chance running in a chroot?\n| >\n| if you mean me (Murray) nope - it's a bog standard RedHat 7.2 install\n\nsorry! I know a guy named \"Monty Hobbs\"... I'm really too tired ;-)\n\n| but i have installed Tcl from the sources from scratch - 8.3.4\n\nIndeed I've tracked the problem down to the line that links\nthe pltcl.so library:\n\nmake[3]: Entering directory `/usr/local/cvs/pgsql/src/pl/tcl'\n/bin/sh mkMakefile.tcldefs.sh '/usr/lib/tclConfig.sh' 'Makefile.tcldefs'\nmake[3]: Leaving directory `/usr/local/cvs/pgsql/src/pl/tcl'\nmake[3]: Entering directory `/usr/local/cvs/pgsql/src/pl/tcl'\ngcc -pipe -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -fPIC -I../../../src/include -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -c -o pltcl.o pltcl.c\ngcc -pipe -shared -Wl,-soname,libtcl.so.0 -o pltcl.so pltcl.o -L/usr/lib -ltcl -ldl -lieee -lm -lc\n ^^^^^^^^^^^\n\nIIRC, this was changed to workaround another problem with the\ntcl client library having name conflicts. This value (TCL_SHLIB_LD)\ncomes directly from the /usr/lib/tclConfig.sh file supplied by the \nrpm. You can add the following line to src/pl/tcl/Makefile\nbelow \"-include Makefile.tcldefs\"\n\n TCL_SHLIB_LD = gcc -shared\n\nto override the erronious value supplied by the system's tclConfig.sh.\n\n| but just because i'm ignorant of many things - how would i check if i \n| was running in chroot environment?\n\nnot sure. I always know when I am, because I setup the chroot.\nSome web hosts will give you a chroot as well, but if you are\ndeveloping on your own workstation, there is little chance of\nyou being in a chroot and not knowing it.\n\nhth.\n b\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Sun, 20 Jan 2002 07:36:37 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> I am seeing the same Tcl_CreateInterp\n> problem you mentioned earlier. The pltcl language does not work \n> even from the 7.2b3 rpms. Can someone verify that pltcl works on\n> their stock redhat 7.2 system?\n\nHmm, what Tcl version are you using? pltcl does not appear broken\non my system, but I think what I've got installed is Tcl 8.0.5.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 12:35:35 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> Can someone verify that pltcl works on\n> their stock redhat 7.2 system?\n\nIndeed it does not. On a straight-from-the-CD RH 7.2 install and\nCVS-tip Postgres, I see both of the behaviors Murray complained of.\n\nWhat I think is particularly nasty is that we get an exit(127) when\nthe symbol resolution fails, leading to database restart. This will\nprobably happen on *most* systems not only Linux, because we are\nspecifying RTLD_LAZY in our dlopen() calls, meaning that missing\nsymbols should be flagged when they are referenced at runtime --- and\nif we call a function that should be there and isn't, there's not much\nthe dynamic loader can do except throw a signal or exit().\n\nWhat we should be doing is specifying RTLD_NOW to dlopen(), so that\nany unresolved symbol failure occurs during dlopen(), when we are\nprepared to deal with it in a clean fashion.\n\nI ran into this same behavior years ago on HPUX and fixed it by using\nwhat they call BIND_IMMEDIATE mode; but I now see that most of the\nother ports are specifying RTLD_LAZY, and thus have this problem.\n\nUnless I hear a credible counter-argument, I am going to change\nRTLD_LAZY to RTLD_NOW in src/backend/port/dynloader/linux.h. I have\ntested that and it produces a clean error with no backend crash.\n\nWhat I would *like* to do is make the same change in all the\nport/dynloader files that reference RTLD_LAZY:\n\tsrc/backend/port/dynloader/aix.h\n\tsrc/backend/port/dynloader/bsdi.h\n\tsrc/backend/port/dynloader/dgux.h\n\tsrc/backend/port/dynloader/freebsd.h\n\tsrc/backend/port/dynloader/irix5.h\n\tsrc/backend/port/dynloader/linux.h\n\tsrc/backend/port/dynloader/netbsd.h\n\tsrc/backend/port/dynloader/openbsd.h\n\tsrc/backend/port/dynloader/osf.h\n\tsrc/backend/port/dynloader/sco.h\n\tsrc/backend/port/dynloader/solaris.h\n\tsrc/backend/port/dynloader/svr4.h\n\tsrc/backend/port/dynloader/univel.h\n\tsrc/backend/port/dynloader/unixware.h\n\tsrc/backend/port/dynloader/win.h\nHowever I'm a bit scared to do that at this late stage of the release\ncycle, because perhaps some of these platforms don't support the full\ndlopen() API. Comments? Can anyone test whether RTLD_NOW works on\nany of the above-mentioned ports?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 13:40:17 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "> However I'm a bit scared to do that at this late stage of the release\n> cycle, because perhaps some of these platforms don't support the full\n> dlopen() API. Comments? Can anyone test whether RTLD_NOW works on\n> any of the above-mentioned ports?\n\nI can confirm that RTLD_NOW exists on BSD/OS. Can we do:\n\n\t#ifdef RTLD_NOW \n\tuse RTLD_NOW \n\t#else \n\twhatever_is_there_now\n\t#endif\n\nin those ports at least for 7.2 so we can be sure we don't get failures.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sun, 20 Jan 2002 14:10:53 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> Indeed I've tracked the problem down to the line that links\n> the pltcl.so library:\n\n> gcc -pipe -shared -Wl,-soname,libtcl.so.0 -o pltcl.so pltcl.o -L/usr/lib -ltcl -ldl -lieee -lm -lc\n> ^^^^^^^^^^^\n\nYeah, removing the \"-Wl,-soname,libtcl.so.0\" switch produces a correctly\nfunctioning pltcl.\n\n> IIRC, this was changed to workaround another problem with the\n> tcl client library having name conflicts. This value (TCL_SHLIB_LD)\n> comes directly from the /usr/lib/tclConfig.sh file supplied by the \n> rpm.\n\nI seem to recall that this same problem was being debated a few weeks\nback, but apparently we didn't actually do anything about it. Looks\nlike we have to.\n\nPeter, didn't you have a proposal on the table to fix this?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 14:14:16 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Murray Prior Hobbs <murray@efone.com> writes:\n> Brent sent me a fix\n\n> ----start Bent's fix ----\n\n> rpm. You can add the following line to src/pl/tcl/Makefile\n> below \"-include Makefile.tcldefs\"\n\n> TCL_SHLIB_LD = gcc -shared\n\n> ---- end Brent's fix -----\n\n> which i tried but did not work\n\nWorks for me. Did you remove the pltcl.so file so it would be rebuilt?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 15:58:14 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Tom Lane writes:\n\n> Unless I hear a credible counter-argument, I am going to change\n> RTLD_LAZY to RTLD_NOW in src/backend/port/dynloader/linux.h. I have\n> tested that and it produces a clean error with no backend crash.\n>\n> What I would *like* to do is make the same change in all the\n> port/dynloader files that reference RTLD_LAZY:\n\nRTLD_LAZY allows you to load shared library modules that contain circular\nreferences. I don't know if that's useful or just stupid, but on some\nsystems the shared library models are pretty, um, different so that the\nneed for this might arise from time to time.\n\n> However I'm a bit scared to do that at this late stage of the release\n> cycle, because perhaps some of these platforms don't support the full\n> dlopen() API. Comments? Can anyone test whether RTLD_NOW works on\n> any of the above-mentioned ports?\n\nI really don't think this is a good change to make now, as we don't know\nhow well all of this is supported, and the failure scenario is annoying\nbut not really that harmful.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Sun, 20 Jan 2002 16:11:01 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu" }, { "msg_contents": "Tom Lane writes:\n\n> Peter, didn't you have a proposal on the table to fix this?\n\nYeah, complain loudly to whoever dared to package a broken Tcl like\nthat... Or we'll work with Andreas Zeugwetter's patches and eliminate the\nuse of tclConfig.sh mostly.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Sun, 20 Jan 2002 16:12:45 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n>> Peter, didn't you have a proposal on the table to fix this?\n\n> Yeah, complain loudly to whoever dared to package a broken Tcl like\n> that... Or we'll work with Andreas Zeugwetter's patches and eliminate the\n> use of tclConfig.sh mostly.\n\nYeah, I was taking a second look at Andreas' patch myself. At the time,\nthe report was that we were only seeing a failure in RPM-packaged\nPostgres and so I thought that the root problem was somewhere in our RPM\nscript. However, I have now tried it for myself and can confirm that\nwe fail in a Postgres source build too. The bogus soname switch might\nbe blamable on the Tcl RPM package and not on Tcl sources, but that\ndoesn't make a lot of difference to us either way.\n\nI'm still quite nervous about making these changes so late in the cycle.\nOTOH I suspect Andreas was right: we haven't been getting any pltcl\nportability testing from our beta testers. If it's broken now, we\ncan hardly make it worse.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 16:33:30 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> Unless I hear a credible counter-argument, I am going to change\n>> RTLD_LAZY to RTLD_NOW in src/backend/port/dynloader/linux.h. I have\n>> tested that and it produces a clean error with no backend crash.\n\n> RTLD_LAZY allows you to load shared library modules that contain circular\n> references.\n\nDoes that not work with RTLD_NOW? I should think it would. In any\ncase, I'm doubtful that we care.\n\n> I really don't think this is a good change to make now, as we don't know\n> how well all of this is supported, and the failure scenario is annoying\n> but not really that harmful.\n\nA database restart is always very bad news in my mind. You might be\nright that it's too risky to make such a change now for 7.2, but I still\nabsolutely want to do it for 7.3.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 16:43:45 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems) " }, { "msg_contents": "Tom Lane writes:\n\n> I'm still quite nervous about making these changes so late in the cycle.\n> OTOH I suspect Andreas was right: we haven't been getting any pltcl\n> portability testing from our beta testers.\n\nThis logic can also be reversed: We haven't been getting any beta testing\nfrom users of Red Hat 7.1.\n\n> If it's broken now, we can hardly make it worse.\n\nYou can surely make things a lot worse for those that are using other\noperating systems. I certainly don't agree with making changes just\nbecause Red Hat blew it.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Sun, 20 Jan 2002 17:17:57 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> You can surely make things a lot worse for those that are using other\n> operating systems. I certainly don't agree with making changes just\n> because Red Hat blew it.\n\nIt does appear that the problem can be blamed entirely on the RPM\npackaging of Tcl. I tried configuring from source on RHL 7.2, and\nneither tcl 8.3.2 nor 8.3.4 produce a \"soname\" switch in TCL_SHLIB_LD.\nIn fact, grep can't find any occurrence of \"soname\" anywhere in the\nTcl source distribution.\n\nNonetheless, I'm not sure that \"do nothing\" is an acceptable response\non our part.\n\nI tried setting up pltcl's makefile to dike out the offending switch:\n\noverride TCL_SHLIB_LD := $(patsubst %soname%, , $(TCL_SHLIB_LD))\n\nbut could not get it to work --- gmake's pattern matching logic seems\nto be too brain-dead to cope with more than one % in a pattern. And\n\noverride TCL_SHLIB_LD := $(patsubst -Wl,-soname%, , $(TCL_SHLIB_LD))\n\ndoesn't work either; apparently there's no way to escape the comma.\nAnyone know a cute hack to get gmake to do this?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 17:52:07 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "[2002-01-20 17:52] Tom Lane said:\n| Peter Eisentraut <peter_e@gmx.net> writes:\n| > You can surely make things a lot worse for those that are using other\n| > operating systems. I certainly don't agree with making changes just\n| > because Red Hat blew it.\n| \n| It does appear that the problem can be blamed entirely on the RPM\n| packaging of Tcl. I tried configuring from source on RHL 7.2, and\n| neither tcl 8.3.2 nor 8.3.4 produce a \"soname\" switch in TCL_SHLIB_LD.\n| In fact, grep can't find any occurrence of \"soname\" anywhere in the\n| Tcl source distribution.\n| \n| Nonetheless, I'm not sure that \"do nothing\" is an acceptable response\n| on our part.\n\nAgreed. I think working around this borkenness in the Makefile is\nthe best solution; I don't think switching from RTLD_LAZY is good\nright now.\n\n| I tried setting up pltcl's makefile to dike out the offending switch:\n| \n| override TCL_SHLIB_LD := $(patsubst %soname%, , $(TCL_SHLIB_LD))\n| \n| but could not get it to work --- gmake's pattern matching logic seems\n| to be too brain-dead to cope with more than one % in a pattern. And\n| \n| override TCL_SHLIB_LD := $(patsubst -Wl,-soname%, , $(TCL_SHLIB_LD))\n| \n| doesn't work either; apparently there's no way to escape the comma.\n| Anyone know a cute hack to get gmake to do this?\n\nIt seems that substvar operates on each \" \" separated token in the\nstring. The following works for me.\n\noverride TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname.*//')\n\ncheers.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Sun, 20 Jan 2002 19:02:57 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> It seems that substvar operates on each \" \" separated token in the\n> string. The following works for me.\n\n> override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname.*//')\n\nI suspect that the above works only because -Wl,-soname is the last\nswitch in TCL_SHLIB_LD; any following switches would be removed too.\nPerhaps better\n\noverride TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname[^ ]*//'\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 19:16:50 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "[2002-01-20 19:16] Tom Lane said:\n| Brent Verner <brent@rcfile.org> writes:\n| > It seems that substvar operates on each \" \" separated token in the\n| > string. The following works for me.\n| \n| > override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname.*//')\n| \n| I suspect that the above works only because -Wl,-soname is the last\n| switch in TCL_SHLIB_LD; any following switches would be removed too.\n| Perhaps better\n| \n| override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname[^ ]*//'\n\nYes, much better.\n\ncheers.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Sun, 20 Jan 2002 19:31:21 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Murray Prior Hobbs <murray@efone.com> writes:\n> tell me oh mighty guru's\n> what linux distribution could i use to make me a happy happy man\n\nJust apply this patch and RHL should work.\n\n*** src/pl/tcl/Makefile.orig\tSat Oct 13 00:23:50 2001\n--- src/pl/tcl/Makefile\tSun Jan 20 21:57:45 2002\n***************\n*** 49,54 ****\n--- 49,58 ----\n endif\n endif\n \n+ # Suppress bogus soname switch that RedHat RPMs put into tclConfig.sh\n+ override TCL_SHLIB_LD := $(shell echo \"$(TCL_SHLIB_LD)\" | sed 's/-Wl,-soname[^ ]*//')\n+ \n+ \n %$(TCL_SHLIB_SUFFIX): %.o\n \t$(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)\n \n\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 20 Jan 2002 22:03:54 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Tom Lane writes:\n\n> Just apply this patch and RHL should work.\n\nI'm OK with this patch. (Although you don't need the override.)\n\nWe should file a bug report with Red Hat, methinks.\n\n> *** src/pl/tcl/Makefile.orig\tSat Oct 13 00:23:50 2001\n> --- src/pl/tcl/Makefile\tSun Jan 20 21:57:45 2002\n> ***************\n> *** 49,54 ****\n> --- 49,58 ----\n> endif\n> endif\n>\n> + # Suppress bogus soname switch that RedHat RPMs put into tclConfig.sh\n> + override TCL_SHLIB_LD := $(shell echo \"$(TCL_SHLIB_LD)\" | sed 's/-Wl,-soname[^ ]*//')\n> +\n> +\n> %$(TCL_SHLIB_SUFFIX): %.o\n> \t$(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Sun, 20 Jan 2002 22:27:21 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> I'm OK with this patch. (Although you don't need the override.)\n\nOkay, committed. (I left in the override; it can't hurt can it?)\n\n> We should file a bug report with Red Hat, methinks.\n\nTrond, I think this is your turf ... is it a bug?\n\n\t\t\tregards, tom lane\n\n\n>> *** src/pl/tcl/Makefile.orig\tSat Oct 13 00:23:50 2001\n>> --- src/pl/tcl/Makefile\tSun Jan 20 21:57:45 2002\n>> ***************\n>> *** 49,54 ****\n>> --- 49,58 ----\n>> endif\n>> endif\n>> \n>> + # Suppress bogus soname switch that RedHat RPMs put into tclConfig.sh\n>> + override TCL_SHLIB_LD := $(shell echo \"$(TCL_SHLIB_LD)\" | sed 's/-Wl,-soname[^ ]*//')\n>> +\n>> +\n>> %$(TCL_SHLIB_SUFFIX): %.o\n>> $(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)\n\n> -- \n> Peter Eisentraut peter_e@gmx.net\n", "msg_date": "Sun, 20 Jan 2002 22:29:58 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "On Sun, Jan 20, 2002 at 01:40:17PM -0500, Tom Lane wrote:\n> What I would *like* to do is make the same change in all the\n> port/dynloader files that reference RTLD_LAZY:\n> \tsrc/backend/port/dynloader/openbsd.h\n\nI can't speak for other platforms but openbsd only has RTLD_LAZY.\n\n-- \nDavid Terrell | \"... a grandiose, wasteful drug war that will never\ndbt@meat.net | be won as long as so many Americans need to \nNebcorp Prime Minister | anesthetize themselves to get through the day.\" \nhttp://wwn.nebcorp.com/ | -Camille Paglia\n", "msg_date": "Mon, 21 Jan 2002 00:12:47 -0800", "msg_from": "David Terrell <dbt@meat.net>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "> On Sun, Jan 20, 2002 at 01:40:17PM -0500, Tom Lane wrote:\n> > What I would *like* to do is make the same change in all the\n> > port/dynloader files that reference RTLD_LAZY:\n> > \tsrc/backend/port/dynloader/openbsd.h\n>\n> I can't speak for other platforms but openbsd only has RTLD_LAZY.\n\nFreeBSD supports both:\n\n RTLD_LAZY Each external function reference is resolved when the func-\n tion is first called.\n\n RTLD_NOW All external function references are bound immediately by\n dlopen().\n\n RTLD_LAZY is normally preferred, for reasons of efficiency. However,\n RTLD_NOW is useful to ensure that any undefined symbols are discovered\n\nChris\n\n", "msg_date": "Mon, 21 Jan 2002 16:21:26 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "Christopher Kings-Lynne wrote:\n> > On Sun, Jan 20, 2002 at 01:40:17PM -0500, Tom Lane wrote:\n> > > What I would *like* to do is make the same change in all the\n> > > port/dynloader files that reference RTLD_LAZY:\n> > > \tsrc/backend/port/dynloader/openbsd.h\n> >\n> > I can't speak for other platforms but openbsd only has RTLD_LAZY.\n> \n> FreeBSD supports both:\n> \n> RTLD_LAZY Each external function reference is resolved when the func-\n> tion is first called.\n> \n> RTLD_NOW All external function references are bound immediately by\n> dlopen().\n> \n> RTLD_LAZY is normally preferred, for reasons of efficiency. However,\n> RTLD_NOW is useful to ensure that any undefined symbols are discovered\n> \n\nInteresting LAZY has better efficiency. Seems we should just keep LAZY\nas our default for future releases and tell people if they link to bad\nobject files, they should expect trouble.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 08:09:36 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "Bruce Momjian writes:\n\n> Interesting LAZY has better efficiency. Seems we should just keep LAZY\n> as our default for future releases and tell people if they link to bad\n> object files, they should expect trouble.\n\nIn practice, we load object files only if we call the function, so symbol\nresolution happens either way briefly after loading. RTLD_NOW includes\nsome overhead because it checks symbols that we might not end up needing,\nbut for the typical PostgreSQL extension module, that should really not\nmatter.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 21 Jan 2002 11:50:26 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu" }, { "msg_contents": "Peter Eisentraut wrote:\n> Bruce Momjian writes:\n> \n> > Interesting LAZY has better efficiency. Seems we should just keep LAZY\n> > as our default for future releases and tell people if they link to bad\n> > object files, they should expect trouble.\n> \n> In practice, we load object files only if we call the function, so symbol\n> resolution happens either way briefly after loading. RTLD_NOW includes\n> some overhead because it checks symbols that we might not end up needing,\n> but for the typical PostgreSQL extension module, that should really not\n> matter.\n\nOK, I was just throwing out the point in case it was significant.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 11:54:44 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Interesting LAZY has better efficiency.\n\n\"Efficiency\" by what measure? I would think that batch resolution of\nsymbols would be faster than taking a trap for each one.\n\n> Seems we should just keep LAZY\n> as our default for future releases and tell people if they link to bad\n> object files, they should expect trouble.\n\n(a) How are they going to find out if the object files are bad, other\nthan by crashing their database? I *really* don't like the attitude\nthat a backend crash is okay. Under any circumstances, development\nor not.\n\n(b) Badness may depend on context, eg LD_LIBRARY_PATH. So it's not\nreally safe to assume that if it worked before then you don't have to\nworry about it crashing you in production.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 12:03:24 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems) " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n\n> Tom Lane writes:\n> \n> > I'm still quite nervous about making these changes so late in the cycle.\n> > OTOH I suspect Andreas was right: we haven't been getting any pltcl\n> > portability testing from our beta testers.\n> \n> This logic can also be reversed: We haven't been getting any beta testing\n> from users of Red Hat 7.1.\n\nI don't think the tcl there had a proper so-name (from memory, I don't\nuse tcl)\n\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "21 Jan 2002 12:28:27 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "Tom Lane <tgl@sss.pgh.pa.us> writes:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > I'm OK with this patch. (Although you don't need the override.)\n> \n> Okay, committed. (I left in the override; it can't hurt can it?)\n> \n> > We should file a bug report with Red Hat, methinks.\n> \n> Trond, I think this is your turf ... is it a bug?\n\n(Note, I don't do tcl.)\n\nAt least part of it is intentional - adding the so name to the tcl\nlibrary. That said, it looks like a bug to me too... at the minimum,\nthe soname should be removed from the tclConfig.sh script after use in\ngenerating the tcl libraries. Adrian?\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "21 Jan 2002 12:36:59 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems" }, { "msg_contents": "On Sun, Jan 20, 2002 at 01:40:17PM -0500, Tom Lane wrote:\n> cycle, because perhaps some of these platforms don't support the full\n> dlopen() API. Comments? Can anyone test whether RTLD_NOW works on\n> any of the above-mentioned ports?\n\nDidn't check it *works*, but from $NetBSD: dlfcn.h,v 1.13 2000/06/13 01:21:53\n\n/* Values for dlopen `mode'. */\n#define RTLD_LAZY 1\n#define RTLD_NOW 2\n#define RTLD_GLOBAL 0x100 /* Allow global searches in object */\n#define RTLD_LOCAL 0x200\n#if !defined(_XOPEN_SOURCE)\n#define DL_LAZY RTLD_LAZY /* Compat */\n#endif\n\nCheers,\n\nPatrick\n", "msg_date": "Mon, 21 Jan 2002 19:04:50 +0000", "msg_from": "Patrick Welche <prlw1@newn.cam.ac.uk>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems)" }, { "msg_contents": "On Sun, Jan 20, 2002 at 07:16:50PM -0500, Tom Lane wrote:\n> Brent Verner <brent@rcfile.org> writes:\n> > It seems that substvar operates on each \" \" separated token in the\n> > string. The following works for me.\n> \n> > override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname.*//')\n> \n> I suspect that the above works only because -Wl,-soname is the last\n> switch in TCL_SHLIB_LD; any following switches would be removed too.\n> Perhaps better\n> \n> override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname[^ ]*//'\n\nSorry, but by this you broke freebsd build which has:\n\nTCL_SHLIB_LD = ld -shared -x -soname $@\n\nand $@ gets substituted too early\n\ncan you restrict this hack by putting something like\n\nifeq ($(PORTNAME), linux)\noverride TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname[^ ]*//'\nendif\n\ninstead?\n", "msg_date": "Wed, 23 Jan 2002 11:11:16 +0200", "msg_from": "Vsevolod Lobko <seva@sevasoft.kiev.ua>", "msg_from_op": false, "msg_subject": "pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu problems)" }, { "msg_contents": "[I trimmed the CC list. It was getting out of hand. Boy, how I despise having \nto use reply-all.... :-)]\n\nOn Wednesday 23 January 2002 04:44 am, Murray Prior Hobbs wrote:\n> and ran the check (make check) - 79 tests passed\n\n> then i ran the make installcheck\n\n> and get precisely the same failures as i got on my 686 over the last 3 days\n\n> could somebody else confirm these findings please or suggest what's going\n> on\n\nThis probably has nothing to do with the TCL issue. It is the locale setting \nbiting you. The first regression run using make check is using the C locale \n-- which passes all tests. The second run isn't using the C locale, \napparently. And those tests fail when the locale is not 'C'. \n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Wed, 23 Jan 2002 07:49:36 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Red Hat 7.2 Regression failures (Re: pltcl build problem on FreeBSD\n\t(was: Re: pltlc and pltlcu problems))" }, { "msg_contents": "Murray Prior Hobbs <murray@efone.com> writes:\n> i made and installed\n\n> and ran the check (make check) - 79 tests passed\n\n> then i ran the make installcheck\n\n> and get precisely the same failures as i got on my 686 over the last 3 days\n\nPATH pointing at the wrong thing, or other conflicting environment\nvariables (eg PGPORT), I'd guess.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 09:56:45 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Vsevolod Lobko <seva@sevasoft.kiev.ua> writes:\n>> Perhaps better\n>> \n>> override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname[^ ]*//'\n\n> Sorry, but by this you broke freebsd build which has:\n\n> TCL_SHLIB_LD = ld -shared -x -soname $@\n\n> and $@ gets substituted too early\n\nHow annoying. I was debating whether to use single or double quotes\naround the echo parameter --- looks like I made the wrong choice.\nWill fix.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 11:08:36 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Vsevolod Lobko writes:\n\n> > override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed 's/-Wl,-soname[^ ]*//'\n>\n> Sorry, but by this you broke freebsd build which has:\n>\n> TCL_SHLIB_LD = ld -shared -x -soname $@\n>\n> and $@ gets substituted too early\n\nI've submitted a bug report to FreeBSD about this. Let's hope they fix it\nsoon.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 23 Jan 2002 11:48:40 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> I've submitted a bug report to FreeBSD about this. Let's hope they fix it\n> soon.\n\nWill it not work to do\n\n$(shell echo '$(TCL_SHLIB_LD)' | sed ...\n\n?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 11:54:09 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "[2002-01-23 11:54] Tom Lane said:\n| Peter Eisentraut <peter_e@gmx.net> writes:\n| > I've submitted a bug report to FreeBSD about this. Let's hope they fix it\n| > soon.\n| \n| Will it not work to do\n| \n| $(shell echo '$(TCL_SHLIB_LD)' | sed ...\n\nNo. I just tested this, and the $@ still got expanded too early.\nWe'll need to use the suggested ifeq($(PORTNAME),linux) test.\n\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Wed, 23 Jan 2002 12:01:50 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> | Will it not work to do\n> | \n> | $(shell echo '$(TCL_SHLIB_LD)' | sed ...\n\n> No. I just tested this, and the $@ still got expanded too early.\n\n[ scratches head ... ] Where is the expansion happening, then? Seems\nweird.\n\n> We'll need to use the suggested ifeq($(PORTNAME),linux) test.\n\nI don't much like that since it makes an inappropriate assumption,\nviz that if you're on Linux you must have a TCL_SHLIB_LD value that\nhasn't got any $variables in it. I'd prefer to figure out *why* we\nare getting a premature evaluation.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 12:06:25 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Tom Lane wrote:\n> Brent Verner <brent@rcfile.org> writes:\n> > | Will it not work to do\n> > | \n> > | $(shell echo '$(TCL_SHLIB_LD)' | sed ...\n> \n> > No. I just tested this, and the $@ still got expanded too early.\n> \n> [ scratches head ... ] Where is the expansion happening, then? Seems\n> weird.\n> \n> > We'll need to use the suggested ifeq($(PORTNAME),linux) test.\n> \n> I don't much like that since it makes an inappropriate assumption,\n> viz that if you're on Linux you must have a TCL_SHLIB_LD value that\n> hasn't got any $variables in it. I'd prefer to figure out *why* we\n> are getting a premature evaluation.\n\nAs a data point, now that FreeBSD is showing problems too, I see this on\nBSD/OS with TCL 8.3 in tclConfig.sh:\n\n\tTCL_SHLIB_LD='cc -shared'\n\nDoes this mean I don't have the problem here?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 23 Jan 2002 12:19:49 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu" }, { "msg_contents": "[2002-01-23 12:06] Tom Lane said:\n| Brent Verner <brent@rcfile.org> writes:\n| > | Will it not work to do\n| > | \n| > | $(shell echo '$(TCL_SHLIB_LD)' | sed ...\n| \n| > No. I just tested this, and the $@ still got expanded too early.\n| \n| [ scratches head ... ] Where is the expansion happening, then? Seems\n| weird.\n\napparently the $(shell ...) construct expands any shell-like\nvars.\n\nfrom make's info file:\n\n The `shell' function performs the same function that backquotes\n (``') perform in most shells: it does \"command expansion\".\n\n| > We'll need to use the suggested ifeq($(PORTNAME),linux) test.\n| \n| I don't much like that since it makes an inappropriate assumption,\n| viz that if you're on Linux you must have a TCL_SHLIB_LD value that\n| hasn't got any $variables in it. I'd prefer to figure out *why* we\n| are getting a premature evaluation.\n\nmaybe check for a '$' in the TCL_SHLIB_LD ? I've been trying\n$(findstring ...) but have not gotten that to work right yet.\n\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Wed, 23 Jan 2002 12:29:50 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Tom Lane writes:\n\n> [ scratches head ... ] Where is the expansion happening, then? Seems\n> weird.\n\nThe $@ is expanded as a make variable. Make does care whether you're\nexecuting a $(shell) thing around it. However, it seems that $@ should\nexpand to nothing in that assignment, so where's the problem?\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 23 Jan 2002 12:59:00 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and" }, { "msg_contents": "[2002-01-23 12:29] Brent Verner said:\n| [2002-01-23 12:06] Tom Lane said:\n| | Brent Verner <brent@rcfile.org> writes:\n| | > | Will it not work to do\n| | > | \n| | > | $(shell echo '$(TCL_SHLIB_LD)' | sed ...\n| | \n| | > No. I just tested this, and the $@ still got expanded too early.\n| | \n| | [ scratches head ... ] Where is the expansion happening, then? Seems\n| | weird.\n| \n| apparently the $(shell ...) construct expands any shell-like\n| vars.\n| \n| from make's info file:\n| \n| The `shell' function performs the same function that backquotes\n| (``') perform in most shells: it does \"command expansion\".\n| \n| | > We'll need to use the suggested ifeq($(PORTNAME),linux) test.\n| | \n| | I don't much like that since it makes an inappropriate assumption,\n| | viz that if you're on Linux you must have a TCL_SHLIB_LD value that\n| | hasn't got any $variables in it. I'd prefer to figure out *why* we\n| | are getting a premature evaluation.\n| \n| maybe check for a '$' in the TCL_SHLIB_LD ? I've been trying\n| $(findstring ...) but have not gotten that to work right yet.\n\nThe best I can come up with is checking for the offending string\n'libtcl.so.0' in the TCL_SHLIB_LD.\n\nifneq (,$(findstring libtcl.so.0,$(TCL_SHLIB_LD)))\n TCL_SHLIB_LD := $(shell echo '$(TCL_SHLIB_LD)' | sed 's/-Wl,-soname[^ ]*//')\nendif\n\n\nany better ideas out there? I've exhausted my PG time for today ;-)\n\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Wed, 23 Jan 2002 12:59:16 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Tom Lane <tgl@sss.pgh.pa.us> writes:\n\n> Brent Verner <brent@rcfile.org> writes:\n> > | Will it not work to do\n> > | \n> > | $(shell echo '$(TCL_SHLIB_LD)' | sed ...\n> \n> > No. I just tested this, and the $@ still got expanded too early.\n> \n> [ scratches head ... ] Where is the expansion happening, then? Seems\n> weird.\n\nThe expansion is done by make. It does expand variables recursively,\neven for :=. Using $$@ instead of $@ should help in this particular\ncase, I think.\n\n Bernhard\n\n-- \nIntevation GmbH http://intevation.de/\nSketch http://sketch.sourceforge.net/\nMapIt! http://mapit.de/\n", "msg_date": "23 Jan 2002 19:02:14 +0100", "msg_from": "Bernhard Herzog <bh@intevation.de>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> [ scratches head ... ] Where is the expansion happening, then? Seems\n>> weird.\n\n> The $@ is expanded as a make variable. Make does care whether you're\n> executing a $(shell) thing around it. However, it seems that $@ should\n> expand to nothing in that assignment, so where's the problem?\n\nI think the complaint is that we need it to still look like $@ when\nTCL_SHLIB_LD is used in the shlib-building rule. If Make recursively\nexpands the variable before executing the $shell construct then we\ngot trouble.\n\nUgly as it is, the check on portname may be the best solution available.\nI'm gonna think a little more, but I haven't got a better idea now.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 13:05:27 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "Bernhard Herzog <bh@intevation.de> writes:\n> Using $$@ instead of $@ should help in this particular\n> case, I think.\n\nBut we haven't got control of what the initial value of TCL_SHLIB_LD is.\n\nHmm. Wait a minute; we're going about this all wrong. Instead of\nhacking the Makefile, let's hack mkMakefile.tcldefs.sh. We can\ndefinitely fix the TCL_SHLIB_LD value there, before Make sees it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 13:07:51 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "On Wed, Jan 23, 2002 at 12:59:00PM -0500, Peter Eisentraut wrote:\n> Tom Lane writes:\n> \n> > [ scratches head ... ] Where is the expansion happening, then? Seems\n> > weird.\n> \n> The $@ is expanded as a make variable. Make does care whether you're\n> executing a $(shell) thing around it. However, it seems that $@ should\n> expand to nothing in that assignment, so where's the problem?\n\nexactly in that, so make triing to execute \nld -shared -x -soname -o pltcl.so pltcl.o\n ^ no arguments to -soname\n", "msg_date": "Wed, 23 Jan 2002 21:34:31 +0200", "msg_from": "Vsevolod Lobko <seva@sevasoft.kiev.ua>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and pltlcu\n\tproblems)" }, { "msg_contents": "\nok i dropped the locale support and reconfigured, remade, reinstalled \netc etc on two machines\n\nboth machines failed - but with different failures\n\nsee below Lamar's mail for deatils of the two sets of failures\n\nmurray\n\nps - i'll remove configure options until nothing fails\n\nLamar Owen wrote:\n\n>[I trimmed the CC list. It was getting out of hand. Boy, how I despise having \n>to use reply-all.... :-)]\n>\n>On Wednesday 23 January 2002 04:44 am, Murray Prior Hobbs wrote:\n>\n>>and ran the check (make check) - 79 tests passed\n>>\n>>then i ran the make installcheck\n>>\n>>and get precisely the same failures as i got on my 686 over the last 3 days\n>>\n>>could somebody else confirm these findings please or suggest what's going\n>>on\n>>\n>\n>This probably has nothing to do with the TCL issue. It is the locale setting \n>biting you. The first regression run using make check is using the C locale \n>-- which passes all tests. The second run isn't using the C locale, \n>apparently. And those tests fail when the locale is not 'C'. \n>\n\nthese are the make checkinstall failures for the following configuarion\n\n./configure --enable-multibyte=UNICODE --enable-unicode-conversion --enable-locale --with-tcl --without-tk --enable-odbc --with-unixodbc --enable-syslog\n\n\n\n\n/bin/sh ./pg_regress --schedule=./serial_schedule --multibyte=UNICODE\n(using postmaster on Unix socket, default port)\n============== dropping database \"regression\" ==============\nERROR: DROP DATABASE: database \"regression\" does not exist\ndropdb: database removal failed\n============== creating database \"regression\" ==============\nCREATE DATABASE\n============== dropping regression test user accounts ==============\n============== installing PL/pgSQL ==============\n============== running regression test queries ==============\ntest boolean ... ok\ntest char ... FAILED\ntest name ... ok\ntest varchar ... FAILED\ntest text ... ok\ntest int2 ... ok\ntest int4 ... ok\ntest int8 ... FAILED\ntest oid ... ok\ntest float4 ... ok\ntest float8 ... ok\ntest bit ... ok\ntest numeric ... FAILED\ntest strings ... ok\ntest numerology ... ok\ntest point ... ok\ntest lseg ... ok\ntest box ... ok\ntest path ... ok\ntest polygon ... ok\ntest circle ... ok\ntest date ... ok\ntest time ... ok\ntest timetz ... ok\ntest timestamp ... ok\ntest timestamptz ... ok\ntest interval ... ok\ntest abstime ... ok\ntest reltime ... ok\ntest tinterval ... ok\ntest inet ... ok\ntest comments ... ok\ntest oidjoins ... ok\ntest type_sanity ... ok\ntest opr_sanity ... ok\ntest geometry ... ok\ntest horology ... ok\ntest create_function_1 ... ok\ntest create_type ... ok\ntest create_table ... ok\ntest create_function_2 ... ok\ntest copy ... FAILED\ntest constraints ... ok\ntest triggers ... ok\ntest create_misc ... ok\ntest create_aggregate ... ok\ntest create_operator ... ok\ntest create_index ... ok\ntest inherit ... ok\ntest create_view ... ok\ntest sanity_check ... ok\ntest errors ... ok\ntest select ... ok\ntest select_into ... ok\ntest select_distinct ... ok\ntest select_distinct_on ... ok\ntest select_implicit ... FAILED\ntest select_having ... FAILED\ntest subselect ... ok\ntest union ... ok\ntest case ... ok\ntest join ... ok\ntest aggregates ... ok\ntest transactions ... ok\ntest random ... ok\ntest portals ... ok\ntest arrays ... ok\ntest btree_index ... ok\ntest hash_index ... ok\ntest privileges ... ok\ntest misc ... FAILED\ntest select_views ... FAILED\ntest alter_table ... ok\ntest portals_p2 ... ok\ntest rules ... ok\ntest foreign_key ... ok\ntest limit ... ok\ntest plpgsql ... ok\ntest temp ... ok\n\n=======================\n 9 of 79 tests failed.\n=======================\n\nthese are the make checkinstall failures for the following configuarion - the locale option is dropped\n\n./configure --enable-multibyte=UNICODE --enable-unicode-conversion --with-tcl --without-tk --enable-odbc --with-unixodbc --enable-syslog\n\n/bin/sh ./pg_regress --schedule=./serial_schedule --multibyte=UNICODE\n(using postmaster on Unix socket, default port)\n============== dropping database \"regression\" ==============\nERROR: DROP DATABASE: database \"regression\" does not exist\ndropdb: database removal failed\n============== creating database \"regression\" ==============\nCREATE DATABASE\n============== dropping regression test user accounts ==============\n============== installing PL/pgSQL ==============\n============== running regression test queries ==============\ntest boolean ... ok\ntest char ... ok\ntest name ... ok\ntest varchar ... ok\ntest text ... ok\ntest int2 ... ok\ntest int4 ... ok\ntest int8 ... ok\ntest oid ... ok\ntest float4 ... ok\ntest float8 ... ok\ntest bit ... ok\ntest numeric ... ok\ntest strings ... ok\ntest numerology ... ok\ntest point ... ok\ntest lseg ... ok\ntest box ... ok\ntest path ... ok\ntest polygon ... ok\ntest circle ... ok\ntest date ... ok\ntest time ... ok\ntest timetz ... ok\ntest timestamp ... ok\ntest timestamptz ... ok\ntest interval ... ok\ntest abstime ... ok\ntest reltime ... ok\ntest tinterval ... ok\ntest inet ... ok\ntest comments ... ok\ntest oidjoins ... ok\ntest type_sanity ... ok\ntest opr_sanity ... ok\ntest geometry ... ok\ntest horology ... ok\ntest create_function_1 ... ok\ntest create_type ... ok\ntest create_table ... ok\ntest create_function_2 ... ok\ntest copy ... FAILED\ntest constraints ... ok\ntest triggers ... ok\ntest create_misc ... ok\ntest create_aggregate ... ok\ntest create_operator ... ok\ntest create_index ... ok\ntest inherit ... ok\ntest create_view ... ok\ntest sanity_check ... ok\ntest errors ... ok\ntest select ... FAILED\ntest select_into ... ok\ntest select_distinct ... FAILED\ntest select_distinct_on ... FAILED\ntest select_implicit ... ok\ntest select_having ... ok\ntest subselect ... ok\ntest union ... ok\ntest case ... ok\ntest join ... ok\ntest aggregates ... FAILED\ntest transactions ... ok\ntest random ... failed (ignored)\ntest portals ... ok\ntest arrays ... ok\ntest btree_index ... ok\ntest hash_index ... ok\ntest privileges ... ok\ntest misc ... FAILED\ntest select_views ... ok\ntest alter_table ... ok\ntest portals_p2 ... FAILED\ntest rules ... ok\ntest foreign_key ... ok\ntest limit ... FAILED\ntest plpgsql ... ok\ntest temp ... ok\n\n====================================================\n 9 of 79 tests failed, 1 of these failures ignored.\n====================================================\n\n\n\n\n\n\n", "msg_date": "Thu, 24 Jan 2002 14:13:53 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: Red Hat 7.2 Regression failures (Re: pltcl build problem on\n\tFreeBSD (was: Re: pltlc and pltlcu problems))" }, { "msg_contents": "Vsevolod Lobko writes:\n\n> Sorry, but by this you broke freebsd build which has:\n>\n> TCL_SHLIB_LD = ld -shared -x -soname $@\n>\n> and $@ gets substituted too early\n\nFreeBSD has fixed this now.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Sun, 27 Jan 2002 11:02:33 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: pltcl build problem on FreeBSD (was: Re: pltlc and" }, { "msg_contents": "I hate to sound like a broken record, but I want to re-open that\ndiscussion about RTLD_LAZY binding that trailed off a week or two\nago. I have just noticed that the 7.0 and 7.1 versions of\nsrc/backend/port/dynloader/linux.h have\n\n#define pg_dlopen(f)\tdlopen(f, 2)\n\nwhich in 7.2 has been changed to\n\n#define pg_dlopen(f)\tdlopen((f), RTLD_LAZY | RTLD_GLOBAL)\n\nBut a quick look in /usr/include/bits/dlfcn.h shows that (at least\non RH Linux 7.2), the old coding was equivalent to RTLD_NOW.\n\nI therefore assert that the current coding is effectively untested\non Linux, which is probably our most popular platform, and therefore\nit should *NOT* be accorded the respect normally due to the status\nquo. Arguably, 7.2 has introduced breakage here.\n\nA grep through the 7.1 versions of src/backend/port/dynloader/*.h\nshows the following rather motley assortment of dlopen flag choices:\n\naix.h:61:#define pg_dlopen(f) dlopen(f, RTLD_LAZY)\nbsdi.h:23:#define pg_dlopen(f) dlopen(f, RTLD_LAZY)\ndgux.h:26:#define pg_dlopen(f) dlopen(f,1)\nfreebsd.h:36:#define pg_dlopen(f) BSD44_derived_dlopen(f, 1)\nirix5.h:29:#define pg_dlopen(f) dlopen(f,1)\nlinux.h:34:#define pg_dlopen(f) dlopen(f, 2)\nnetbsd.h:36:#define pg_dlopen(f) BSD44_derived_dlopen(f, 1)\nopenbsd.h:36:#define pg_dlopen(f) BSD44_derived_dlopen(f, 1)\nosf.h:31:#define pg_dlopen(f) dlopen(f, RTLD_LAZY)\nsco.h:29:#define pg_dlopen(f) dlopen(f,1)\nsolaris.h:9:#define pg_dlopen(f) dlopen(f,1)\nsunos4.h:29:#define pg_dlopen(f) dlopen(f, 1)\nsvr4.h:29:#define pg_dlopen(f) dlopen(f,RTLD_LAZY)\nunivel.h:29:#define pg_dlopen(f) dlopen(f,RTLD_LAZY)\nunixware.h:29:#define pg_dlopen(f) dlopen(f,RTLD_LAZY)\nwin.h:29:#define pg_dlopen(f) dlopen(f,1)\n\nIn 7.2 these have all been changed to \"RTLD_LAZY | RTLD_GLOBAL\", but\nI am no longer willing to presume that that's equivalent to the\noriginal coding. Could people who have these platforms look to see\nwhat the numeric values mentioned above actually equate to on their\nplatforms?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 10 Feb 2002 20:00:42 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu " }, { "msg_contents": "[2002-02-10 20:00] Tom Lane said:\n\n| freebsd.h:36:#define pg_dlopen(f) BSD44_derived_dlopen(f, 1)\n| netbsd.h:36:#define pg_dlopen(f) BSD44_derived_dlopen(f, 1)\n\n freebsd 4.5\n netbsd 1.5.2\n\n#define RTLD_LAZY 1\n#define RTLD_GLOBAL 0x100\n\n\ncheers.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Sun, 10 Feb 2002 20:42:59 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> freebsd 4.5\n> netbsd 1.5.2\n\n> #define RTLD_LAZY 1\n> #define RTLD_GLOBAL 0x100\n\nThanks. Is there an RTLD_NOW symbol on those platforms?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 10 Feb 2002 21:24:16 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu " }, { "msg_contents": "[2002-02-10 21:24] Tom Lane said:\n| Brent Verner <brent@rcfile.org> writes:\n| > freebsd 4.5\n| > netbsd 1.5.2\n| \n| > #define RTLD_LAZY 1\n| > #define RTLD_GLOBAL 0x100\n| \n| Thanks. Is there an RTLD_NOW symbol on those platforms?\n\nyes. I've attached the dlfcn.h files from each incase there is\nanything else in there that might be of interest.\n\ncheers.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman", "msg_date": "Sun, 10 Feb 2002 22:49:23 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu" }, { "msg_contents": "I wrote:\n> I hate to sound like a broken record, but I want to re-open that\n> discussion about RTLD_LAZY binding that trailed off a week or two\n> ago.\n> ... I therefore assert that the current coding is effectively untested\n> on Linux, which is probably our most popular platform, and therefore\n> it should *NOT* be accorded the respect normally due to the status\n> quo. Arguably, 7.2 has introduced breakage here.\n\nAfter some further digging around on the net, I believe that coding in\nthe following style is safe and will work on all systems supporting\ndlopen():\n\n/*\n * In older systems, like SunOS 4.1.3, the RTLD_NOW flag isn't defined\n * and the mode argument to dlopen must always be 1. The RTLD_GLOBAL\n * flag is wanted if available, but it doesn't exist everywhere.\n * If it doesn't exist, set it to 0 so it has no effect.\n */\n#ifndef RTLD_NOW\n# define RTLD_NOW 1\n#endif\n\n#ifndef RTLD_GLOBAL\n# define RTLD_GLOBAL 0\n#endif\n\n#define pg_dlopen(f)\tdlopen((f), RTLD_NOW | RTLD_GLOBAL)\n\n\nI also believe that this will produce more consistent cross-platform\nbehavior: so far as I could learn from googling, systems that do not\ndefine RTLD_NOW/RTLD_LAZY all act as though the mode were RTLD_NOW,\nie, immediate binding.\n\nAny objections to modifying all the port/dynloader files this way?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 11 Feb 2002 19:49:57 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu " }, { "msg_contents": "On Mon, Feb 11, 2002 at 07:49:57PM -0500, Tom Lane wrote:\n> I also believe that this will produce more consistent cross-platform\n> behavior: so far as I could learn from googling, systems that do not\n> define RTLD_NOW/RTLD_LAZY all act as though the mode were RTLD_NOW,\n> ie, immediate binding.\n> \n> Any objections to modifying all the port/dynloader files this way?\n\nOpenBSD:\n The dlopen() function takes a name of a shared object as its first argu-\n ment. The shared object is mapped into the address space, relocated, and\n its external references are resolved in the same way as is done with the\n implicitly loaded shared libraries at program startup.\n\n The path argument can either be an absolute pathname or it can be of the\n form ``lib<name>.so[.xx[.yy]]'' in which case the same library search\n rules apply that are used for ``intrinsic'' shared library searches. The\n second argument currently has no effect, but should be set to DL_LAZY for\n future compatibility.\n\nThat last sentence being key....\n\n-- \nDavid Terrell | \"War is peace, \nPrime Minister, Nebcorp | freedom is slavery, \ndbt@meat.net | ignorance is strength \nhttp://wwn.nebcorp.com/ | Dishes are clean.\" - Chris Fester\n", "msg_date": "Thu, 14 Feb 2002 18:08:42 -0800", "msg_from": "David Terrell <dbt@meat.net>", "msg_from_op": false, "msg_subject": "Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu" } ]
[ { "msg_contents": "I have enabled /contrib/pg_upgrade and added a mention in the README\nthat it is lightly tested. I have not received any testing reports\nsince I finished it earlier this week.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 17 Jan 2002 23:42:14 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "pg_upgrade" }, { "msg_contents": "I just downloaded postgresql-7.2b5.tar.gz from \nhttp://developer.postgresql.org/beta.php. It seems the file is actually \nnot gzipped, just tarred.\n\n-rwxr--r-- 1 root cvs 37734400 Jan 18 11:22 \npostgresql-7.2b5.tar.gz\n\n# tar -xzvf postgresql-7.2b5.tar.gz\n\ngzip: stdin: not in gzip format\ntar: Child returned status 1\ntar: Error exit delayed from previous errors\n\n\nJoe\n\n\n", "msg_date": "Fri, 18 Jan 2002 11:31:06 -0800", "msg_from": "\"Joe Conway (wwc)\" <jconway@cox.net>", "msg_from_op": false, "msg_subject": "postgresql-7.2b5.tar.gz" }, { "msg_contents": "On Fri, 18 Jan 2002, Joe Conway (wwc) wrote:\n\n> I just downloaded postgresql-7.2b5.tar.gz from\n> http://developer.postgresql.org/beta.php. It seems the file is actually\n> not gzipped, just tarred.\n>\n> -rwxr--r-- 1 root cvs 37734400 Jan 18 11:22\n> postgresql-7.2b5.tar.gz\n\n-rw-r--r-- 1 pgsql pgsql 9171841 Jan 14 08:26 postgresql-7.2b5.tar.gz\n\nSure your browser didn't do you a favor and ungzip it? I've been bit\nby that before.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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": "Fri, 18 Jan 2002 14:52:06 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: postgresql-7.2b5.tar.gz" }, { "msg_contents": "\"Joe Conway (wwc)\" <jconway@cox.net> writes:\n> I just downloaded postgresql-7.2b5.tar.gz from \n> http://developer.postgresql.org/beta.php. It seems the file is actually \n> not gzipped, just tarred.\n\n> -rwxr--r-- 1 root cvs 37734400 Jan 18 11:22 \n> postgresql-7.2b5.tar.gz\n\nThe file is certainly gzipped on the FTP server. I'm wondering if your\nbrowser \"helpfully\" decompressed it as it came in (which might have been\nactually somewhat helpful, if it changed the filename, too ...)\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 14:57:25 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: postgresql-7.2b5.tar.gz " }, { "msg_contents": "Tom Lane wrote:\n\n> \n>>-rwxr--r-- 1 root cvs 37734400 Jan 18 11:22 \n>>postgresql-7.2b5.tar.gz\n>>\n> \n> The file is certainly gzipped on the FTP server. I'm wondering if your\n> browser \"helpfully\" decompressed it as it came in (which might have been\n> actually somewhat helpful, if it changed the filename, too ...)\n\n\nSure enough, looks like Mozilla *was* trying to be helpful.\n\nIt turns out if you hold down <shift> while clicking on the link (to \nprevent trying to view a file in the browser instead of downloading) \nthen the file gets automatically uncompressed. If you click the link \nwithout <shift>ing, the compressed file comes down as is.\n\nSorry for crying wolf!\n\nJoe\n\n\n\n", "msg_date": "Fri, 18 Jan 2002 13:51:14 -0800", "msg_from": "\"Joe Conway (wwc)\" <jconway@cox.net>", "msg_from_op": false, "msg_subject": "Re: postgresql-7.2b5.tar.gz" }, { "msg_contents": "\"Joe Conway (wwc)\" <jconway@cox.net> writes:\n\n> Tom Lane wrote:\n> \n> >\n> >> -rwxr--r-- 1 root cvs 37734400 Jan 18 11:22\n> >> postgresql-7.2b5.tar.gz\n> >>\n> > The file is certainly gzipped on the FTP server. I'm wondering if\n> > your\n> > browser \"helpfully\" decompressed it as it came in (which might have been\n> > actually somewhat helpful, if it changed the filename, too ...)\n> \n> \n> Sure enough, looks like Mozilla *was* trying to be helpful.\n> \n> It turns out if you hold down <shift> while clicking on the link (to\n> prevent trying to view a file in the browser instead of downloading)\n> then the file gets automatically uncompressed. If you click the link\n> without <shift>ing, the compressed file comes down as is.\n> \n> Sorry for crying wolf!\n> \n> Joe\n\nThat's why nowadays I right click on links choose \"Copy Link Address\"\nand paste link into an xterm where I can safely use wget to actually\ndownload the darn thing.\n\nJason\n", "msg_date": "18 Jan 2002 15:34:08 -0700", "msg_from": "Jason Earl <jason.earl@simplot.com>", "msg_from_op": false, "msg_subject": "Re: postgresql-7.2b5.tar.gz" }, { "msg_contents": "On 18 Jan 2002, Jason Earl wrote:\n\n> \"Joe Conway (wwc)\" <jconway@cox.net> writes:\n>\n> > Tom Lane wrote:\n> >\n> > >\n> > >> -rwxr--r-- 1 root cvs 37734400 Jan 18 11:22\n> > >> postgresql-7.2b5.tar.gz\n> > >>\n> > > The file is certainly gzipped on the FTP server. I'm wondering if\n> > > your\n> > > browser \"helpfully\" decompressed it as it came in (which might have been\n> > > actually somewhat helpful, if it changed the filename, too ...)\n> >\n> >\n> > Sure enough, looks like Mozilla *was* trying to be helpful.\n> >\n> > It turns out if you hold down <shift> while clicking on the link (to\n> > prevent trying to view a file in the browser instead of downloading)\n> > then the file gets automatically uncompressed. If you click the link\n> > without <shift>ing, the compressed file comes down as is.\n> >\n> > Sorry for crying wolf!\n> >\n> > Joe\n>\n> That's why nowadays I right click on links choose \"Copy Link Address\"\n> and paste link into an xterm where I can safely use wget to actually\n> download the darn thing.\n\nPlease tell me that works with the php sources. I had it at one point\nbut can't find the trick. Quite often I need to download php to a\nmachine that doesn't have lynx and is not local.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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": "Fri, 18 Jan 2002 17:37:23 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: postgresql-7.2b5.tar.gz" } ]
[ { "msg_contents": "Hi, I see followings in current:\n\ncreate table t2 (t date primary key)\n[insert some data into t2]\n select *,age(t) from t2 where age(t) = '9 mons 30 days'::interval;\n t | age \n------------+----------------\n 2001-03-18 | 10 mons\n 2001-03-19 | 9 mons 30 days\n(2 rows)\n\nHow come 10 mons == 9 mons 30 days?\n--\nTatsuo Ishii\n", "msg_date": "Fri, 18 Jan 2002 13:47:45 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": true, "msg_subject": "age() function?" }, { "msg_contents": "Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> How come 10 mons == 9 mons 30 days?\n\nBecause for purposes of comparisons, type interval assumes 1 month\n== 30 days (cf. interval_cmp_internal). Pretty grotty, I agree,\nbut it's not easy to see how to do better.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 00:11:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: age() function? " }, { "msg_contents": "> > How come 10 mons == 9 mons 30 days?\n> \n> Because for purposes of comparisons, type interval assumes 1 month\n> == 30 days (cf. interval_cmp_internal). Pretty grotty, I agree,\n> but it's not easy to see how to do better.\n\nOh I see. Probably that's the reason why the standard does not allow\nmonth-and-day-mixed interval.\n--\nTatsuo Ishii\n", "msg_date": "Fri, 18 Jan 2002 14:38:57 +0900", "msg_from": "Tatsuo Ishii <t-ishii@sra.co.jp>", "msg_from_op": true, "msg_subject": "Re: age() function? " }, { "msg_contents": "Tom Lane wrote:\n> Tatsuo Ishii <t-ishii@sra.co.jp> writes:\n> > How come 10 mons == 9 mons 30 days?\n> \n> Because for purposes of comparisons, type interval assumes 1 month\n> == 30 days (cf. interval_cmp_internal). Pretty grotty, I agree,\n> but it's not easy to see how to do better.\n\nI guess if we knew the month we could do better. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 00:54:09 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: age() function?" }, { "msg_contents": "> > > How come 10 mons == 9 mons 30 days?\n> > Because for purposes of comparisons, type interval assumes 1 month\n> > == 30 days (cf. interval_cmp_internal). Pretty grotty, I agree,\n> > but it's not easy to see how to do better.\n> Oh I see. Probably that's the reason why the standard does not allow\n> month-and-day-mixed interval.\n\nRight. I have it fall back to a fixed 30 days. Seems better than\ndisallowing it altogether...\n\n - Thomas\n", "msg_date": "Fri, 18 Jan 2002 07:23:41 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: age() function?" } ]
[ { "msg_contents": "Not sure where to send this, or if it is time for RC1, but here is a small\ncontribution.\n\nIt is an integer array aggregator and enumerator. It allows you to use the\n\"group by\" clause to create an integer array, then allows you to extract the\narray as a set of rows.", "msg_date": "Fri, 18 Jan 2002 09:17:15 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": true, "msg_subject": "contrib: int_array_aggregator() int_array_enum()" }, { "msg_contents": "\nThis has been saved for the 7.3 release:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches2\n\n---------------------------------------------------------------------------\n\nmlw wrote:\n> Not sure where to send this, or if it is time for RC1, but here is a small\n> contribution.\n> \n> It is an integer array aggregator and enumerator. It allows you to use the\n> \"group by\" clause to create an integer array, then allows you to extract the\n> array as a set of rows.\n\n[ Attachment, skipping... ]\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 21:15:49 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: contrib: int_array_aggregator() int_array_enum()" }, { "msg_contents": "\nYour patch has been added to the PostgreSQL unapplied patches list at:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches\n\nI will try to apply it within the next 48 hours.\n\n---------------------------------------------------------------------------\n\n\nmlw wrote:\n> Not sure where to send this, or if it is time for RC1, but here is a small\n> contribution.\n> \n> It is an integer array aggregator and enumerator. It allows you to use the\n> \"group by\" clause to create an integer array, then allows you to extract the\n> array as a set of rows.\n\n[ Attachment, skipping... ]\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Feb 2002 21:12:56 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: contrib: int_array_aggregator() int_array_enum()" }, { "msg_contents": "\nPatch applied to /contrib. Thanks.\n\n---------------------------------------------------------------------------\n\n\nmlw wrote:\n> Not sure where to send this, or if it is time for RC1, but here is a small\n> contribution.\n> \n> It is an integer array aggregator and enumerator. It allows you to use the\n> \"group by\" clause to create an integer array, then allows you to extract the\n> array as a set of rows.\n\n[ Attachment, skipping... ]\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sun, 24 Feb 2002 22:45:58 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: contrib: int_array_aggregator() int_array_enum()" } ]
[ { "msg_contents": "I just got this explanation for the autocommit setting. Maybe we should add\nthsi to the docs.\n\n----- Forwarded message from Robert Hufsky <Robert.Hufsky@ser.at> -----\n\nFrom: \"Robert Hufsky\" <Robert.Hufsky@ser.at>\nTo: \"Michael Meskes\" <meskes@debian.org>\nSubject: autocommit in ecpg\nDate: Fri, 18 Jan 2002 08:21:17 +0100\n\n[...]\n\nTransaction Control and Autocommit\nAn application can be operating in \"autocommit on\" or \"autocommit off\" mode.\nThe mode can be selected by issuing\n\nexec sql set autocommit to on; or\nexec sql set autocommit to off;\n\nAutocommit Off\n\nIn this mode, no sql statement is ever committed unless explicitly stated by\n\nexec sql commit;\n\n>From the beginning of a database session an implicit transaction is open.\nEach SQL statement that is issued is part of the transaction. The\ntransaction is closed and work is committed by exec sql commit;.\n\nImmediately after the exec sql commit; statement a new transaction is opened\nand the same rules apply.\n\nNote that an exec sql begin; statement is not applicable in \"autocommit off\"\nmode.\n\nAutocommit On\n\nIn this mode, each statement is automatically committed. This can be\nconvinient but it also can lead to performance problems as each implicit\ncommit may cause a disk write operation.\n\nEven in \"autocommit on\" mode, multi-statememt transactions can be achieved\nby placing multiple SQL statements between\n\nexec sql begin;\n and\nexec sql commit;\n\n[...]\n----- End forwarded message -----\n\nMichael\n-- \nMichael Meskes\nMichael@Fam-Meskes.De\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n", "msg_date": "Fri, 18 Jan 2002 16:54:09 +0100", "msg_from": "Michael Meskes <meskes@postgresql.org>", "msg_from_op": true, "msg_subject": "[Robert.Hufsky@ser.at: autocommit in ecpg]" }, { "msg_contents": "OK, I have added this information to the ecpg and ref/ecpg manual pages\nas appropriate. Let me know if I should add anything else. I also\nremoved a comment from the bottom of ref/sgml that didn't make any sense.\n\n---------------------------------------------------------------------------\n\nMichael Meskes wrote:\n> I just got this explanation for the autocommit setting. Maybe we should add\n> thsi to the docs.\n> \n> ----- Forwarded message from Robert Hufsky <Robert.Hufsky@ser.at> -----\n> \n> From: \"Robert Hufsky\" <Robert.Hufsky@ser.at>\n> To: \"Michael Meskes\" <meskes@debian.org>\n> Subject: autocommit in ecpg\n> Date: Fri, 18 Jan 2002 08:21:17 +0100\n> \n> [...]\n> \n> Transaction Control and Autocommit\n> An application can be operating in \"autocommit on\" or \"autocommit off\" mode.\n> The mode can be selected by issuing\n> \n> exec sql set autocommit to on; or\n> exec sql set autocommit to off;\n> \n> Autocommit Off\n> \n> In this mode, no sql statement is ever committed unless explicitly stated by\n> \n> exec sql commit;\n> \n> >From the beginning of a database session an implicit transaction is open.\n> Each SQL statement that is issued is part of the transaction. The\n> transaction is closed and work is committed by exec sql commit;.\n> \n> Immediately after the exec sql commit; statement a new transaction is opened\n> and the same rules apply.\n> \n> Note that an exec sql begin; statement is not applicable in \"autocommit off\"\n> mode.\n> \n> Autocommit On\n> \n> In this mode, each statement is automatically committed. This can be\n> convinient but it also can lead to performance problems as each implicit\n> commit may cause a disk write operation.\n> \n> Even in \"autocommit on\" mode, multi-statememt transactions can be achieved\n> by placing multiple SQL statements between\n> \n> exec sql begin;\n> and\n> exec sql commit;\n> \n> [...]\n> ----- End forwarded message -----\n> \n> Michael\n> -- \n> Michael Meskes\n> Michael@Fam-Meskes.De\n> Go SF 49ers! Go Rhein Fire!\n> Use Debian GNU/Linux! Use PostgreSQL!\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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\nIndex: doc/src/sgml/ecpg.sgml\n===================================================================\nRCS file: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v\nretrieving revision 1.33\ndiff -c -r1.33 ecpg.sgml\n*** doc/src/sgml/ecpg.sgml\t2002/01/07 02:29:11\t1.33\n--- doc/src/sgml/ecpg.sgml\t2002/01/18 20:30:13\n***************\n*** 1053,1066 ****\n </para>\n \n <para>\n! All <acronym>SQL</acronym> statements are performed in one\n! transaction unless you issue a commit transaction. To accomplish\n! this auto-transaction behavior, the first statement and the first\n! statement after a commit or rollback always begins a new transaction. To\n! disable this feature, use the <option>-t</option> command-line\n! option.\n </para>\n- \n </sect2>\n </sect1>\n </chapter>\n--- 1053,1068 ----\n </para>\n \n <para>\n! In the default mode, queries are committed only when <command>exec\n! sql commit</command> is issued. <application>Ecpg</application>\n! also supports auto-commit of transactions via the\n! <option>-t</option> command-line option or via the <literal>exec\n! sql set autocommit to on</literal> statement. In\n! <literal>autocommit<literal> mode, each query is automatically\n! committed unless it is inside an explicit transaction block. This\n! mode can be explicitly turned off using <literal>exec sql set\n! autocommit to off</literal>.\n </para>\n </sect2>\n </sect1>\n </chapter>\nIndex: doc/src/sgml/libpq.sgml\n===================================================================\nRCS file: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v\nretrieving revision 1.85\ndiff -c -r1.85 libpq.sgml\n*** doc/src/sgml/libpq.sgml\t2002/01/07 02:29:12\t1.85\n--- doc/src/sgml/libpq.sgml\t2002/01/18 20:30:19\n***************\n*** 2109,2118 ****\n <para>\n <filename>libpq</filename> is thread-safe as of\n <productname>PostgreSQL</productname> 7.0, so long as no two threads\n! attempt to manipulate the same <structname>PGconn</> object at the same time. In particular,\n! you cannot issue concurrent queries from different threads through the same\n! connection object. (If you need to run concurrent queries, start up multiple\n! connections.)\n </para>\n \n <para>\n--- 2109,2125 ----\n <para>\n <filename>libpq</filename> is thread-safe as of\n <productname>PostgreSQL</productname> 7.0, so long as no two threads\n! attempt to manipulate the same <structname>PGconn</> object at the same\n! time. In particular, you cannot issue concurrent queries from different\n! threads through the same connection object. (If you need to run\n! concurrent queries, start up multiple connections.)\n! </para>\n! <para>\n! However, <filename>libpq</filename> clients using the\n! <literal>crypt</literal> encryption method rely on the\n! <literal>crypt()</literal> operating system function, which often is not\n! thread-safe. It is better to use <literal>MD5</literal> encryption,\n! which is guarantted to be thread-safe on all platforms.\n </para>\n \n <para>\nIndex: doc/src/sgml/ref/ecpg-ref.sgml\n===================================================================\nRCS file: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v\nretrieving revision 1.16\ndiff -c -r1.16 ecpg-ref.sgml\n*** doc/src/sgml/ref/ecpg-ref.sgml\t2002/01/06 18:12:00\t1.16\n--- doc/src/sgml/ref/ecpg-ref.sgml\t2002/01/18 20:30:20\n***************\n*** 57,63 ****\n <term>-t</term>\n <listitem>\n <para>\n! \tTurn on auto-commit of transactions.\n </para>\n </listitem>\n </varlistentry>\n--- 57,66 ----\n <term>-t</term>\n <listitem>\n <para>\n! \tTurn on auto-commit of transactions. In this mode, each query is\n! \tautomatically committed unless it is inside an explicit\n! \ttransaction block. In the default mode, queries are committed\n! \tonly when <command>exec sql commit</command> is issued.\n </para>\n </listitem>\n </varlistentry>\n***************\n*** 403,434 ****\n See the <filename>TODO</filename> file in the source for some more\n missing features.\n </para>\n- \n- <!--\n- .SH FILES\n- .PD 0\n- .TP\n- .B /usr/src/pgsql/postgresql-${ver}/src/interfaces...\n- ./ecpg/include.......source for \\fIecpg\\fP header files.\n- ./ecpg/lib...........source for \\fIecpg\\fP libraries.\n- ./ecpg/preproc.......source for \\fIecpg\\fP header files.\n- ./ecpg/test..........source for \\fIecpg\\fP libraries.\n- (test contains examples of syntax for ecpg SQL-C.)\n- .PD\n- .TP\n- .B /usr/local/pgsql/bin \n- \\fIPostgreSQL\\fP binaries including \\fIecpg\\fP.\n- .PD\n- .TP\n- .B /usr/local/pgsql/include \n- \\fIPostgreSQL\\fP headers including \\fIecpglib.h\\fP \\fIecpgtype.h\\fP \n- and \\fIsqlca.h\\fP.\n- .PD\n- .TP\n- .B /usr/local/pgsql/lib \n- \\fIPostgreSQL\\fP libraries including \\fIlibecpg.a\\fP and \n- \\fIlibecpg.so\\fP.\n- -->\n \n </refsect1>\n </refentry>\n--- 406,411 ----", "msg_date": "Fri, 18 Jan 2002 15:32:20 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [Robert.Hufsky@ser.at: autocommit in ecpg]" } ]
[ { "msg_contents": "Just an FYI that the recent problem I had (in 7.2b2) naming a column \n'Time' is not present in this beta. Although it was not critical that I \nhad a column named time, it does ease my porting effort.\n\nAlso... \n\nwhen I downloaded 7.2b5 and compiled using the steps\n\n./configure --with-perl --enable-odbc --with-unixodbc\nmake\n\nI received and error in the .../interfaces/odbc directory about unknown \nfiles\nsql.h\nand a couple of others (I did this at home last night).\n\nSince I've only recently tried to use an application on Linux that uses \nODBC, I'm unfamiliar with the unixODBC manager and how to define odbc \nDSN's on the Linux system. However, I'm pretty sure that I need to \ncompile with odbc enabled to install the Linux odbc driver. Correct? \n Are my config options incorrect?\n\nRunning ./configure with no options and compiling resulted in no errors \nand I could successfully make install. But I don't think I have an odbc \ndriver to use...\n\nThanks,\nDwayne\n\n", "msg_date": "Fri, 18 Jan 2002 11:41:26 -0500", "msg_from": "\"Dwayne Miller\" <dmiller@espgroup.net>", "msg_from_op": true, "msg_subject": "7.2b5 notes" }, { "msg_contents": "Dwayne Miller writes:\n\n> when I downloaded 7.2b5 and compiled using the steps\n>\n> ./configure --with-perl --enable-odbc --with-unixodbc\n> make\n>\n> I received and error in the .../interfaces/odbc directory about\n> unknown files sql.h and a couple of others (I did this at home last\n> night).\n\nIt sounds like you don't have unixODBC installed at all. See\nwww.unixodbc.org. \"--with-unixodbc\" doesn't mean you're using Unix and\nyou want to use ODBC. unixODBC is the product name of an ODBC driver\nmanager that runs on POSIXy operating systems. You might want to check\nout the ODBC chapter in the Programmer's Guide, too.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 18 Jan 2002 13:30:43 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: 7.2b5 notes" } ]
[ { "msg_contents": "PostgreSQL often uses terminology in programs and documentation that is\nvague and meaningless to anyone who is new to the system or not familiar\nwith the implementation. Users are often heard to complain that in\nPostgreSQL everything is named differently. We should clean these things\nup and in the future think twice before we write something or name\nsomething.\n\nIn particular, I have four examples in mind:\n\n\"postmaster\" is widely used. The term is already confusing to outsiders\nbecause it has nothing to do with the post office. But OK, it's\nhistorical. But note that many users never see a process or executable\ncalled postmaster because it's started automatically or they use pg_ctl,\nor they're just using their ODBC client. People tend to know what a\n\"server\" is, so I suggest that term except when you are actually talking\nabout the executable.\n\n\"backend\" is often used to mean one of the child processes of the\npostmaster. In a general sense, backend is just the same as server, which\nis the opposite of client or frontend. Users can't be expected to know\nthat the server forks subprocesses to do its thing. One of the statistics\naccess functions is described as \"Number of active backends in database\".\nHow does that work? I thought you could only run one postmaster per data\narea? -- I think the term \"session\" is generally clearer, because you\nalready have session users and these things.\n\n\"tuple\" is described in one place as \"A tuple is an individual state of a\nrow; each update of a row creates a new tuple for the same logical row.\"\nThis definition is inconsistent with common usage -- and even the rest of\nthe manual.\n\nA \"query\" is actually only something that retrieves data from a database,\nthat is, a SELECT statement. UPDATEs are not queries, DELETEs are not\nqueries, and certainly CREATE TABLE isn't a query. These things are just\nstatements or commands. Some documentation has this completely mixed up.\n\nPlease take these kinds of issues into consideration, as they could make\nmany users' lifes just slightly easier.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 18 Jan 2002 14:17:20 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Confusing terminology" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> In particular, I have four examples in mind:\n\n> [ \"postmaster\" and \"backend\" -> \"server\" and \"session\" ]\n\nI think we should use \"postmaster\" when we are specifically discussing\nthe parent daemon process as distinguished from its children, and\n\"backend\" when we are specifically describing a child process as\ndistinguished from its parent and siblings. \"Server\" is fine in any\ncontext where you just mean \"that software at the other end of the wire\nfrom the client\". Look at it this way: if Postgres were implemented as\na monolithic server process, would your documentation still be correct\nand sensible? If so, say \"server\". Use the other two terms when you\nneed to distinguish the parts. Example:\n\n\tAfter receiving a connection request, the postmaster spawns\n\ta backend process to handle that client session.\n\nWhile this is certainly project-specific language, it's useful to people\nwho may actually have to look at the code; and if they're reading\ndocumentation that is talking about the parts of the server in the first\nplace, they're not that far away from wanting to look at code. I don't\nthink that\n\n\tAfter receiving a connection request, the server spawns\n\ta session process to handle that client session.\n\nis an improvement --- it seems more to have reduced the concept to a\ntautology. (Also, as seen here, I don't care for using \"session\"\nto describe a process. A session is a different sort of animal.)\n\n> \"tuple\" is described in one place as \"A tuple is an individual state of a\n> row; each update of a row creates a new tuple for the same logical row.\"\n> This definition is inconsistent with common usage -- and even the rest of\n> the manual.\n\nGive us \"common usage\" that distinguishes these two concepts, please.\nI agree that we've not been consistent, but unless someone lays down\na clear definition for everyone to follow, it won't get better.\n\nMaybe it's time for someone to prepare an \"official\" glossary that sets\nout all these terms carefully, so that people will have something to\nrefer to when they're trying to pick a word to use.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 14:42:26 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology " }, { "msg_contents": "> While this is certainly project-specific language, it's useful to people\n> who may actually have to look at the code; and if they're reading\n> documentation that is talking about the parts of the server in the first\n> place, they're not that far away from wanting to look at code. I don't\n> think that\n> \n> \tAfter receiving a connection request, the server spawns\n> \ta session process to handle that client session.\n> \n> is an improvement --- it seems more to have reduced the concept to a\n> tautology. (Also, as seen here, I don't care for using \"session\"\n> to describe a process. A session is a different sort of animal.)\n\nYes, I feel session is something that exists between the client and the\nserver. It is not a server-only concept.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 15:12:25 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "Tom Lane writes:\n\n> >from the client\". Look at it this way: if Postgres were implemented as\n> a monolithic server process, would your documentation still be correct\n> and sensible? If so, say \"server\".\n\nThat was exactly my thought.\n\n> Use the other two terms when you need to distinguish the parts.\n> Example:\n>\n> \tAfter receiving a connection request, the postmaster spawns\n> \ta backend process to handle that client session.\n\nThis is OK, because it's true: There's a new process and it's at the\nbackend side of the wire. (Actually, a session is something that exists\nbetween a client and a server.) What I don't like is language like \"how\nmany backends are active on this database?\" -- It's one: PostgreSQL. It\nwould be correct to say \"how many (PostgreSQL) backend *processes* are\nactive...\", or maybe just \"how many clients are connected to this\ndatabase\".\n\n> While this is certainly project-specific language, it's useful to people\n> who may actually have to look at the code; and if they're reading\n> documentation that is talking about the parts of the server in the first\n> place, they're not that far away from wanting to look at code.\n\nRight, but there are only specific chapters in the documentation that talk\nabout this.\n\n> > \"tuple\" is described in one place as \"A tuple is an individual state of a\n> > row; each update of a row creates a new tuple for the same logical row.\"\n> > This definition is inconsistent with common usage -- and even the rest of\n> > the manual.\n>\n> Give us \"common usage\" that distinguishes these two concepts, please.\n\nThe libpq API uses tuple to mean row (and field to mean column). Other\nAPIs like pgtcl and libpq++ have copied that. I think that that's more\ncommon usage than xmin and xmax.\n\n> I agree that we've not been consistent, but unless someone lays down\n> a clear definition for everyone to follow, it won't get better.\n\nI think it's OK to use tuple == row, and \"row state\" or \"tuple state\" when\nyou're talking about MVCC (which is only rarely done anyway). A row can\nhave more than one state at the same time under MVCC, but a row can have\nmore than one tuple???\n\n> Maybe it's time for someone to prepare an \"official\" glossary that sets\n> out all these terms carefully, so that people will have something to\n> refer to when they're trying to pick a word to use.\n\nYeah, I think I'd like to set something like this up as part of the\nprogram message style guide that I've talked about recently.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 18 Jan 2002 16:17:31 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Re: Confusing terminology " }, { "msg_contents": "> > \tAfter receiving a connection request, the postmaster spawns\n> > \ta backend process to handle that client session.\n> \n> This is OK, because it's true: There's a new process and it's at the\n> backend side of the wire. (Actually, a session is something that exists\n> between a client and a server.) What I don't like is language like \"how\n> many backends are active on this database?\" -- It's one: PostgreSQL. It\n> would be correct to say \"how many (PostgreSQL) backend *processes* are\n> active...\", or maybe just \"how many clients are connected to this\n> database\".\n\nOr how many sessions. That seems to be the best wording unless you want\nto highlight the existance of backend processes.\n\nI am not sure I agree that there is only one backend running, well maybe\nI see your point but it seems a little confusing. We used the term\n'backend' with Ingres and it always meant your backend process.\n\n> > Maybe it's time for someone to prepare an \"official\" glossary that sets\n> > out all these terms carefully, so that people will have something to\n> > refer to when they're trying to pick a word to use.\n> \n> Yeah, I think I'd like to set something like this up as part of the\n> program message style guide that I've talked about recently.\n\nThere is a crude attempt in the FAQ. Maybe we can add there.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 16:29:15 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > > After receiving a connection request, the postmaster spawns\n> > > a backend process to handle that client session.\n> >\n> > This is OK, because it's true: There's a new process and it's at the\n> > backend side of the wire. (Actually, a session is something that exists\n> > between a client and a server.) What I don't like is language like \"how\n> > many backends are active on this database?\" -- It's one: PostgreSQL. It\n> > would be correct to say \"how many (PostgreSQL) backend *processes* are\n> > active...\", or maybe just \"how many clients are connected to this\n> > database\".\n> \n> Or how many sessions. That seems to be the best wording unless you want\n> to highlight the existance of backend processes.\n> \n> I am not sure I agree that there is only one backend running, well maybe\n> I see your point but it seems a little confusing. We used the term\n> 'backend' with Ingres and it always meant your backend process.\n> \n> > > Maybe it's time for someone to prepare an \"official\" glossary that sets\n> > > out all these terms carefully, so that people will have something to\n> > > refer to when they're trying to pick a word to use.\n> >\n> > Yeah, I think I'd like to set something like this up as part of the\n> > program message style guide that I've talked about recently.\n> \n> There is a crude attempt in the FAQ. Maybe we can add there.\n\nWhat about \"relation\" vs. \"table\"? \n\nCREATE TABLE foo(key integer);\n\nERROR: Relation 'foo' already exists\n\nI realize the historical context of the word, but it flies in the face\nof the language.\n\nMike Mascari\nmascarm@mascari.com\n", "msg_date": "Fri, 18 Jan 2002 16:45:16 -0500", "msg_from": "Mike Mascari <mascarm@mascari.com>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "On Fri, 18 Jan 2002, Mike Mascari wrote:\n\n> What about \"relation\" vs. \"table\"? \n> \n> CREATE TABLE foo(key integer);\n> \n> ERROR: Relation 'foo' already exists\n\nCan a table named foo and a view named foo exist in the same database?\n\n\nCheers,\nRod\n-- \n Let Accuracy Triumph Over Victory\n\n Zetetic Institute\n \"David's Sling\"\n Marc Stiegler\n\n", "msg_date": "Fri, 18 Jan 2002 15:54:38 -0800 (PST)", "msg_from": "\"Roderick A. Anderson\" <raanders@tincan.org>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "Roderick A. Anderson writes:\n>\n> On Fri, 18 Jan 2002, Mike Mascari wrote:\n>\n> > What about \"relation\" vs. \"table\"?\n> >\n> > CREATE TABLE foo(key integer);\n> >\n> > ERROR: Relation 'foo' already exists\n>\n> Can a table named foo and a view named foo exist in the same database?\n>\n>\n> Cheers,\n> Rod\n\nNo. There's no reasonable way for the server to know which you mean when you\nexecute a statement. This applies to tables, views, sequences, etc.\n\n\n\n", "msg_date": "Fri, 18 Jan 2002 18:57:08 -0500", "msg_from": "\"Arguile\" <arguile@lucentstudios.com>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "On Fri, 18 Jan 2002, Arguile wrote:\n\n> Roderick A. Anderson writes:\n\n> > > ERROR: Relation 'foo' already exists\n> >\n> > Can a table named foo and a view named foo exist in the same database?\n> >\n> No. There's no reasonable way for the server to know which you mean when you\n> execute a statement. This applies to tables, views, sequences, etc.\n\nIt was a rhetorical question (aka. smart-ass). My point was a table,\nview, sequence, and their friends are all relations. Or at least to my\nunderstanding the table and view are relations.\n And therefore Relation 'foo' already exists makes sense to me.\n\n\nBest,\nRod\n-- \n Let Accuracy Triumph Over Victory\n\n Zetetic Institute\n \"David's Sling\"\n Marc Stiegler\n\n", "msg_date": "Sat, 19 Jan 2002 09:58:34 -0800 (PST)", "msg_from": "\"Roderick A. Anderson\" <raanders@tincan.org>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "Roderick A. Anderson wrote:\n\n[snip]\n>\n> It was a rhetorical question (aka. smart-ass). My point was a table,\n> view, sequence, and their friends are all relations. Or at least to my\n> understanding the table and view are relations.\n> And therefore Relation 'foo' already exists makes sense to me.\n>\n\nOops, sorry about that. Text, at times, doesn't fully convey the proper\ntone. :)\n\n\n", "msg_date": "Sat, 19 Jan 2002 13:03:13 -0500", "msg_from": "\"Arguile\" <arguile@lucentstudios.com>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "\"Roderick A. Anderson\" wrote:\n> \n> On Fri, 18 Jan 2002, Arguile wrote:\n> \n> > Roderick A. Anderson writes:\n> \n> > > > ERROR: Relation 'foo' already exists\n> > >\n> > > Can a table named foo and a view named foo exist in the same database?\n> > >\n> > No. There's no reasonable way for the server to know which you mean when you\n> > execute a statement. This applies to tables, views, sequences, etc.\n> \n> It was a rhetorical question (aka. smart-ass). My point was a table,\n> view, sequence, and their friends are all relations. Or at least to my\n> understanding the table and view are relations.\n> And therefore Relation 'foo' already exists makes sense to me.\n\nCREATE INDEX i_foo1 on foo(key);\n\nERROR: DefineIndex: relation \"foo\" not found\n\nALTER TABLE foo ADD COLUMN key integer;\n\nERROR: ALTER TABLE: column name \"key\" already exists in table \"foo\"\n\nTRUNCATE TABLE foo;\n\nERROR: Relation 'foo' does not exist\n\nMike Mascari\nmascarm@mascari.com\n", "msg_date": "Sat, 19 Jan 2002 13:44:14 -0500", "msg_from": "Mike Mascari <mascarm@mascari.com>", "msg_from_op": false, "msg_subject": "Re: Confusing terminology" }, { "msg_contents": "Roderick A. Anderson writes:\n\n> It was a rhetorical question (aka. smart-ass). My point was a table,\n> view, sequence, and their friends are all relations. Or at least to my\n> understanding the table and view are relations.\n> And therefore Relation 'foo' already exists makes sense to me.\n\n From a point of view of implementation, the term \"relation\" also covers\nindexes, which can be confusing. Standard SQL (which doesn't have indexes\nor sequences) uses the term \"table\" to mean both regular tables and views.\nNeither of these choices are entirely pretty.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Sun, 20 Jan 2002 17:25:40 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": true, "msg_subject": "Re: Confusing terminology" } ]
[ { "msg_contents": "\nWhat is the default maximum limits for a text column, and how can I extend\nit past those limits, if possible :>\n\n\n Chris Bowlby,\n -----------------------------------------------------\n Web Developer @ Hub.org.\n excalibur@hub.org\n www.hub.org\n 1-902-542-3657\n -----------------------------------------------------\n\n", "msg_date": "Fri, 18 Jan 2002 15:59:33 -0400 (AST)", "msg_from": "Chris Bowlby <excalibur@hub.org>", "msg_from_op": true, "msg_subject": "Text Column limits" }, { "msg_contents": "Chris Bowlby <excalibur@hub.org> writes:\n\n> What is the default maximum limits for a text column, and how can I extend\n> it past those limits, if possible :>\n\nThe limit is very high in modern versions. RAM + swap, basically. ;)\n\n-Doug\n-- \nLet us cross over the river, and rest under the shade of the trees.\n --T. J. Jackson, 1863\n", "msg_date": "18 Jan 2002 15:27:32 -0500", "msg_from": "Doug McNaught <doug@wireboard.com>", "msg_from_op": false, "msg_subject": "Re: Text Column limits" }, { "msg_contents": "On 18 Jan 2002, Doug McNaught wrote:\n\nHmmm,\n\n We've got a database that has about 81000 characters per text entry, of\nwhich no more can be squeezed in....\n\n> Chris Bowlby <excalibur@hub.org> writes:\n>\n> > What is the default maximum limits for a text column, and how can I extend\n> > it past those limits, if possible :>\n>\n> The limit is very high in modern versions. RAM + swap, basically. ;)\n>\n> -Doug\n> --\n> Let us cross over the river, and rest under the shade of the trees.\n> --T. J. Jackson, 1863\n>\n\n Chris Bowlby,\n -----------------------------------------------------\n Web Developer @ Hub.org.\n excalibur@hub.org\n www.hub.org\n 1-902-542-3657\n -----------------------------------------------------\n\n", "msg_date": "Fri, 18 Jan 2002 17:02:36 -0400 (AST)", "msg_from": "Chris Bowlby <excalibur@hub.org>", "msg_from_op": true, "msg_subject": "Re: Text Column limits" }, { "msg_contents": "Chris Bowlby <excalibur@hub.org> writes:\n\n> On 18 Jan 2002, Doug McNaught wrote:\n> \n> Hmmm,\n> \n> We've got a database that has about 81000 characters per text entry, of\n> which no more can be squeezed in....\n\nAnd the error message you get is... ???\n\nWe're not mind-readers here. ;)\n\n-Doug\n-- \nLet us cross over the river, and rest under the shade of the trees.\n --T. J. Jackson, 1863\n", "msg_date": "18 Jan 2002 16:05:18 -0500", "msg_from": "Doug McNaught <doug@wireboard.com>", "msg_from_op": false, "msg_subject": "Re: Text Column limits" }, { "msg_contents": "On 18 Jan 2002, Doug McNaught wrote:\n\nHi Doug,\n\nAck.. sorry about that... ok here's the error...\n\nERROR: Tuple is too big: size 14392, max size 8140\n\nlooks like the size is being restricted to about 8K, when I need to sqeeze\n14+K into her.... did we miss a compile option somewhere?\n\n\n> Chris Bowlby <excalibur@hub.org> writes:\n>\n> > On 18 Jan 2002, Doug McNaught wrote:\n> >\n> > Hmmm,\n> >\n> > We've got a database that has about 81000 characters per text entry, of\n> > which no more can be squeezed in....\n>\n> And the error message you get is... ???\n>\n> We're not mind-readers here. ;)\n>\n> -Doug\n> --\n> Let us cross over the river, and rest under the shade of the trees.\n> --T. J. Jackson, 1863\n>\n\n Chris Bowlby,\n -----------------------------------------------------\n Web Developer @ Hub.org.\n excalibur@hub.org\n www.hub.org\n 1-902-542-3657\n -----------------------------------------------------\n\n", "msg_date": "Sun, 20 Jan 2002 23:56:03 -0400 (AST)", "msg_from": "Chris Bowlby <excalibur@hub.org>", "msg_from_op": true, "msg_subject": "Re: Text Column limits" }, { "msg_contents": "> Ack.. sorry about that... ok here's the error...\n>\n> ERROR: Tuple is too big: size 14392, max size 8140\n>\n> looks like the size is being restricted to about 8K, when I need to sqeeze\n> 14+K into her.... did we miss a compile option somewhere?\n\nJust make sure you're using postgres 7.1.x, and have recompiled any software\n(such as PHP) that links to it and you will have a virtually unlimited row\nlength. (Use 'text' column type for text and 'bytea' for binary)\n\nChris\n\n", "msg_date": "Mon, 21 Jan 2002 12:06:43 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": false, "msg_subject": "Re: Text Column limits" } ]
[ { "msg_contents": "\nWe use pg_dump nightly to dump data from all tables in our databases (only\ntable data, makes restore easier, trust me on that).\n\nMy question is this:\n\nI have many tables that have millions of rows.\n\nLet's say I start the pg_dump...\n\nThen, an update in a transaction occurs that updates 3 different tables\nover a period of time.\n\nWill some of the pg_dump table data be \"out of sync\"?\n\nHow exactly does pg_dump (if at all) handle transactions/table changes?\n\nThanks for the info.\n\n-- \nLaurette Cisneros\n(510) 420-3137\nNextBus Information Systems, Inc.\nwww.nextbus.com\nPassenger Information Everywhere\n\n", "msg_date": "Fri, 18 Jan 2002 16:26:29 -0800 (PST)", "msg_from": "Laurette Cisneros <laurette@nextbus.com>", "msg_from_op": true, "msg_subject": "pg_dump question" }, { "msg_contents": "Laurette Cisneros wrote:\n> \n> We use pg_dump nightly to dump data from all tables in our databases (only\n> table data, makes restore easier, trust me on that).\n> \n> My question is this:\n> \n> I have many tables that have millions of rows.\n> \n> Let's say I start the pg_dump...\n> \n> Then, an update in a transaction occurs that updates 3 different tables\n> over a period of time.\n> \n> Will some of the pg_dump table data be \"out of sync\"?\n> \n> How exactly does pg_dump (if at all) handle transactions/table changes?\n\nPg_dump takes a snapshot of the database when it starts to the restore\nwill be constistent with the start time of pg_dump. Good question.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 18 Jan 2002 19:57:05 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: pg_dump question" }, { "msg_contents": "This is most execellent!\n\nOn Fri, 18 Jan 2002, Bruce Momjian wrote:\n\n> Laurette Cisneros wrote:\n> >\n> > We use pg_dump nightly to dump data from all tables in our databases (only\n> > table data, makes restore easier, trust me on that).\n> >\n> > My question is this:\n> >\n> > I have many tables that have millions of rows.\n> >\n> > Let's say I start the pg_dump...\n> >\n> > Then, an update in a transaction occurs that updates 3 different tables\n> > over a period of time.\n> >\n> > Will some of the pg_dump table data be \"out of sync\"?\n> >\n> > How exactly does pg_dump (if at all) handle transactions/table changes?\n>\n> Pg_dump takes a snapshot of the database when it starts to the restore\n> will be constistent with the start time of pg_dump. Good question.\n>\n>\n\n-- \nLaurette Cisneros\n(510) 420-3137\nNextBus Information Systems, Inc.\nwww.nextbus.com\nPassenger Information Everywhere\n\n", "msg_date": "Fri, 18 Jan 2002 16:59:18 -0800 (PST)", "msg_from": "Laurette Cisneros <laurette@nextbus.com>", "msg_from_op": true, "msg_subject": "Re: pg_dump question" } ]
[ { "msg_contents": "I'm starting to think about how to do SQL-compatible schemas in Postgres.\n\nOne of the first issues that comes up is that Postgres has interpretations\nof qualified (dotted) names that conflict with what the standard says to\ndo. This stuff is a hangover from Berkeley days and PostQUEL. Briefly,\nsince there are no schemas in PG, anytime we have a dotted name we know\nthat the first component *must* be a table name. Successive components are\nthen resolved as either column or function names applied to whatever we\nhave so far. For example,\n\n\ta.b.c\tis equivalent to c(a.b) if c is a function\n\nThe equivalence works the other way too: you can write colname(tabname)\nand it will be taken as tabname.colname (though this seems to work only\nif tabname already has a rangetable entry).\n\nThis is not going to fly together with SQL92, which wants a.b.c to mean\nschema a, table b, column c.\n\nI believe we can resolve the conflict without breaking any cases that\nare likely to be used much in practice. Here's my proposal:\n\nFirst, I'd like to allow the notation \"table.*\" to be used as a function\nargument, representing passing a whole-row value to a function (the\nfunction's argument would be declared as the table rowtype). Presently\nthis is done by writing just the undecorated table name, but that is\nambiguous if the same name is also used as a column name in the query.\nAlso, we need this notation for use with qualified table names.\n\nHaving done that, we can resolve names appearing in expressions thus:\n\nfoo\t\tFirst try to resolve as unqualified column name;\n\t\tif not found, try to resolve as unqualified table name\n\t\t(in which case this is a whole-row value, equivalent\n\t\tto foo.*).\n\nfoo.bar\t\tfoo is an unqualified table name. Try first to resolve\n\t\tbar as a column name of foo; if not found, try to resolve\n\t\tbar as a function taking the rowtype of foo.\n\nfoo.bar.baz\tThis refers to table bar in schema foo. baz is either\n\t\ta column or function name, as above.\n\nfoo.bar.baz.quux\tRefers to table baz in schema bar in catalog foo.\n\t\tquux is either a column or function name, as above.\n\nfoo.*\t\tfoo is an unqualified table name; means whole-row value.\n\nfoo.bar.*\tWhole row of table bar in schema foo.\n\nfoo.bar.baz.*\tWhole row of table baz in schema bar in catalog foo.\n\nThe first two of these rules are the same as current behavior; the next\ntwo are additions mandated by SQL92; the last three are a proposed\nextension to allow unambiguous reference to whole-row values.\n\nWith these rules, we do not lose any functionality that we have now,\nbut some PostQUEL-ish constructs will need to be rewritten into an\nequivalent form.\n\nPostQUEL-isms that still work:\n\ntable.func\tequivalent to func(table.*)\n\nfunc(table)\tequivalent to func(table.*), as long as table name\n\t\tdoesn't match any column name of the query\n\nPostQUEL-isms that no longer work:\n\ntable.col.func\t\tMust rewrite as func(table.col)\n\ntable.func1.func2\tMust rewrite as, eg, func2(func1(table.*))\n\nWhile there are a couple of examples of the above two constructs in the\nregression tests, I doubt they are used much in the real world.\n\nAnother PostQUEL-ism that I would like to remove is col(tab) to mean\ntab.col; I'd prefer to restrict the function syntax to functions only.\nWe could continue to support this for unqualified table names, but\ngiven the above rules it could not work for a qualified table name,\neg, col(schema.tab) would be misinterpreted. Again, it seems unlikely\nthat many people are using this, so we may as well try to regularize\nthe syntax as much as we can.\n\nYou may wonder why I'm still allowing the construction tab.func ---\nwhy not get rid of that too? Well, mainly because I'd like to support\nthe Oracle-ish syntax for nextval: seqname.nextval. Together with the\ndesire not to break existing code unnecessarily, that seems a good enough\nreason to leave it in.\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 18 Jan 2002 19:29:43 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Schemas vs. PostQUEL: resolving qualified identifiers" } ]
[ { "msg_contents": "\n>Maybe it's time for someone to prepare an \"official\" glossary that sets\n>out all these terms carefully, so that people will have something to\n>refer to when they're trying to pick a word to use.\n\nMaybe we could coax Robert Easter to add to his already wonderful page\nof Essential Database Terminology that is linked off the techdocs page\na section which is Postgres specific terminology.... having them in\nthe same place would prevent duplication of effort and his existing\nglossary is very well done IMO.\nBest Regards,\nCarl Garland\n\n_________________________________________________________________\nGet your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.\n\n", "msg_date": "Fri, 18 Jan 2002 23:13:06 -0500", "msg_from": "\"carl garland\" <carlhgarland@hotmail.com>", "msg_from_op": true, "msg_subject": "Re: Confusing terminology" } ]
[ { "msg_contents": "AFAIK we are go for 7.2RC1.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 19 Jan 2002 00:24:43 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Ready for RC1?" }, { "msg_contents": "\nYup, going to bundle her first thing when I get up tomorrow (or, rather,\nlater today, looking at the time *grin*)\n\n\nOn Sat, 19 Jan 2002, Tom Lane wrote:\n\n> AFAIK we are go for 7.2RC1.\n>\n> \t\t\tregards, tom lane\n>\n\n", "msg_date": "Sat, 19 Jan 2002 01:34:01 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: Ready for RC1?" }, { "msg_contents": "[2002-01-19 01:34] Marc G. Fournier said:\n| \n| Yup, going to bundle her first thing when I get up tomorrow (or, rather,\n| later today, looking at the time *grin*)\n\nIs this rolled yet? I haven't seen it in any mirrors and haven't\nbeen able to get on ftp.postgresql.org (which I assume is ftp master).\n\nthanks.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Mon, 21 Jan 2002 02:32:12 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: Ready for RC1?" }, { "msg_contents": "On Mon, 21 Jan 2002, Brent Verner wrote:\n\n> [2002-01-19 01:34] Marc G. Fournier said:\n> |\n> | Yup, going to bundle her first thing when I get up tomorrow (or, rather,\n> | later today, looking at the time *grin*)\n>\n> Is this rolled yet? I haven't seen it in any mirrors and haven't\n> been able to get on ftp.postgresql.org (which I assume is ftp master).\n\nNo ... I've held off waiting on a resolution of the problem that Tom Lane\nbrought up with the RTLD_* stuff, since if any changes in there are going\nin, they should be done *at least* before RC1 ...\n\n", "msg_date": "Mon, 21 Jan 2002 10:10:29 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: Ready for RC1?" }, { "msg_contents": "Marc G. Fournier writes:\n\n> No ... I've held off waiting on a resolution of the problem that Tom Lane\n> brought up with the RTLD_* stuff, since if any changes in there are going\n> in, they should be done *at least* before RC1 ...\n\nWe're not doing that in this release, AFAIK.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 21 Jan 2002 11:51:04 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Ready for RC1?" }, { "msg_contents": "\nTom, can you confirm that you don't want to do this for at least the Linux\ncase? If not, will roll her ...\n\n\nOn Mon, 21 Jan 2002, Peter Eisentraut wrote:\n\n> Marc G. Fournier writes:\n>\n> > No ... I've held off waiting on a resolution of the problem that Tom Lane\n> > brought up with the RTLD_* stuff, since if any changes in there are going\n> > in, they should be done *at least* before RC1 ...\n>\n> We're not doing that in this release, AFAIK.\n>\n> --\n> Peter Eisentraut peter_e@gmx.net\n>\n>\n\n", "msg_date": "Mon, 21 Jan 2002 13:06:08 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: Ready for RC1?" }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n> No ... I've held off waiting on a resolution of the problem that Tom Lane\n> brought up with the RTLD_* stuff, since if any changes in there are going\n> in, they should be done *at least* before RC1 ...\n\nI think the consensus is that we should not risk the RTLD_* change now.\n\nI put in a Makefile hack to cure the immediate issue with Red Hat's Tcl\nRPMs, so I think we're good to go on RC1.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 12:29:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Ready for RC1? " }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n> Tom, can you confirm that you don't want to do this for at least the Linux\n> case? If not, will roll her ...\n\nYes, I think we should sit tight on this for 7.2. There seemed to be\nsome people arguing that RTLD_LAZY might be better; I disagree, but\nwill not force the issue until the argument is settled. Let's roll...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 15:10:35 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Ready for RC1? " } ]
[ { "msg_contents": "Hi all,\n\nI'm thinking about how we don't really have native compatability for\nWindows.\n\nApparently Apache has designed their own cross-platform compatibility\nlayer which other projects can use, so that most of the cross-platform\ncoding concerns are taken care of.\n\nHas anyone out there taken a look at it? Sometime in the future (that's\nwhy I've written PostgreSQL 8.0), if that Apache cross-platform\ncompatibility layer is any good would the HACKERS consider us using it?\n\n???\n\nRegards and best wishes,\n\nJustin Clift\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Sun, 20 Jan 2002 16:46:59 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "PostgreSQL 8.0 and cross-platform capabilities" }, { "msg_contents": "\nI know that Apache2 is using shared memory, and as far as I know, their\ncompatability layer does do this under Windows ...\n\nOn Sun, 20 Jan 2002, Justin Clift wrote:\n\n> Hi all,\n>\n> I'm thinking about how we don't really have native compatability for\n> Windows.\n>\n> Apparently Apache has designed their own cross-platform compatibility\n> layer which other projects can use, so that most of the cross-platform\n> coding concerns are taken care of.\n>\n> Has anyone out there taken a look at it? Sometime in the future (that's\n> why I've written PostgreSQL 8.0), if that Apache cross-platform\n> compatibility layer is any good would the HACKERS consider us using it?\n>\n> ???\n>\n> Regards and best wishes,\n>\n> Justin Clift\n>\n> --\n> \"My grandfather once told me that there are two kinds of people: those\n> who work and those who take the credit. He told me to try to be in the\n> first group; there was less competition there.\"\n> - Indira Gandhi\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n\n", "msg_date": "Sun, 20 Jan 2002 03:15:24 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL 8.0 and cross-platform capabilities" } ]
[ { "msg_contents": "\nAOL buying Red Hat?\n\nhttp://news.com.com/2100-1001-819243.html\n\nAny truth to this rumor?\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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": "Sun, 20 Jan 2002 14:19:03 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": true, "msg_subject": "AOL buying RedHat?" } ]
[ { "msg_contents": "Is is possible to add GNU/GPL licence to the next\nrelease of the pgsql in addition to the UCB licence.\n\nThe UCB licence applies to old code several years ago,\nbut by law it is required to include it forever with\npgsql. \n\nI am proposing that in addition to UCB, all the new\ncode added/changed after the UCB code must be covered\nunder GNU/GPL.\n\nGnu/GPL is the best licensing scheme for open source\nproducts.\n\n\n\n__________________________________________________\nDo You Yahoo!?\nSend FREE video emails in Yahoo! Mail!\nhttp://promo.yahoo.com/videomail/\n", "msg_date": "Sun, 20 Jan 2002 13:03:41 -0800 (PST)", "msg_from": "alavoor <alavoor@yahoo.com>", "msg_from_op": true, "msg_subject": "PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "alavoor wrote:\n> \n> Is is possible to add GNU/GPL licence to the next\n> release of the pgsql in addition to the UCB licence.\n> \n> The UCB licence applies to old code several years ago,\n> but by law it is required to include it forever with\n> pgsql.\n> \n> I am proposing that in addition to UCB, all the new\n> code added/changed after the UCB code must be covered\n> under GNU/GPL.\n> \n> Gnu/GPL is the best licensing scheme for open source\n> products.\n\nDon't go there man. It is a long discussion and many people do not share your\nviews.\n", "msg_date": "Sun, 20 Jan 2002 16:50:42 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nNot in this life time, but thanks for adding your 2 bits ...\n\nOn Sun, 20 Jan 2002, alavoor wrote:\n\n> Is is possible to add GNU/GPL licence to the next\n> release of the pgsql in addition to the UCB licence.\n>\n> The UCB licence applies to old code several years ago,\n> but by law it is required to include it forever with\n> pgsql.\n>\n> I am proposing that in addition to UCB, all the new\n> code added/changed after the UCB code must be covered\n> under GNU/GPL.\n>\n> Gnu/GPL is the best licensing scheme for open source\n> products.\n>\n>\n>\n> __________________________________________________\n> Do You Yahoo!?\n> Send FREE video emails in Yahoo! Mail!\n> http://promo.yahoo.com/videomail/\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n>\n\n", "msg_date": "Sun, 20 Jan 2002 17:54:23 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "mlw wrote:\n> alavoor wrote:\n> > \n> > Is is possible to add GNU/GPL licence to the next\n> > release of the pgsql in addition to the UCB licence.\n> > \n> > The UCB licence applies to old code several years ago,\n> > but by law it is required to include it forever with\n> > pgsql.\n> > \n> > I am proposing that in addition to UCB, all the new\n> > code added/changed after the UCB code must be covered\n> > under GNU/GPL.\n> > \n> > Gnu/GPL is the best licensing scheme for open source\n> > products.\n> \n> Don't go there man. It is a long discussion and many people do not share your\n> views.\n\nAt the great risk of causing chaos, let me chime in on this. First, in\nthe past we have hidden behind the story that we can't change our\nlicense, which I don' think is true. We could add GPL on top of the BSD\nlicense and therefore someone wanting to make a proprietary version of\nPostgreSQL would have to start with today's code. However all future\nsubmitters would have to agree to GPL for their new code.\n\nHowever, we clearly don't have unanimous agreement on using GPL so I\nwould like to address this in an FAQ item to get it more concrete. What\ndo people think of this summary:\n\n---------------------------------------------------------------------------\n\nWe currently have a BSD license, the archetypal open-source license. \nThe GPL is similar to BSD, except that it has certain anti-closed source\n(proprietary) restrictions. Many PostgreSQL developers question the\nneed for such restrictions and we therefore will continue with the BSD\nlicense for the for-seeable future.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sun, 20 Jan 2002 23:43:53 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> We currently have a BSD license, the archetypal open-source license.\n> The GPL is similar to BSD, except that it has certain anti-closed source\n> (proprietary) restrictions. Many PostgreSQL developers question the\n> need for such restrictions and we therefore will continue with the BSD\n> license for the for-seeable future.\n\nYou are a talented man with a knack for simplifying the imponderables. ;-)\n", "msg_date": "Sun, 20 Jan 2002 23:47:35 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "mlw wrote:\n> Bruce Momjian wrote:\n> > \n> > We currently have a BSD license, the archetypal open-source license.\n> > The GPL is similar to BSD, except that it has certain anti-closed source\n> > (proprietary) restrictions. Many PostgreSQL developers question the\n> > need for such restrictions and we therefore will continue with the BSD\n> > license for the for-seeable future.\n ^^^^^^^^^^^\n\nIt is actually spelled \"foreseeable\".\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sun, 20 Jan 2002 23:51:59 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> At the great risk of causing chaos, let me chime in on this. First, in\n> the past we have hidden behind the story that we can't change our\n> license, which I don' think is true. We could add GPL on top of the BSD\n> license and therefore someone wanting to make a proprietary version of\n> PostgreSQL would have to start with today's code.\n\nI doubt this is true at all. We could possibly specify GPL for *new*\ncode (eg, whole new source files) that we add to the tree, but we can't\nunilaterally relicense the existing code. And can you usefully specify\na GPL license for individual patches added to a basically-BSD source file?\nIsn't going to work.\n\nIn any case, the discussion has been had many times before and the\nanswer is not going to change. I like your idea of putting something in\nthe FAQ to try to stave off future queries. The wording you have is\nokay as far as it goes, but I'd like to see it made perfectly crystal\nclear that we *have* considered GPL and we are *not* interested in\nhearing any more \"why don't you switch to GPL\" proposals. Deleting the\n\"currently\" would be a start.\n\n> We currently have a BSD license, the archetypal open-source license. \n> The GPL is similar to BSD, except that it has certain anti-closed source\n> (proprietary) restrictions. Many PostgreSQL developers question the\n> need for such restrictions and we therefore will continue with the BSD\n> license for the for-seeable future.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 00:29:22 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "[2002-01-20 23:43] Bruce Momjian said:\n \n| At the great risk of causing chaos, let me chime in on this. First, in\n \n| However, we clearly don't have unanimous agreement on using GPL so I\n| would like to address this in an FAQ item to get it more concrete. What\n| do people think of this summary:\n\n| The GPL is similar to BSD, except that it has certain anti-closed source\n| (proprietary) restrictions. \n\nCalling the two licenses \"similar\" is only an invitation to engage \nin license war. I'd suggest something like the following (as long \nas it doesn't contain any factual errors).\n\n The PostgreSQL project has released its code under the BSD\n license since its inception. Occasionally, users request that \n the project be relicensed under the GPL. Many PostgreSQL \n developers feel the GPL contains certain restrictions that \n might limit the ability of commercial entities to contribute \n or continue contributing to the codebase, and question the \n need for such restrictions. In light of these concerns, we \n will continue with the BSD license for the foreseeable future.\n\ncheers.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Mon, 21 Jan 2002 01:01:03 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Brent Verner <brent@rcfile.org> writes:\n> Calling the two licenses \"similar\" is only an invitation to engage \n> in license war.\n\nGood point.\n\n> I'd suggest something like the following (as long \n> as it doesn't contain any factual errors).\n\n> The PostgreSQL project has released its code under the BSD\n> license since its inception. Occasionally, users request that \n> the project be relicensed under the GPL. Many PostgreSQL \n> developers feel the GPL contains certain restrictions that \n> might limit the ability of commercial entities to contribute \n> or continue contributing to the codebase, and question the \n> need for such restrictions. In light of these concerns, we \n> will continue with the BSD license for the foreseeable future.\n\nThis is really good as far as it goes. I'd also like to see the\npoint made that we cannot simply relicense the code, even if we wished\nto, because the current developers are not the sole authors/owners.\nPerhaps something like this:\n\n The PostgreSQL project has released its code under the BSD license\n since its inception; as did the Berkeley Postgres project before us.\n Occasionally, users suggest that the project be relicensed under the\n GPL. This is not very practical because it would require the\n concurrence not only of the current developers, but many past\n contributors both at Berkeley and all over the net. Furthermore,\n many PostgreSQL developers feel the GPL contains restrictions that\n would limit the ability of commercial entities to contribute or\n continue contributing to the codebase, and question the need for such\n restrictions. In light of these issues, we will continue with the\n BSD license for the foreseeable future.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 01:30:49 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "> This is really good as far as it goes. I'd also like to see the\n> point made that we cannot simply relicense the code, even if we wished\n> to, because the current developers are not the sole authors/owners.\n> Perhaps something like this:\n> \n> The PostgreSQL project has released its code under the BSD license\n> since its inception; as did the Berkeley Postgres project before us.\n> Occasionally, users suggest that the project be relicensed under the\n> GPL. This is not very practical because it would require the\n> concurrence not only of the current developers, but many past\n> contributors both at Berkeley and all over the net. Furthermore,\n> many PostgreSQL developers feel the GPL contains restrictions that\n> would limit the ability of commercial entities to contribute or\n> continue contributing to the codebase, and question the need for such\n> restrictions. In light of these issues, we will continue with the\n> BSD license for the foreseeable future.\n\nMan, this text is getting longer. :-(\n\nAnyway, let's look at it this way. If we allow for proprietary versions\nof PostgreSQL, it is hard to imagine why we couldn't make a GPL version\n_without_ the agreement of past contributors. We have to keep the BSD\npart about giving credit and no sueing, but we can clearly _add_ the GPL\ncruft if we wanted to and all current/future developers agree. It is\nbasically a GPL fork of PostgreSQL, rather than a proprietary fork.\n\nNow, I don't want to do that, but I do think it is doable.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 01:49:48 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "...\n> Anyway, let's look at it this way. If we allow for proprietary versions\n> of PostgreSQL, it is hard to imagine why we couldn't make a GPL version\n> _without_ the agreement of past contributors. We have to keep the BSD\n> part about giving credit and no sueing, but we can clearly _add_ the GPL\n> cruft if we wanted to and all current/future developers agree. It is\n> basically a GPL fork of PostgreSQL, rather than a proprietary fork.\n\nI agree that this is possible. I'd prefer not making a statement in the\nFAQ regarding license justifications/alternatives at this time, because\nit could be a long discussion with little gain.\n\nPlease note the source of this most recent unsolicited suggestion with\nunsubstantiated reasoning and we will conclude that we have already\nspent too much time on the subject for this go 'round. imho of course ;)\n\n - Thomas\n", "msg_date": "Mon, 21 Jan 2002 06:56:29 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> Anyway, let's look at it this way. If we allow for proprietary versions\n> of PostgreSQL, it is hard to imagine why we couldn't make a GPL version\n> _without_ the agreement of past contributors. We have to keep the BSD\n> part about giving credit and no sueing, but we can clearly _add_ the GPL\n> cruft if we wanted to and all current/future developers agree. It is\n> basically a GPL fork of PostgreSQL, rather than a proprietary fork.\n\nWell, (a) not all current developers will agree, (b) you need to get\npast developers in there too, and (c) I'm not as sure as you are that\nwe can simply plaster GPL on top of BSD-licensed code. The GPL does\nnot like merging GPL code with not-GPL code, free or otherwise. See\n \n b) You must cause any work that you distribute or publish, that in\n whole or in part contains or is derived from the Program or any\n part thereof, to be licensed as a whole at no charge to all third\n ^^^^^^^^^^^^^^^^^^^\n parties under the terms of this License.\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis is the \"viral\" aspect of GPL that so many people have complained of.\n\nBut wait a sec; the last thing we need here is yet another license\ndiscussion. Given that the objective of this FAQ addition is to prevent\nfuture license flamewars, I think the last thing we want it to do is\ngive any suggestion that GPL-izing the code might actually be feasible.\nWhy are you so eager to suggest that that might be possible?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 02:04:21 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "[2002-01-21 01:30] Tom Lane said:\n\n| Perhaps something like this:\n| \n| The PostgreSQL project has released its code under the BSD license\n| since its inception; as did the Berkeley Postgres project before us.\n| Occasionally, users suggest that the project be relicensed under the\n| GPL. This is not very practical because it would require the\n| concurrence not only of the current developers, but many past\n| contributors both at Berkeley and all over the net. Furthermore,\n| many PostgreSQL developers feel the GPL contains restrictions that\n| would limit the ability of commercial entities to contribute or\n| continue contributing to the codebase, and question the need for such\n| restrictions. In light of these issues, we will continue with the\n| BSD license for the foreseeable future.\n\n+1\n\ncheers.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Mon, 21 Jan 2002 02:27:42 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, Jan 21, 2002 at 02:04:21AM -0500, Tom Lane wrote:\n> This is the \"viral\" aspect of GPL that so many people have complained of.\n> \n> But wait a sec; the last thing we need here is yet another license\n> discussion. Given that the objective of this FAQ addition is to prevent\n> future license flamewars, I think the last thing we want it to do is\n> give any suggestion that GPL-izing the code might actually be feasible.\n> Why are you so eager to suggest that that might be possible?\n\nTruth is useful, even if unpleasant.\n\nDave, happy with BSD.\n\n-- \nDavid Terrell | \"the only part about medicinal marijuana that \nPrime Minister, Nebcorp | bothers me is that, when I started chemo, all of \ndbt@meat.net | my children and grandchildren told me they could \nhttp://wwn.nebcorp.com/ | get some for me if I needed it.\" -mrw's grandfather\n", "msg_date": "Mon, 21 Jan 2002 00:16:06 -0800", "msg_from": "David Terrell <dbt@meat.net>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Brent Verner wrote:\n> \n> [2002-01-21 01:30] Tom Lane said:\n> \n> | Perhaps something like this:\n> |\n> | The PostgreSQL project has released its code under the BSD license\n> | since its inception; as did the Berkeley Postgres project before us.\n> | Occasionally, users suggest that the project be relicensed under the\n> | GPL. This is not very practical because it would require the\n> | concurrence not only of the current developers, but many past\n> | contributors both at Berkeley and all over the net. Furthermore,\n> | many PostgreSQL developers feel the GPL contains restrictions that\n> | would limit the ability of commercial entities to contribute or\n> | continue contributing to the codebase, and question the need for such\n> | restrictions. In light of these issues, we will continue with the\n> | BSD license for the foreseeable future.\n> \n> +1\n\nYep, lets go with this version.\n\n+ Justin\n\n> \n> cheers.\n> brent\n> \n> --\n> \"Develop your talent, man, and leave the world something. Records are\n> really gifts from people. To think that an artist would love you enough\n> to share his music with anyone is a beautiful thing.\" -- Duane Allman\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 2: you can get off all lists at once with the unregister command\n> (send \"unregister YourEmailAddressHere\" to majordomo@postgresql.org)\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Mon, 21 Jan 2002 21:39:05 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Tom Lane wrote:\n\n> many PostgreSQL developers feel the GPL contains restrictions that\n> would limit the ability of commercial entities to contribute or\n> continue contributing to the codebase, and question the need for such\n\nThis could easily be interpreted as flamebait. It doesn't\nlimit contribution at all. What's wrong with:\n\n\tThe GPL contains restrictions which we do not\n\twish to impose upon our users and developers.\n\nWhy just \"commercial entities\"?\n\nMatthew.\n\n", "msg_date": "Mon, 21 Jan 2002 10:39:46 +0000 (GMT)", "msg_from": "Matthew Kirkwood <matthew@hairy.beasts.org>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > Anyway, let's look at it this way. If we allow for proprietary versions\n> > of PostgreSQL, it is hard to imagine why we couldn't make a GPL version\n> > _without_ the agreement of past contributors. We have to keep the BSD\n> > part about giving credit and no sueing, but we can clearly _add_ the GPL\n> > cruft if we wanted to and all current/future developers agree. It is\n> > basically a GPL fork of PostgreSQL, rather than a proprietary fork.\n> \n> Well, (a) not all current developers will agree, (b) you need to get\n> past developers in there too, and (c) I'm not as sure as you are that\n> we can simply plaster GPL on top of BSD-licensed code. The GPL does\n> not like merging GPL code with not-GPL code, free or otherwise. See\n> \n> b) You must cause any work that you distribute or publish, that in\n> whole or in part contains or is derived from the Program or any\n> part thereof, to be licensed as a whole at no charge to all third\n> ^^^^^^^^^^^^^^^^^^^\n> parties under the terms of this License.\n> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> \n> This is the \"viral\" aspect of GPL that so many people have complained of.\n> \n> But wait a sec; the last thing we need here is yet another license\n> discussion. Given that the objective of this FAQ addition is to prevent\n> future license flamewars, I think the last thing we want it to do is\n> give any suggestion that GPL-izing the code might actually be feasible.\n> Why are you so eager to suggest that that might be possible?\n\nI am not trying to suggest GPL. I merely think we should be honest that\nwe don't want GPL.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 08:12:33 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Matthew Kirkwood wrote:\n> On Mon, 21 Jan 2002, Tom Lane wrote:\n> \n> > many PostgreSQL developers feel the GPL contains restrictions that\n> > would limit the ability of commercial entities to contribute or\n> > continue contributing to the codebase, and question the need for such\n> \n> This could easily be interpreted as flamebait. It doesn't\n> limit contribution at all. What's wrong with:\n> \n> \tThe GPL contains restrictions which we do not\n> \twish to impose upon our users and developers.\n> \n> Why just \"commercial entities\"?\n\nYes, this is the problem with longer wording --- the more words, the\nmore possibility for disagreement/discussion and offense. The more\ndetailed you get, \"We can't do it\", \"We don't like X about it\", the more\npossibility for problems.\n\nOne clarification. We could not put the GPL on top of our current\nlicense, but we could add enough GPL aspects to make it effectively GPL.\nOf course, it would be a mess, we couldn't get most to agree to it, and\nI don't want to do it, but there it is.\n\nAn updated version of my short text is below. I removed the mention of\n\"current\" and \"similar\". I also strengthened the last sentence. That\nlast sentence could also be removed completely.\n\n---------------------------------------------------------------------------\n\nWe carry a BSD license, the archetypal open-source license. While the\nGPL also promotes open-source, it has certain anti-closed source\n(proprietary) restrictions. Many PostgreSQL developers question the\nneed for such restrictions. We like our BSD license and see no need to\nchange it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 08:29:33 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Sun, 20 Jan 2002, Bruce Momjian wrote:\n\n> ---------------------------------------------------------------------------\n>\n> We currently have a BSD license, the archetypal open-source license.\n> The GPL is similar to BSD, except that it has certain anti-closed source\n> (proprietary) restrictions. Many PostgreSQL developers question the\n> need for such restrictions and we therefore will continue with the BSD\n> license for the for-seeable future.\n\nGPL is kinda 'anti-open source' too, IMHO ... it puts restrictions on what\nyou can do with the source code, so it isn't *really* \"free to do with as\nyou wish\" ...\n\n", "msg_date": "Mon, 21 Jan 2002 10:03:09 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nI'd get rid of the 'foreseeable future' part myself ...\n\n\nOn Mon, 21 Jan 2002, Brent Verner wrote:\n\n> [2002-01-20 23:43] Bruce Momjian said:\n>\n> | At the great risk of causing chaos, let me chime in on this. First, in\n>\n> | However, we clearly don't have unanimous agreement on using GPL so I\n> | would like to address this in an FAQ item to get it more concrete. What\n> | do people think of this summary:\n>\n> | The GPL is similar to BSD, except that it has certain anti-closed source\n> | (proprietary) restrictions.\n>\n> Calling the two licenses \"similar\" is only an invitation to engage\n> in license war. I'd suggest something like the following (as long\n> as it doesn't contain any factual errors).\n>\n> The PostgreSQL project has released its code under the BSD\n> license since its inception. Occasionally, users request that\n> the project be relicensed under the GPL. Many PostgreSQL\n> developers feel the GPL contains certain restrictions that\n> might limit the ability of commercial entities to contribute\n> or continue contributing to the codebase, and question the\n> need for such restrictions. In light of these concerns, we\n> will continue with the BSD license for the foreseeable future.\n>\n> cheers.\n> brent\n>\n> --\n> \"Develop your talent, man, and leave the world something. Records are\n> really gifts from people. To think that an artist would love you enough\n> to share his music with anyone is a beautiful thing.\" -- Duane Allman\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n\n", "msg_date": "Mon, 21 Jan 2002 10:04:25 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> > This is really good as far as it goes. I'd also like to see the\n> > point made that we cannot simply relicense the code, even if we wished\n> > to, because the current developers are not the sole authors/owners.\n> > Perhaps something like this:\n> >\n> > The PostgreSQL project has released its code under the BSD license\n> > since its inception; as did the Berkeley Postgres project before us.\n> > Occasionally, users suggest that the project be relicensed under the\n> > GPL. This is not very practical because it would require the\n> > concurrence not only of the current developers, but many past\n> > contributors both at Berkeley and all over the net. Furthermore,\n> > many PostgreSQL developers feel the GPL contains restrictions that\n> > would limit the ability of commercial entities to contribute or\n> > continue contributing to the codebase, and question the need for such\n> > restrictions. In light of these issues, we will continue with the\n> > BSD license for the foreseeable future.\n>\n> Man, this text is getting longer. :-(\n>\n> Anyway, let's look at it this way. If we allow for proprietary versions\n> of PostgreSQL, it is hard to imagine why we couldn't make a GPL version\n> _without_ the agreement of past contributors. We have to keep the BSD\n> part about giving credit and no sueing, but we can clearly _add_ the GPL\n> cruft if we wanted to and all current/future developers agree. It is\n> basically a GPL fork of PostgreSQL, rather than a proprietary fork.\n\nIf someone wanted to fork and call it a new name, ya, its doable ...\n\n\n", "msg_date": "Mon, 21 Jan 2002 10:05:27 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> Tom Lane wrote:\n> > Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > > Anyway, let's look at it this way. If we allow for proprietary versions\n> > > of PostgreSQL, it is hard to imagine why we couldn't make a GPL version\n> > > _without_ the agreement of past contributors. We have to keep the BSD\n> > > part about giving credit and no sueing, but we can clearly _add_ the GPL\n> > > cruft if we wanted to and all current/future developers agree. It is\n> > > basically a GPL fork of PostgreSQL, rather than a proprietary fork.\n> >\n> > Well, (a) not all current developers will agree, (b) you need to get\n> > past developers in there too, and (c) I'm not as sure as you are that\n> > we can simply plaster GPL on top of BSD-licensed code. The GPL does\n> > not like merging GPL code with not-GPL code, free or otherwise. See\n> >\n> > b) You must cause any work that you distribute or publish, that in\n> > whole or in part contains or is derived from the Program or any\n> > part thereof, to be licensed as a whole at no charge to all third\n> > ^^^^^^^^^^^^^^^^^^^\n> > parties under the terms of this License.\n> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> >\n> > This is the \"viral\" aspect of GPL that so many people have complained of.\n> >\n> > But wait a sec; the last thing we need here is yet another license\n> > discussion. Given that the objective of this FAQ addition is to prevent\n> > future license flamewars, I think the last thing we want it to do is\n> > give any suggestion that GPL-izing the code might actually be feasible.\n> > Why are you so eager to suggest that that might be possible?\n>\n> I am not trying to suggest GPL. I merely think we should be honest that\n> we don't want GPL.\n\nYa, but with your wording, you are suggesting that that desire may change\nin the future ...\n\n\n", "msg_date": "Mon, 21 Jan 2002 10:07:09 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> Matthew Kirkwood wrote:\n> > On Mon, 21 Jan 2002, Tom Lane wrote:\n> >\n> > > many PostgreSQL developers feel the GPL contains restrictions that\n> > > would limit the ability of commercial entities to contribute or\n> > > continue contributing to the codebase, and question the need for such\n> >\n> > This could easily be interpreted as flamebait. It doesn't\n> > limit contribution at all. What's wrong with:\n> >\n> > \tThe GPL contains restrictions which we do not\n> > \twish to impose upon our users and developers.\n> >\n> > Why just \"commercial entities\"?\n>\n> Yes, this is the problem with longer wording --- the more words, the\n> more possibility for disagreement/discussion and offense. The more\n> detailed you get, \"We can't do it\", \"We don't like X about it\", the more\n> possibility for problems.\n>\n> One clarification. We could not put the GPL on top of our current\n> license, but we could add enough GPL aspects to make it effectively GPL.\n> Of course, it would be a mess, we couldn't get most to agree to it, and\n> I don't want to do it, but there it is.\n>\n> An updated version of my short text is below. I removed the mention of\n> \"current\" and \"similar\". I also strengthened the last sentence. That\n> last sentence could also be removed completely.\n>\n> ---------------------------------------------------------------------------\n>\n> We carry a BSD license, the archetypal open-source license. While the\n> GPL also promotes open-source, it has certain anti-closed source\n> (proprietary) restrictions. Many PostgreSQL developers question the\n> need for such restrictions. We like our BSD license and see no need to\n> change it.\n\nThis one is nice and short and to the point ... I like :)\n\n\n", "msg_date": "Mon, 21 Jan 2002 10:08:30 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n<snip>\n> \n> We carry a BSD license, the archetypal open-source license. While the\n> GPL also promotes open-source, it has certain anti-closed source\n> (proprietary) restrictions. Many PostgreSQL developers question the\n> need for such restrictions. We like our BSD license and see no need to\n> change it.\n\nOk, how about :\n\nWe carry a BSD license, the archetypal open-source license. While the\nGPL also promotes open-source, it has certain anti \"closed source\"\n(proprietary) restrictions. We like our BSD license and see no need to\nchange it.\n\nThat has got to be about as plain and non-offensive as possible.\n\n:)\n\nRegards and best wishes,\n\nJustin Clift\n\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (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> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Tue, 22 Jan 2002 01:08:38 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> We carry a BSD license, the archetypal open-source license. While the\n> GPL also promotes open-source,\n ^^^ ^^^^^^^^^^^\n\nSpot the recipe for disaster :-)\n\n\"While the GPL expresses many of our goals,\"\n\n> it has certain anti-closed source (proprietary) restrictions. Many\n> PostgreSQL developers question the need for such restrictions. We\n> like our BSD license and see no need to change it.\n\nI don't really like \"Many PostgreSQL developers question\nthe need for such restrictions.\" It may be that they do,\nbut that's not the point; the point is that you don't\nwant them, not that they are inherently inappropriate\n(whether you believe that or not).\n\nMatthew.\n\n", "msg_date": "Mon, 21 Jan 2002 14:16:37 +0000 (GMT)", "msg_from": "Matthew Kirkwood <matthew@hairy.beasts.org>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Justin Clift wrote:\n> Bruce Momjian wrote:\n> <snip>\n> > \n> > We carry a BSD license, the archetypal open-source license. While the\n> > GPL also promotes open-source, it has certain anti-closed source\n> > (proprietary) restrictions. Many PostgreSQL developers question the\n> > need for such restrictions. We like our BSD license and see no need to\n> > change it.\n> \n> Ok, how about :\n> \n> We carry a BSD license, the archetypal open-source license. While the\n> GPL has similar goals, it has questionable anti-\"closed source\"\n> (proprietary) restrictions. We like our BSD license and see no need to\n> change it.\n\nOK, here is Justin's wording, with \"goals\" and \"questionable\" added.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 09:20:51 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Spoken like a true *BSD person. I'm on the board of the Open Source Initiative \n(current maintainer of the Open Source Definition). None of us would ever \ncharacterize the GPL as \"anti-open source\".\n\nTo paraphrase Woody Allen (who quipped \"the lamb may lie down with the lion, \nbut the lamb won't get very much sleep\"), if you value the freedom to hack on \nsource code, the GPL enables the lamb (an individual programmer) to lie down \nwith the lion (large corporate interests who could take the code down a \nproprietary path) without losing sleep. Also, I don't see this as anti-closed \nsource--just pro-programmer.\n\nM\n\nMarc G. Fournier wrote:\n\n> On Sun, 20 Jan 2002, Bruce Momjian wrote:\n> \n> \n>>---------------------------------------------------------------------------\n>>\n>>We currently have a BSD license, the archetypal open-source license.\n>>The GPL is similar to BSD, except that it has certain anti-closed source\n>>(proprietary) restrictions. Many PostgreSQL developers question the\n>>need for such restrictions and we therefore will continue with the BSD\n>>license for the for-seeable future.\n>>\n> \n> GPL is kinda 'anti-open source' too, IMHO ... it puts restrictions on what\n> you can do with the source code, so it isn't *really* \"free to do with as\n> you wish\" ...\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n> \n\n\n", "msg_date": "Mon, 21 Jan 2002 09:26:20 -0500", "msg_from": "Michael Tiemann <tiemann@redhat.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\n\nBruce Momjian wrote:\n> \n> Justin Clift wrote:\n> > Bruce Momjian wrote:\n> > <snip>\n> > >\n> > > We carry a BSD license, the archetypal open-source license. While the\n> > > GPL also promotes open-source, it has certain anti-closed source\n> > > (proprietary) restrictions. Many PostgreSQL developers question the\n> > > need for such restrictions. We like our BSD license and see no need to\n> > > change it.\n> >\n> > Ok, how about :\n> >\n> > We carry a BSD license, the archetypal open-source license. While the\n> > GPL has similar goals, it has questionable anti-\"closed source\"\n> > (proprietary) restrictions. We like our BSD license and see no need to\n> > change it.\n\nI don't think calling the GPL \"questionable\" is anything other than\nflame-bait. BUT, I do like the new \"goals\" wording... um... how's this\n:\n\nWe carry a BSD license, the archetypal open-source license. While the\nGPL has similar goals, it also has anti-\"closed source\" (proprietary)\nrestrictions. We like our BSD license and see no need to change it.\n\n***\n\nI find it amazing I'm even concerned about this when I should be\nsleeping. :)\n\n'nite\n\n+ Justin\n\n> OK, here is Justin's wording, with \"goals\" and \"questionable\" added.\n> \n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (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\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Tue, 22 Jan 2002 01:48:03 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n\n>\n> I'd get rid of the 'foreseeable future' part myself ...\n\nThe whole thing is too wordy.\n\nMany PostgreSQL developers past and present are uncomfortable with\nrestrictions imposed by the GPL. The PostgreSQL project always has\nand will continue to remain under the BSD license alone.\n\nIt's an FAQ entry, not an exercise for a law student.\n\n>\n>\n> On Mon, 21 Jan 2002, Brent Verner wrote:\n>\n> > [2002-01-20 23:43] Bruce Momjian said:\n> >\n> > | At the great risk of causing chaos, let me chime in on this. First, in\n> >\n> > | However, we clearly don't have unanimous agreement on using GPL so I\n> > | would like to address this in an FAQ item to get it more concrete. What\n> > | do people think of this summary:\n> >\n> > | The GPL is similar to BSD, except that it has certain anti-closed source\n> > | (proprietary) restrictions.\n> >\n> > Calling the two licenses \"similar\" is only an invitation to engage\n> > in license war. I'd suggest something like the following (as long\n> > as it doesn't contain any factual errors).\n> >\n> > The PostgreSQL project has released its code under the BSD\n> > license since its inception. Occasionally, users request that\n> > the project be relicensed under the GPL. Many PostgreSQL\n> > developers feel the GPL contains certain restrictions that\n> > might limit the ability of commercial entities to contribute\n> > or continue contributing to the codebase, and question the\n> > need for such restrictions. In light of these concerns, we\n> > will continue with the BSD license for the foreseeable future.\n> >\n> > cheers.\n> > brent\n> >\n> > --\n> > \"Develop your talent, man, and leave the world something. Records are\n> > really gifts from people. To think that an artist would love you enough\n> > to share his music with anyone is a beautiful thing.\" -- Duane Allman\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> >\n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> >\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 09:53:39 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n\n> On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n>\n> >\n> > I'd get rid of the 'foreseeable future' part myself ...\n>\n> The whole thing is too wordy.\n>\n> Many PostgreSQL developers past and present are uncomfortable with\n> restrictions imposed by the GPL. The PostgreSQL project always has\n> and will continue to remain under the BSD license alone.\n\nThis one is perfect ... Bruce? I really leaves no openings, no?\n\n\n>\n> It's an FAQ entry, not an exercise for a law student.\n>\n> >\n> >\n> > On Mon, 21 Jan 2002, Brent Verner wrote:\n> >\n> > > [2002-01-20 23:43] Bruce Momjian said:\n> > >\n> > > | At the great risk of causing chaos, let me chime in on this. First, in\n> > >\n> > > | However, we clearly don't have unanimous agreement on using GPL so I\n> > > | would like to address this in an FAQ item to get it more concrete. What\n> > > | do people think of this summary:\n> > >\n> > > | The GPL is similar to BSD, except that it has certain anti-closed source\n> > > | (proprietary) restrictions.\n> > >\n> > > Calling the two licenses \"similar\" is only an invitation to engage\n> > > in license war. I'd suggest something like the following (as long\n> > > as it doesn't contain any factual errors).\n> > >\n> > > The PostgreSQL project has released its code under the BSD\n> > > license since its inception. Occasionally, users request that\n> > > the project be relicensed under the GPL. Many PostgreSQL\n> > > developers feel the GPL contains certain restrictions that\n> > > might limit the ability of commercial entities to contribute\n> > > or continue contributing to the codebase, and question the\n> > > need for such restrictions. In light of these concerns, we\n> > > will continue with the BSD license for the foreseeable future.\n> > >\n> > > cheers.\n> > > brent\n> > >\n> > > --\n> > > \"Develop your talent, man, and leave the world something. Records are\n> > > really gifts from people. To think that an artist would love you enough\n> > > to share his music with anyone is a beautiful thing.\" -- Duane Allman\n> > >\n> > > ---------------------------(end of broadcast)---------------------------\n> > > TIP 5: Have you checked our extensive FAQ?\n> > >\n> > > http://www.postgresql.org/users-lounge/docs/faq.html\n> > >\n> >\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> >\n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> >\n>\n>\n> Vince.\n> --\n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide 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>\n\n", "msg_date": "Mon, 21 Jan 2002 11:02:18 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "> > > Ok, how about :\n> > >\n> > > We carry a BSD license, the archetypal open-source license. While the\n> > > GPL has similar goals, it has questionable anti-\"closed source\"\n> > > (proprietary) restrictions. We like our BSD license and see no need to\n> > > change it.\n> \n> I don't think calling the GPL \"questionable\" is anything other than\n> flame-bait. BUT, I do like the new \"goals\" wording... um... how's this\n> :\n> \n> We carry a BSD license, the archetypal open-source license. While the\n> GPL has similar goals, it also has anti-\"closed source\" (proprietary)\n> restrictions. We like our BSD license and see no need to change it.\n\nI know this is a pain but I think it is worth getting this down so we\nhave something concrete to point to when people ask. Actually, it is\ngoing much quicker and smoother than I thought.\n\nHow about this? I have removed \"questionable\": (This is getting shorter\neach time.)\n\n---------------------------------------------------------------------------\n\nWe carry a BSD license, the archetypal open-source license. While the\nGPL has similar goals, it also has \"closed source\" (proprietary)\nrestrictions. We like our BSD license and see no need to change it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 10:02:45 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Marc G. Fournier wrote:\n> On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> \n> > On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n> >\n> > >\n> > > I'd get rid of the 'foreseeable future' part myself ...\n> >\n> > The whole thing is too wordy.\n> >\n> > Many PostgreSQL developers past and present are uncomfortable with\n> > restrictions imposed by the GPL. The PostgreSQL project always has\n> > and will continue to remain under the BSD license alone.\n> \n> This one is perfect ... Bruce? I really leaves no openings, no?\n\nIt is hard to argue with this wording either. Let's see how people\nvote.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 10:06:36 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nI'd like to second Michael Tiemann's opinion: I respect the PG developers'\nright to use the BSD license, and I understand the BSD point of view. I just\nhappen to disagree with it.\n\nI also support the idea of putting together an FAQ that is as simple and\nstraight-forward as possible, so that no time is wasted on license flaming.\nIf the final note could simply say that you've chosen the BSD license\nwithout bashing the GPL, we, GPL fans, would greatly appreciate it.\n\nCan't we all just get along?\n\n-Ben\n\n\nOn 1/21/02 9:03 AM, \"Marc G. Fournier\" <scrappy@hub.org> wrote:\n\n> GPL is kinda 'anti-open source' too, IMHO ... it puts restrictions on what\n> you can do with the source code, so it isn't *really* \"free to do with as\n> you wish\" ...\n\n", "msg_date": "Mon, 21 Jan 2002 10:29:19 -0500", "msg_from": "Ben Adida <ben@mit.edu>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> Marc G. Fournier wrote:\n> > On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> >\n> > > On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n> > >\n> > > >\n> > > > I'd get rid of the 'foreseeable future' part myself ...\n> > >\n> > > The whole thing is too wordy.\n> > >\n> > > Many PostgreSQL developers past and present are uncomfortable with\n> > > restrictions imposed by the GPL. The PostgreSQL project always has\n> > > and will continue to remain under the BSD license alone.\n> >\n> > This one is perfect ... Bruce? I really leaves no openings, no?\n>\n> It is hard to argue with this wording either. Let's see how people\n> vote.\n\nAs one of those who contributed my $.02 to PostgreSQL, I think short is\nsweet.\n\n'tis got my vote.\n\n-- \nDominic J. Eidson\n \"Baruk Khazad! Khazad ai-menu!\" - Gimli\n-------------------------------------------------------------------------------\nhttp://www.the-infinite.org/ http://www.the-infinite.org/~dominic/\n\n", "msg_date": "Mon, 21 Jan 2002 09:48:04 -0600 (CST)", "msg_from": "\"Dominic J. Eidson\" <sauron@the-infinite.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "How about something like this, avoiding any such BSD/GPL comparison:\n\n\nThe PostgreSQL project was originated using the BSD license. Over the\nyears many people have contributed code and effort understanding that\ntheir work would be licensed using the BSD license. The leaders of the\nPostgreSQL project, as an entity, do not believe that it would be right\nto change the implied agreement under which the entirety of the project\nwas developed.\n", "msg_date": "Mon, 21 Jan 2002 11:00:27 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "mlw wrote:\n> How about something like this, avoiding any such BSD/GPL comparison:\n> \n> \n> The PostgreSQL project was originated using the BSD license. Over the\n> years many people have contributed code and effort understanding that\n> their work would be licensed using the BSD license. The leaders of the\n> PostgreSQL project, as an entity, do not believe that it would be right\n> to change the implied agreement under which the entirety of the project\n> was developed.\n\nYou know, that is true, but it sort of suggests that we would change if\nwe felt we could, but we don't actually want to.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 11:00:46 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Ben Adida wrote:\n\n\n> I also support the idea of putting together an FAQ that is as simple and\n> straight-forward as possible, so that no time is wasted on license flaming.\n> If the final note could simply say that you've chosen the BSD license\n> without bashing the GPL, we, GPL fans, would greatly appreciate it.\n\n\nWhy not just say that PG was originally developed at Berkeley, and \nreleased by them under the BSD licence? You could simply point out that \nPG has flourished as a project releasing code under that license, it \nain't broke, and there ain't anything to fix.\n\nIn other words, stay neutral on the \"which is best\" issue and point out \nthe simple historical truth.\n\n\n> Can't we all just get along?\n\nAsk the Palestinians and Israelis. Or the Serbs and Bosnians. Or Microsoft\n\nand the rest of the software industry.\n\n\nThe whole BSD/GPL issue's pretty trite, when you think about it.\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Mon, 21 Jan 2002 08:03:50 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n\n> Marc G. Fournier wrote:\n> > On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> > \n> > > On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n> > >\n> > > >\n> > > > I'd get rid of the 'foreseeable future' part myself ...\n> > >\n> > > The whole thing is too wordy.\n> > >\n> > > Many PostgreSQL developers past and present are uncomfortable\n> > > with restrictions imposed by the GPL. The PostgreSQL project\n> > > always has and will continue to remain under the BSD license\n> > > alone.\n> > \n> > This one is perfect ... Bruce? I really leaves no openings, no?\n> \n> It is hard to argue with this wording either. Let's see how people\n> vote.\n\nWhile it is certainly true that PostgreSQL developers are\n\"uncomfortable\" with the GPL this version doesn't say *why* you are\nuncomfortable. People that follow the BSD-GPL flamewars know what\nyour problems with the GPL are, but other folks that are just\nperipherally aware of the debate (like those who are asking about\nGPLing PostgreSQL) could very well misinterpret this. After all, if\nthey want you to GPL PostgreSQL then clearly they think the\n\"restrictions\" placed by the GPL are not a big deal. To them this\nstatement will probably read like:\n\n We have always used the BSD license and believe the GPL is for\n hippies and communists :).\n\nI like the other version:\n\n We carry a BSD license, the archetypal open-source license.\n While the GPL has similar goals, it also has anti-\"closed\n source\" (proprietary) restrictions. We like our BSD license\n and see no need to change it.\n\nInstead of emphasizing the problems with the GPL this version\nemphasizes the benefits of the BSD license (it's the archetypal\nopen-source license, and it has no anti-proprietary restrictions).\nThis statement also specifically points out which \"restrictions\" to\nthe GPL make you uncomfortable.\n\nI would go on to say that it \"extends the hand of fellowship\" by\npointing out that the GPL has similar goals, but I think that would be\na little over the top. No need to wax poetic.\n\nMy 2 cents,\nJason Earl\n", "msg_date": "21 Jan 2002 09:12:37 -0700", "msg_from": "Jason Earl <jason.earl@simplot.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Marc G. Fournier wrote:\n> On Sun, 20 Jan 2002, Bruce Momjian wrote:\n>\n> > ---------------------------------------------------------------------------\n> >\n> > We currently have a BSD license, the archetypal open-source license.\n> > The GPL is similar to BSD, except that it has certain anti-closed source\n> > (proprietary) restrictions. Many PostgreSQL developers question the\n> > need for such restrictions and we therefore will continue with the BSD\n> > license for the for-seeable future.\n>\n> GPL is kinda 'anti-open source' too, IMHO ... it puts restrictions on what\n> you can do with the source code, so it isn't *really* \"free to do with as\n> you wish\" ...\n\n Yupp, it's kinda \"I am the only truth and you shall not have\n any other licenses ...\", IMHO a little selfish.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 21 Jan 2002 11:12:48 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> Marc G. Fournier wrote:\n> > On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> >\n> > > On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n> > >\n> > > >\n> > > > I'd get rid of the 'foreseeable future' part myself ...\n> > >\n> > > The whole thing is too wordy.\n> > >\n> > > Many PostgreSQL developers past and present are uncomfortable with\n> > > restrictions imposed by the GPL. The PostgreSQL project always has\n> > > and will continue to remain under the BSD license alone.\n> >\n> > This one is perfect ... Bruce? I really leaves no openings, no?\n>\n> It is hard to argue with this wording either. Let's see how people\n> vote.\n\n I like it. It reduces it to the bottom line \"we've been\n there, discussed that, forget it\".\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Mon, 21 Jan 2002 11:21:05 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Tom Lane writes:\n\n[...]\n> many PostgreSQL developers feel the GPL contains restrictions that\n> would limit the ability of commercial entities to contribute or\n> continue contributing to the codebase, and question the need for such\n> restrictions. In light of these issues, we will continue with the\n> BSD license for the foreseeable future.\n\nIf that is actually true, then \"many PostgreSQL developers\" are completely\nmissing the point. (Or possibly the commercial entities are missing the\npoint.)\n\nIf commercial entity A writes code C, then A owns the copyright on C and A\ncan relicense C in any way they want. In particular A can contribute C to\na \"community\" GPL code base and can sell C in a closed-source product at\nthe same time.\n\nFor commercial entities, the main difference between a BSD license and the\nGPL is that they can add their own code and sell the result closed-source\n*without* having to effectively contribute it to the community sources.\nBut in that case they're not actually \"contributing\", as you write, and\nthe open project could care less.\n\nAs a PostgreSQL developer, I don't agree with the statement you made for\nanother reason: It implies that there is something better about the GPL\nand we have to justify ourselves for not using it. We don't. We give\naway the code we write with no strings attached, and anyone who wants to\nquestion that has to come up with better arguments than I've heard so far.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 21 Jan 2002 11:42:20 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "\nI have to admit you hit on exactly why I worded the original as I did. \nIt emphasizes the commonality of the two licenses, and specifically\npoints out the the part of the GPL that we don't like, without slamming\nit.\n\n---------------------------------------------------------------------------\n\nJason Earl wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> \n> > Marc G. Fournier wrote:\n> > > On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> > > \n> > > > On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n> > > >\n> > > > >\n> > > > > I'd get rid of the 'foreseeable future' part myself ...\n> > > >\n> > > > The whole thing is too wordy.\n> > > >\n> > > > Many PostgreSQL developers past and present are uncomfortable\n> > > > with restrictions imposed by the GPL. The PostgreSQL project\n> > > > always has and will continue to remain under the BSD license\n> > > > alone.\n> > > \n> > > This one is perfect ... Bruce? I really leaves no openings, no?\n> > \n> > It is hard to argue with this wording either. Let's see how people\n> > vote.\n> \n> While it is certainly true that PostgreSQL developers are\n> \"uncomfortable\" with the GPL this version doesn't say *why* you are\n> uncomfortable. People that follow the BSD-GPL flamewars know what\n> your problems with the GPL are, but other folks that are just\n> peripherally aware of the debate (like those who are asking about\n> GPLing PostgreSQL) could very well misinterpret this. After all, if\n> they want you to GPL PostgreSQL then clearly they think the\n> \"restrictions\" placed by the GPL are not a big deal. To them this\n> statement will probably read like:\n> \n> We have always used the BSD license and believe the GPL is for\n> hippies and communists :).\n> \n> I like the other version:\n> \n> We carry a BSD license, the archetypal open-source license.\n> While the GPL has similar goals, it also has anti-\"closed\n> source\" (proprietary) restrictions. We like our BSD license\n> and see no need to change it.\n> \n> Instead of emphasizing the problems with the GPL this version\n> emphasizes the benefits of the BSD license (it's the archetypal\n> open-source license, and it has no anti-proprietary restrictions).\n> This statement also specifically points out which \"restrictions\" to\n> the GPL make you uncomfortable.\n> \n> I would go on to say that it \"extends the hand of fellowship\" by\n> pointing out that the GPL has similar goals, but I think that would be\n> a little over the top. No need to wax poetic.\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 11:53:32 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n>\n> I have to admit you hit on exactly why I worded the original as I did.\n> It emphasizes the commonality of the two licenses, and specifically\n> points out the the part of the GPL that we don't like, without slamming\n> it.\n\nThat wording invites responses from people who want to give you reasons\nto change it. Do you want to put the issue to bed or invite more debate?\n\n\n>\n> ---------------------------------------------------------------------------\n>\n> Jason Earl wrote:\n> > Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> >\n> > > Marc G. Fournier wrote:\n> > > > On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> > > >\n> > > > > On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n> > > > >\n> > > > > >\n> > > > > > I'd get rid of the 'foreseeable future' part myself ...\n> > > > >\n> > > > > The whole thing is too wordy.\n> > > > >\n> > > > > Many PostgreSQL developers past and present are uncomfortable\n> > > > > with restrictions imposed by the GPL. The PostgreSQL project\n> > > > > always has and will continue to remain under the BSD license\n> > > > > alone.\n> > > >\n> > > > This one is perfect ... Bruce? I really leaves no openings, no?\n> > >\n> > > It is hard to argue with this wording either. Let's see how people\n> > > vote.\n> >\n> > While it is certainly true that PostgreSQL developers are\n> > \"uncomfortable\" with the GPL this version doesn't say *why* you are\n> > uncomfortable. People that follow the BSD-GPL flamewars know what\n> > your problems with the GPL are, but other folks that are just\n> > peripherally aware of the debate (like those who are asking about\n> > GPLing PostgreSQL) could very well misinterpret this. After all, if\n> > they want you to GPL PostgreSQL then clearly they think the\n> > \"restrictions\" placed by the GPL are not a big deal. To them this\n> > statement will probably read like:\n> >\n> > We have always used the BSD license and believe the GPL is for\n> > hippies and communists :).\n> >\n> > I like the other version:\n> >\n> > We carry a BSD license, the archetypal open-source license.\n> > While the GPL has similar goals, it also has anti-\"closed\n> > source\" (proprietary) restrictions. We like our BSD license\n> > and see no need to change it.\n> >\n> > Instead of emphasizing the problems with the GPL this version\n> > emphasizes the benefits of the BSD license (it's the archetypal\n> > open-source license, and it has no anti-proprietary restrictions).\n> > This statement also specifically points out which \"restrictions\" to\n> > the GPL make you uncomfortable.\n> >\n> > I would go on to say that it \"extends the hand of fellowship\" by\n> > pointing out that the GPL has similar goals, but I think that would be\n> > a little over the top. No need to wax poetic.\n>\n\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 11:56:54 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Tom Lane wrote:\n> \n> Brent Verner <brent@rcfile.org> writes:\n> > Calling the two licenses \"similar\" is only an invitation to engage\n> > in license war.\n> \n> Good point.\n> \n> > I'd suggest something like the following (as long\n> > as it doesn't contain any factual errors).\n> \n> > The PostgreSQL project has released its code under the BSD\n> > license since its inception. Occasionally, users request that\n> > the project be relicensed under the GPL. Many PostgreSQL\n> > developers feel the GPL contains certain restrictions that\n> > might limit the ability of commercial entities to contribute\n> > or continue contributing to the codebase, and question the\n> > need for such restrictions. In light of these concerns, we\n> > will continue with the BSD license for the foreseeable future.\n> \n> This is really good as far as it goes. I'd also like to see the\n> point made that we cannot simply relicense the code, even if we wished\n> to, because the current developers are not the sole authors/owners.\n> Perhaps something like this:\n> \n> The PostgreSQL project has released its code under the BSD license\n> since its inception; as did the Berkeley Postgres project before us.\n> Occasionally, users suggest that the project be relicensed under the\n> GPL. This is not very practical because it would require the\n> concurrence not only of the current developers, but many past\n> contributors both at Berkeley and all over the net. Furthermore,\n> many PostgreSQL developers feel the GPL contains restrictions that\n> would limit the ability of commercial entities to contribute or\n ^^^^^^^^^^^^^^^^^\n \nIn the interests of exactitude, shouldn't that really be something like\n\"adversely affects the willingness\"? Or \"discourages commercial\nentities from contributing...\"? (Though the latter is actually a bit\ntoo strong for my liking).\n\nIt's not like the GPL really *prevents* them from contributing...\n", "msg_date": "Mon, 21 Jan 2002 11:01:21 -0600", "msg_from": "\"Keith G. Murphy\" <keithmur@mindspring.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Vince Vielhaber wrote:\n> On Mon, 21 Jan 2002, Bruce Momjian wrote:\n> \n> >\n> > I have to admit you hit on exactly why I worded the original as I did.\n> > It emphasizes the commonality of the two licenses, and specifically\n> > points out the the part of the GPL that we don't like, without slamming\n> > it.\n> \n> That wording invites responses from people who want to give you reasons\n> to change it. Do you want to put the issue to bed or invite more debate?\n\nI guess my goal is to have a paragraph that tries to show the value of\nthe BSD license. Saying we just don't like the GPL isn't telling people\nwhat we dislike about it. It opens up questions of why we don't like it,\nand it is more confrontational that I would like to be towards the GPL. \nMany GPL folks are GPL because they don't understand the nature of the\nGPL restrictions in practice and why the BSD license may be better for\nthem. The wording I used attempts to \"reach out that hand\" as someone\nsaid. to the other side, in a nice way.\n\nWhat we could try is the more gentile wording and if that causes too\nmuch chatter, we can clamp down on the wording and give a more\nconfrontational tone.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 12:04:54 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nOK, here is merged wording of my version and Vince's. It keeps the\n\"reach out the hand\" phrase, but ends with a clear statement that no\nlicense changes are desired.\n\n---------------------------------------------------------------------------\n\nWe carry a BSD license, the archetypal open-source license. While the\nGPL has similar goals, it also has \"closed source\" (proprietary)\nrestrictions. Many PostgreSQL developers are uncomfortable with such\nrestrictions. The PostgreSQL project has no intention of modifying its\nexisting license.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 12:13:44 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> Vince Vielhaber wrote:\n> > On Mon, 21 Jan 2002, Bruce Momjian wrote:\n> >\n> > >\n> > > I have to admit you hit on exactly why I worded the original as I did.\n> > > It emphasizes the commonality of the two licenses, and specifically\n> > > points out the the part of the GPL that we don't like, without slamming\n> > > it.\n> >\n> > That wording invites responses from people who want to give you reasons\n> > to change it. Do you want to put the issue to bed or invite more debate?\n>\n> I guess my goal is to have a paragraph that tries to show the value of\n> the BSD license. Saying we just don't like the GPL isn't telling people\n> what we dislike about it. It opens up questions of why we don't like it,\n\nIt's really noone's business why any of us dislike it. My reasons may\nor may not be different than yours which may/may not be different from\nMarc's, and so on. Why try to summarize everyone's feelings when it's\nunnecessary. My statement never said that we just don't like it, it\nwas clear that many of the developers were uncomfortable with its\nrestrictions. Break it down. What are \"many of the developers\"\nuncomfortable with? The GPL's restrictions. What's not clear about\nthat? It didn't say \"many of the developers just don't like it\", that\nwould border on confrontational. You're not going to change the minds\nof those that favor GPL just as you're not going to change the minds\nof those that prefer BSD.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 12:14:27 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nI appreciate everyone chiming on on this discussion. I know it isn't\nfun, but once we get agreeable wording, it is something we can point to\nthat will give clarity to others asking similar questions.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 12:15:07 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n>\n> OK, here is merged wording of my version and Vince's. It keeps the\n> \"reach out the hand\" phrase, but ends with a clear statement that no\n> license changes are desired.\n\nConfrontational. Too wordy. Invites debate.\n\n\n>\n> ---------------------------------------------------------------------------\n>\n> We carry a BSD license, the archetypal open-source license. While the\n> GPL has similar goals, it also has \"closed source\" (proprietary)\n> restrictions. Many PostgreSQL developers are uncomfortable with such\n> restrictions. The PostgreSQL project has no intention of modifying its\n> existing license.\n>\n>\n\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 12:16:40 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> As a PostgreSQL developer, I don't agree with the statement you made for\n> another reason: It implies that there is something better about the GPL\n> and we have to justify ourselves for not using it. We don't.\n\nQuite true. I like the last few variants Bruce has proposed, along the\nlines of \"We like the BSD license and see no reason to change.\"\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 12:23:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "> It's really noone's business why any of us dislike it. My reasons may\n> or may not be different than yours which may/may not be different from\n> Marc's, and so on. Why try to summarize everyone's feelings when it's\n> unnecessary. My statement never said that we just don't like it, it\n> was clear that many of the developers were uncomfortable with its\n> restrictions. Break it down. What are \"many of the developers\"\n> uncomfortable with? The GPL's restrictions. What's not clear about\n> that? It didn't say \"many of the developers just don't like it\", that\n> would border on confrontational. You're not going to change the minds\n> of those that favor GPL just as you're not going to change the minds\n> of those that prefer BSD.\n\nIsn't it the restrictions on proprietary use that we dislike? Seems we\nshould say that in there.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 12:24:32 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nI think, and Vince can correct me if I'm wrong, but Vince is pointing out\nthe whole 'Many of the Developers' thing ... if we are (or at least appear\nto be) unanimous in this, then there is nothing to discuss ... if \"Many of\nthe developers' are uncomfortable, then obviously there are ones out there\nthat aren't, and that is where the whole \"confrontation\" I think arises\n...\n\nWhy does this discussion get started over and over again? Because one\nperson brings it up, and those in favor of GPL generally pop up\nthereafter, and it just goes around ...\n\nif we get rid of 'the Many' part, then you are saying \"thi sis the way it\nis, this is the way it stays, no discussion\" ...\n\nOn Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> > It's really noone's business why any of us dislike it. My reasons may\n> > or may not be different than yours which may/may not be different from\n> > Marc's, and so on. Why try to summarize everyone's feelings when it's\n> > unnecessary. My statement never said that we just don't like it, it\n> > was clear that many of the developers were uncomfortable with its\n> > restrictions. Break it down. What are \"many of the developers\"\n> > uncomfortable with? The GPL's restrictions. What's not clear about\n> > that? It didn't say \"many of the developers just don't like it\", that\n> > would border on confrontational. You're not going to change the minds\n> > of those that favor GPL just as you're not going to change the minds\n> > of those that prefer BSD.\n>\n> Isn't it the restrictions on proprietary use that we dislike? Seems we\n> should say that in there.\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n>\n\n", "msg_date": "Mon, 21 Jan 2002 13:29:56 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Marc G. Fournier wrote:\n> \n> I think, and Vince can correct me if I'm wrong, but Vince is pointing out\n> the whole 'Many of the Developers' thing ... if we are (or at least appear\n> to be) unanimous in this, then there is nothing to discuss ... if \"Many of\n> the developers' are uncomfortable, then obviously there are ones out there\n> that aren't, and that is where the whole \"confrontation\" I think arises\n> ...\n> \n> Why does this discussion get started over and over again? Because one\n> person brings it up, and those in favor of GPL generally pop up\n> thereafter, and it just goes around ...\n> \n> if we get rid of 'the Many' part, then you are saying \"thi sis the way it\n> is, this is the way it stays, no discussion\" ...\n\nBut Vince's text is below. It starts with \"Many\". I merely grafted his\ntext after my opening text:\n\nMany PostgreSQL developers past and present are uncomfortable with\nrestrictions imposed by the GPL. The PostgreSQL project always has\nand will continue to remain under the BSD license alone.\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 12:32:56 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> > It's really noone's business why any of us dislike it. My reasons may\n> > or may not be different than yours which may/may not be different from\n> > Marc's, and so on. Why try to summarize everyone's feelings when it's\n> > unnecessary. My statement never said that we just don't like it, it\n> > was clear that many of the developers were uncomfortable with its\n> > restrictions. Break it down. What are \"many of the developers\"\n> > uncomfortable with? The GPL's restrictions. What's not clear about\n> > that? It didn't say \"many of the developers just don't like it\", that\n> > would border on confrontational. You're not going to change the minds\n> > of those that favor GPL just as you're not going to change the minds\n> > of those that prefer BSD.\n>\n> Isn't it the restrictions on proprietary use that we dislike? Seems we\n> should say that in there.\n\nDefine we. Are you sure that that's *everyone's* dislike? Are you\nsure there aren't other reasons - Tom mentioned it's viral nature\nfor one thing, which happens to be one of my dislikes but it's not\nthe only one. Say that restriction was changed in the GPL, would\nyou then want to change PostgreSQL to GPL? You might, but I doubt\neveryone would (and I'm sure Marc wouldn't).\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 12:35:00 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > It's really noone's business why any of us dislike it. My reasons may\n> > or may not be different than yours which may/may not be different from\n> > Marc's, and so on. Why try to summarize everyone's feelings when it's\n> > unnecessary. My statement never said that we just don't like it, it\n> > was clear that many of the developers were uncomfortable with its\n> > restrictions. Break it down. What are \"many of the developers\"\n> > uncomfortable with? The GPL's restrictions. What's not clear about\n> > that? It didn't say \"many of the developers just don't like it\", that\n> > would border on confrontational. You're not going to change the minds\n> > of those that favor GPL just as you're not going to change the minds\n> > of those that prefer BSD.\n> \n> Isn't it the restrictions on proprietary use that we dislike? Seems we\n> should say that in there.\n\nIs it necessary to say you don't like the GPL? Isn't it sufficient to\njust say it is counter to policy?\n\nI think the problem with writing this thing is the emotional attachment\nboth camps have to their license.\n\nI think any attempt to say you dislike GPL for any reason invites\ndebate. Forget it, just say for historical reasons and with respect for\nall the people that made PostgreSQL what it is today, the license will\nremain as it always has.\n\n\n\n> \n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (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, 21 Jan 2002 12:35:41 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> Marc G. Fournier wrote:\n> >\n> > I think, and Vince can correct me if I'm wrong, but Vince is pointing out\n> > the whole 'Many of the Developers' thing ... if we are (or at least appear\n> > to be) unanimous in this, then there is nothing to discuss ... if \"Many of\n> > the developers' are uncomfortable, then obviously there are ones out there\n> > that aren't, and that is where the whole \"confrontation\" I think arises\n> > ...\n> >\n> > Why does this discussion get started over and over again? Because one\n> > person brings it up, and those in favor of GPL generally pop up\n> > thereafter, and it just goes around ...\n> >\n> > if we get rid of 'the Many' part, then you are saying \"thi sis the way it\n> > is, this is the way it stays, no discussion\" ...\n>\n> But Vince's text is below. It starts with \"Many\". I merely grafted his\n> text after my opening text:\n>\n> Many PostgreSQL developers past and present are uncomfortable with\n> restrictions imposed by the GPL. The PostgreSQL project always has\n> and will continue to remain under the BSD license alone.\n\nThen I disagree with Vince's for same reason :) Unless ... add in\nsomething that implies that without unanimous consent of all developers (a\nnear impossible task), it can't be cahnged?\n\n\n", "msg_date": "Mon, 21 Jan 2002 13:35:43 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n> On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n>> The whole thing is too wordy.\n>> \n>> Many PostgreSQL developers past and present are uncomfortable with\n>> restrictions imposed by the GPL. The PostgreSQL project always has\n>> and will continue to remain under the BSD license alone.\n\n> This one is perfect ... Bruce? I really leaves no openings, no?\n\nI like it too. Short & sweet.\n\nCan we go back to work now? ;-)\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 12:38:06 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n\n>\n> I think, and Vince can correct me if I'm wrong, but Vince is pointing out\n> the whole 'Many of the Developers' thing ... if we are (or at least appear\n> to be) unanimous in this, then there is nothing to discuss ... if \"Many of\n> the developers' are uncomfortable, then obviously there are ones out there\n> that aren't, and that is where the whole \"confrontation\" I think arises\n> ...\n>\n> Why does this discussion get started over and over again? Because one\n> person brings it up, and those in favor of GPL generally pop up\n> thereafter, and it just goes around ...\n>\n> if we get rid of 'the Many' part, then you are saying \"thi sis the way it\n> is, this is the way it stays, no discussion\" ...\n\nI pondered \"many\". You can remove it if you wish, but you then paint\nall contributers with the same brush and I don't think that's true.\nSome being uncomfortable and some not is (imnsho) not confrontational\nat all, it merely states fact. If anything should be changed, it's the\nword \"uncomfortable\" is the whimpy one, but it's less confrontational\nthan dislike, hate, etc.\n\n>\n> On Mon, 21 Jan 2002, Bruce Momjian wrote:\n>\n> > > It's really noone's business why any of us dislike it. My reasons may\n> > > or may not be different than yours which may/may not be different from\n> > > Marc's, and so on. Why try to summarize everyone's feelings when it's\n> > > unnecessary. My statement never said that we just don't like it, it\n> > > was clear that many of the developers were uncomfortable with its\n> > > restrictions. Break it down. What are \"many of the developers\"\n> > > uncomfortable with? The GPL's restrictions. What's not clear about\n> > > that? It didn't say \"many of the developers just don't like it\", that\n> > > would border on confrontational. You're not going to change the minds\n> > > of those that favor GPL just as you're not going to change the minds\n> > > of those that prefer BSD.\n> >\n> > Isn't it the restrictions on proprietary use that we dislike? Seems we\n> > should say that in there.\n> >\n> > --\n> > Bruce Momjian | http://candle.pha.pa.us\n> > pgman@candle.pha.pa.us | (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\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 12:41:23 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Marc G. Fournier wrote:\n\n> On Mon, 21 Jan 2002, Bruce Momjian wrote:\n>\n> > Marc G. Fournier wrote:\n> > >\n> > > I think, and Vince can correct me if I'm wrong, but Vince is pointing out\n> > > the whole 'Many of the Developers' thing ... if we are (or at least appear\n> > > to be) unanimous in this, then there is nothing to discuss ... if \"Many of\n> > > the developers' are uncomfortable, then obviously there are ones out there\n> > > that aren't, and that is where the whole \"confrontation\" I think arises\n> > > ...\n> > >\n> > > Why does this discussion get started over and over again? Because one\n> > > person brings it up, and those in favor of GPL generally pop up\n> > > thereafter, and it just goes around ...\n> > >\n> > > if we get rid of 'the Many' part, then you are saying \"thi sis the way it\n> > > is, this is the way it stays, no discussion\" ...\n> >\n> > But Vince's text is below. It starts with \"Many\". I merely grafted his\n> > text after my opening text:\n> >\n> > Many PostgreSQL developers past and present are uncomfortable with\n> > restrictions imposed by the GPL. The PostgreSQL project always has\n> > and will continue to remain under the BSD license alone.\n>\n> Then I disagree with Vince's for same reason :) Unless ... add in\n> something that implies that without unanimous consent of all developers (a\n> near impossible task), it can't be cahnged?\n\nSee my previous comment on \"many\" but if you still disagree, how about\nthis:\n\nWithout the unanimous consent of all of the developers and contributors,\nthe PostgreSQL license cannot be changed, modified or added to.\n\nGives no reasons, invites debate from both factions, won't put it to\nbed. Lemme think on this one a bit, I may still come up with something\neveryone can stomach without being too wordy or ambiguous.\n\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 12:50:20 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Tom Lane wrote:\n\n> \"Marc G. Fournier\" <scrappy@hub.org> writes:\n> > On Mon, 21 Jan 2002, Vince Vielhaber wrote:\n> >> The whole thing is too wordy.\n> >>\n> >> Many PostgreSQL developers past and present are uncomfortable with\n> >> restrictions imposed by the GPL. The PostgreSQL project always has\n> >> and will continue to remain under the BSD license alone.\n>\n> > This one is perfect ... Bruce? I really leaves no openings, no?\n>\n> I like it too. Short & sweet.\n\nOkay, I'm not that hard up on the Many issue, and it does say what we want\n...\n\n\n", "msg_date": "Mon, 21 Jan 2002 14:00:50 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "mlw wrote:\n> Bruce Momjian wrote:\n> > \n> > > It's really noone's business why any of us dislike it. My reasons may\n> > > or may not be different than yours which may/may not be different from\n> > > Marc's, and so on. Why try to summarize everyone's feelings when it's\n> > > unnecessary. My statement never said that we just don't like it, it\n> > > was clear that many of the developers were uncomfortable with its\n> > > restrictions. Break it down. What are \"many of the developers\"\n> > > uncomfortable with? The GPL's restrictions. What's not clear about\n> > > that? It didn't say \"many of the developers just don't like it\", that\n> > > would border on confrontational. You're not going to change the minds\n> > > of those that favor GPL just as you're not going to change the minds\n> > > of those that prefer BSD.\n> > \n> > Isn't it the restrictions on proprietary use that we dislike? Seems we\n> > should say that in there.\n> \n> Is it necessary to say you don't like the GPL? Isn't it sufficient to\n> just say it is counter to policy?\n> \n> I think the problem with writing this thing is the emotional attachment\n> both camps have to their license.\n> \n> I think any attempt to say you dislike GPL for any reason invites\n> debate. Forget it, just say for historical reasons and with respect for\n> all the people that made PostgreSQL what it is today, the license will\n> remain as it always has.\n\nThis gets to the crux of why I chose the wording I did. If we fall back\nto \"Oh, it has always been that way\", we are basically saying BSD is an\nold license and if we could do it over again today, we would chose GPL,\nwhich I don't think is true, or at least not certain.\n\nWe need something that:\n\n\t1) quells debate\n\t2) shows are are proud of the BSD license we have\n\t3) encourages BSD license usage\n\nBasically, we need some wording that no only quells debate, but also\npaints BSD as a favorable license that people should like and use. We\nhave people contributing modules in /contrib, and some of them are\nGPL'ing them because we don't have a statement about our license and why\nwe are proud of it. If we don't have such a statement, it is hard to\nencourage people to contribute new modules under BSD rather than GPL.\n\nNo wording is going to be perfect, but I do believe we need to have a\npositive statement of BSD in that paragraph and how it can be seen as\nprefereable to GPL.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 13:08:12 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Bruce Momjian wrote:\n\n> mlw wrote:\n> > Bruce Momjian wrote:\n> > >\n> > > > It's really noone's business why any of us dislike it. My reasons may\n> > > > or may not be different than yours which may/may not be different from\n> > > > Marc's, and so on. Why try to summarize everyone's feelings when it's\n> > > > unnecessary. My statement never said that we just don't like it, it\n> > > > was clear that many of the developers were uncomfortable with its\n> > > > restrictions. Break it down. What are \"many of the developers\"\n> > > > uncomfortable with? The GPL's restrictions. What's not clear about\n> > > > that? It didn't say \"many of the developers just don't like it\", that\n> > > > would border on confrontational. You're not going to change the minds\n> > > > of those that favor GPL just as you're not going to change the minds\n> > > > of those that prefer BSD.\n> > >\n> > > Isn't it the restrictions on proprietary use that we dislike? Seems we\n> > > should say that in there.\n> >\n> > Is it necessary to say you don't like the GPL? Isn't it sufficient to\n> > just say it is counter to policy?\n> >\n> > I think the problem with writing this thing is the emotional attachment\n> > both camps have to their license.\n> >\n> > I think any attempt to say you dislike GPL for any reason invites\n> > debate. Forget it, just say for historical reasons and with respect for\n> > all the people that made PostgreSQL what it is today, the license will\n> > remain as it always has.\n>\n> This gets to the crux of why I chose the wording I did. If we fall back\n> to \"Oh, it has always been that way\", we are basically saying BSD is an\n> old license and if we could do it over again today, we would chose GPL,\n> which I don't think is true, or at least not certain.\n>\n> We need something that:\n>\n> \t1) quells debate\n> \t2) shows are are proud of the BSD license we have\n> \t3) encourages BSD license usage\n>\n> Basically, we need some wording that no only quells debate, but also\n> paints BSD as a favorable license that people should like and use. We\n> have people contributing modules in /contrib, and some of them are\n> GPL'ing them because we don't have a statement about our license and why\n> we are proud of it. If we don't have such a statement, it is hard to\n> encourage people to contribute new modules under BSD rather than GPL.\n>\n> No wording is going to be perfect, but I do believe we need to have a\n> positive statement of BSD in that paragraph and how it can be seen as\n> prefereable to GPL.\n>\n>\n\nBetween this and Marc's comment, I think I can come up with the right\nwording. Give me a bit.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 13:10:24 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "> > 3) encourages BSD license usage\n> \n> And here it is! As hidden as this is, it is the problem. I do not think\n> you have unanimous agreement, else these arguments would not keep coming\n> up. As long as you are \"promoting\" BSD you will invite vigorous debate\n> with the GPL camp. For the sake of the peace and respect for the GPL\n> camp, I think the politics and religion of license should be relegated\n> to personal opinion.\n\nI merely meant that we should show BSD as a viable license, rather than\nmake excuses for it by saying it was chosen by someone long ago. We\n_do_ need to promote it within our own source tree.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 13:59:39 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> mlw wrote:\n> > I think any attempt to say you dislike GPL for any reason invites\n> > debate. Forget it, just say for historical reasons and with respect for\n> > all the people that made PostgreSQL what it is today, the license will\n> > remain as it always has.\n> \n> This gets to the crux of why I chose the wording I did. If we fall back\n> to \"Oh, it has always been that way\", we are basically saying BSD is an\n> old license and if we could do it over again today, we would chose GPL,\n> which I don't think is true, or at least not certain.\n> \n> We need something that:\n> \n> 1) quells debate\n\nYes, this is important.\n\n\n> 2) shows are are proud of the BSD license we have\nOk, that's good, I personally see strengths in both licenses.\n\n> 3) encourages BSD license usage\n\nAnd here it is! As hidden as this is, it is the problem. I do not think\nyou have unanimous agreement, else these arguments would not keep coming\nup. As long as you are \"promoting\" BSD you will invite vigorous debate\nwith the GPL camp. For the sake of the peace and respect for the GPL\ncamp, I think the politics and religion of license should be relegated\nto personal opinion.\n", "msg_date": "Mon, 21 Jan 2002 13:59:55 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> > > 3) encourages BSD license usage\n> >\n> > And here it is! As hidden as this is, it is the problem. I do not think\n> > you have unanimous agreement, else these arguments would not keep coming\n> > up. As long as you are \"promoting\" BSD you will invite vigorous debate\n> > with the GPL camp. For the sake of the peace and respect for the GPL\n> > camp, I think the politics and religion of license should be relegated\n> > to personal opinion.\n> \n> I merely meant that we should show BSD as a viable license, rather than\n> make excuses for it by saying it was chosen by someone long ago. We\n> _do_ need to promote it within our own source tree.\n\nI just hopped over to PHP, and here is thier explanation:\n\nQ. Why is PHP 4 not dual-licensed under the GNU General Public License\n(GPL) like PHP 3 was?\n\nA. GPL enforces many restrictions on what can and cannot be done with\nthe licensed code. The PHP developers decided to release PHP under a\nmuch more loose license (Apache-style), to help PHP become as popular as\npossible.\n", "msg_date": "Mon, 21 Jan 2002 14:21:28 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n\n> > > 3) encourages BSD license usage\n> > \n> > And here it is! As hidden as this is, it is the problem. I do not\n> > think you have unanimous agreement, else these arguments would not\n> > keep coming up. As long as you are \"promoting\" BSD you will invite\n> > vigorous debate with the GPL camp. For the sake of the peace and\n> > respect for the GPL camp, I think the politics and religion of\n> > license should be relegated to personal opinion.\n> \n> I merely meant that we should show BSD as a viable license, rather\n> than make excuses for it by saying it was chosen by someone long\n> ago. We _do_ need to promote it within our own source tree.\n\nThen why not simply try something like this:\n\n We carry a BSD license, the archetypal open-source license.\n While the GPL has similar goals, it also has anti-\"closed\n source\" (proprietary) restrictions. Programmers that would\n like to have their source code included in the official\n PostgreSQL distribution will need to license their code using\n a BSD style license.\n\nThis clearly sets the policy for inclusion of source code in the\nofficial distribution without whacking the GPL hackers for their\npreference in license. Even the staunchest pro-GPL hacker would agree\nthat the GPL has \"anti-'closed source' (proprietary) restrictions.\"\n\nJason\n", "msg_date": "21 Jan 2002 12:36:37 -0700", "msg_from": "Jason Earl <jason.earl@simplot.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "I'm not replying to anyone in particular, and I'm certainly no lawyer nor\nan expert on either license, but why do you have to give any reasons at\nall? Why can't you just say \"for a variety of reasons postgresql is using\nthe BSD licence and it is going to stay that way\".\n\nI don't see a need to tell people why you aren't going to switch, nor to\neven talk about the GPL at all... anything you say will upset someone and\nthey'll bring it up again...\n\nI do like the bit about contributed code needing to be under the BSD\nlicense as that's something that isn't answered.\n\njust my 2 cents...\n\n-philip\n\nOn 21 Jan 2002, Jason Earl wrote:\n\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n>\n> > > > 3) encourages BSD license usage\n> > >\n> > > And here it is! As hidden as this is, it is the problem. I do not\n> > > think you have unanimous agreement, else these arguments would not\n> > > keep coming up. As long as you are \"promoting\" BSD you will invite\n> > > vigorous debate with the GPL camp. For the sake of the peace and\n> > > respect for the GPL camp, I think the politics and religion of\n> > > license should be relegated to personal opinion.\n> >\n> > I merely meant that we should show BSD as a viable license, rather\n> > than make excuses for it by saying it was chosen by someone long\n> > ago. We _do_ need to promote it within our own source tree.\n>\n> Then why not simply try something like this:\n>\n> We carry a BSD license, the archetypal open-source license.\n> While the GPL has similar goals, it also has anti-\"closed\n> source\" (proprietary) restrictions. Programmers that would\n> like to have their source code included in the official\n> PostgreSQL distribution will need to license their code using\n> a BSD style license.\n>\n> This clearly sets the policy for inclusion of source code in the\n> official distribution without whacking the GPL hackers for their\n> preference in license. Even the staunchest pro-GPL hacker would agree\n> that the GPL has \"anti-'closed source' (proprietary) restrictions.\"\n>\n> Jason\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n\n", "msg_date": "Mon, 21 Jan 2002 12:39:11 -0800 (PST)", "msg_from": "Philip Hallstrom <philip@adhesivemedia.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "I've like the variations of the theme for this, especially the simplisty\nof the one below. The only thing that may be adventagous to change is\nto say: \n \"PostgreSQL developers are uncomfortable with such restrictions\" \nrather than using the word \"Many\". However, as listed sounds fine to me.\n\nMaybe this is confrontational, but does it make sense to give a list of\na few things wrong with the GPL? I'm unsure if that would be benfitial\nor just confrontational, since it would sound like an attack against the\nGPL license directly.\n\nOn Mon, 2002-01-21 at 10:13, Bruce Momjian wrote:\n> \n> OK, here is merged wording of my version and Vince's. It keeps the\n> \"reach out the hand\" phrase, but ends with a clear statement that no\n> license changes are desired.\n> \n> ---------------------------------------------------------------------------\n> \n> We carry a BSD license, the archetypal open-source license. While the\n> GPL has similar goals, it also has \"closed source\" (proprietary)\n> restrictions. Many PostgreSQL developers are uncomfortable with such\n> restrictions. The PostgreSQL project has no intention of modifying its\n> existing license.\n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> pgman@candle.pha.pa.us | (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> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "21 Jan 2002 13:41:46 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On 21 Jan 2002, Ned Wolpert wrote:\n\n> I've like the variations of the theme for this, especially the simplisty\n> of the one below. The only thing that may be adventagous to change is\n> to say:\n> \"PostgreSQL developers are uncomfortable with such restrictions\"\n> rather than using the word \"Many\". However, as listed sounds fine to me.\n\nBecause lacking the word \"Many\" implies that ALL of the developers\nare uncomfortable with the restriction which is incorrect.\n\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 15:43:44 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 2002-01-21 at 09:42, Peter Eisentraut wrote:\n> As a PostgreSQL developer, I don't agree with the statement you made for\n> another reason: It implies that there is something better about the GPL\n> and we have to justify ourselves for not using it. We don't. We give\n> away the code we write with no strings attached, and anyone who wants to\n> question that has to come up with better arguments than I've heard so far.\n\nI agree with Peter here. There is no need to justify the license schema\nwith PostgreSQL. However, I think people need to be clear (via FAQ,\nReadme, anything with a URL that we can point to people) so that when\nthis question comes up, we simply direct them there and say, basically,\n\"its a non-discusionable\"\n\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "21 Jan 2002 13:46:52 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Sorry for adding to this already long (and previously discussed) thread but\nI don't see much need in justifying the BSD license, just say \"Hey, it's\nwhat we've had, we like it and we don't want to change it Thanks very much\nfor your opinion but it's been discussed and the decision to stay with the\nBSD license has been made\"\n\nThere we go! PostgreSQL developers (and users) don't need to answer to\nanyone in my opinion and I think the statement should reflect that in the\nnicest way possible.. Just a \"thanks but no thanks\" in the FAQ and add a\nnote asking people to please not bring it up again :-)\n\n*deposits $0.02*\n\n-Mitch\n\n\n\n", "msg_date": "Mon, 21 Jan 2002 13:47:04 -0700", "msg_from": "\"Mitch Vincent\" <mitch@doot.org>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "> As a PostgreSQL developer, I don't agree with the statement you made for\n> another reason: It implies that there is something better about the GPL\n> and we have to justify ourselves for not using it. We don't. We give\n> away the code we write with no strings attached, and anyone who wants to\n> question that has to come up with better arguments than I've heard so far.\n\nIt's my opinion that the code is the developer's to do with as they please,\nand if they like the BSD license then no one really has a right to argue! If\nanything it allows users to do *more* than other licenses, the way I see\nit..\n\nBottom line is it's been decided and the mother's #1 reason of \"because I\nsaid so\" is good enough for me (and should be for everyone that's not a\ndeveloper IMHO)! :-)\n\n-Mitch\n\n\n", "msg_date": "Mon, 21 Jan 2002 13:50:27 -0700", "msg_from": "\"Mitch Vincent\" <mitch@doot.org>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "On Mon, 2002-01-21 at 09:12, Jason Earl wrote:\n> We have always used the BSD license and believe the GPL is for\n> hippies and communists :).\n\nOT: I thought GPL was for communists and BSD was for hippies? ;-)\n\n\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "21 Jan 2002 13:51:08 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Ned Wolpert wrote:\n\nChecking application/pgp-signature: FAILURE\n-- Start of PGP signed section.\n> On Mon, 2002-01-21 at 09:12, Jason Earl wrote:\n> > We have always used the BSD license and believe the GPL is for\n> > hippies and communists :).\n> \n> OT: I thought GPL was for communists and BSD was for hippies? ;-)\n\nWay off topic: I think it is GPL/communism vs. BSD/socialism.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 15:53:16 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian writes:\n\n> > > Many PostgreSQL developers past and present are uncomfortable with\n> > > restrictions imposed by the GPL. The PostgreSQL project always has\n> > > and will continue to remain under the BSD license alone.\n> >\n> > This one is perfect ... Bruce? I really leaves no openings, no?\n>\n> It is hard to argue with this wording either. Let's see how people\n> vote.\n\nBesides the poor grammar in the second sentence, it's also incorrect,\nbecause the whole point of the BSD license to some people is that it is\nnot \"alone\" under the BSD license but can be relicensed in other ways.\n\nI think we should just scrap it and get on with our lives. There are\nabout 2 questions a year about the license issues, which does not qualify\nit as \"FAQ\" anyway.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 21 Jan 2002 16:12:58 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "OK, I have worked with Vince, our webmaster, to merge our two versions\ninto one paragraph that everyone, hopefully, will like. It is below. \nIt would be added to the bottom of FAQ item 1.2:\n\n---------------------------------------------------------------------------\n\nThe above is the BSD license, the classic open-source license. While the\nGPL has similar goals, PostgreSQL developers find the restrictions\nimposed by the GPL to be unacceptable. Since the BSD license has no\nsuch restrictions, we like it and have no intention of changing it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 21 Jan 2002 16:40:56 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> The above is the BSD license, the classic open-source license. While the\n> GPL has similar goals, \n\nBSD and GPL licences don't have similar goals. You'll get a lot of mail saying\nthis, if you publish such a phrase.\n\nJust say BSD is the licence used by PostgreSQL. Let people make their own idea\nof why and for what things are the way they are. This way, it'll be *way* much\necological.\n\nI, for instance, learned to accept the fact that PG is BSD-licensed, which also\nhelped me understand the nature of BSD. But it took time. It is not suitable for\na FAQ.\n\nI remember a very enlightening sentence months ago in this list, which said the\nintention behind the licencing scheme was \"do whatever you want with this\nsoftware, but do it under your own responsibility, don't blame the authors\"\n\nRegards,\nHaroldo.\n", "msg_date": "Mon, 21 Jan 2002 19:18:15 -0300", "msg_from": "Haroldo Stenger <hstenger@adinet.com.uy>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, Jan 21, 2002 at 04:12:58PM -0500, Peter Eisentraut wrote:\n> Bruce Momjian writes:\n> \n> > > > Many PostgreSQL developers past and present are uncomfortable with\n> > > > restrictions imposed by the GPL. The PostgreSQL project always has\n> > > > and will continue to remain under the BSD license alone.\n> > >\n> > > This one is perfect ... Bruce? I really leaves no openings, no?\n> >\n> > It is hard to argue with this wording either. Let's see how people\n> > vote.\n> \n> Besides the poor grammar in the second sentence, it's also incorrect,\n> because the whole point of the BSD license to some people is that it is\n> not \"alone\" under the BSD license but can be relicensed in other ways.\n> \n> I think we should just scrap it and get on with our lives. There are\n> about 2 questions a year about the license issues, which does not qualify\n> it as \"FAQ\" anyway.\n> \n\nThe one thing that _does_ come up is not 'change your license to GPL' but\n\"here's my GPLed code: can it get into the main tree?\" I liked the version\nthat mentioned 'contributors must BSD license to get it into the main tree'\nsince that's the principle Q for people we care about: potential coders.\nAnyone else who wants to argue licenses can be safely ignored.\n\nRoss\n", "msg_date": "Mon, 21 Jan 2002 17:15:44 -0600", "msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Keith G. Murphy wrote:\n\n\n> In the interests of exactitude, shouldn't that really be something like\n> \"adversely affects the willingness\"? Or \"discourages commercial\n> entities from contributing...\"? (Though the latter is actually a bit\n> too strong for my liking).\n\n\nNot to mention the fact that anyone who chooses to take a look around \nthe universe will find at least as many commercial entities contributing \nto well-known GPL'd software as to well-known BSD'd software.\n\nOracle supports Linux, not xxxBSD. IBM supports Linux, not xxxBSD.\n\nNote that I'm not arguing the merits of either license here, only the \nfact that the common argument that the GPL discourages commercial \ninvestment while the BSD license encourages it does not appear to \nreflect reality.\n\n \n> It's not like the GPL really *prevents* them from contributing...\n\n\nNor does it prevent one from distributing the same software under a \ndifferent license, as TrollTech does. GPL if you build GPL'd software \nfor Linux, a proprietary $$$ license in other cases - a situation \naccepted by none other than RMS (who is not my favorite person, either, \nthough I personally like the GPL).\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Mon, 21 Jan 2002 15:34:58 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Don Baccus wrote:\n> \n> Keith G. Murphy wrote:\n> \n> > In the interests of exactitude, shouldn't that really be something like\n> > \"adversely affects the willingness\"? Or \"discourages commercial\n> > entities from contributing...\"? (Though the latter is actually a bit\n> > too strong for my liking).\n> \n> Not to mention the fact that anyone who chooses to take a look around\n> the universe will find at least as many commercial entities contributing\n> to well-known GPL'd software as to well-known BSD'd software.\n> \n> Oracle supports Linux, not xxxBSD. IBM supports Linux, not xxxBSD.\n> \n> Note that I'm not arguing the merits of either license here, only the\n> fact that the common argument that the GPL discourages commercial\n> investment while the BSD license encourages it does not appear to\n> reflect reality.\n\nI think that has more to do with the fact that there is more visibility\nwith Linux. While the BSD license was still tied up in confusion over\nwho owned what (AT&T vs Berkeley) people started to contribute to GNU.\nLinux seemed to be the first project with both. I don't think the\ncommercial word cared if it was a FREE-BSD OS or FREE-GNU OS license,\njust that it was free and Linux seems to be (as far as features go),\nBSD + more.\n\nThe GNU license discourages vertical application vendors from\ncontributing as they have to give away the source and expertise.\n\nI have no problem with free source code. I do have a problem\nof having to implement some source code that belongs to a customer\nand they consider their database part of their competitive advantage.\nBy having to give away the source, they tell their competitors\nhow to export from their database. This does discourage commercial\nwork where the database and how you access it is confidential.\n\nOne advantage of PostgreSQL is that you can use it for your\ncustomers - and THEY own the paid for source code.\n\nThe BSD license does not keep them from contributing, but it allows\nthem not have to when they can't give it away. GPL is great for\nsome things, but not for databases.", "msg_date": "Mon, 21 Jan 2002 17:08:42 -0700", "msg_from": "Doug Royer <Doug@royer.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 2002-01-21 at 16:34, Don Baccus wrote: \n> Not to mention the fact that anyone who chooses to take a look around \n> the universe will find at least as many commercial entities contributing \n> to well-known GPL'd software as to well-known BSD'd software.\n> \n> Oracle supports Linux, not xxxBSD. IBM supports Linux, not xxxBSD.\n\nI'm not sure that this is because of license issues with GPL versus BSD.\nOracle's applications on Linux are released with a propritary license...\nthat runs on a (for the most part) GPL'd OS. IBM does release some code\nunder GPL, and tends not to under BSD, but also has applications that\nrun on Linux that are propritary license. \n\nYes, both Oracle and IBM (and Sun for that fact) support Linux more than\nxxxBSD as operating systems, and they are more likely to release code\nunder GPL (Sun with OpenOffice, etc) but their support of Linux is more\nmarket driven, not license driven. (\n\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "21 Jan 2002 17:16:03 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "> The above is the BSD license, the classic open-source license. While the\n> GPL has similar goals, PostgreSQL developers find the restrictions\n> imposed by the GPL to be unacceptable. Since the BSD license has no\n> such restrictions, we like it and have no intention of changing it.\n\nIf you feel you must bother to mention this whole sordid topic somewhere\nin the documentation, I much prefer the already-suggested,\nnon-judgemental wording (by Mitch Vincent and others) of something like:\n\n Postgres has been developed and released under the BSD license\n from its inception. Code contributed to the main distribution\n is assumed to be, and must be, released under this same license.\n\nFrankly, I'm not sure why I should be uncomfortable with GPL, and I'm\nnot sure that a FAQ should presume to explain why I am, especially if I\nam not. But I *am* comfortable with the ground rules of PostgreSQL which\nhave been there since the beginning and with which we have seen\ntremendous growth and maturity of the project and product. Good enough\nfor me ;)\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 01:47:30 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n\n> > The above is the BSD license, the classic open-source license. While the\n> > GPL has similar goals, PostgreSQL developers find the restrictions\n> > imposed by the GPL to be unacceptable. Since the BSD license has no\n> > such restrictions, we like it and have no intention of changing it.\n>\n> If you feel you must bother to mention this whole sordid topic somewhere\n> in the documentation, I much prefer the already-suggested,\n> non-judgemental wording (by Mitch Vincent and others) of something like:\n>\n> Postgres has been developed and released under the BSD license\n> from its inception. Code contributed to the main distribution\n> is assumed to be, and must be, released under this same license.\n>\n> Frankly, I'm not sure why I should be uncomfortable with GPL, and I'm\n> not sure that a FAQ should presume to explain why I am, especially if I\n> am not. But I *am* comfortable with the ground rules of PostgreSQL which\n> have been there since the beginning and with which we have seen\n> tremendous growth and maturity of the project and product. Good enough\n> for me ;)\n\nTom, the word \"uncomfortable\" was removed. Maybe you should reread it.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 21 Jan 2002 20:54:24 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Doug Royer wrote:\n\n\n> The GNU license discourages vertical application vendors from\n> contributing as they have to give away the source and expertise.\n\n\nOnly if they actually change the source and distribute those changes.\n\nYou can take Oracle's approach, i.e. work with the Linux kernel/library \nfolks in order to get features you want (raw I/O), then happily run your \napplication on top of it.\n\nThey could've done the work themselves, released that to the Linux world \n under the GNU license, and still happily distribute Oracle and the \ntools that come with Oracle (slowly being rolled into Linux space) in \nclosed an proprietary form.\n\n \n> I have no problem with free source code. I do have a problem\n> of having to implement some source code that belongs to a customer\n> and they consider their database part of their competitive advantage.\n> By having to give away the source, they tell their competitors\n> how to export from their database. This does discourage commercial\n> work where the database and how you access it is confidential.\n> \n> One advantage of PostgreSQL is that you can use it for your\n> customers - and THEY own the paid for source code.\n\n\nIf your customers aren't releasing what they paid for, they don't have \nto turn it back.\n\nYou only have to turn the source back if you *release* your changes.\n\nOpenACS is GPL'd and about a half-dozen (growing towards a dozen, \nactually) small companies do custom client db-backed websites using \nOracle and PG. The custom code we create for an individual customer's \nsite remains with that customer, if they prefer. There's no GPL problem \nat all.\n\n(We encourage release back to the community, of course, as a half-dozen \n*small* consulting shops cooperating on making our toolkit robust and \nfeatureful we benefit when we can share work our clients pay for).\n\nThe GPL protects us against a party wrapping everything up, extending \nit, and offering an improved proprietary version and turning around and \ntrying to put our small firms out of business. OK, dot-com mania is \nover and the odds of someone doing that are minimal. My point though is \nthat far from being \"communist\" the GPL gives us a bit more control over \nthe code, which helps satisfy our *capitalist* endeavors.\n\n\n> The BSD license does not keep them from contributing, but it allows\n> them not have to when they can't give it away. GPL is great for\n> some things, but not for databases.\n\n\nThere's no reason why the client library, for instance, couldn't be \nLGPL'd, removing this problem.\n\n\nI'm not arguing that PG should switch - the BSD's a *fine* license. I\n\ndon't want anyone to misunderstand my feelings on this. Clearly the BSD \ndoesn't encumber the code and for those folks who are comfortable with \nthis, the more power to them.\n\nBut I keep reading interpretations of the GPL and its effects here that \nare far removed from the real world.\n\nMaking a statement knocking the GPL in ways that show a misunderstanding \nof how the license works in practice won't do much to keep this subject \nfrom coming up periodically.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Mon, 21 Jan 2002 18:26:51 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Ned Wolpert wrote:\n\n> On Mon, 2002-01-21 at 16:34, Don Baccus wrote: \n> \n>>Not to mention the fact that anyone who chooses to take a look around \n>>the universe will find at least as many commercial entities contributing \n>>to well-known GPL'd software as to well-known BSD'd software.\n>>\n>>Oracle supports Linux, not xxxBSD. IBM supports Linux, not xxxBSD.\n>>\n> \n> I'm not sure that this is because of license issues with GPL versus BSD.\n\n\nI wasn't implying this. I simply pointed out that the supposed \ndisincentive to commercial participation that the GPL brings to the \ntable is fantasy.\n\n\n> Oracle's applications on Linux are released with a propritary license...\n> that runs on a (for the most part) GPL'd OS.\n\n\nRight. No viral effect, nope, the LGPL was developed precisely to make \nthis point clear though it can be argued it wasn't necessary. Nothing \nwrong with being precise and up-front with what is thought to be OK or \nnot, though.\n\n\n> Yes, both Oracle and IBM (and Sun for that fact) support Linux more than\n> xxxBSD as operating systems, and they are more likely to release code\n> under GPL (Sun with OpenOffice, etc) but their support of Linux is more\n> market driven, not license driven. (\n\n\nWhich wasn't my point, see above. There's no license disincentive. I \ndidn't argue that there's a license *incentive* working in the GPL's favor.\n\nThough now that you mention it, there might be - IBM may be more willing \nto release code under the GPL because they know that a competitor will \nhave to release improvements under the GPL, rather than suck in IBM's \nstuff as the basis for a proprietary product.\n\nWhen you're tackling Microsoft that's something to consider, given that \nthey've incorporated BSD-licensed code into windows in the past.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Mon, 21 Jan 2002 18:32:53 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Don Baccus wrote:\n\n\n> OpenACS is GPL'd ...\n\n\nI should point out that we inherited GPL'd code, thus \"which license\" \nisn't an issue. If someone asks me why we don't use the BSD license I \nhave a very simple answer for them.\n\nWhich should be the case with PG. The original authors released it \nunder the Berkely license and \"which license\" shouldn't be an issue. I \nstill don't understand why more needs to be said. If people are too \nclueless to understand this, let them remain clueless and ignore them.\n\nIMHO, that is.\n\n\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Mon, 21 Jan 2002 18:41:59 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "...\n> Tom, the word \"uncomfortable\" was removed. Maybe you should reread it.\n\nReread what? There are several threads going on at once afaict (or at\nleast afa-my-mailer-ct). If we are comfortable with the current\narrangement, then why bother trying to explain it ad infinitum?\n\nI'm also not sure why this thread is on -general rather than on\n-hackers, but that has been true of lots of threads recently...\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 02:59:45 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Monday 21 January 2002 09:41 pm, Don Baccus wrote:\n> Which should be the case with PG. The original authors released it\n> under the Berkely license and \"which license\" shouldn't be an issue. I\n> still don't understand why more needs to be said. If people are too\n> clueless to understand this, let them remain clueless and ignore them.\n\nAnd we must consider the source of this last 'cannonade'. After all, the \nlaws of physics apply to software! (;-)).\n\nPersonally, I don't think our FAQ list should address this issue at all. \nPostgreSQL is BSD licensed. And that's just that.\n\nHowever, if the majority thinks it best to point out the reasons, the \nsmaller, simpler, and lowest flashpoint solution should be taken. The GPL \nhas its adherents, advantages, and disadvantages. The BSD license likewise. \nMutual respect amongst the parties should be followed, IMHO.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Mon, 21 Jan 2002 22:18:10 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Hi all,\n\nIt may be useful to include a link below the final statement to this\n(and/or other) threads on BSD/GPL license discussion. As much as a license\nFAQ item is about informing users about the license and why it\nspecifically is used, it needs also to deter people from the 'WHY ISN'T\nPOSTGRES xyz LICENSE?' mailing list post.\n\nSomething as simple as 'Changing postgres to another license has already\nbeen discussed at length over the years. See the following urls' would\nhelp. After all, it seems that the frequently asked question 'Why isn't\nPostgres GPL'd?' not 'Why is Postgres released under a BSD License?'\n\nThanks,\n\nGavin\n\n", "msg_date": "Tue, 22 Jan 2002 15:22:31 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Gavin Sherry wrote:\n\n\n> Something as simple as 'Changing postgres to another license has already\n> been discussed at length over the years. See the following urls' would\n> help. After all, it seems that the frequently asked question 'Why isn't\n> Postgres GPL'd?' not 'Why is Postgres released under a BSD License?'\n\nSimple answer: \"because Postgres and the BSD license predates the GPL.\"\n\n\nI think that's correct and it's even relevant, no?\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Mon, 21 Jan 2002 20:49:57 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Thomas Lockhart wrote:\n> ...\n> > Tom, the word \"uncomfortable\" was removed. Maybe you should reread it.\n> \n> Reread what? There are several threads going on at once afaict (or at\n> least afa-my-mailer-ct). If we are comfortable with the current\n> arrangement, then why bother trying to explain it ad infinitum?\n\nCurrent wording proposal which is a mix from several people:\n\nThe above is the BSD license, the classic open-source license. While the\nGPL has similar goals, PostgreSQL developers find the restrictions\nimposed by the GPL to be unacceptable. Since the BSD license has no\nsuch restrictions, we like it and have no intention of changing it.\n\n> I'm also not sure why this thread is on -general rather than on\n> -hackers, but that has been true of lots of threads recently...\n\nNot sure who added general but I did not remove it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Jan 2002 01:00:25 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "> The above is the BSD license, the classic open-source license. While the\n> GPL has similar goals, PostgreSQL developers find the restrictions\n> imposed by the GPL to be unacceptable. Since the BSD license has no\n> such restrictions, we like it and have no intention of changing it.\n\n*I* don't find GPL unacceptable. Some of my favorite software (present\ncompany excepted of course) has it. But I am and have always been\nsatisfied that the BSD license (predating GPL as Don points out) serves\nPostgres and PostgreSQL just fine.\n\nI've always considered it a point of recognition that we retain the\nlicensing that Berkeley was kind enough to give us. It *is* one of the\ngreat licenses in the history of open software. So why are we having to\njustify it?\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 06:38:02 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 21 Jan 2002, Don Baccus wrote:\n\n> Gavin Sherry wrote:\n> \n> \n> > Something as simple as 'Changing postgres to another license has already\n> > been discussed at length over the years. See the following urls' would\n> > help. After all, it seems that the frequently asked question 'Why isn't\n> > Postgres GPL'd?' not 'Why is Postgres released under a BSD License?'\n> \n> Simple answer: \"because Postgres and the BSD license predates the GPL.\"\n> \n> \n> I think that's correct and it's even relevant, no?\n\nI wasn't asking the question personally =) but rather discussing the kind\nof being being asked by people interested in Postgres's licensing and the\nway it would be most adequately answered.\n\nGavin\n\n", "msg_date": "Tue, 22 Jan 2002 17:49:06 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Thomas Lockhart <lockhart@fourpalms.org> writes:\n> I've always considered it a point of recognition that we retain the\n> licensing that Berkeley was kind enough to give us. It *is* one of the\n> great licenses in the history of open software.\n\nAgreed entirely.\n\n> So why are we having to justify it?\n\nWe're not \"justifying\" it; we're trying to compose a FAQ entry that\nmight stave off a few askings of this all-too-frequently-asked question.\nFAQs exist to save people time, not to \"justify\" things. And this\nissue certainly has come up often enough to merit a FAQ entry.\n\nBasically, I think we want a reasonably polite version of \"it's been\ndiscussed, it's been agreed to, it's not open to further discussion;\nnow go away\" ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 03:24:53 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "Don Baccus <dhogaza@pacifier.com> writes:\n> Why not just say that PG was originally developed at Berkeley, and \n> released by them under the BSD licence? You could simply point out that \n> PG has flourished as a project releasing code under that license, it \n> ain't broke, and there ain't anything to fix.\n\nY'know, this has got a lot of merit to it.\n\nSee also my reply to Tom Lockhart. We've seen the \"why isn't PG under\nGPL\" question often enough that it clearly merits a FAQ entry. The\npurpose of a FAQ entry is to save time for both askers and answerers.\nPotential askers should not be left with the illusion that they might\nchange the already-thoroughly-considered decision by asking Yet One More\nTime. Ye weary answerers have other things to do than respond Yet One\nMore Time. If we make a FAQ entry, the one thing I require of it is\nthat it be absolutely, pellucidly, crystal clear that there is not scope\nfor more discussion. \"It ain't broke and we aren't gonna fix it\" seems\nto meet the need admirably.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 03:50:09 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "I think it's necessary, just looking at my mailbox :).\n\nAnyone who wants a GPL version of Postgresql can fork off.\n\nCheerio,\nLink.\n\nAt 03:24 AM 22-01-2002 -0500, Tom Lane wrote:\n>Thomas Lockhart <lockhart@fourpalms.org> writes:\n>> I've always considered it a point of recognition that we retain the\n>> licensing that Berkeley was kind enough to give us. It *is* one of the\n>> great licenses in the history of open software.\n>\n>Agreed entirely.\n>\n>> So why are we having to justify it?\n>\n>We're not \"justifying\" it; we're trying to compose a FAQ entry that\n>might stave off a few askings of this all-too-frequently-asked question.\n>FAQs exist to save people time, not to \"justify\" things. And this\n>issue certainly has come up often enough to merit a FAQ entry.\n>\n>Basically, I think we want a reasonably polite version of \"it's been\n>discussed, it's been agreed to, it's not open to further discussion;\n>now go away\" ...\n>\n>\t\t\tregards, tom lane\n>\n>---------------------------(end of broadcast)---------------------------\n>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n>\n>\n\n", "msg_date": "Tue, 22 Jan 2002 17:55:20 +0800", "msg_from": "Lincoln Yeoh <lyeoh@pop.jaring.my>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n\n> ...\n> > Tom, the word \"uncomfortable\" was removed. Maybe you should reread it.\n>\n> Reread what? There are several threads going on at once afaict (or at\n> least afa-my-mailer-ct). If we are comfortable with the current\n> arrangement, then why bother trying to explain it ad infinitum?\n\nReread what?! The same message you quoted and I responded to!\n\n> I'm also not sure why this thread is on -general rather than on\n> -hackers, but that has been true of lots of threads recently...\n\n'cuze that's how it started and noone changed it.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 22 Jan 2002 05:35:00 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n\n> > The above is the BSD license, the classic open-source license. While the\n> > GPL has similar goals, PostgreSQL developers find the restrictions\n> > imposed by the GPL to be unacceptable. Since the BSD license has no\n> > such restrictions, we like it and have no intention of changing it.\n>\n> *I* don't find GPL unacceptable. Some of my favorite software (present\n> company excepted of course) has it. But I am and have always been\n> satisfied that the BSD license (predating GPL as Don points out) serves\n> Postgres and PostgreSQL just fine.\n\nAnd now you know why I wanted the word \"many\" in there.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 22 Jan 2002 05:42:29 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\nHey guys, I think we have three camps here.\n\n(1) BSD camp.\n(2) GPL Camp.\n(3) Moderates.\n\nThe BSD camp wants to promote the BSD license and the philosophy. There is\nnothing wrong with this, but I think it has to be acknowledged.\n\nThe GPL camp can't understand how anyone would not use GPL for an open source\nproject. So many evil companies from whom to protect one's self.\n\nThe Moderates are in between.\n\nI am personally uncomfortable with promoting the BSD license. It is a good\nlicense, yes, but I think it is too open, and does lend itself to corporate\nabuse.\n\nI am equally uncomfortable in promoting the GPL. I think it is way too radical\nand attempts to be too viral.\n\nCan't we just say that PostgreSQL uses the BSD license for historical reasons,\nand without any absolute consensus amongst the developers, there is no reason\nto change? I think that is a very reasonable middle of the road approach,\nwithout getting into the GPL/BSD bashing.\n\nI think it is abundantly clear that PostgreSQL is bigger than the license\ndebate, and that many people with different views on it, are willing to accept\nthe status quo to develop for it.\n\nDoes any one really see any reason to debate this? BSD people won't change\ntheir minds and the GPL people will continue to push for GPL.\n\n\nI\n", "msg_date": "Tue, 22 Jan 2002 07:23:58 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL (Can't take anymore! Make\n\tit" }, { "msg_contents": "...\n> And now you know why I wanted the word \"many\" in there.\n\nI understand that. My point is that we are dancing around trying to find\nacceptable wording for a line of explanation that simply should not be\nthere in the first place. Why bother mentioning \"many find GPL\nunacceptable\", no matter what alternate phrasing is found, when the\nissue for everyone with the project can boil down to much simpler, more\nfundamental reasons peculiar to PostgreSQL itself:\n\n PostgreSQL was given to us by Berkeley with the BSD license,\n and that license has served us well.\n\nNo need to explain acceptable vs unacceptable, no need to decide whether\nthere are a few, some, many, or all developers feeling GPL is\nunacceptable, no need for any of that.\n\nI don't mean to be argumentative here (and hope I'm not) but it seems we\nare stretching to find wording for a possibly controversial area which\nis moot since there are other fundamental reasons for enjoying the\nlicense we have.\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 14:26:50 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n\n> ...\n> > And now you know why I wanted the word \"many\" in there.\n>\n> I understand that. My point is that we are dancing around trying to find\n> acceptable wording for a line of explanation that simply should not be\n> there in the first place. Why bother mentioning \"many find GPL\n> unacceptable\", no matter what alternate phrasing is found, when the\n> issue for everyone with the project can boil down to much simpler, more\n> fundamental reasons peculiar to PostgreSQL itself:\n>\n> PostgreSQL was given to us by Berkeley with the BSD license,\n> and that license has served us well.\n>\n> No need to explain acceptable vs unacceptable, no need to decide whether\n> there are a few, some, many, or all developers feeling GPL is\n> unacceptable, no need for any of that.\n>\n> I don't mean to be argumentative here (and hope I'm not) but it seems we\n> are stretching to find wording for a possibly controversial area which\n> is moot since there are other fundamental reasons for enjoying the\n> license we have.\n\nYou are, but it's alright. What we're trying to head off is the\nrepeated \"why not gpl\" issue. By only saying that we like the bsd\nlicense and plan on staying with it only invites more why's, as we've\nexperienced every time in the past, and the end result is we have to\nexplain which, of course, only invites more comments, why's, etc. This\nsimple explanation will *hopefully* put it to rest. There will be no\nreason to ask why when that answer is already given.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 22 Jan 2002 09:36:06 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "mlw <markw@mohawksoft.com> writes:\n> Does any one really see any reason to debate this? BSD people won't change\n> their minds and the GPL people will continue to push for GPL.\n\nHuh? We're not debating it --- no one in this thread is suggesting that\nthe license be changed. We're trying to formulate a FAQ entry that\nwill prevent people from bringing the subject up again in the future.\n\nI think the hard part here is to word the entry to make it clear that\nthe decision is final, without annoying anyone so much that we end up\ncreating flamewars instead of preventing 'em.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 09:54:01 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL (Can't take anymore! Make\n\tit" }, { "msg_contents": "...\n> You are, but it's alright. What we're trying to head off is the\n> repeated \"why not gpl\" issue. By only saying that we like the bsd\n> license and plan on staying with it only invites more why's, as we've\n> experienced every time in the past, and the end result is we have to\n> explain which, of course, only invites more comments, why's, etc. This\n> simple explanation will *hopefully* put it to rest. There will be no\n> reason to ask why when that answer is already given.\n\nHmm. But it isn't a simple explanation, it invites controversy and\nargument, and it isn't necessary. I appreciate your efforts to find some\nother phrasing while still addressing \"why don't we switch?\", but imho\nthat line of explanation just shouldn't be there, period.\n\nLet's get back to the FAQ issue. There are two questions which might be\nasked and which might be included in a FAQ:\n\n1) Q: Why does PostgreSQL have a BSD license?\n A: PostgreSQL was developed at Berkeley and open-sourced under the\nBSD license. That license has served us well over many years.\n\n2) Q: Why does PostgreSQL not have a GPL license?\n A: See (1)\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 14:59:20 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n\n> ...\n> > You are, but it's alright. What we're trying to head off is the\n> > repeated \"why not gpl\" issue. By only saying that we like the bsd\n> > license and plan on staying with it only invites more why's, as we've\n> > experienced every time in the past, and the end result is we have to\n> > explain which, of course, only invites more comments, why's, etc. This\n> > simple explanation will *hopefully* put it to rest. There will be no\n> > reason to ask why when that answer is already given.\n>\n> Hmm. But it isn't a simple explanation, it invites controversy and\n> argument, and it isn't necessary. I appreciate your efforts to find some\n> other phrasing while still addressing \"why don't we switch?\", but imho\n> that line of explanation just shouldn't be there, period.\n>\n> Let's get back to the FAQ issue. There are two questions which might be\n> asked and which might be included in a FAQ:\n>\n> 1) Q: Why does PostgreSQL have a BSD license?\n> A: PostgreSQL was developed at Berkeley and open-sourced under the\n> BSD license. That license has served us well over many years.\n>\n> 2) Q: Why does PostgreSQL not have a GPL license?\n> A: See (1)\n\nIt's worth a try if you actually think it'll work, but as many times as\nI've seen it come up I seriously doubt #2 will settle it and the\ncomplaints of trying to sidestep the issue will be the new platform for\nthose wanting it changed.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 22 Jan 2002 10:04:32 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "I am starting to agree with Thomas and others --- why mention the GPL at\nall. How about this. (Again to appear at the bottom of FAQ item 1.2):\n\n---------------------------------------------------------------------------\n\nThe above is the BSD license, the classic open-source license. It has no\nrestrictions on how the source code may be used. We like it and have no\nintention of changing it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Jan 2002 10:23:49 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Tom Lane wrote:\n> \n> mlw <markw@mohawksoft.com> writes:\n> > Does any one really see any reason to debate this? BSD people won't change\n> > their minds and the GPL people will continue to push for GPL.\n> \n> Huh? We're not debating it --- no one in this thread is suggesting that\n> the license be changed. We're trying to formulate a FAQ entry that\n> will prevent people from bringing the subject up again in the future.\n> \n> I think the hard part here is to word the entry to make it clear that\n> the decision is final, without annoying anyone so much that we end up\n> creating flamewars instead of preventing 'em.\n\nCould something like \"The core team has participated in several\ndiscussions \nabout changing the license and has found no good reasons to do so\". \nIf anyone else wants to relese it under any other license (GPL, MPL,\nAOL, MSFT ;)\nthen they are free to do so as long as they comply with the original\nlicense.\n\nThat could produce 1 or 2 dead PostgreGPL.sf.net projects each year but \nshould otherways be harmless :)\n\n----------------\nHannu\n", "msg_date": "Tue, 22 Jan 2002 17:30:07 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL (Can't take anymore! " }, { "msg_contents": "Thomas Lockhart <lockhart@fourpalms.org> writes:\n> 1) Q: Why does PostgreSQL have a BSD license?\n> A: PostgreSQL was developed at Berkeley and open-sourced under the\n> BSD license. That license has served us well over many years.\n\n> 2) Q: Why does PostgreSQL not have a GPL license?\n> A: See (1)\n\nNot bad, but I'd add one more sentence:\n\n2) Q: Why does PostgreSQL not have a GPL license?\n A: See (1). It would be very difficult to change licenses,\n and we see no need to.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 10:38:43 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL " }, { "msg_contents": "> 2) Q: Why does PostgreSQL not have a GPL license?\n> A: See (1). It would be very difficult to change licenses,\n> and we see no need to.\n\nYup, that works for me :)\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 15:42:36 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Mon, 2002-01-21 at 19:32, Don Baccus wrote:\n> Which wasn't my point, see above. There's no license disincentive. I \n> didn't argue that there's a license *incentive* working in the GPL's favor.\n\nFrom what you were saying, it sounded like you were comparing releasing\nproducts on Linux vs. xxxBSD was related to how the OS's were licensed. \nNow I understand that you weren't meaning to say that.\n\n\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "22 Jan 2002 08:55:25 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n\n\n> The above is the BSD license, the classic open-source license. It has no\n> restrictions on how the source code may be used. We like it and have no\n> intention of changing it.\n\n\nMuch better. I personally think that mentioning the historical \nconnection (i.e. code developed at Berkeley, released under BSD) would \nhelp quelch the \"why not change?\" questions. At least I think it makes \na simple answer to such questions. If someone doesn't think that it is \n important to respect the license under which the early developers \nreleased their code, that's a clue that they're not clueful enough to \nbother talking to, isn't it?\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Tue, 22 Jan 2002 07:59:44 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Thomas Lockhart <lockhart@fourpalms.org> writes:\n\n> ...\n> > You are, but it's alright. What we're trying to head off is the\n> > repeated \"why not gpl\" issue. By only saying that we like the bsd\n> > license and plan on staying with it only invites more why's, as we've\n> > experienced every time in the past, and the end result is we have to\n> > explain which, of course, only invites more comments, why's, etc. This\n> > simple explanation will *hopefully* put it to rest. There will be no\n> > reason to ask why when that answer is already given.\n> \n> Hmm. But it isn't a simple explanation, it invites controversy and\n> argument, and it isn't necessary. I appreciate your efforts to find some\n> other phrasing while still addressing \"why don't we switch?\", but imho\n> that line of explanation just shouldn't be there, period.\n> \n> Let's get back to the FAQ issue. There are two questions which might be\n> asked and which might be included in a FAQ:\n> \n> 1) Q: Why does PostgreSQL have a BSD license?\n> A: PostgreSQL was developed at Berkeley and open-sourced under the\n> BSD license. That license has served us well over many years.\n> \n> 2) Q: Why does PostgreSQL not have a GPL license?\n> A: See (1)\n\nI like this one. \n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "22 Jan 2002 11:01:39 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Hi all,\n\nI have an addition for it :\n\nVince Vielhaber wrote:\n> \n> On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n<snip>\n> >\n> > 1) Q: Why does PostgreSQL have a BSD license?\n> > A: PostgreSQL was developed at Berkeley and open-sourced under the\n> > BSD license. That license has served us well over many years.\n> >\n> > 2) Q: Why does PostgreSQL not have a GPL license?\n> > A: See (1)\n\n3) Q: Can I try and convince you guys to use the GPL, or maybe even just\n add the GPL to PostgreSQL?\n A: No. You will be ignored and/or flamed depending on how people\n feel at the time.\n\n Probably flamed.\n\n And probably with enthusiasm. :)\n\n Don't do it.\n\n\n+ Justin\n\n> \n> It's worth a try if you actually think it'll work, but as many times as\n> I've seen it come up I seriously doubt #2 will settle it and the\n> complaints of trying to sidestep the issue will be the new platform for\n> those wanting it changed.\n> \n> Vince.\n> --\n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide 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> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Wed, 23 Jan 2002 03:06:05 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Tue, 2002-01-22 at 08:59, Don Baccus wrote:\n> Bruce Momjian wrote:\n> \n> \n> > The above is the BSD license, the classic open-source license. It has no\n> > restrictions on how the source code may be used. We like it and have no\n> > intention of changing it.\n> \n\nWorks for me. Can a vote be cast and we be done with it?\n\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "22 Jan 2002 09:11:27 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "On Wed, 23 Jan 2002, Justin Clift wrote:\n\n> Hi all,\n>\n> I have an addition for it :\n>\n> Vince Vielhaber wrote:\n> >\n> > On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n> <snip>\n> > >\n> > > 1) Q: Why does PostgreSQL have a BSD license?\n> > > A: PostgreSQL was developed at Berkeley and open-sourced under the\n> > > BSD license. That license has served us well over many years.\n> > >\n> > > 2) Q: Why does PostgreSQL not have a GPL license?\n> > > A: See (1)\n>\n> 3) Q: Can I try and convince you guys to use the GPL, or maybe even just\n> add the GPL to PostgreSQL?\n> A: No. You will be ignored and/or flamed depending on how people\n> feel at the time.\n>\n> Probably flamed.\n>\n> And probably with enthusiasm. :)\n>\n> Don't do it.\n\n\nI'm thinking we should just use Lincoln's verbage and be done\nwith it.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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, 22 Jan 2002 11:18:24 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "...\n> And probably with enthusiasm. :)\n\n:)\n\n - Thomas\n", "msg_date": "Tue, 22 Jan 2002 16:25:11 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Vince Vielhaber wrote:\n> \n> On Wed, 23 Jan 2002, Justin Clift wrote:\n> \n> > Hi all,\n> >\n> > I have an addition for it :\n> >\n> > Vince Vielhaber wrote:\n> > >\n> > > On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n> > <snip>\n> > > >\n> > > > 1) Q: Why does PostgreSQL have a BSD license?\n> > > > A: PostgreSQL was developed at Berkeley and open-sourced under the\n> > > > BSD license. That license has served us well over many years.\n> > > >\n> > > > 2) Q: Why does PostgreSQL not have a GPL license?\n> > > > A: See (1)\n> >\n> > 3) Q: Can I try and convince you guys to use the GPL, or maybe even just\n> > add the GPL to PostgreSQL?\n> > A: No. You will be ignored and/or flamed depending on how people\n> > feel at the time.\n> >\n> > Probably flamed.\n> >\n> > And probably with enthusiasm. :)\n> >\n> > Don't do it.\n> \n> I'm thinking we should just use Lincoln's verbage and be done\n> with it.\n\nI wasn't serious.\n\n:)\n\n+ Justin\n\n> \n> Vince.\n> --\n> ==========================================================================\n> Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n> 56K Nationwide 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\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n\n", "msg_date": "Wed, 23 Jan 2002 03:33:26 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "\"Keith G. Murphy\" wrote:\n> \n> \n> It's not like the GPL really *prevents* them from contributing...\n> \nI see further down in the thread (which looks like another thread to my\nsomewhat-broken mailreader), that the offending wording had already been\nremoved/changed.\n\nI seem to have provoked an off-topic discussion (but not the flamewar I\ndreaded). Sorry I hadn't looked ahead and preempted it.\n\nBut I'm glad that the inflammatory wording is gone.\n", "msg_date": "Tue, 22 Jan 2002 11:29:10 -0600", "msg_from": "\"Keith G. Murphy\" <keithmur@mindspring.com>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Justin Clift wrote:\n> \n> Hi all,\n> \n> I have an addition for it :\n> \n> Vince Vielhaber wrote:\n> >\n> > On Tue, 22 Jan 2002, Thomas Lockhart wrote:\n> <snip>\n> > >\n> > > 1) Q: Why does PostgreSQL have a BSD license?\n> > > A: PostgreSQL was developed at Berkeley and open-sourced under the\n> > > BSD license. That license has served us well over many years.\n> > >\n> > > 2) Q: Why does PostgreSQL not have a GPL license?\n> > > A: See (1)\n> \n> 3) Q: Can I try and convince you guys to use the GPL, or maybe even just\n> add the GPL to PostgreSQL?\n> A: No. You will be ignored and/or flamed depending on how people\n> feel at the time.\n> \n> Probably flamed.\n> \n> And probably with enthusiasm. :)\n> \n> Don't do it.\n4) Q: Why is it when I try to convince you guys to use the GPL, my email\nserver gets clobbered for days.\n A: See 3.\n", "msg_date": "Tue, 22 Jan 2002 14:45:25 -0500", "msg_from": "mlw <markw@mohawksoft.com>", "msg_from_op": false, "msg_subject": "Re: [GENERAL] PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Bruce Momjian wrote:\n> I am starting to agree with Thomas and others --- why mention the GPL at\n> all. How about this. (Again to appear at the bottom of FAQ item 1.2):\n> \n> ---------------------------------------------------------------------------\n> \n> The above is the BSD license, the classic open-source license. It has no\n> restrictions on how the source code may be used. We like it and have no\n> intention of changing it.\n\nOK, no one is violently ill at the above wording so I will add it to the\nbottom of FAQ item 1.2 until some better wording comes along. :-)\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Jan 2002 15:24:50 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Hello, alavoor!\n\nOn Sun, Jan 20, 2002 at 01:03:41PM -0800, you wrote:\n\n> Gnu/GPL is the best licensing scheme for open source\n> products.\nAnd first case MySQL vs Gemini will show up it's unusability in real\nworld.\n\n-- \nNEVE-RIPE\n", "msg_date": "Fri, 1 Mar 2002 12:32:01 +0200", "msg_from": "Nevermind <never@nevermind.kiev.ua>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" }, { "msg_contents": "Le Dimanche 20 Janvier 2002 22:03, alavoor a écrit :\n> I am proposing that in addition to UCB, all the new\n> code added/changed after the UCB code must be covered\n> under GNU/GPL.\n\nThis question has been discussed at least 100 times at least on pgsql-hackers \nby PostgreSQL developpers. If you want to learn more about it, just read the \nposts.\n\nThere is a large consensus not to change the present copyright, just because \nit is impossible for legal reasons : all authors must agree, which is not the \ncase.\n\nBest regards,\nJean-Michel POURE\n", "msg_date": "Fri, 1 Mar 2002 12:07:40 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL Licence: GNU/GPL" } ]
[ { "msg_contents": "we have the following plan:\nAggregate (cost=40018.00..40048.08 rows=401 width=41) (actual\ntime=44807.96..44931.81 rows=2 loops=1)\n -> Group (cost=40018.00..40028.02 rows=4011 width=41) (actual\ntime=44677.19..44803.74 rows=3131 loops=1)\n -> Sort (cost=40018.00..40018.00 rows=4011 width=41) (actual\ntime=44677.13..44700.16 rows=3131 loops=1)\n -> Merge Join (cost=0.00..39777.96 rows=4011 width=41)\n(actual time=2.80..44460.70 rows=3131 loops=1)\n -> Index Scan using orders_pkey on orders\n(cost=0.00..8916.15 rows=150000 width=23) (actual time=0.22..8180.93\nrows=149966 loops=1)\n -> Index Scan using lineitem_pkey on lineitem\n(cost=0.00..30426.65 rows=4011 width=18) (actual time=1.87..33570.50\nrows=3131 loops=1)\nTotal runtime: 44936.77 msec\nif we set enable_mergejoin=false, plan is this:\n\nAggregate (cost=42802.29..42832.37 rows=401 width=41) (actual\ntime=34705.28..34828.93 rows=2 loops=1)\n -> Group (cost=42802.29..42812.32 rows=4011 width=41) (actual\ntime=34574.73..34700.84 rows=3131 loops=1)\n -> Sort (cost=42802.29..42802.29 rows=4011 width=41) (actual\ntime=34574.66..34597.68 rows=3131 loops=1)\n -> Nested Loop (cost=0.00..42562.25 rows=4011 width=41)\n(actual time=2.25..34359.35 rows=3131 loops=1)\n -> Index Scan using lineitem_pkey on lineitem\n(cost=0.00..30426.65 rows=4011 width=18) (actual time=1.93..33448.35\nrows=3131 loops=1)\n -> Index Scan using orders_pkey on orders\n(cost=0.00..3.01 rows=1 width=23) (actual time=0.19..0.22 rows=1\nloops=3131)\nTotal runtime: 34833.54 msec\nwhich is better\n\nthe question is:\nIs there any way to force planner to use nested loops instead of setting\nvariable?\nThanks and regards", "msg_date": "Mon, 21 Jan 2002 11:39:11 +0100", "msg_from": "Luis Amigo <lamigo@atc.unican.es>", "msg_from_op": true, "msg_subject": "how to force planner to do nestloops instead of merge joins" } ]
[ { "msg_contents": "\nWe /really/ need to add regression tests for the PLs if it is at\nall possible.\n\nDoes it make sense to sed the $with_tcl, $with_perl, and $with_python \nvalues into the pg_regress script after modifying it to to \n\"createlang\" the appropriate language when the corresponing with_lang\noption is \"yes\", then add the test name to $extra_tests.\n\nThis is basically how we handle plpgsql in the tests, except that \nplpgsql is not run as an $extra_test. It makes more sense to use\nthe $extra_tests facility for the optional PLs.\n\nthanks.\n brent\n\n-- \n\"Develop your talent, man, and leave the world something. Records are \nreally gifts from people. To think that an artist would love you enough\nto share his music with anyone is a beautiful thing.\" -- Duane Allman\n", "msg_date": "Mon, 21 Jan 2002 06:29:12 -0500", "msg_from": "Brent Verner <brent@rcfile.org>", "msg_from_op": true, "msg_subject": "adding regression tests for PLs" }, { "msg_contents": "Brent Verner writes:\n\n> We /really/ need to add regression tests for the PLs if it is at\n> all possible.\n\nYes.\n\n> Does it make sense to sed the $with_tcl, $with_perl, and $with_python\n> values into the pg_regress script after modifying it to to\n> \"createlang\" the appropriate language when the corresponing with_lang\n> option is \"yes\", then add the test name to $extra_tests.\n\nThat sounds reasonable. In the next release we'll probably end up having\nall configured languages installed by default, so you don't need to worry\nabout the createlang part too much.\n\nIf you want to start designing test cases, feel free.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 21 Jan 2002 11:46:14 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: adding regression tests for PLs" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> If you want to start designing test cases, feel free.\n\nNote there already is a pltcl test in src/pl/tcl/test.\nPretty basic probably, but you might as well start with that.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 16:36:47 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: adding regression tests for PLs " } ]
[ { "msg_contents": "\n> > override TCL_SHLIB_LD := $(shell echo $(TCL_SHLIB_LD) | sed \n> 's/-Wl,-soname.*//')\n> \n> I suspect that the above works only because -Wl,-soname is the last\n> switch in TCL_SHLIB_LD; any following switches would be removed too.\n> Perhaps better\n\nJust have to say: I can't beleive this.\nDoublefixing such a grotty Makefile that is known to not work on \n2 Platforms, and known to work on those 2 + at least 2 other platforms\nwith the patch Tom recently sent in.\n\nDon't you all trust Makefile.shlib ? It does perfectly create shlibs\nof nearly the same making without problems.\n\nAndreas\n", "msg_date": "Mon, 21 Jan 2002 18:39:25 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> Don't you all trust Makefile.shlib ?\n\nI do trust Makefile.shlib. I don't trust a large revision of the pltcl\nbuild process on the day we intend to put out RC1. That's a recipe for\nembarrassment.\n\nDid you already forget my report yesterday that your patch failed on HPUX?\nHow many of our other platforms might have problems too? Minor ones,\nsure, but we have no remaining window for port testing.\n\nThe patch I stuck in was certainly an ugly wart, but it fixes the\nimmediate problem with minimal risk. Switching pltcl to use\nMakefile.shlib is something we need to do in an orderly way with full\nprovisions for a port testing cycle. In other words, hold it for 7.3.\n\nThere's also the possibility that we'll listen to Peter and start\nstatically linking the PLs into the backend, in which case this all\nbecomes moot. But, again, that's not happening for 7.2.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 12:49:38 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " } ]
[ { "msg_contents": "\n> > Don't you all trust Makefile.shlib ?\n> \n> I do trust Makefile.shlib. I don't trust a large revision of the pltcl\n> build process on the day we intend to put out RC1. That's a recipe for\n> embarrassment.\n\nYes, I know, and do accept that :-) Just had to rid myself of a little\nannoyance ... (probably wasn't good wording, but such is the krux of \nnon-native speakers)\n\n> Did you already forget my report yesterday that your patch failed on HPUX?\n\nI hoped, you would test on hpux, but yes. sorry. The only diff to my latest \npatch that Bruce keeps in queue is the \"-lc\", no ? \n\n> How many of our other platforms might have problems too? Minor ones,\n> sure, but we have no remaining window for port testing.\n\nNote for future fix:\nI think actually hpux only failed, because it has a broken Makefile.shlib.\nIt is Makefile.shlib's business to know that the link line for\na shlib needs -lc ? Other ports that still use ld to link seem to get \nthis right (mainly the BSD's). (Makefile.port might also be the place \nto do this)\n\nAs a short test you could test plpython on hpux with current cvs.\nMy guess is, that it doesn't work.\n\nAndreas\n", "msg_date": "Mon, 21 Jan 2002 19:38:12 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: pltlc and pltlcu problems " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> I think actually hpux only failed, because it has a broken Makefile.shlib.\n> It is Makefile.shlib's business to know that the link line for\n> a shlib needs -lc ?\n\nPossibly -lc should go into Makefile.shlib, but that doesn't eliminate\nthe need for a special case in pltcl's makefile --- at least as long as\nit depends on tclConfig to tell it how to link. The problem is that\nTCL_SHLIB_LD_LIBS comes up empty on HPUX, but you still need to put\n$(TCL_LIBS) into the link command.\n\n> As a short test you could test plpython on hpux with current cvs.\n> My guess is, that it doesn't work.\n\nCould be. I don't have python installed here ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 13:45:08 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: pltlc and pltlcu problems " } ]
[ { "msg_contents": "Continuing to think about implementing SQL schemas for 7.3 ...\n\nToday's topic for discussion: which types of Postgres objects should\nbelong to schemas, and which ones should have other name scopes?\n\nRelations (tables, indexes, views, sequences) clearly belong to schemas.\nSince each relation has an associated datatype with the same name, it\nseems that datatypes must belong to schemas as well. (Even if that\nargument doesn't convince you, SQL99 says that user-defined datatypes\nbelong to schemas.) However the situation is murkier for other kinds of\nobjects.\n\nHere are all the kinds of named objects that exist in Postgres today,\nwith some comments on whether they should belong to schemas or not:\n\nrelations\t\tMust be in schemas\ntypes\t\t\tMust be in schemas\ndatabases\t\tDatabases contain schemas, not vice versa\nusers\t\t\tUsers are cross-database, so not in schemas\ngroups\t\t\tUser groups are cross-database, so not in schemas\nlanguages\t\tProbably should not be in schemas\naccess methods\t\tProbably should not be in schemas\nopclasses\t\tSee below\noperators\t\tSee below\nfunctions/procedures\tSee below\naggregates\t\tShould treat same as regular functions\nconstraints\t\tSee below\nrules\t\t\tSee below\ntriggers\t\tSee below\nNOTIFY conditions\tSee below\n\nLanguages and access methods are not trivial to add to the system, so\nthere's not much risk of name conflicts, and no reason to make their name\nscope less than global.\n\nThe situation is a lot murkier for operators and functions. These should\nprobably be treated alike, since operators are just syntactic sugar for\nfunctions. I think the basic argument for making them schema-local is\nthat different users might conceivably want to define conflicting\nfunctions or operators of the same name. Against that, however, there\nare a number of reasons for wanting to keep these objects database-wide.\nFirst off there are syntactic problems. Do you really want to write\n\t\tA schemaname.+ B\nto qualify an ambiguous \"+\" operator? Looks way too much like a syntax\nerror to me. Allowing this would probably turn a lot of simple syntax\nerrors into things that get past the grammar and end up producing truly\nconfusing error messages. Qualified function names also pose some\nproblems, not so much with\n\t\tschemaname.function(args)\nwhich seems reasonable, but with the Berkeley-derived syntax that allows\n\"foo.function\" to mean \"function(foo)\" --- there's no way to squeeze a\nschema-name for the function into that. (And you'll recall from my note\nof the other day that we don't want to abandon this syntax entirely,\nbecause people would like us to support \"sequencename.nextval\" for Oracle\ncompatibility.) Notice that we are not forced to make functions/operators\nschema-local just because datatypes are, because overloading will save the\nday. func(schema1.type1) and func(schema2.type1) are distinct functions\nbecause the types are different, even if they live in the same function\nnamespace. Finally, SQL99 doesn't appear to think that operator and\nfunction names are schema-local; though that may just be because it hasn't\ngot user-defined operators AFAICT.\n\nI am leaning towards keeping functions/operators database-wide, but would\nlike to hear comments. Is there any real value in, eg, allowing different\nusers to define different \"+\" operators *on the same datatypes*?\n\nNot sure about index opclasses. Given that datatype names are\nschema-local, one can think of scenarios where two users define similar\ndatatypes and then try to use the same index opclass name for both.\nBut it seems pretty unlikely. I'd prefer to leave opclass names\ndatabase-wide for simplicity. Comments?\n\nAs for constraints, currently we only support table-level constraints,\nand we do not enforce any uniqueness at all on their names; multiple\nconstraints for the same table can have the same name (and if so, ALTER\nTABLE DROP CONSTRAINT drops all matching names). SQL92 requires named\nconstraints to have names that are unique within their schema, which is\nokay for standalone assertions (which we haven't got) but seems quite\nunnecessary for constraints attached to tables. And what's really odd,\nit appears to allow a table constraint to belong to a different schema\nthan the table it is on! This is pretty bogus. I'd prefer to ignore the\npart of the spec that says that table constraint names can be qualified\nnames, and either keep our existing behavior or require constraint names\nto be unique per-table. Thoughts?\n\nRewrite rules are currently required to have a name unique within their\ndatabase. We clearly don't want that to still be true in the schema\nenvironment. Personally I would like to make rules' names unique only\namong rules on the same table (like we handle triggers). That would\nmean an incompatible change in the syntax of DROP RULE: it'd have to\nbecome DROP RULE rule ON table, much like DROP TRIGGER. Is that okay?\nIf not, probably we must make rulenames local to schemas and say they\nimplicitly belong to the schema of the associated table.\n\nTriggers are already handled as being named uniquely among the triggers\nof the same table. This behavior is fine with me, and doesn't need to\nbe changed for schema support.\n\nI can see some advantage to considering NOTIFY condition names to be local\nto a schema, but I can also see risks of breaking existing applications.\nCurrently, \"NOTIFY foo\" will signal to \"LISTEN foo\" even if the two\nprocesses belong to different users. With an implicit schema qualifier\nattached to foo, very likely this would fail to work. Since NOTIFY names\naren't officially registered anywhere, the implicit qualifier would have\nto correspond to the front schema of one's schema search path, and there'd\nbe no way for such processes to communicate if their search paths didn't\nmatch. I think people would end up always qualifying NOTIFY names with\na single schema name, which means we might as well continue to consider\nthem global. On the other hand, if you assume that NOTIFY names are often\nthe names of tables, it'd make sense to allow them to be qualified. Any\nthoughts on this?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 16:29:52 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane wrote:\n> \n> Continuing to think about implementing SQL schemas for 7.3 ...\n> \n> Today's topic for discussion: which types of Postgres objects should\n> belong to schemas, and which ones should have other name scopes?\n...\n> \n> I am leaning towards keeping functions/operators database-wide, but would\n> like to hear comments. Is there any real value in, eg, allowing different\n> users to define different \"+\" operators *on the same datatypes*?\n\nWith regard to functions, I believe they should be schema specific.\nOracle allows the creation of procedures/functions in specific schema.\nUser2 may then execute user1's function as:\n\nEXECUTE user1.myfunction();\n\nHowever, as you suggest, the fully qualified naming of functions gets\nmessy. So Oracle allows (and I think we would need) PUBLIC SYNONYMs.\nThis allows user1 to do:\n\nCREATE TABLE employees(key integer, name VARCHAR(20));\n\nCREATE SEQUENCE s;\n\nCREATE PROCEDURE newemployee(n IN VARCHAR)\nAS \nBEGIN\nINSERT INTO employees\nSELECT s.nextval, n\nFROM DUAL;\nEND;\n/\n\nGRANT INSERT ON employees TO user2;\nGRANT EXECUTE ON newemployee TO user2;\nCREATE PUBLIC SYNONYM newemployee FOR user1.newemployee;\n\nNow, user2 just does:\n\nEXECUTE newemployee(10);\n\n\nIn fact, with regard to the package discussion a while back, Oracle\nallows this:\n\nDatabase->Schema->Package->Procedure\n\nand this:\n\nDatabase->Schema->Procedure\n\nand effectively this:\n\nDatabase->Procedure via Database->PUBLIC Schema->Procedure\n\nI really think that the main purpose of schemas is to prevent an\nill-informed or malicious user from engaging in unacceptable behavior.\nBy placing everything in schemas, it allows the Oracle DBA to have a\nvery fine-grained control over the ability of user1 to interfere with\nuser2. Before user1 above could pollute the global namespace, the dba\nmust have:\n\nGRANT user1 CREATE PUBLIC SYNONYM\n\nprivilege, or created the synonym himself. This allows things like\npg_class to reside within their own schema, as well as all built-in\nPostgreSQL functions. After the bootstrapping, PUBLIC SYNONYMs are\ncreated for all of the system objects which should have global scope:\n\nCREATE PUBLIC SYNONYM pg_class FOR system.pg_class;\nCREATE PUBLIC SYNONYM abs(int) FOR system.abs(int);\n\nOne major benefit of Oracle is that the DBA, through the use of\nSTATEMENT privileges (i.e. GRANT CREATE TABLE to user1), resource\nPROFILEs, and TABLESPACES can easily admin a database used by 20\ndifferent deparments and 1000 different users without the fear that one\nmight step on the other's toes. If the accounting department wants to\ncreate an addtax() function, it shouldn't have to ask the receiving\ndeptartment to do so. \n\nJust my thoughts,\n\nMike Mascari\nmascarm@mascari.com\n", "msg_date": "Mon, 21 Jan 2002 18:45:34 -0500", "msg_from": "Mike Mascari <mascarm@mascari.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane writes:\n\n> languages\t\tProbably should not be in schemas\n> access methods\t\tProbably should not be in schemas\n> opclasses\t\tSee below\n> operators\t\tSee below\n> functions/procedures\tSee below\n> aggregates\t\tShould treat same as regular functions\n> constraints\t\tSee below\n> rules\t\t\tSee below\n> triggers\t\tSee below\n> NOTIFY conditions\tSee below\n\nRemember that a schema is a named representation of ownership, so anything\nthat can be owned must be in a schema. (Unless you want to invent a\nparallel universe for a different kind of ownership, which would be\nincredibly confusing.) Also remember that we wanted to use schemas as a\nway to prevent unprivileged users from creating anything by default. So\nit would be much simpler if \"everything\" were in a schema.\n\nI wouldn't worry so much about the invocation syntax -- if you don't like\nugly don't make ugly. For instance, if you add a user-defined operator\nyou would probably either put it in the same schema with the rest of your\nproject or put it in some sort of a global or default schema (to be\ndetermined) to make it available to the whole system, my assumption being\nthat either way you don't need to qualify the operator. But the important\nthing is that you *could* make cross-schema operator calls, say during\ndevelopment or testing.\n\nConsequentially, I opine that all of the things listed above should be in\na schema. (Although I don't have a strong opinion about notifications,\nyet.)\n\n> namespace. Finally, SQL99 doesn't appear to think that operator and\n> function names are schema-local; though that may just be because it hasn't\n> got user-defined operators AFAICT.\n\nCheck clause 10.4 <routine invocation>: routine names are (optionally)\nschema qualified like everything else.\n\n> Rewrite rules are currently required to have a name unique within their\n> database. We clearly don't want that to still be true in the schema\n> environment. Personally I would like to make rules' names unique only\n> among rules on the same table (like we handle triggers). That would\n> mean an incompatible change in the syntax of DROP RULE: it'd have to\n> become DROP RULE rule ON table, much like DROP TRIGGER. Is that okay?\n> If not, probably we must make rulenames local to schemas and say they\n> implicitly belong to the schema of the associated table.\n\nI'd rather make the opposite change (make trigger names schema-global)\nbecause that aligns with SQL99 and it would make more sense for overall\nconsistency (e.g., you can't have indexes with the same names on different\ntables). The syntax change would also be backward compatible. I think\neither way, schema-global or table-global namespace, can be argued to be\nmore useful or more confusion-prone, so I side with the standard on this\none.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Mon, 21 Jan 2002 19:01:13 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Remember that a schema is a named representation of ownership, so anything\n> that can be owned must be in a schema. (Unless you want to invent a\n> parallel universe for a different kind of ownership, which would be\n> incredibly confusing.)\n\nI don't buy that premise. It's true that SQL92 equates ownership of a\nschema with ownership of the objects therein, but AFAICS we have no hope\nof being forward-compatible with existing database setups (wherein there\ncan be multiple tables of different ownership all in a single namespace)\nif we don't allow varying ownership within a schema. I think we can\narrange things so that we are upward compatible with both SQL92 and\nthe old way. Haven't worked out details yet though.\n\nHave to run, more later.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 20:06:30 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "FYI: Applications like Data Architect would benefit from a consistent and \ncomplete interface to the schema. For example; I found that we had to bypass \nthe DD views which exist (as I recall) because they did not give us all \ninformation we needed. So we selected stuff from the system tables directly. \nYucky. Sorry I can not recall details but thought that I would mention this \nhere. The MySQL 'SHOW' statements seem to work pretty well and shields us \nfrom changes to the system tables.\n\nPeter\n\n> I don't buy that premise. It's true that SQL92 equates ownership of a\n> schema with ownership of the objects therein, but AFAICS we have no hope\n> of being forward-compatible with existing database setups (wherein there\n> can be multiple tables of different ownership all in a single namespace)\n> if we don't allow varying ownership within a schema. I think we can\n> arrange things so that we are upward compatible with both SQL92 and\n> the old way. Haven't worked out details yet though.\n>\n> Have to run, more later.\n", "msg_date": "Mon, 21 Jan 2002 17:39:05 -0800", "msg_from": "Peter Harvey <pharvey@codebydesign.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane wrote:\n> \n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Remember that a schema is a named representation of ownership, so anything\n> > that can be owned must be in a schema. (Unless you want to invent a\n> > parallel universe for a different kind of ownership, which would be\n> > incredibly confusing.)\n> \n> I don't buy that premise. It's true that SQL92 equates ownership of a\n> schema with ownership of the objects therein, but AFAICS we have no hope\n> of being forward-compatible with existing database setups (wherein there\n> can be multiple tables of different ownership all in a single namespace)\n> if we don't allow varying ownership within a schema. I think we can\n> arrange things so that we are upward compatible with both SQL92 and\n> the old way. Haven't worked out details yet though.\n> \n\nPeter is right. Schemas is just a practical way of creating things\nunder\nthe same authorization-id + crating a namespace so that different\nauthorization-ids can have objects with the same (unqualified name).\n\nQuoting Date (pg. 221): \"The schema authID for a given schema identifies\nthe owner of that schema (and hence the owner of everything described by\nthat schema also).\"\n\nIt is very important that we reach a conclusion on this as it simplifies\nthings a lot.\n\nRegards,\nFernando\n\n\nP.S.: That is why I was telling you that, except for the namespace part,\nwe already have the groundwork for Entry-level SQL-Schemas (where the \nschema is always the authorization-id of the creator) -- it is just\na question of handling the \"owner\" appropriately.\n\n\n-- \nFernando Nasser\nRed Hat Canada Ltd. E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Tue, 22 Jan 2002 10:50:17 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Fernando Nasser <fnasser@redhat.com> writes:\n> Tom Lane wrote:\n>> I don't buy that premise. It's true that SQL92 equates ownership of a\n>> schema with ownership of the objects therein, but AFAICS we have no hope\n>> of being forward-compatible with existing database setups (wherein there\n>> can be multiple tables of different ownership all in a single namespace)\n>> if we don't allow varying ownership within a schema.\n\n> Quoting Date (pg. 221): \"The schema authID for a given schema identifies\n> the owner of that schema (and hence the owner of everything described by\n> that schema also).\"\n\nYes, I know what the spec says. I also think we'll have a revolt on our\nhands if we don't make it possible for existing Postgres applications to\ncontinue working as they have in the past --- and that means allowing\ntables of different ownerships to be accessible in a single namespace.\n\nAlthough I haven't thought through the details yet, it seems to me that\na solution exists along these lines:\n\n1. The creator of an object owns it. (With some special cases, eg the\n superuser should be able to create a schema owned by someone else.)\n\n2. Whether you can create an object in a schema that is owned by someone\n else depends on permissions attached to the schema. By default only\n the owner of a schema can create anything in it.\n\n3. SQL92-compatible behavior is achieved when everyone has their own\n schema and they don't grant each other create-in-schema rights.\n Backwards-compatible behavior is achieved when everyone uses a\n shared \"public\" schema.\n\nWe'd probably need GUC variable(s) to make it possible to choose which\nbehavior is the default. I haven't thought much about exactly what\nknobs should be provided. I do think we will want at least these two\nknobs:\n\n1. A \"search path\" that is an ordered list of schemas to look in\n when trying to resolve an unqualified name.\n\n2. A \"default schema\" variable that identifies the schema to create\n objects in, if a fully qualified name is not given.\n\nThe default creation location shouldn't be hardwired to equal the\nfront of the search path, because the front item of the search path\nis probably always going to be a backend-local temporary schema\n(this is where we'll create temporary tables).\n\nThe most dumbed-down version of this that would work is to reduce the\nsearch path to just a fixed list of three locations: temp schema, a\nselectable default schema (which is also the default creation location),\nand a system schema (where pg_class and friends live). But a\nuser-settable path wouldn't be any more effort to support, and might\noffer some useful capability.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 11:16:11 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> > Quoting Date (pg. 221): \"The schema authID for a given schema identifies\n> > the owner of that schema (and hence the owner of everything described by\n> > that schema also).\"\n> \n> Yes, I know what the spec says. I also think we'll have a revolt on our\n> hands if we don't make it possible for existing Postgres applications to\n> continue working as they have in the past --- and that means allowing\n> tables of different ownerships to be accessible in a single namespace.\n> \n\nBut them it is not SQL-Schemas. Call it something else, \"packages\"\nfor instance. The standard has lots of rules and other considerations\nall around the document that depend on schemas have the meaning they \nassigned to it.\n\nIf someone wants to really make use of SQL-Schemas, he/she will need to \nreorg the database anyway, which will probably mean dumping the data,\nmassaging the DLL and recreating it. I guess most users of SQL-Schemas\nwill be people creating new databases.\n\nFor the current users, (based on your idea below) a default behavior of\nsearching the current-AuthID schema, them the \"default\" schema them\n\"any\"\nschema will probably make things work.\n\nFernando\n\nP.S.: Note that the standard has no GRANTs for SCHEMAs themselves; all\nGRANTS go to the specific objects as before.\n\n\n> Although I haven't thought through the details yet, it seems to me that\n> a solution exists along these lines:\n> \n> 1. The creator of an object owns it. (With some special cases, eg the\n> superuser should be able to create a schema owned by someone else.)\n> \n> 2. Whether you can create an object in a schema that is owned by someone\n> else depends on permissions attached to the schema. By default only\n> the owner of a schema can create anything in it.\n> \n> 3. SQL92-compatible behavior is achieved when everyone has their own\n> schema and they don't grant each other create-in-schema rights.\n> Backwards-compatible behavior is achieved when everyone uses a\n> shared \"public\" schema.\n> \n> We'd probably need GUC variable(s) to make it possible to choose which\n> behavior is the default. I haven't thought much about exactly what\n> knobs should be provided. I do think we will want at least these two\n> knobs:\n> \n> 1. A \"search path\" that is an ordered list of schemas to look in\n> when trying to resolve an unqualified name.\n> \n> 2. A \"default schema\" variable that identifies the schema to create\n> objects in, if a fully qualified name is not given.\n> \n> The default creation location shouldn't be hardwired to equal the\n> front of the search path, because the front item of the search path\n> is probably always going to be a backend-local temporary schema\n> (this is where we'll create temporary tables).\n> \n> The most dumbed-down version of this that would work is to reduce the\n> search path to just a fixed list of three locations: temp schema, a\n> selectable default schema (which is also the default creation location),\n> and a system schema (where pg_class and friends live). But a\n> user-settable path wouldn't be any more effort to support, and might\n> offer some useful capability.\n> \n> regards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 3: if posting/reading through Usenet, please send an appropriate\n> subscribe-nomail command to majordomo@postgresql.org so that your\n> message can get through to the mailing list cleanly\n\n-- \nFernando Nasser\nRed Hat Canada Ltd. E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Tue, 22 Jan 2002 11:43:49 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Fernando Nasser <fnasser@redhat.com> writes:\n> But them it is not SQL-Schemas. Call it something else, \"packages\"\n> for instance. The standard has lots of rules and other considerations\n> all around the document that depend on schemas have the meaning they \n> assigned to it.\n\nWhere? And are there any cases where it really matters?\n\n> If someone wants to really make use of SQL-Schemas, he/she will need to \n> reorg the database anyway, which will probably mean dumping the data,\n> massaging the DLL and recreating it. I guess most users of SQL-Schemas\n> will be people creating new databases.\n\nNo doubt. That still leaves us with the problem of providing\nbackward-compatible behavior in an engine that is going to be designed\nto support schemas. I'm not sure what you think the implementation of\nschemas is going to look like --- but I think it's not going to be\nsomething that can be turned off or ignored. Every table is going to\nbelong to some schema, and the old behavior has to be available within\nthat framework.\n\nWe are not working in a vacuum here, and that means that \"implement\nthe specification and nothing but\" is not a workable design approach.\nWe are going to end up with something that does the things SQL92 asks\nfor, but does other things too.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 11:51:30 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "OK, so the proposal is that we dissociate the ownership from the\nnamespace when we implement our version of SQL-Schemas, right?\nThis way an object will have both an owner and a schema (while in\nthe standard they are the same thing).\n\nThe important is not much to accommodate someone who is creating\nschemas (a new thing, so objects can be created the \"right\" way)\nbut rather to accommodate current code that does not use schemas\nand have several owners for the objects (which would all fall\ninto a \"default\" schema). Can you agree with that?\n\nI was looking to see if we choose the proper defaults and search paths\nand the \"default\" schema we could make it look for SQL-compliant code \nas if it was a vanilla SQL-Schemas implementation.\n\nTo support the current database schema definitions (without SQL-Schemas\nand with different owners), things would be created with the current\nuser authorization id and will have its name defined in the \"default\"\nSQL-Schema\nnamespace. Also, when referring to an object if the name is not\nqualified\nwith the schema name, the search would go through the schema with the\ncurrent authorization id (as required by the std) and proceed to check \nthe \"default\" schema.\n\nThe only problem in the scenario above is that the standard says that \nwhen creating objects and not specifying the schema the schema name\nshould be assumed to be the current user authorization id (or whatever\nauthorization id the code is running as). In our case it would go to\nthe default schema. If someone wants the SQL std behavior then, he/she\nmust create things inside a CREATE SCHEMA statement or explicitly\nqualify\nwith the schema name the objects being created. Can we live with that?\nWill we pass the conformance tests? (I saw tests that test the schema\nname\nthat is assumed when referencing but I do not recall seeing one that\ntests\nwhat is assumed on creation -- things I saw were all created inside\nCREATE SCHEMA statements. Note, also, that passing the NIST tests\ndoesn't\nmake us compliant if we know that we are doing something different than\nwhat is specified -- it just means that we got away with it :-)\n\n\n-- \nFernando Nasser\nRed Hat Canada Ltd. E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Tue, 22 Jan 2002 15:30:20 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Fernando Nasser <fnasser@redhat.com> writes:\n> The only problem in the scenario above is that the standard says that \n> when creating objects and not specifying the schema the schema name\n> should be assumed to be the current user authorization id (or whatever\n> authorization id the code is running as). In our case it would go to\n> the default schema. If someone wants the SQL std behavior then, he/she\n> must create things inside a CREATE SCHEMA statement or explicitly\n> qualify\n> with the schema name the objects being created. Can we live with\n> that?\n\nHuh? You seem to be assuming that we need to support both the\nhistorical Postgres behavior and the SQL-standard behavior with exactly\nthe same configuration switches. That's not how I'm seeing it at all.\nThe way I'm envisioning it, you could get either the historical\nbehavior, or the standard's behavior, depending on how you set up the\nconfiguration variables. I don't see any particular reason to limit the\nsystem to just those two cases, either, if the underlying implementation\nhas enough flexibility to support custom namespace configurations.\n\nI believe that we could get the historical behavior with something like\n\n\tschema search path = (\"public\" schema, system schema);\n\n\tdefault creation schema = \"public\" schema\n\nand the standard's behavior with something like\n\n\tschema search path = (user's own schema, system schema);\n\n\tdefault creation schema = user's own schema\n\n(ignoring the issue of a schema for temp tables for the moment).\n\nIf you prefer to think of these things as \"namespaces\" rather than\n\"schemas\", that's fine with me ... what we're talking about here\nis an implementation that can support SQL-style schemas, but isn't\nnarrowly able to do only that.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 15:41:49 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> Huh? You seem to be assuming that we need to support both the\n> historical Postgres behavior and the SQL-standard behavior with exactly\n> the same configuration switches. That's not how I'm seeing it at all.\n> The way I'm envisioning it, you could get either the historical\n> behavior, or the standard's behavior, depending on how you set up the\n> configuration variables. \n\nThen we can live just with the schema being the ownership.\n\nSwitches set to standard:\n\n schema search path = (\"user's own schema\", postgres)\n\n [ default creation schema = user's own schema ] same as below,\n we don't need this\nswitch\n\nSwitches set to historical:\n\n schema search path = (user's own schema, \"any\" schema, postgres)\n\n [ default creation schema = user's own schema ]\n\nThe searching in \"any\" schema (i.e., any owner) will let will find \nthings that where defined the way they are today, i.e., possibly\nby several different users.\n\n\nP.S.: You can even add the \"default\" schema in the standard case and\nI believe you are still compliant and can handle things easier:\n schema search path = (\"user's own schema\", postgres)\n\n\nMaybe you could give an example of a case where the schema meaning\nownership breaks things. Or what kind of additional things you have\nin mind that would require orthogonal schema and ownership spaces.\n\n\nRegards,\nFernando\n\n\n\n\n-- \nFernando Nasser\nRed Hat Canada Ltd. E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Tue, 22 Jan 2002 16:02:07 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Fernando Nasser <fnasser@redhat.com> writes:\n> Switches set to historical:\n\n> schema search path = (user's own schema, \"any\" schema, postgres)\n\n> [ default creation schema = user's own schema ]\n\n> The searching in \"any\" schema (i.e., any owner) will let will find \n> things that where defined the way they are today, i.e., possibly\n> by several different users.\n\nNo, it won't, because nothing will ever get put into that schema.\n(At least not by existing pg_dump scripts, which are the things that\nreally need to see the historical behavior.) The\ndefault-creation-schema variable has got to point at any/public/\nwhatever-we-call it, or you do not have the historical behavior.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 16:14:16 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> Fernando Nasser <fnasser@redhat.com> writes:\n> > Switches set to historical:\n> \n> > schema search path = (user's own schema, \"any\" schema, postgres)\n> \n> > [ default creation schema = user's own schema ]\n> \n> > The searching in \"any\" schema (i.e., any owner) will let will find\n> > things that where defined the way they are today, i.e., possibly\n> > by several different users.\n> \n> No, it won't, because nothing will ever get put into that schema.\n> (At least not by existing pg_dump scripts, which are the things that\n> really need to see the historical behavior.) The\n> default-creation-schema variable has got to point at any/public/\n> whatever-we-call it, or you do not have the historical behavior.\n> \n\nYou did not understand what I meant by \"any\". It is not a schema\ncalled \"any\". It is _any_ schema.\n\nExample:\n\nA creates a table (do not specify the schema) so it gets into\nthe schema named A (as per standard).\n\nB refers to the table without qualifying it...\n\nIn the standard case: look into schema B (=> not found), not in\npostgres either.\nERROR: Inv. relation As the standard requires.\n\nIn the historical mode: look into schema B (=> not found), look into\nANY\nschema (finds it in A). Works as it is today.\n\n\nNote that I only suggest looking in B first (in the historical case)\nbecause\nthis will allow for the coexistence of the current mode with a\nquasi-compliant\nuse of SQL-Schemas. You only need to change the switch if you want\nstrict\ncompliance.\n\n\n\n-- \nFernando Nasser\nRed Hat Canada Ltd. E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Tue, 22 Jan 2002 16:26:33 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Fernando Nasser <fnasser@redhat.com> writes:\n> In the historical mode: look into schema B (=> not found), look into\n> ANY schema (finds it in A). Works as it is today.\n\nNo, it doesn't work the same as today, because in that implementation\nboth A and B can create the same tablename without complaint. It then\nbecomes very unclear which instance other people will get (unless your\n\"any\" placeholder somehow implies a search order).\n\nThe idea of being able to put an \"any\" placeholder into the search list\nis an interesting one, though. If we can resolve the ambiguity problem\nit might be a useful feature.\n\nI am a little troubled by the idea of placing \"any\" before the system\nschema (what if JRandomLuser creates a table named \"pg_class\"?) but it\nmight be workable at the tail end of the path.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 16:34:47 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> Fernando Nasser <fnasser@redhat.com> writes:\n> > In the historical mode: look into schema B (=> not found), look into\n> > ANY schema (finds it in A). Works as it is today.\n> \n> No, it doesn't work the same as today, because in that implementation\n> both A and B can create the same tablename without complaint.\n\nI agree that we won't be able to catch this as an error unless we turn \nanother switch that requires unique names (there goes one of the\nadvantages\nof having schemas, but there is always the option of leaving it on).\n\nIn this case it would be more close to the current behavior but what is\nleft of the SQL-Schemas will be more of a syntactic sugar (although it\ncan\nbe still used by the DBA to better organize the grant of privileges).\n\nAnyway, it would be a DBA option to live with not detecting duplicate\nnames. And, I hope all our tools, graphical or not, will make it clear\nwhat\nis the schema things are defined into, so it would not be difficult to \nfigure out what is going wrong if something goes wrong (and we can also\nprint the relation oid on messages). \n\n> It then\n> becomes very unclear which instance other people will get (unless your\n> \"any\" placeholder somehow implies a search order).\n> \n\nIf someone is just using the current mode, there shouldn't be (all names\nare\ndatabase-unique).\n\nThe only case where this situation can happen is if someone is trying\nto use schemas and the historical non-schema organization in the same\ndatabase, right? Can we make the search order per database?)\n\nOne possibility is to state that this is not recommended (one should \norganize things as schemas or not at all in a database) and say that \nthe search order, besides the current AuthId, is unspecified (random). \n\nAnother possibility is to allow only one object with that name in the\n\"any\" space. If someone means an object that was defined on a schema,\nhe/she can qualify the name with the schema (good practice). The only\ncase where this is not possible is the legacy case, where there is \nexactly one object with that name anyway.\n\nI prefer this second solution.\n\n> The idea of being able to put an \"any\" placeholder into the search list\n> is an interesting one, though. If we can resolve the ambiguity problem\n> it might be a useful feature.\n> \n\nSee above.\n\n> I am a little troubled by the idea of placing \"any\" before the system\n> schema (what if JRandomLuser creates a table named \"pg_class\"?) but it\n> might be workable at the tail end of the path.\n> \n\nYes, I thought of that as I was typing, but it was not the important\npoint at that time. You're right, should go at the end.\n\n-- \nFernando Nasser\nRed Hat Canada Ltd. E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Tue, 22 Jan 2002 17:03:19 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane writes:\n\n> I don't buy that premise. It's true that SQL92 equates ownership of a\n> schema with ownership of the objects therein, but AFAICS we have no hope\n> of being forward-compatible with existing database setups (wherein there\n> can be multiple tables of different ownership all in a single namespace)\n> if we don't allow varying ownership within a schema.\n\nWe could have a Boolean knob that says \"if you don't find the object in\nthe default schema, search all other schemas\". That should provide all\nthe backward compatibility we need. Moreover, I figure if we do it that\nway, the whole schema implementation reduces itself mostly to parser work,\nno complicated system catalog changes, no complex overhaul of the\nprivilege system -- at least initially.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Tue, 22 Jan 2002 18:18:38 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane writes:\n\n> No, it doesn't work the same as today, because in that implementation\n> both A and B can create the same tablename without complaint. It then\n> becomes very unclear which instance other people will get (unless your\n> \"any\" placeholder somehow implies a search order).\n\nThe \"search any schema\" switch is only intended for use with legacy\ndatabases, where duplicate names don't occur anyway. If someone uses it\nwith a new schema-using database design, then he kind of ought to know\nthat the switch probably doesn't make a whole lot of sense. However, to\nget reproduceable behaviour anyway we can just define a search order, such\nas by schema name.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Tue, 22 Jan 2002 18:27:35 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Moreover, I figure if we do it that\n> way, the whole schema implementation reduces itself mostly to parser work,\n> no complicated system catalog changes, no complex overhaul of the\n> privilege system -- at least initially.\n\nWhy are you guys so eager to save me work? I'm not in the least\ninterested in implementing a \"schema\" feature that can only handle\nthe entry-level user == schema case. Therefore, just relabeling the\nowner column as schema isn't an interesting option.\n\nI really don't see what's wrong with building a namespace mechanism\nthat is orthogonal to ownership and then using that to implement what\nSQL92 wants. I think this will be cleaner, simpler, and more flexible\nthan trying to equate ownership with namespace.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 18:31:08 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Tom Lane writes:\n>> No, it doesn't work the same as today, because in that implementation\n>> both A and B can create the same tablename without complaint. It then\n>> becomes very unclear which instance other people will get (unless your\n>> \"any\" placeholder somehow implies a search order).\n\n> The \"search any schema\" switch is only intended for use with legacy\n> databases, where duplicate names don't occur anyway.\n\nThat's a mighty narrow view of the world. Do you think that people had\nbetter convert to SQL schemas before they ever again create a table?\nThe fact is that ordinary non-schema-aware usage will certainly lead to\nthe above scenario.\n\n> that the switch probably doesn't make a whole lot of sense. However, to\n> get reproduceable behaviour anyway we can just define a search order, such\n> as by schema name.\n\nOr say that you get an \"ambiguous reference\" error if there is more than\none possible candidate in the \"any\" namespace. (Although that opens the\ndoor for innocent creation of a table foo by one user to break other\npeople's formerly-working queries that reference some other foo.)\nBottom line for me is that this is an untried concept. I think the\nconcept of an \"any\" searchlist entry is risky enough that I don't much\nwant to hang the entire usability of the implementation on the\nassumption that we won't find any fatal problems with \"any\".\n\n\nHowever, the argument over whether SQL92's concept of ownership should\nbe taken as gospel is not really the argument I wanted to have in this\nthread. Is it possible to go back to the original point concerning\nwhether there should be different namespace boundaries for different\ntypes of objects? You aren't going to avoid those issues by saying that\nnamespace == ownership is good enough.\n\nI'm particularly troubled by the idea of trying to apply this \"any\"\nlookup concept to resolution of overloaded operators and functions.\nSuppose I have a reference func(type1,type2) that I'm trying to resolve,\nand I have an inexact match (one requiring coercion) in my own schema.\nDo I look to the \"any\" schema to see if there are better matches?\nIf so, what happens if the \"any\" schema contains multiple possibilities\nwith identical signatures (presumably created by different users)? ISTM\nthis will positively guarantee a resolution failure, since there's no\nway for the resolver to prefer one over another. Thus, by creating\na \"func(foo,bar)\" function --- quite legally --- JRandomLuser might\nbreak other people's formerly working queries that use other functions\nnamed func. Although it's possible for this to happen now, it'll be\na lot more surprising if JRandomLuser thinks that his functions live\nin his own private schema namespace.\n\nI'm thinking that the overloading concept is not going to play well\nat all with multiple namespaces for functions or operators, and that\nwe'd be best off to say that there is only one namespace (per database)\nfor these things.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 19:02:20 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Tue, Jan 22, 2002 at 06:31:08PM -0500, Tom Lane wrote:\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Moreover, I figure if we do it that\n> > way, the whole schema implementation reduces itself mostly to parser work,\n> > no complicated system catalog changes, no complex overhaul of the\n> > privilege system -- at least initially.\n> \n> Why are you guys so eager to save me work? I'm not in the least\n> interested in implementing a \"schema\" feature that can only handle\n> the entry-level user == schema case. Therefore, just relabeling the\n> owner column as schema isn't an interesting option.\n> \n> I really don't see what's wrong with building a namespace mechanism\n> that is orthogonal to ownership and then using that to implement what\n> SQL92 wants. I think this will be cleaner, simpler, and more flexible\n> than trying to equate ownership with namespace.\n> \n\nI'm with Tom on this: the extended Schema capability he's described\ncombines the best of both authentication mechanisms, IMHO. It give\nus namespace separation ala the SQL standard, and individual object\nownership, like unix FS semantics. Only having ownership on the\n'containers' strikes me as limiting, even if that is how the standard\ndescribes it.\n\nRoss\n", "msg_date": "Tue, 22 Jan 2002 18:18:13 -0600", "msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Mon, 21 Jan 2002, Tom Lane wrote:\n\n> Continuing to think about implementing SQL schemas for 7.3 ...\n>\n> Today's topic for discussion: which types of Postgres objects should\n> belong to schemas, and which ones should have other name scopes?\n>\n> Relations (tables, indexes, views, sequences) clearly belong to schemas.\n> Since each relation has an associated datatype with the same name, it\n> seems that datatypes must belong to schemas as well. (Even if that\n> argument doesn't convince you, SQL99 says that user-defined datatypes\n> belong to schemas.) However the situation is murkier for other kinds of\n> objects.\n>\n> Here are all the kinds of named objects that exist in Postgres today,\n> with some comments on whether they should belong to schemas or not:\n>\n> relations\t\tMust be in schemas\n> types\t\t\tMust be in schemas\n> databases\t\tDatabases contain schemas, not vice versa\n> users\t\t\tUsers are cross-database, so not in schemas\n> groups\t\t\tUser groups are cross-database, so not in schemas\n> languages\t\tProbably should not be in schemas\n> access methods\t\tProbably should not be in schemas\n> opclasses\t\tSee below\n> operators\t\tSee below\n> functions/procedures\tSee below\n> aggregates\t\tShould treat same as regular functions\n> constraints\t\tSee below\n> rules\t\t\tSee below\n> triggers\t\tSee below\n> NOTIFY conditions\tSee below\n>\n> Languages and access methods are not trivial to add to the system, so\n> there's not much risk of name conflicts, and no reason to make their name\n> scope less than global.\n>\n> The situation is a lot murkier for operators and functions. These should\n> probably be treated alike, since operators are just syntactic sugar for\n> functions. I think the basic argument for making them schema-local is\n> that different users might conceivably want to define conflicting\n> functions or operators of the same name. Against that, however, there\n> are a number of reasons for wanting to keep these objects database-wide.\n> First off there are syntactic problems. Do you really want to write\n> \t\tA schemaname.+ B\n> to qualify an ambiguous \"+\" operator? Looks way too much like a syntax\n> error to me. Allowing this would probably turn a lot of simple syntax\n> errors into things that get past the grammar and end up producing truly\n> confusing error messages. Qualified function names also pose some\n> problems, not so much with\n> \t\tschemaname.function(args)\n> which seems reasonable, but with the Berkeley-derived syntax that allows\n> \"foo.function\" to mean \"function(foo)\" --- there's no way to squeeze a\n> schema-name for the function into that. (And you'll recall from my note\n\nWhy not? What's wrong with either schema.foo.function (==>\nfunction(schema.foo)) or foo.schema.function (==> schema.function(foo))?\nTables and functions can't have the same names as schemas, so we will be\nable to notice the schema names in there. Oh, and I worked out how to get\nparse.y to be happy with x.y & x.y.z (schema.package.function) names. :-)\n\n> of the other day that we don't want to abandon this syntax entirely,\n> because people would like us to support \"sequencename.nextval\" for Oracle\n> compatibility.) Notice that we are not forced to make functions/operators\n> schema-local just because datatypes are, because overloading will save the\n> day. func(schema1.type1) and func(schema2.type1) are distinct functions\n> because the types are different, even if they live in the same function\n> namespace. Finally, SQL99 doesn't appear to think that operator and\n> function names are schema-local; though that may just be because it hasn't\n> got user-defined operators AFAICT.\n\nActually functions do have to be schema local. It's in the spec (don't\nhave exactly where with me).\n\n> I am leaning towards keeping functions/operators database-wide, but would\n> like to hear comments. Is there any real value in, eg, allowing different\n> users to define different \"+\" operators *on the same datatypes*?\n\nYes. It means that third-party developers can develop routines and then\noperators based on them without having to worry about conflicts. Obviously\nthese two different operators would have to be in different schemas. Also,\nit would mean that someone could ship replacement operators for built-in\noperators. Say adding a + operator which throws exceptions on overflow.\n:-)\n\n> Not sure about index opclasses. Given that datatype names are\n> schema-local, one can think of scenarios where two users define similar\n> datatypes and then try to use the same index opclass name for both.\n> But it seems pretty unlikely. I'd prefer to leave opclass names\n> database-wide for simplicity. Comments?\n\nMy vote would be to make them schema-specific. As Peter pointed out,\nschemas are how you own things, so put them in a schema so we can keep\ntrack of ownership.\n\nTake care,\n\nBill\n\n", "msg_date": "Tue, 22 Jan 2002 17:10:24 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane wrote:\n> \n> I'm particularly troubled by the idea of trying to apply this \"any\"\n> lookup concept to resolution of overloaded operators and functions.\n> Suppose I have a reference func(type1,type2) that I'm trying to resolve,\n> and I have an inexact match (one requiring coercion) in my own schema.\n> Do I look to the \"any\" schema to see if there are better matches?\n> If so, what happens if the \"any\" schema contains multiple possibilities\n> with identical signatures (presumably created by different users)? ISTM\n> this will positively guarantee a resolution failure, since there's no\n> way for the resolver to prefer one over another. Thus, by creating\n> a \"func(foo,bar)\" function --- quite legally --- JRandomLuser might\n> break other people's formerly working queries that use other functions\n> named func. Although it's possible for this to happen now, it'll be\n> a lot more surprising if JRandomLuser thinks that his functions live\n> in his own private schema namespace.\n>\n\nSo, in a nutshell, the price we pay for function overloading is the\ninability to have schema-specific functions. Right? Possibly why Oracle\ndoesn't allow function overloading? As a user, I'd much rather have\nschema-specific functions than only global. I'm not downplaying the\nvalue of function overloading, but if I had the choice (which I guess I\ncan't/won't), I'd choose schema-specific functions over function\noverloading...\n\nMike Mascari\nmascarm@mascari.com\n", "msg_date": "Tue, 22 Jan 2002 20:15:29 -0500", "msg_from": "Mike Mascari <mascarm@mascari.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane writes:\n\n> I really don't see what's wrong with building a namespace mechanism\n> that is orthogonal to ownership and then using that to implement what\n> SQL92 wants. I think this will be cleaner, simpler, and more flexible\n> than trying to equate ownership with namespace.\n\nOK, I can accept that. But then I want to get back at my original point,\nnamely that all database objects (except users and groups) should be in\nschemas. This is also cleaner, simpler, and more flexible. There is\nclearly demand for schema-local functions. So I think that designing this\nsystem from the premise that a schema-qualified operator call will look\nstrange is the wrong end to start at.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Tue, 22 Jan 2002 20:52:14 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n> Why not? What's wrong with either schema.foo.function (==>\n> function(schema.foo)) or foo.schema.function (==> schema.function(foo))?\n\nNeither is wrong in isolation, but how do you tell the difference?\nMore to the point, given input x.y.z, how do you tell which component\nis what?\n\n> Tables and functions can't have the same names as schemas,\n\nNews to me. Where is that written on stone tablets? Even if that's\nconsidered an acceptable limitation from a purely functional point of\nview, I don't like using it to disambiguate input. The error messages\nyou'll get from incorrect input to an implementation that depends on\nthat to disambiguate cases will not be very helpful.\n\n> Actually functions do have to be schema local. It's in the spec (don't\n> have exactly where with me).\n\n(A) I don't believe that; please cite chapter and verse; (B) even if\nSQL92 thinks that's okay, we can't do it that way because of\nbackwards-compatibility issues.\n\n> My vote would be to make them schema-specific. As Peter pointed out,\n> schemas are how you own things,\n\nSorry, but this line of argument is trying to assume the very point in\ndispute.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 00:07:57 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane writes:\n\n> > Actually functions do have to be schema local. It's in the spec (don't\n> > have exactly where with me).\n>\n> (A) I don't believe that; please cite chapter and verse;\n\nIn SQL99, chapter 4 verse 23 it says\n\n\"An SQL-invoked routine is an element of an SQL-schema and is called a\nschema-level routine.\"\n\n> (B) even if\n> SQL92 thinks that's okay, we can't do it that way because of\n> backwards-compatibility issues.\n\nI don't buy that. If all you're looking for is preserving\n\nfoo.bar <==> bar(foo)\n\nfor compatibility, then you can simply say that \"bar\" cannot be\nschema-qualified in the left form (so it needs to live in the current or\nthe default schema). We currently only have one default schema, so that's\nbackward compatible. I think this syntax is a mistake, so I don't feel\ncompelled to provide more than backwards compatibility.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Wed, 23 Jan 2002 01:11:21 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> OK, I can accept that. But then I want to get back at my original point,\n> namely that all database objects (except users and groups) should be in\n> schemas. This is also cleaner, simpler, and more flexible. There is\n> clearly demand for schema-local functions. So I think that designing this\n> system from the premise that a schema-qualified operator call will look\n> strange is the wrong end to start at.\n\nOkay, a fair point --- or you could have used my own argument against\nme: there's nothing wrong with designing a general mechanism and then\nchoosing not to expose all of the functionality. So let's assume that\nfunctions and operators live in namespaces, and that we have some kind\nof search path across multiple namespaces for use when an unqualified\nname is given.\n\nNow, how is that going to play with resolution of ambiguous calls?\n\nThe most reasonable semantics I can think of are to collect all the\npotential matches (matching op/func name) across all the searchable\nnamespaces, discarding only those that have exactly the same signature\nas one in a prior namespace. Thus, eg, plus(int4,int4) in an earlier\nnamespace would hide plus(int4,int4) in a later namespace in the search\npath, but it wouldn't hide plus(int8,int8). After we've collected all\nthe visible alternatives, do resolution based on argument types the same\nway as we do now.\n\nThe only alternative semantics that seem defensible at all are to stop\nat the first namespace that contains any matching-by-name op or func,\nand do resolution using only the candidates available in that namespace.\nThat strikes me as not a good idea; for example, a user who defines a\n\"+\" operator in his own schema for his own datatype would be quite\nunhappy to find it masking all the \"+\" operators in the system schema.\n\nI believe that this behavior would be fairly reasonable if our\nbackward-compatibility feature consists of a \"public\" namespace\nthat all users can write in. OTOH I think it would not play at all\nwell if we use Fernando's idea of an \"any\" wildcard in the search\npath. (1) Imagine the case where we have some users who are using\nthe backward-compatible behavior while others have set up private\nnamespaces. If Joe SmartGuy creates a \"+\" operator in his private\nnamespace, it'll be visible to people using the \"any\" wildcard and\npossibly cause resolution-ambiguity failures for them, even though\nJoe deliberately did what he should do to avoid that. (2) \"any\"\ncreates the problem of resolving multiple functions with identical\nsignatures in different namespaces, with no reasonable rule for\nmaking the choice.\n\nSo I'm still of the opinion that an \"any\" wildcard is too risky a\nsolution for our backwards-compatibility problem.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 10:31:25 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "\nOn Wed, 23 Jan 2002, Tom Lane wrote:\n\n> The only alternative semantics that seem defensible at all are to stop\n> at the first namespace that contains any matching-by-name op or func,\n> and do resolution using only the candidates available in that namespace.\n> That strikes me as not a good idea; for example, a user who defines a\n> \"+\" operator in his own schema for his own datatype would be quite\n> unhappy to find it masking all the \"+\" operators in the system schema.\n>\n> I believe that this behavior would be fairly reasonable if our\n> backward-compatibility feature consists of a \"public\" namespace\n> that all users can write in. OTOH I think it would not play at all\n> well if we use Fernando's idea of an \"any\" wildcard in the search\n> path. (1) Imagine the case where we have some users who are using\n> the backward-compatible behavior while others have set up private\n> namespaces. If Joe SmartGuy creates a \"+\" operator in his private\n> namespace, it'll be visible to people using the \"any\" wildcard and\n> possibly cause resolution-ambiguity failures for them, even though\n> Joe deliberately did what he should do to avoid that. (2) \"any\"\n> creates the problem of resolving multiple functions with identical\n> signatures in different namespaces, with no reasonable rule for\n> making the choice.\n\nWouldn't it make sense to prefer operators/functions earlier in the search\npath for resolving ambiguity. So if you had plus(int4, int4) in my\nschema and plus(int8, int8) in system, and they'd otherwise cause an\nambiguity failure for the query, use the plus(int4, int4) on mine. It\nseems not too far from having the search path shadow later exact matches.\n\n\n", "msg_date": "Wed, 23 Jan 2002 08:35:47 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:\n> Wouldn't it make sense to prefer operators/functions earlier in the search\n> path for resolving ambiguity. So if you had plus(int4, int4) in my\n> schema and plus(int8, int8) in system, and they'd otherwise cause an\n> ambiguity failure for the query, use the plus(int4, int4) on mine. It\n> seems not too far from having the search path shadow later exact matches.\n\nGiven the complexity of the resolution rules (cf.\nhttp://developer.postgresql.org/docs/postgres/typeconv.html),\nit's not clear that we can determine exactly which \"later\" entry ought\nto be blamed for causing a resolution failure. I'd be interested to\nhear Lockhart's opinion on this --- but my gut feeling is we don't\nwant to go there. The resolution rules are already complicated enough,\nand I think layering an additional mechanism like that onto them might\nmake the behavior totally unpredictable.\n\nAnother problem is that this would probably cause earlier namespace\nentries to be over-preferred. For example, suppose that the system\nnamespace has plus(int4,int4) and plus(int8,int8) and you choose to\ndefine plus(int4,int8) locally. I believe you'd suddenly find yours\nbeing used for *any* cross-datatype addition, including cases that\nhad nothing obvious to do with either int4 or int8 ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 11:46:58 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "\nOn Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:\n> > Wouldn't it make sense to prefer operators/functions earlier in the search\n> > path for resolving ambiguity. So if you had plus(int4, int4) in my\n> > schema and plus(int8, int8) in system, and they'd otherwise cause an\n> > ambiguity failure for the query, use the plus(int4, int4) on mine. It\n> > seems not too far from having the search path shadow later exact matches.\n>\n> Given the complexity of the resolution rules (cf.\n> http://developer.postgresql.org/docs/postgres/typeconv.html),\n> it's not clear that we can determine exactly which \"later\" entry ought\n> to be blamed for causing a resolution failure. I'd be interested to\n> hear Lockhart's opinion on this --- but my gut feeling is we don't\n> want to go there. The resolution rules are already complicated enough,\n> and I think layering an additional mechanism like that onto them might\n> make the behavior totally unpredictable.\n\n> Another problem is that this would probably cause earlier namespace\n> entries to be over-preferred. For example, suppose that the system\n> namespace has plus(int4,int4) and plus(int8,int8) and you choose to\n> define plus(int4,int8) locally. I believe you'd suddenly find yours\n> being used for *any* cross-datatype addition, including cases that\n> had nothing obvious to do with either int4 or int8 ...\n\nWell, what I'd been thinking of would have been similar to anywhere it\nsays \"If only one candidate matches\", becoming \"If the earliest search\npath entry with at least one candidate matching has only one\nmatching candidate ...\" But that would cause the plus(int4, int8) to get\nused in any cross-datatype case that could coerce and didn't have a\nstronger match (ie, one of the arguments exactly matching a plus argument\nper b or c) so that's probably not good enough.\n\n\n\n", "msg_date": "Wed, 23 Jan 2002 09:09:35 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Mon, 21 Jan 2002, Tom Lane wrote:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Remember that a schema is a named representation of ownership, so anything\n> > that can be owned must be in a schema. (Unless you want to invent a\n> > parallel universe for a different kind of ownership, which would be\n> > incredibly confusing.)\n>\n> I don't buy that premise. It's true that SQL92 equates ownership of a\n> schema with ownership of the objects therein, but AFAICS we have no hope\n> of being forward-compatible with existing database setups (wherein there\n> can be multiple tables of different ownership all in a single namespace)\n> if we don't allow varying ownership within a schema. I think we can\n> arrange things so that we are upward compatible with both SQL92 and\n> the old way. Haven't worked out details yet though.\n\nYes we most certianly can! :-)\n\nOne of the things schemas have to support is essentially a PATH specifier.\nSo all we need to do is have all of the schemas created in a new DB have\npath specifiers pulling in all of the other schemas. Thus we can make a\nschema-savy system act as if it has only one namespace.\n\nBack when Zembu was paying me to work on this, I envisioned a script or\ntool you'd feed a DB dump, and it would do the schema fixup, including\nadding PATH directives to all schemas, so they all see everything.\n\nSince you have to pg_dump when updating, all this adds is running one tool\nduring an upgrade. And then existing apps would work. :-)\n\nTake care,\n\nBill\n\n\n", "msg_date": "Wed, 23 Jan 2002 11:34:23 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n> One of the things schemas have to support is essentially a PATH specifier.\n\nYes, but...\n\n> So all we need to do is have all of the schemas created in a new DB have\n> path specifiers pulling in all of the other schemas. Thus we can make a\n> schema-savy system act as if it has only one namespace.\n\nWhen you create a new user, do all those path specifiers for the\nexisting users magically update themselves? Seems like maintenance\nwould be a pain.\n\nFernando's \"any\" idea is probably a cleaner way to handle it if we\nwanted to do things like that. But I still think it'll be safer and\nmore controllable if we provide a \"public\" namespace instead; see\nfollowup discussions.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 14:57:14 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > Why not? What's wrong with either schema.foo.function (==>\n> > function(schema.foo)) or foo.schema.function (==> schema.function(foo))?\n>\n> Neither is wrong in isolation, but how do you tell the difference?\n> More to the point, given input x.y.z, how do you tell which component\n> is what?\n\nSee below.\n\n> > Tables and functions can't have the same names as schemas,\n>\n> News to me. Where is that written on stone tablets? Even if that's\n\nI'm still trying to find the quote, but I found it a few months ago. I'm\nlooking in SQL99, which is 1100+ pages for section 2. :-)\n\n> considered an acceptable limitation from a purely functional point of\n> view, I don't like using it to disambiguate input. The error messages\n> you'll get from incorrect input to an implementation that depends on\n> that to disambiguate cases will not be very helpful.\n\n?? Depends on how we do it. As I see it, we have four cases. In the\nx.y.z.p.q, we have:\n\n1) No table name, but a function name. It's a function call.\n\n2) A table name, but no function name. It's a table reference.\n\n3) Both a table name & function name, and the function is first. I think\nthis case is an error (I don't think we support function.foo ==\nfunction(foo))\n\n4) Both a table name & function name, and the table is first. This is\nfoo.function.\n\nOk, there is a fifth case, no function nor table names, which is an error.\n\n> > Actually functions do have to be schema local. It's in the spec (don't\n> > have exactly where with me).\n>\n> (A) I don't believe that; please cite chapter and verse; (B) even if\n\nPeter got to that one first.\n\n> SQL92 thinks that's okay, we can't do it that way because of\n> backwards-compatibility issues.\n\nWhy do backwards-compatability issues keep us from doing it?\n\nYes, I understand we have apps now with different users owning things\n(tables, functions) which they all can access, just like they were in one\nunified name space. With real schemas, they are in differen namespaces.\nBut as long as the routines, tables, triggers & such in each schema can\nfind things in the other schemas as if they were in one namespace, where\nis the problem? We just have the app gain PATH directives to path in all\nthe other schemas.\n\nThe app runs, even though there are different schemas involved. Where is\nthe problem?\n\n> > My vote would be to make them schema-specific. As Peter pointed out,\n> > schemas are how you own things,\n>\n> Sorry, but this line of argument is trying to assume the very point in\n> dispute.\n\nWhen you started this thread, you said you were thinking about\n\"implementing SQL schemas.\" Are these \"SQL schemas\" going to follow the\nspec or not? SQL'99 is rather clear that ownership happens at the schema\nlevel. Peter spent quite a lot of time last October pounding that into my\nhead, and after I looked at the spec, I found he was 100% correct.\n\nIf these schemas are to follow the standards, ownership happens at the\nschema level. If ownership happens elsewhere, whatever we're doing is not\nfollowing the standard. Unfortunatly it's that cut & dried. So why should\nwe call them \"SQL schemas\" if we aren't following the SQL spec?\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 12:41:48 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n> On Wed, 23 Jan 2002, Tom Lane wrote:\n>> Bill Studenmund <wrstuden@netbsd.org> writes:\n> Why not? What's wrong with either schema.foo.function (==>\n> function(schema.foo)) or foo.schema.function (==> schema.function(foo))?\n>> \n>> Neither is wrong in isolation, but how do you tell the difference?\n>> More to the point, given input x.y.z, how do you tell which component\n>> is what?\n\n> ?? Depends on how we do it. As I see it, we have four cases. In the\n> x.y.z.p.q, we have:\n\n> 1) No table name, but a function name. It's a function call.\n\n> 2) A table name, but no function name. It's a table reference.\n\nNo, you're missing the point. Which of x,y,z,p,q is the name we\nare going to test to see if it is a table or function? And which\nof these names is a schema name --- if you don't even know that,\nit's hard to argue that checking to see if some name is known is\na well-defined operation.\n\n> When you started this thread, you said you were thinking about\n> \"implementing SQL schemas.\" Are these \"SQL schemas\" going to follow the\n> spec or not?\n\nIf you use only the SQL-defined operations, after setting up any\nconfiguration variables we may invent in the way we will document as\nnecessary for SQL-compatible behavior, then you will get SQL-compatible\nbehavior. I do not think that precludes having an underlying\nimplementation that sees the world differently than SQL does and\nsupports non-SQL behaviors too. (For that matter, I'm sure there is\ntext somewhere in the spec that points out that the spec intends to\ndefine user-visible behavior, not implementation.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 15:57:16 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > One of the things schemas have to support is essentially a PATH specifier.\n>\n> Yes, but...\n>\n> > So all we need to do is have all of the schemas created in a new DB have\n> > path specifiers pulling in all of the other schemas. Thus we can make a\n> > schema-savy system act as if it has only one namespace.\n>\n> When you create a new user, do all those path specifiers for the\n> existing users magically update themselves? Seems like maintenance\n> would be a pain.\n\nNo, they don't. But why should they? Why should they need to?\n\nEither we're migrating an existing app, for which adding PATH directives\nwith a helper program before restore works, or we're making a new app. If\nyou're designing an app for a schema-savy system, you need to think about\nschemas.\n\n> Fernando's \"any\" idea is probably a cleaner way to handle it if we\n> wanted to do things like that. But I still think it'll be safer and\n> more controllable if we provide a \"public\" namespace instead; see\n> followup discussions.\n\nWhy? Why is it needed? What would public let you do that PATH and ACLs\nwouldn't?\n\nThe only reason I can see it's needed is so that people can make new apps\nfor a schema-savy PostgreSQL while ignoring the schemas. That strikes me\nas bad. I agree that schemas shouldn't interfeer with things, but to let\nfolks just blow them off seems equally bad.\n\nAlso, it wouldn't be SQL'99 schemas. It can still be done, but it's\nsolving a problem that the other SQL'99 databases don't seem to have.\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 12:58:33 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > On Wed, 23 Jan 2002, Tom Lane wrote:\n> >> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > Why not? What's wrong with either schema.foo.function (==>\n> > function(schema.foo)) or foo.schema.function (==> schema.function(foo))?\n> >>\n> >> Neither is wrong in isolation, but how do you tell the difference?\n> >> More to the point, given input x.y.z, how do you tell which component\n> >> is what?\n>\n> > ?? Depends on how we do it. As I see it, we have four cases. In the\n> > x.y.z.p.q, we have:\n>\n> > 1) No table name, but a function name. It's a function call.\n>\n> > 2) A table name, but no function name. It's a table reference.\n>\n> No, you're missing the point. Which of x,y,z,p,q is the name we\n> are going to test to see if it is a table or function? And which\n> of these names is a schema name --- if you don't even know that,\n> it's hard to argue that checking to see if some name is known is\n> a well-defined operation.\n\nNo, I'm not. :-) You test enough of them to figure out what case you have.\nYes, it might be a bit of work, but it's doable.\n\nActually, it's not that hard. In foo.funcname, do we support anything\nAFTER the funcname? I don't think so. If there were a parenthesis, then we\nhave a function call. If it's an operator or something else, we have\neither a table reference, or a foo.funcname function call. So all we have\nto do is see if p.q (last two elements) is a schema.function, or of q is a\nfunction pathed into our current schema. If yes, we have foo.function. If\nnot, then we have some table reference.\n\n> > When you started this thread, you said you were thinking about\n> > \"implementing SQL schemas.\" Are these \"SQL schemas\" going to follow the\n> > spec or not?\n>\n> If you use only the SQL-defined operations, after setting up any\n> configuration variables we may invent in the way we will document as\n> necessary for SQL-compatible behavior, then you will get SQL-compatible\n> behavior. I do not think that precludes having an underlying\n> implementation that sees the world differently than SQL does and\n> supports non-SQL behaviors too. (For that matter, I'm sure there is\n> text somewhere in the spec that points out that the spec intends to\n> define user-visible behavior, not implementation.)\n\nWhile I agree in principle, that quote is from talking about ownership. I\ndon't see how we can gloss over ownership. :-)\n\nAlso, why support two different behaviors? That means 1) there's code\nbloat since the backend has to support both. 2) Support is harder as major\nDB behaviors will change depending on these settings. 3) I still haven't\nseen anything this variant behavior would do that can't be done with\nschema paths and access control lists, other than it would let people keep\nthinking about things as they do now.\n\nThat latter reason doesn't strike me as a good one. Yes, it will take some\ngetting used to to wrap minds around schemas, but once done, I don't think\nit will be that hard. Yes, the documentation will need work, and the\ntutorial will need changing (And Bruce will need to release a new edition\nof his book :-) , but once that's done, I don't think working with real\nschemas will be that hard. So why not just do things right from the\nbegining?\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 13:15:33 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "\n\n\n\n\nTom Lane wrote:\n\nStephan Szabo <sszabo@megazone23.bigpanda.com> writes:\n\nWouldn't it make sense to prefer operators/functions earlier in the searchpath for resolving ambiguity. So if you had plus(int4, int4) in myschema and plus(int8, int8) in system, and they'd otherwise cause anambiguity failure for the query, use the plus(int4, int4) on mine. Itseems not too far from having the search path shadow later exact matches.\n\nGiven the complexity of the resolution rules (cf.http://developer.postgresql.org/docs/postgres/typeconv.html),it's not clear that we can determine exactly which \"later\" entry oughtto be blamed for causing a resolution failure. I'd be interested tohear Lockhart's opinion on this --- but my gut feeling is we don'twant to go there. The resolution rules are already complicated enough,and I think layering an additional mechanism like that onto them mightmake the behavior totally unpredictable.Another problem is that this would probably cause earlier namespaceentries to be over-preferred. For example, suppose that the systemnamespace has plus(int4,int4) and plus(int8,int8) and you choose todefine plus(int4,int8) locally. I believe you'd suddenly find yoursbeing used for *any* cross-datatype addit\nion, including cases thathad nothing obvious to do with either int4 or int8 ...\n\nThis is a good example.  The other option is to use  name, arg1, arg2...\nas a hunt path for function call resolution.  This would depend on when datatype\npromotion is occuring (i.e. int4 to int8, int8 to int4, etc... )\n\nThen you could just be really hard and say that only exact and trivial conversion\nmatches in user space will be used .   \n\nThere is no easy answer for this, but whatever rules are initiated need to\nbe something that someone can step through to solve w/o a machine.\n\nI do think you will ultimately need a search utility that provides 'which'\nfunctionality.   (Given my namespace, which function in what namespace is\ngoing to be called.)\n\n\t\t\tregards, tom lane---------------------------(end of broadcast)---------------------------TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n\n\n\n\n\n", "msg_date": "Wed, 23 Jan 2002 15:16:20 -0600", "msg_from": "Thomas Swan <tswan-lst@ics.olemiss.edu>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n> Either we're migrating an existing app, for which adding PATH directives\n> with a helper program before restore works, or we're making a new app.\n\nSorry, I don't accept that either-or proposition. People will expect to\nbe able to continue to use 7.3 as they have used Postgres in the past.\nAmong other things that will mean being able to add new users to an\nexisting installation. If we say \"you can't do much of anything in 7.3\nuntil you upgrade all your applications to schema-awareness\", then we're\ngoing to have lots of unhappy users.\n\n>> Fernando's \"any\" idea is probably a cleaner way to handle it if we\n>> wanted to do things like that. But I still think it'll be safer and\n>> more controllable if we provide a \"public\" namespace instead; see\n>> followup discussions.\n\n> Why? Why is it needed? What would public let you do that PATH and ACLs\n> wouldn't?\n\nPublic gives you a place to put the ACL determining what people can do\nwith publicly-visible names. See, eg, comments from Joe Conway.\nWithout a specific public namespace to put ACLs on, a dbadmin has very\nlittle control over interuser interactions. Please note that the\nfacility we are talking about offering here is not available in existing\nPostgres nor in SQL92, but that doesn't make it evil or unreasonable.\n\nBasically my point here is that the SQL spec is not the be-all and\nend-all of database development. (Have you read C. J. Date's commentary\non it, for example?) We have a proven useful concept of object ownership\nin existing Postgres, and I see no need to remove that facility in\npursuit of slavish adherence to a specification. If it were a project\ngoal to rip out everything in Postgres that is not mentioned in the\nSQL spec, we could have a much smaller distribution ... with lots fewer\nusers.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 16:26:33 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n>> No, you're missing the point. Which of x,y,z,p,q is the name we\n>> are going to test to see if it is a table or function?\n\n> No, I'm not. :-) You test enough of them to figure out what case you have.\n\nThere could be multiple valid interpretations. When you can't even\nfigure out where to start, it's too squishy for me. Code complexity\nisn't really the issue here, it's whether a user can understand what's\ngoing on.\n\n> Actually, it's not that hard. In foo.funcname, do we support anything\n> AFTER the funcname? I don't think so. If there were a parenthesis, then we\n> have a function call. If it's an operator or something else, we have\n> either a table reference, or a foo.funcname function call. So all we have\n> to do is see if p.q (last two elements) is a schema.function, or of q is a\n> function pathed into our current schema. If yes, we have foo.function. If\n> not, then we have some table reference.\n\nNow wait a sec. What you started out with was the claim\n\n> Why not? What's wrong with either schema.foo.function (==>\n> function(schema.foo)) or foo.schema.function (==> schema.function(foo))?\n\nThe issue was not figuring out whether the last component was a function\nname or not, it was to determine what the other components were, and in\nparticular whether the function name should be presumed to be qualified\n(by the next-to-last component taken as a schema name) or unqualified.\nThat in turns changes your assumptions about which of the components\nfurther left are table names, schema names, or catalog names.\n\n> ... I don't think working with real\n> schemas will be that hard. So why not just do things right from the\n> begining?\n\nIf I thought that SQL's model of ownership == namespace was \"right\",\nthen we probably wouldn't be having this argument. I think the spec\npretty much sucks in this particular department, and I don't see why\nwe should restrict our implementation to support only the spec's\nbraindead world view. Especially not when it makes the implementation\nharder, not easier, because we end up needing to add in weird frammishes\nto have some semblance of backwards-compatibility too.\n\nPlease give me some good reasons (not \"the spec says so\") why it's\na good idea to treat ownership of a namespace as equivalent to ownership\nof the objects in it, and why decoupling the concepts at the\nimplementation level isn't a reasonable thing to do.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 16:46:01 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> >> No, you're missing the point. Which of x,y,z,p,q is the name we\n> >> are going to test to see if it is a table or function?\n>\n> > No, I'm not. :-) You test enough of them to figure out what case you have.\n>\n> There could be multiple valid interpretations. When you can't even\n> figure out where to start, it's too squishy for me. Code complexity\n> isn't really the issue here, it's whether a user can understand what's\n> going on.\n>\n> > Actually, it's not that hard. In foo.funcname, do we support anything\n> > AFTER the funcname? I don't think so. If there were a parenthesis, then we\n> > have a function call. If it's an operator or something else, we have\n> > either a table reference, or a foo.funcname function call. So all we have\n> > to do is see if p.q (last two elements) is a schema.function, or of q is a\n> > function pathed into our current schema. If yes, we have foo.function. If\n> > not, then we have some table reference.\n>\n> Now wait a sec. What you started out with was the claim\n>\n> > Why not? What's wrong with either schema.foo.function (==>\n> > function(schema.foo)) or foo.schema.function (==> schema.function(foo))?\n>\n> The issue was not figuring out whether the last component was a function\n> name or not, it was to determine what the other components were, and in\n> particular whether the function name should be presumed to be qualified\n> (by the next-to-last component taken as a schema name) or unqualified.\n> That in turns changes your assumptions about which of the components\n> further left are table names, schema names, or catalog names.\n\nThen you choose. Choose a search order, and document it. If you are going\nto go back into a corner full of so much ambiguity, then document your way\nout.\n\nYou can make it easier restricting say catalogs and schemas to have\ndifferent names, or schemas, tables, and functions can't have the same\nname. For this, I'd suggest following Oracle's example. I don't think you\ncan go too wrong using Oracle's behavior to break ties & ambiguities.\n\n> > ... I don't think working with real\n> > schemas will be that hard. So why not just do things right from the\n> > begining?\n>\n> If I thought that SQL's model of ownership == namespace was \"right\",\n> then we probably wouldn't be having this argument. I think the spec\n> pretty much sucks in this particular department, and I don't see why\n> we should restrict our implementation to support only the spec's\n> braindead world view. Especially not when it makes the implementation\n> harder, not easier, because we end up needing to add in weird frammishes\n> to have some semblance of backwards-compatibility too.\n\n?? What weird fammishes from ownership?\n\nIt actually makes things (slightly) simpler. All of the owner fields\ndisapear from most system tables, because the owner is implied by the\ncontaining schema.\n\nAlso, what is braindead about the spec? Yes, it's not what I would choose,\nand it's different from what PG does now. But it's just that, different.\nGiven all of the ACL abilities (if the superuser wants user X to be able\nto create objects in table Y of schema Z, s/he makes it so), why does it\nmatter who owns the object?\n\n> Please give me some good reasons (not \"the spec says so\") why it's\n> a good idea to treat ownership of a namespace as equivalent to ownership\n> of the objects in it, and why decoupling the concepts at the\n> implementation level isn't a reasonable thing to do.\n\nCan you really give a good reason other than, \"I don't like it?\"\n\nAbsent the existance of specs, it's a matter of choice. Having all of the\nownership happen at the schema level or at the individual item level, it's\nsix of one, half-dozen of the other.\n\nBut there is a spec. A spec that, as far as I can tell, all other\nschema-claming DBs follow. So why shouldn't we follow it? Yes, you don't\nlike it. But is this really supposed to be about personal desires, or\nabout the resulting DB?\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 14:20:22 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > OK, I can accept that. But then I want to get back at my original point,\n> > namely that all database objects (except users and groups) should be in\n> > schemas. This is also cleaner, simpler, and more flexible. There is\n> > clearly demand for schema-local functions. So I think that designing this\n> > system from the premise that a schema-qualified operator call will look\n> > strange is the wrong end to start at.\n>\n> Okay, a fair point --- or you could have used my own argument against\n> me: there's nothing wrong with designing a general mechanism and then\n> choosing not to expose all of the functionality. So let's assume that\n> functions and operators live in namespaces, and that we have some kind\n> of search path across multiple namespaces for use when an unqualified\n> name is given.\n>\n> Now, how is that going to play with resolution of ambiguous calls?\n>\n> The most reasonable semantics I can think of are to collect all the\n> potential matches (matching op/func name) across all the searchable\n> namespaces, discarding only those that have exactly the same signature\n> as one in a prior namespace. Thus, eg, plus(int4,int4) in an earlier\n> namespace would hide plus(int4,int4) in a later namespace in the search\n> path, but it wouldn't hide plus(int8,int8). After we've collected all\n> the visible alternatives, do resolution based on argument types the same\n> way as we do now.\n>\n> The only alternative semantics that seem defensible at all are to stop\n> at the first namespace that contains any matching-by-name op or func,\n> and do resolution using only the candidates available in that namespace.\n> That strikes me as not a good idea; for example, a user who defines a\n> \"+\" operator in his own schema for his own datatype would be quite\n> unhappy to find it masking all the \"+\" operators in the system schema.\n\nThere is a third behavior which is almost the first one. And it's the one\nI use for function matching in the package diffs I made oh so long ago.\n:-)\n\nYou look in the first namespace for all candidates. If one matches, you\nuse it. If two or more match, you throw the error we throw now. If none\nmatch, you move on to the next namespace and repeat the search there.\n\nIt's what the code does now. It's not that hard. It's just essentially\nturning part of the function lookup into a for loop over the namespaces.\n:-)\n\nIt's easier than gathering everything as you only gather one namespace's\nworth of matches at once.\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 14:40:12 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > Either we're migrating an existing app, for which adding PATH directives\n> > with a helper program before restore works, or we're making a new app.\n>\n> Sorry, I don't accept that either-or proposition. People will expect to\n> be able to continue to use 7.3 as they have used Postgres in the past.\n> Among other things that will mean being able to add new users to an\n> existing installation. If we say \"you can't do much of anything in 7.3\n> until you upgrade all your applications to schema-awareness\", then we're\n> going to have lots of unhappy users.\n\n\"upgrad[ing] .. to schema-awareness\" is adding the PATHs to the schema\ncreates. You then have a unified namespace (to the apps perspective). The\nmigration tool I mentioned should be able to do this (and will need to be\npresent).\n\nAs PostgreSQL changes, people are going to have to learn to deal with new\nfeatures. I really don't think that dealing with schemas is going to be\nthat hard. Also, at Zembu, all of the apps we looked at had maybe two or\nthree schemas. These are big apps. If they can live with just a few\nschemas, why do we need so many that maintainance is a pain?\n\nAlso, what is this new user going to do *IN THE EXISTING APP*? Either the\nuser is going to change existing tables, for which adding the user to the\nACLs (or better yet to a group) will work, or the new user is going to own\nnew tables. If the new user is owning new tables, then you have to change\nthe app to refer to them. If the upgrade to 7.3 included a, \"quick\ntutorial about the new schema support,\" the author should be able to adapt\neasily.\n\n> >> Fernando's \"any\" idea is probably a cleaner way to handle it if we\n> >> wanted to do things like that. But I still think it'll be safer and\n> >> more controllable if we provide a \"public\" namespace instead; see\n> >> followup discussions.\n>\n> > Why? Why is it needed? What would public let you do that PATH and ACLs\n> > wouldn't?\n>\n> Public gives you a place to put the ACL determining what people can do\n> with publicly-visible names. See, eg, comments from Joe Conway.\n> Without a specific public namespace to put ACLs on, a dbadmin has very\n> little control over interuser interactions. Please note that the\n> facility we are talking about offering here is not available in existing\n> Postgres nor in SQL92, but that doesn't make it evil or unreasonable.\n\nI think the existance of a DEFAULT schema (which is a real schema, not a\nspecial namespace) would also aleviate the above concerns.\n\n> Basically my point here is that the SQL spec is not the be-all and\n> end-all of database development. (Have you read C. J. Date's commentary\n> on it, for example?) We have a proven useful concept of object ownership\n> in existing Postgres, and I see no need to remove that facility in\n> pursuit of slavish adherence to a specification. If it were a project\n> goal to rip out everything in Postgres that is not mentioned in the\n> SQL spec, we could have a much smaller distribution ... with lots fewer\n> users.\n\nI haven't read the comentary, do you have a URL?\n\nI agree that we should not limit ourselves to SQL'99. But doing more than\nSQL'99 is different from wanting to support SQL schemas while using a\ndifferent ownership model, when one of the main things of SQL schemas as I\nunderstand it is the ownership model.\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 14:55:29 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Bill Studenmund wrote:\n\n> On Wed, 23 Jan 2002, Tom Lane wrote:\n>\n> There is a third behavior which is almost the first one. And it's the one\n> I use for function matching in the package diffs I made oh so long ago.\n> :-)\n>\n> You look in the first namespace for all candidates. If one matches, you\n> use it. If two or more match, you throw the error we throw now. If none\n> match, you move on to the next namespace and repeat the search there.\n\nThat's even more strongly towards earlier namespaces than my suggestion.\nHow do you define match? If you allow coercions, then the\nplus(int8, int8) in my schema would be prefered over better (possibly\nexact) matches in the system schema which may not be what you want.\n\n\n\n", "msg_date": "Wed, 23 Jan 2002 15:30:07 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Stephan Szabo wrote:\n\n> On Wed, 23 Jan 2002, Bill Studenmund wrote:\n>\n> > On Wed, 23 Jan 2002, Tom Lane wrote:\n> >\n> > There is a third behavior which is almost the first one. And it's the one\n> > I use for function matching in the package diffs I made oh so long ago.\n> > :-)\n> >\n> > You look in the first namespace for all candidates. If one matches, you\n> > use it. If two or more match, you throw the error we throw now. If none\n> > match, you move on to the next namespace and repeat the search there.\n>\n> That's even more strongly towards earlier namespaces than my suggestion.\n> How do you define match? If you allow coercions, then the\n> plus(int8, int8) in my schema would be prefered over better (possibly\n> exact) matches in the system schema which may not be what you want.\n\nTrue. But:\n\n1) How often are you going to make routines with names that duplicate\nthose in the system schema, when you don't want them to be used?\n\n2) you can always explicitly refer to the system schema, so you can get\nthe routine you want if it's not the one you'll get by coercion.\n\n3) We tested other (commercial) databases, and they have this behavior, so\nit seems a reasonable thing to do.\n\n4) It's simple and easy to understand.\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 15:47:55 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Bill Studenmund wrote:\n\n> On Wed, 23 Jan 2002, Stephan Szabo wrote:\n>\n> > On Wed, 23 Jan 2002, Bill Studenmund wrote:\n> >\n> > > On Wed, 23 Jan 2002, Tom Lane wrote:\n> > >\n> > > There is a third behavior which is almost the first one. And it's the one\n> > > I use for function matching in the package diffs I made oh so long ago.\n> > > :-)\n> > >\n> > > You look in the first namespace for all candidates. If one matches, you\n> > > use it. If two or more match, you throw the error we throw now. If none\n> > > match, you move on to the next namespace and repeat the search there.\n> >\n> > That's even more strongly towards earlier namespaces than my suggestion.\n> > How do you define match? If you allow coercions, then the\n> > plus(int8, int8) in my schema would be prefered over better (possibly\n> > exact) matches in the system schema which may not be what you want.\n>\n> True. But:\n>\n> 1) How often are you going to make routines with names that duplicate\n> those in the system schema, when you don't want them to be used?\n\nSure, you want them used when the arguments match, but what about when\nthey don't exactly?\nIf the system schema has foo(integer) and in my schema I make a new type\nand then make a type(integer) and foo(type), when I call foo(1), do I\nreally mean do a coersion to my type and call foo(type)?\n\n\n", "msg_date": "Wed, 23 Jan 2002 16:07:07 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Stephan Szabo wrote:\n\n> On Wed, 23 Jan 2002, Bill Studenmund wrote:\n>\n> > True. But:\n> >\n> > 1) How often are you going to make routines with names that duplicate\n> > those in the system schema, when you don't want them to be used?\n>\n> Sure, you want them used when the arguments match, but what about when\n> they don't exactly?\n> If the system schema has foo(integer) and in my schema I make a new type\n> and then make a type(integer) and foo(type), when I call foo(1), do I\n> really mean do a coersion to my type and call foo(type)?\n\nYes, you did. The documentation said that that would happen, so since you\nmade the call ambiguous, you wanted the coercion to happen. Or at least\nyou weren't concerned that it might.\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 16:18:18 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Bill Studenmund wrote:\n\n> On Wed, 23 Jan 2002, Stephan Szabo wrote:\n>\n> > On Wed, 23 Jan 2002, Bill Studenmund wrote:\n> >\n> > > True. But:\n> > >\n> > > 1) How often are you going to make routines with names that duplicate\n> > > those in the system schema, when you don't want them to be used?\n> >\n> > Sure, you want them used when the arguments match, but what about when\n> > they don't exactly?\n> > If the system schema has foo(integer) and in my schema I make a new type\n> > and then make a type(integer) and foo(type), when I call foo(1), do I\n> > really mean do a coersion to my type and call foo(type)?\n>\n> Yes, you did. The documentation said that that would happen, so since you\n\nIt doesn't currently say anything of the sort. If we made the above\nbehavior the standard, it would, but that's sort of circular. ;) Unless\nI'm misreading the page Tom sent me to earlier, it seems to say it\nprefers matches with exact types over coercions which would no longer be\ntrue.\n\n> made the call ambiguous, you wanted the coercion to happen. Or at least\n> you weren't concerned that it might.\n\nI still disagree. If I make a complex number type in my schema,\nI don't really intend integer+integer to convert to complex and give me a\ncomplex answer even if I want to be able to cast integers into complex.\nAFAIK there's no way to specify that I want to make the function\ncomplex(integer) such that I can do CAST(1 as complex) but not as an\nimplicit cast.\n\n", "msg_date": "Wed, 23 Jan 2002 16:34:32 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Stephan Szabo wrote:\n\n> On Wed, 23 Jan 2002, Bill Studenmund wrote:\n>\n> > On Wed, 23 Jan 2002, Stephan Szabo wrote:\n> >\n> > Yes, you did. The documentation said that that would happen, so since you\n>\n> It doesn't currently say anything of the sort. If we made the above\n> behavior the standard, it would, but that's sort of circular. ;) Unless\n> I'm misreading the page Tom sent me to earlier, it seems to say it\n> prefers matches with exact types over coercions which would no longer be\n> true.\n\nThe documentation says nothing about schemas at all now, so obviously it\nhas to change. :-)\n\n> > made the call ambiguous, you wanted the coercion to happen. Or at least\n> > you weren't concerned that it might.\n>\n> I still disagree. If I make a complex number type in my schema,\n> I don't really intend integer+integer to convert to complex and give me a\n> complex answer even if I want to be able to cast integers into complex.\n> AFAIK there's no way to specify that I want to make the function\n> complex(integer) such that I can do CAST(1 as complex) but not as an\n> implicit cast.\n\nNote: I've been talking about functions, and you're talking about\noperators. While operators are syntactic sugar for functions, one big\ndifference is that you can't specify explicit schemas for operators (nor\ndo I think you should be able to). I think exact matches for operators\nanywhere in the path would be better than local coercable ones.\n\nDoes SQL'99 say anything about this?\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 16:47:48 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Bill Studenmund wrote:\n\nWhat I was getting at was that Tom's behavior (or even mine) is more\nsimilar to the currently described behavior than the suggested one.\n\n> > > made the call ambiguous, you wanted the coercion to happen. Or at least\n> > > you weren't concerned that it might.\n> >\n> > I still disagree. If I make a complex number type in my schema,\n> > I don't really intend integer+integer to convert to complex and give me a\n> > complex answer even if I want to be able to cast integers into complex.\n> > AFAIK there's no way to specify that I want to make the function\n> > complex(integer) such that I can do CAST(1 as complex) but not as an\n> > implicit cast.\n>\n> Note: I've been talking about functions, and you're talking about\n> operators. While operators are syntactic sugar for functions, one big\n> difference is that you can't specify explicit schemas for operators (nor\n> do I think you should be able to). I think exact matches for operators\n> anywhere in the path would be better than local coercable ones.\n\nI'd say the same thing for a random math function as well. For example\nif there was a square(int) that returned $1*$1 and I made a square for my\ncomplex type, I'd still expect that square(5) is an integer rather than a\ncomplex using the square(complex). For example, I'd expect square(5) to\nbe a valid length argument to substr.\n\n> Does SQL'99 say anything about this?\nThat I don't know about (don't have a draft around to look at). I'm not\nsure that it'd have these problems though unless it's got the same sort of\ncoercion system.\n\n", "msg_date": "Wed, 23 Jan 2002 17:22:26 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund writes:\n\n> Does SQL'99 say anything about this?\n\nYes, though, as usual, you have to twist your brain a little to understand\nit. My understanding is that for a function call of the form \"foo(a, b)\"\nit goes like this:\n\n1. Find all functions named \"foo\" in the current database. This is the\nset of \"possibly candidate routines\".\n\n2. Drop all routines that you do not have EXECUTE privilege for. This is\nthe set of \"executable routines\".\n\n3. Drop all routines that do not have compatible parameter lists. This is\nthe set of \"invocable routines\".\n\n4. Drop all routines whose schema is not in the path. This is the set of\n\"candidate routines\".\n\n5. If you have more than one routine left, eliminate some routines\naccording to type precedence rules. (We do some form of this, SQL99\nspecifies something different.) This yields the set of \"candidate subject\nroutines\".\n\n6. Choose the routine whose schema is earliest in the path as the \"subject\nroutine\".\n\nExecute the subject routine. Phew!\n\n\nThis doesn't look glaringly wrong to me, so maybe you want to consider it.\nPlease note step 2.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Thu, 24 Jan 2002 00:28:16 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Stephan Szabo wrote:\n\n> On Wed, 23 Jan 2002, Bill Studenmund wrote:\n>\n> What I was getting at was that Tom's behavior (or even mine) is more\n> similar to the currently described behavior than the suggested one.\n\nI understand. As part of developing the package changes, though, I found\nthat Oracle used the method I described for finding routines in packages.\n\n From Peter's description, it sounds like Oracle's not following the spec.\n\n> I'd say the same thing for a random math function as well. For example\n> if there was a square(int) that returned $1*$1 and I made a square for my\n> complex type, I'd still expect that square(5) is an integer rather than a\n> complex using the square(complex). For example, I'd expect square(5) to\n> be a valid length argument to substr.\n\nYeah, that makes sense.\n\n> > Does SQL'99 say anything about this?\n> That I don't know about (don't have a draft around to look at). I'm not\n\nDo you want pdfs?\n\n> sure that it'd have these problems though unless it's got the same sort of\n> coercion system.\n\nI don't think it has the same sort of coercion, but it has some, I'd\nexpect (as all of the DBs I know of have some sort of coercion :-)\n\nTake care,\n\nBill\n\n", "msg_date": "Thu, 24 Jan 2002 11:47:07 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Thu, 24 Jan 2002, Peter Eisentraut wrote:\n\n> Bill Studenmund writes:\n>\n> > Does SQL'99 say anything about this?\n>\n> Yes, though, as usual, you have to twist your brain a little to understand\n> it.\n\nIndeed. I find the spec makes the most sense after you understand it. ;-)\n\n> My understanding is that for a function call of the form \"foo(a, b)\"\n> it goes like this:\n>\n> 1. Find all functions named \"foo\" in the current database. This is the\n> set of \"possibly candidate routines\".\n>\n> 2. Drop all routines that you do not have EXECUTE privilege for. This is\n> the set of \"executable routines\".\n>\n> 3. Drop all routines that do not have compatible parameter lists. This is\n> the set of \"invocable routines\".\n>\n> 4. Drop all routines whose schema is not in the path. This is the set of\n> \"candidate routines\".\n>\n> 5. If you have more than one routine left, eliminate some routines\n> according to type precedence rules. (We do some form of this, SQL99\n> specifies something different.) This yields the set of \"candidate subject\n> routines\".\n>\n> 6. Choose the routine whose schema is earliest in the path as the \"subject\n> routine\".\n>\n> Execute the subject routine. Phew!\n\nWow. Thanks for diging this out.\n\n> This doesn't look glaringly wrong to me, so maybe you want to consider it.\n> Please note step 2.\n\nIt looks fine, and is probably what we should do. Well, I'd do things in a\ndifferent order (look only in in-path schemas first for instance), but\nthat's just trying to optimize the query. :-)\n\nHow different are the type coercion rules?\n\nTake care,\n\nBill\n\n", "msg_date": "Thu, 24 Jan 2002 11:50:12 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> If you use only the SQL-defined operations, after setting up any\n> configuration variables we may invent in the way we will document as\n> necessary for SQL-compatible behavior, then you will get SQL-compatible\n> behavior. I do not think that precludes having an underlying\n> implementation that sees the world differently than SQL does and\n> supports non-SQL behaviors too. (For that matter, I'm sure there is\n> text somewhere in the spec that points out that the spec intends to\n> define user-visible behavior, not implementation.)\n\nThis makes a lot of sense and suggests the possibility of 'schema enabled'\ndatabases. That is, a switch 'bool withschemas' (which defaults to\nfalse) could be added to pg_database. If true, the parser and ownership\nmodel reflects that of SQL'99 and/or the Postgres schema model. If false,\nthe existing 'schema' model is assumed.\n\nThis should allow existing users to migrate their data and applications to\n7.3 without having to modify either.\n\nIts not an ideal solution but backward compatibility is generally results\nin compromise ;).\n\nGavin\n\n", "msg_date": "Fri, 25 Jan 2002 15:25:05 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane writes:\n\n> There could be multiple valid interpretations. When you can't even\n> figure out where to start, it's too squishy for me. Code complexity\n> isn't really the issue here, it's whether a user can understand what's\n> going on.\n\nHere's a tricky question: In what situations is a.b valid to mean b(a)?\nBecause in a general object-like system you could write a.b.c.d to mean\nd(c(b(a))). There you've got a system where it's really impossible to\ntell anything. Maybe b() returns a table, so a.b.c.d could mean\nsubattribute d in column c in the table returned by b(a).\n\nSomehow we need to do at least one of three things:\n1. Require parentheses after function calls.\n2. Use a different operator to invoke function calls (SQL uses ->).\n3. Require users to register functions as \"methods\" with the data type\nbefore being able to say a.b for b(a). This also takes care of having to\nspecify the schema of b because that's declared when you define the\nmethod.\n\nSQL99 does 2 and 3 (but not 1).\n\nI say, forget Oracle. Oracle doesn't have all the extensibility\nfunctionality that PostgreSQL has. Let's build a system that is\nconsistent, orthogonal, and easy to use for *our* users, and those that\nwant to convert will quickly see the value.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 25 Jan 2002 00:27:07 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> Here's a tricky question: In what situations is a.b valid to mean b(a)?\n\nI defined that in my first message on these issues: the last element\nof a dotted-name string can be either a field name or a function\n(which is applied to a table that's the next-to-last item). The\nnext-to-last element is always a table name.\n\n> Because in a general object-like system you could write a.b.c.d to mean\n> d(c(b(a))).\n\nIndeed, that can happen now in Postgres, and as I pointed out we have\nto get rid of it. That doesn't mean we need to eliminate the base case,\nhowever.\n\n> Somehow we need to do at least one of three things:\n> 1. Require parentheses after function calls.\n\nBreaks existing code unnecessarily.\n\n> 2. Use a different operator to invoke function calls (SQL uses ->).\n\nBreaks existing code unnecessarily.\n\n> 3. Require users to register functions as \"methods\" with the data type\n> before being able to say a.b for b(a). This also takes care of having to\n> specify the schema of b because that's declared when you define the\n> method.\n\nDoesn't buy you anything unless you intend to reject function\noverloading too. With overloading you may have multiple functions\nb(something), so you still have to be able to determine what a is\nwithout any context.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 00:40:18 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Fri, 25 Jan 2002, Gavin Sherry wrote:\n\n> This makes a lot of sense and suggests the possibility of 'schema enabled'\n> databases. That is, a switch 'bool withschemas' (which defaults to\n> false) could be added to pg_database. If true, the parser and ownership\n> model reflects that of SQL'99 and/or the Postgres schema model. If false,\n> the existing 'schema' model is assumed.\n>\n> This should allow existing users to migrate their data and applications to\n> 7.3 without having to modify either.\n>\n> Its not an ideal solution but backward compatibility is generally results\n> in compromise ;).\n\nI guess my frustration with this idea is that we don't really need it. We\ncan achieve the same global namespace for an old app without it. All we\nneed is a tool which turns old dumps into new ones (which we probably need\nanyway) that merges all of the schemas together w/ PATH statements. Or\nmaybe (new idea) a tool which looks at the schemas in a DB and updates\ntheir PATHs so they act unified.\n\nWe can achieve the old behavior w/o having to build it into the backend.\nSo why add code to the backend when we don't have to? Among other things,\nit would complicate the system schema as we'd have to keep track of\nownership values we wouldn't otherwise need to.\n\nTake care,\n\nBill\n\n", "msg_date": "Fri, 25 Jan 2002 12:50:26 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "...\n> > Wouldn't it make sense to prefer operators/functions earlier in the search\n> > path for resolving ambiguity. So if you had plus(int4, int4) in my\n> > schema and plus(int8, int8) in system, and they'd otherwise cause an\n> > ambiguity failure for the query, use the plus(int4, int4) on mine. It\n> > seems not too far from having the search path shadow later exact matches.\n> Given the complexity of the resolution rules (cf.\n> http://developer.postgresql.org/docs/postgres/typeconv.html),\n> it's not clear that we can determine exactly which \"later\" entry ought\n> to be blamed for causing a resolution failure. I'd be interested to\n> hear Lockhart's opinion on this --- but my gut feeling is we don't\n> want to go there. The resolution rules are already complicated enough,\n> and I think layering an additional mechanism like that onto them might\n> make the behavior totally unpredictable.\n\n(I've been following the discussion; I suspect that this part may\nalready have an obvious answer since \"any\" scoping -- equivalent to\nflattening the namespace? -- may now be out of favor; I'm assuming that\nwe have a clearly scoped lookup scheme available).\n\nimho there is nothing fundamentally difficult or \"unpredictable\" about\nlayering schema lookup on to the existing function resolution rules. One\nmight want a bit better diagnostics about *which* function was actually\nchosen, but reasonable scoping and lookup rules could be constructed\nwhich give reasonable behavior with the addition of schemas.\n\nFor example, the current function resolution rules prefer an exact\nmatch, then start looking for approximate matches, and narrow that down\nto preferring the one with the best explicit match on data types. If\nmore than one matches, then it rejects the query. (I've left out one or\ntwo steps, but on the whole this is the behavior that matters.)\n\nWith schemas, one could choose to use \"closest schema\" as the tiebreaker\nfor multiple matches, but istm that an exact match should always win.\n\nWe might want to include a mechanism that *blocks* schema lookups deeper\ninto the search path, to allow reliable *complete replacement* of a\nfunction. This would be a property of the function, to be set when it is\ndefined in the schema. So an implementer could choose to restrict\nlookups explicitly if that is deemed necessary. Again, this is not a\nhuge complication.\n\nIt is an interesting discussion, and the fine points will not be brought\nout without having lots of back-and-forth, which seems to be happening\nalready ;)\n\n - Thomas\n", "msg_date": "Sat, 26 Jan 2002 03:05:44 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Is *the path* below the same as \"search path* in other\npostings about this thread ?\n\nMaybe Peter's posting isn't the one exactly what I have to\nask but there are too many postings for me to follow.\n\nregards,\nHiroshi Inoue\n\nPeter Eisentraut wrote:\n> \n> Bill Studenmund writes:\n> \n> > Does SQL'99 say anything about this?\n> \n> Yes, though, as usual, you have to twist your brain a little to understand\n> it. My understanding is that for a function call of the form \"foo(a, b)\"\n> it goes like this:\n> \n> 1. Find all functions named \"foo\" in the current database. This is the\n> set of \"possibly candidate routines\".\n> \n> 2. Drop all routines that you do not have EXECUTE privilege for. This is\n> the set of \"executable routines\".\n> \n> 3. Drop all routines that do not have compatible parameter lists. This is\n> the set of \"invocable routines\".\n> \n> 4. Drop all routines whose schema is not in the path. This is the set of\n> \"candidate routines\".\n> \n> 5. If you have more than one routine left, eliminate some routines\n> according to type precedence rules. (We do some form of this, SQL99\n> specifies something different.) This yields the set of \"candidate subject\n> routines\".\n> \n> 6. Choose the routine whose schema is earliest in the path as the \"subject\n> routine\".\n> \n> Execute the subject routine. Phew!\n> \n> This doesn't look glaringly wrong to me, so maybe you want to consider it.\n> Please note step 2.\n> \n> --\n> Peter Eisentraut peter_e@gmx.net\n", "msg_date": "Mon, 28 Jan 2002 10:33:05 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Mon, 28 Jan 2002, Hiroshi Inoue wrote:\n\n> Is *the path* below the same as \"search path* in other\n> postings about this thread ?\n\nI think so. I believe the path I've been talking about is the one in step\n6 below.\n\nTake care,\n\nBill\n\n> Maybe Peter's posting isn't the one exactly what I have to\n> ask but there are too many postings for me to follow.\n>\n> regards,\n> Hiroshi Inoue\n>\n> Peter Eisentraut wrote:\n> >\n> > Bill Studenmund writes:\n> >\n> > > Does SQL'99 say anything about this?\n> >\n> > Yes, though, as usual, you have to twist your brain a little to understand\n> > it. My understanding is that for a function call of the form \"foo(a, b)\"\n> > it goes like this:\n> >\n> > 1. Find all functions named \"foo\" in the current database. This is the\n> > set of \"possibly candidate routines\".\n> >\n> > 2. Drop all routines that you do not have EXECUTE privilege for. This is\n> > the set of \"executable routines\".\n> >\n> > 3. Drop all routines that do not have compatible parameter lists. This is\n> > the set of \"invocable routines\".\n> >\n> > 4. Drop all routines whose schema is not in the path. This is the set of\n> > \"candidate routines\".\n> >\n> > 5. If you have more than one routine left, eliminate some routines\n> > according to type precedence rules. (We do some form of this, SQL99\n> > specifies something different.) This yields the set of \"candidate subject\n> > routines\".\n> >\n> > 6. Choose the routine whose schema is earliest in the path as the \"subject\n> > routine\".\n> >\n> > Execute the subject routine. Phew!\n> >\n> > This doesn't look glaringly wrong to me, so maybe you want to consider it.\n> > Please note step 2.\n> >\n> > --\n> > Peter Eisentraut peter_e@gmx.net\n>\n\n", "msg_date": "Mon, 28 Jan 2002 16:27:04 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund wrote:\n> \n> On Mon, 28 Jan 2002, Hiroshi Inoue wrote:\n> \n> > Is *the path* below the same as \"search path* in other\n> > postings about this thread ?\n> \n> I think so. I believe the path I've been talking about is the one in step\n> 6 below.\n\nWhat I can find in SQL99 is SQL-path.\nDoes *the path*(i.e search path) mean SQL-path ?\nThey don't seem the same to me.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Tue, 29 Jan 2002 14:47:24 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Tue, 29 Jan 2002, Hiroshi Inoue wrote:\n\n> Bill Studenmund wrote:\n> >\n> > On Mon, 28 Jan 2002, Hiroshi Inoue wrote:\n> >\n> > > Is *the path* below the same as \"search path* in other\n> > > postings about this thread ?\n> >\n> > I think so. I believe the path I've been talking about is the one in step\n> > 6 below.\n>\n> What I can find in SQL99 is SQL-path.\n> Does *the path*(i.e search path) mean SQL-path ?\n> They don't seem the same to me.\n\nWhile we may have not been using the terminology of the spec, I think we\nhave been talking about schema paths from SQL99.\n\nOne difference between our discussions and SQL99 I've noticed is that\nwe've spoken of having the path find functions (and operators and\naggregates), types, _and_tables_. SQL99 doesn't have tables in there\nAFAICT, but I think it makes sense.\n\nTake care,\n\nBill\n\n", "msg_date": "Tue, 29 Jan 2002 09:43:22 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund wrote:\n> \n> On Tue, 29 Jan 2002, Hiroshi Inoue wrote:\n> \n> > What I can find in SQL99 is SQL-path.\n> > Does *the path*(i.e search path) mean SQL-path ?\n> > They don't seem the same to me.\n> \n> While we may have not been using the terminology of the spec, I think we\n> have been talking about schema paths from SQL99.\n> \n> One difference between our discussions and SQL99 I've noticed is that\n> we've spoken of having the path find functions (and operators and\n> aggregates), types, _and_tables_.\n\nMy understanding is the same.\nTom, Peter is it right ?\n\n> SQL99 doesn't have tables in there\n> AFAICT, but I think it makes sense.\n\nIt seems to make sense but they are different and\nour *path* is never an extension of SQL-path.\nWhere are the difference or the relevance referred\nto in this thread ?\n\nregards,\nHiroshi Inoue\n", "msg_date": "Wed, 30 Jan 2002 09:20:46 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 30 Jan 2002, Hiroshi Inoue wrote:\n\n> Bill Studenmund wrote:\n> >\n> > On Tue, 29 Jan 2002, Hiroshi Inoue wrote:\n> > SQL99 doesn't have tables in there\n> > AFAICT, but I think it makes sense.\n>\n> It seems to make sense but they are different and\n> our *path* is never an extension of SQL-path.\n> Where are the difference or the relevance referred\n> to in this thread ?\n\nHow is our path not an extention of SQL-path? Or at least how is the path\nI've been pushing not an SQL-path?\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 30 Jan 2002 12:08:54 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "[ just catching up on this thread after a couple days thinking about\nother things ]\n\nStephan Szabo <sszabo@megazone23.bigpanda.com> writes:\n> AFAIK there's no way to specify that I want to make the function\n> complex(integer) such that I can do CAST(1 as complex) but not as an\n> implicit cast.\n\nYou may have forgotten that I recently suggested adding just such a\nfeature, ie a boolean flag on pg_proc rows to indicate whether they can\nbe considered for implicit casts. I think we'd agreed that it would be\na good thing to do in 7.3.\n\nHowever, that doesn't bear very much on the general argument of the\nthread. The bottom line is that we've put a whole lot of sweat into\ndeveloping rules for resolving ambiguous operator and function calls,\nand I don't think we're going to be willing to toss all that effort into\nthe scrap heap. But making namespace search order the dominant factor\nin choosing a function/operator (as Bill seems to want) would certainly\nbreak all that carefully-crafted effort. If we put the system namespace\nat the front of the search list then users would be unable to override\nstandard operators with schema-local substitutes; clearly that's no\ngood. But if we put it at the back, then a schema-local user operator\nwould dominate all system entries of the same operator name, even for\nquite different types, and thereby it would break the resolution\nbehavior.\n\nSo I'm still of the opinion that my original suggestion is the only\nworkable one: collect candidates across all available namespaces,\ndiscarding only those that are exact matches to candidates in earlier\nnamespaces, and then apply the existing resolution rules to the\ncollection. AFAICS this need not be any slower than what we do now,\nif the catalog is set up so that we can collect candidates in one\nindexscan without regard to namespace. The case where there actually\nare any exact matches to discard should be uncommon, so we can deal with\nit later on in the resolution process.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 30 Jan 2002 16:12:24 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Wed, 30 Jan 2002, Tom Lane wrote:\n\n> [ just catching up on this thread after a couple days thinking about\n> other things ]\n>\n> However, that doesn't bear very much on the general argument of the\n> thread. The bottom line is that we've put a whole lot of sweat into\n> developing rules for resolving ambiguous operator and function calls,\n> and I don't think we're going to be willing to toss all that effort into\n> the scrap heap. But making namespace search order the dominant factor\n> in choosing a function/operator (as Bill seems to want) would certainly\n> break all that carefully-crafted effort. If we put the system namespace\n> at the front of the search list then users would be unable to override\n> standard operators with schema-local substitutes; clearly that's no\n> good. But if we put it at the back, then a schema-local user operator\n> would dominate all system entries of the same operator name, even for\n> quite different types, and thereby it would break the resolution\n> behavior.\n\nI've changed my mind. :-)\n\n> So I'm still of the opinion that my original suggestion is the only\n> workable one: collect candidates across all available namespaces,\n> discarding only those that are exact matches to candidates in earlier\n> namespaces, and then apply the existing resolution rules to the\n> collection. AFAICS this need not be any slower than what we do now,\n> if the catalog is set up so that we can collect candidates in one\n> indexscan without regard to namespace. The case where there actually\n> are any exact matches to discard should be uncommon, so we can deal with\n> it later on in the resolution process.\n\nSounds like the thing to do, and it matches the spec. :-)\n\nOh, you can make a path with your namespace before the built-in one. It's\njust that if you don't include the built-in one (IMPLIMENTATION_SCHEMA) in\na path, you're supposed to prepend it to the specified list.\n\nTake care,\n\nBill\n\n\n", "msg_date": "Wed, 30 Jan 2002 13:17:07 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> Bill Studenmund wrote:\n>> While we may have not been using the terminology of the spec, I think we\n>> have been talking about schema paths from SQL99.\n>> \n>> One difference between our discussions and SQL99 I've noticed is that\n>> we've spoken of having the path find functions (and operators and\n>> aggregates), types, _and_tables_.\n\n> My understanding is the same.\n> Tom, Peter is it right ?\n\nSQL99's SQL-path is very clearly stated to be used only for looking up\nroutines and user-defined type names. Extending it to cover tables,\noperators, and so forth makes sense to me, but we have to recognize\nthat it is a spec extension and therefore not all the answers we need\ncan be found in the spec.\n\nI also find it curious that they exclude standard type names from the\nsearch path. It would seem obvious to treat the standard type names\nas included in a schema that is part of the search path, but AFAICT\nthis is not done in the spec. Postgres *has to* do it that way,\nhowever, or give up our whole approach to datatypes; surely we don't\nwant to hardwire the SQL-standard datatypes into the parser to the\nexclusion of the not-so-standard ones.\n\nIMHO, the spec's artificial distinction between system and user types\nlimits its usefulness as a guide to the questions we're debating here.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 30 Jan 2002 18:13:06 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Wed, 30 Jan 2002, Tom Lane wrote:\n\n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > Bill Studenmund wrote:\n> >> While we may have not been using the terminology of the spec, I think we\n> >> have been talking about schema paths from SQL99.\n> >>\n> >> One difference between our discussions and SQL99 I've noticed is that\n> >> we've spoken of having the path find functions (and operators and\n> >> aggregates), types, _and_tables_.\n>\n> > My understanding is the same.\n> > Tom, Peter is it right ?\n>\n> SQL99's SQL-path is very clearly stated to be used only for looking up\n> routines and user-defined type names. Extending it to cover tables,\n> operators, and so forth makes sense to me, but we have to recognize\n> that it is a spec extension and therefore not all the answers we need\n> can be found in the spec.\n\nTrue. I think that extending the path to be used for operators and\naggregates makes sense as they are special types of function calls. The\nsearching for tables might need to be a configurable parameter (defaulting\nto yes), though. I think it makes sense to do, but I can imagine cases\nwhere apps need to not.\n\n> I also find it curious that they exclude standard type names from the\n> search path. It would seem obvious to treat the standard type names\n> as included in a schema that is part of the search path, but AFAICT\n> this is not done in the spec. Postgres *has to* do it that way,\n> however, or give up our whole approach to datatypes; surely we don't\n> want to hardwire the SQL-standard datatypes into the parser to the\n> exclusion of the not-so-standard ones.\n>\n> IMHO, the spec's artificial distinction between system and user types\n> limits its usefulness as a guide to the questions we're debating here.\n\nTrue.\n\nDoes SQL99 support types as flexable as the ones we do? I know types in\nOracle are basically special cases of already built-in ones...\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 30 Jan 2002 15:41:09 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund wrote:\n> \n> On Wed, 30 Jan 2002, Hiroshi Inoue wrote:\n> \n> > Bill Studenmund wrote:\n> > >\n> > > On Tue, 29 Jan 2002, Hiroshi Inoue wrote:\n> > > SQL99 doesn't have tables in there\n> > > AFAICT, but I think it makes sense.\n> >\n> > It seems to make sense but they are different and\n> > our *path* is never an extension of SQL-path.\n> > Where are the difference or the relevance referred\n> > to in this thread ?\n> \n> How is our path not an extention of SQL-path? Or at least how is the path\n> I've been pushing not an SQL-path?\n\nIMHO _tables_like objects must be guarded from such\na search mechanism fundamentally. I don't object to\nthe use of our *path* but it should be distinguished\nfrom SQL-path.\n\nFor example the PATH environment variable is used\nonly to search executables not files. Is it\npreferable for *rm a_file* to search all the directory\nin the PATH ? If the purpose is different the different\n*path* is needed of cource. \n\nregards,\nHiroshi Inoue\n", "msg_date": "Thu, 31 Jan 2002 08:55:20 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane wrote:\n> \n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > Bill Studenmund wrote:\n> >> While we may have not been using the terminology of the spec, I think we\n> >> have been talking about schema paths from SQL99.\n> >>\n> >> One difference between our discussions and SQL99 I've noticed is that\n> >> we've spoken of having the path find functions (and operators and\n> >> aggregates), types, _and_tables_.\n> \n> > My understanding is the same.\n> > Tom, Peter is it right ?\n> \n> SQL99's SQL-path is very clearly stated to be used only for looking up\n> routines and user-defined type names. Extending it to cover tables,\n> operators, and so forth makes sense to me,\n\nI have no objection to the point it makes sense to use\nsuch *path*s internally but I think it also has a siginificance\nfor SQL-path to not look up _tables_like objects. \nI think they are different from the first and we should(need)\nnot manage the system with one *path*.\n\nBTW I see few references to *catalog*. Would the concept\nof catalog be introduced together. If so what would be\ncontained in the current database.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Thu, 31 Jan 2002 10:57:06 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> I have no objection to the point it makes sense to use\n> such *path*s internally but I think it also has a siginificance\n> for SQL-path to not look up _tables_like objects. \n> I think they are different from the first and we should(need)\n> not manage the system with one *path*.\n\nI'm unconvinced. We must search for datatypes and tables on the same\npath because tables have associated datatypes; it will definitely not\ndo to look for a table's datatype and get the wrong type. And I think\nthat functions and operators should be looked for on the same path\nas datatypes, because a type should be pretty closely associated with\nthe functions/operators for it. So it seems to me that the apparent\nflexibility of having more than one path is just a way to shoot yourself\nin the foot. Why are you concerned that we keep them separate?\n\n> BTW I see few references to *catalog*. Would the concept\n> of catalog be introduced together. If so what would be\n> contained in the current database.\n\nMy thought is that we will consider catalog == database. As far as\nI can tell, that is a legitimate implementation-defined way of\ninterpreting the spec. (It's not clear to me what the value is of\nhaving more than one level of schema hierarchy; or at least, if you want\nhierarchical namespaces, there's no argument for stopping at depth two.\nBut I digress.) To satisfy the spec we must allow a (purely decorative)\nspecification of the current database name as the catalog level of a\nqualified name, but that's as far as I want to go. In this round,\nanyway. Cross-database access is not something to tackle for 7.3.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 30 Jan 2002 21:32:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > I have no objection to the point it makes sense to use\n> > such *path*s internally but I think it also has a siginificance\n> > for SQL-path to not look up _tables_like objects.\n> > I think they are different from the first and we should(need)\n> > not manage the system with one *path*.\n> \n> I'm unconvinced. We must search for datatypes and tables on the same\n> path because tables have associated datatypes;\n\nIsn't the table definition a part of the datatype in\nsuch a case ?\n\n> it will definitely not\n> do to look for a table's datatype and get the wrong type. And I think\n> that functions and operators should be looked for on the same path\n> as datatypes, because a type should be pretty closely associated with\n> the functions/operators for it. So it seems to me that the apparent\n> flexibility of having more than one path is just a way to shoot yourself\n> in the foot. Why are you concerned that we keep them separate?\n\nFor example, doesn't 'DROP table a_table' drop the \na_table table in a schema in the *path* if there's\nno a_table table in the current schema ?\n\nIf we would never introduce SQL-paths (in the future)\nthere would be problem.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Thu, 31 Jan 2002 12:36:19 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> For example, doesn't 'DROP table a_table' drop the \n> a_table table in a schema in the *path* if there's\n> no a_table table in the current schema ?\n\nSure. And that's exactly what it should do, IMHO.\nOtherwise the notion that you can ignore your private\nschema (at the front of the path) if you're not using\nit falls down. Also, we wouldn't be able to implement\ntemp tables via a backend-local schema at the front of\nthe path.\n\nAny security concerns here should be addressed by putting\nACLs on the schemas you don't want altered; not by contorting\nthe notion of a search path to work for some operations and\nnot others.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 30 Jan 2002 22:43:41 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> \n> > BTW I see few references to *catalog*. Would the concept\n> > of catalog be introduced together. If so what would be\n> > contained in the current database.\n> \n> My thought is that we will consider catalog == database. As far as\n> I can tell, that is a legitimate implementation-defined way of\n> interpreting the spec. (It's not clear to me what the value is of\n> having more than one level of schema hierarchy; or at least, if you want\n> hierarchical namespaces, there's no argument for stopping at depth two.\n> But I digress.) To satisfy the spec we must allow a (purely decorative)\n> specification of the current database name as the catalog level of a\n> qualified name, but that's as far as I want to go. In this round,\n> anyway. Cross-database access is not something to tackle for 7.3.\n\nJust a confirmation.\nWe can't see any catalog.schema.object notation in 7.3,\ncan we ?\n\nregards,\nHiroshi Inoue\n", "msg_date": "Thu, 31 Jan 2002 12:47:20 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> Just a confirmation.\n> We can't see any catalog.schema.object notation in 7.3,\n> can we ?\n\nNo, what I meant was you could write catalog.schema.object --- but for\n7.3, the system will only accept it if the catalog name is the same as\nthe current database. This satisfies the minimum requirements of the\nspec, and it leaves notational room to use the catalog name as the cue\nfor cross-database access, if we ever decide we want to try to do that.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 30 Jan 2002 22:51:00 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n> \n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > For example, doesn't 'DROP table a_table' drop the\n> > a_table table in a schema in the *path* if there's\n> > no a_table table in the current schema ?\n> \n> Sure. And that's exactly what it should do, IMHO.\n> Otherwise the notion that you can ignore your private\n> schema (at the front of the path) if you're not using\n> it falls down. Also, we wouldn't be able to implement\n> temp tables via a backend-local schema at the front of\n> the path.\n\nI don't think it's useful for tables other than temp\nones and I wouldn't use it other than for temp ones.\n\nWhen we type 'rm a_file' in a shell environment\ndoes the *rm* command search the PATH in finding\nthe a_file file ? Even though we need to implement\nsuch a search mechanism we would use another path\ndifferent from the executable search PATH. I don't\nthink our *path* is an extension of SQL-path.\n\nI wouldn't complain unless we call the *path*\nas SQL-path or an extension of SQL-path.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Thu, 31 Jan 2002 19:37:18 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Thu, 31 Jan 2002, Hiroshi Inoue wrote:\n\n> Tom Lane wrote:\n> >\n> > Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > SQL99's SQL-path is very clearly stated to be used only for looking up\n> > routines and user-defined type names. Extending it to cover tables,\n> > operators, and so forth makes sense to me,\n>\n> I have no objection to the point it makes sense to use\n> such *path*s internally but I think it also has a siginificance\n> for SQL-path to not look up _tables_like objects.\n> I think they are different from the first and we should(need)\n> not manage the system with one *path*.\n\nI'm confused. Are you suggesting multiple paths? i.e. a function/type path\nand a table one?\n\nI think calling our path an SQL path is fine. Yes, we extend it by using\nit for tables too, but it strikes me as still fundamentally an SQL path.\nSo I don't see why we should not call it that.\n\nTake care,\n\nBill\n\n", "msg_date": "Thu, 31 Jan 2002 08:26:40 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Thu, 31 Jan 2002, Hiroshi Inoue wrote:\n\n> > it will definitely not\n> > do to look for a table's datatype and get the wrong type. And I think\n> > that functions and operators should be looked for on the same path\n> > as datatypes, because a type should be pretty closely associated with\n> > the functions/operators for it. So it seems to me that the apparent\n> > flexibility of having more than one path is just a way to shoot yourself\n> > in the foot. Why are you concerned that we keep them separate?\n>\n> For example, doesn't 'DROP table a_table' drop the\n> a_table table in a schema in the *path* if there's\n> no a_table table in the current schema ?\n>\n> If we would never introduce SQL-paths (in the future)\n> there would be problem.\n\n??\n\nWe're talking about adding them now. Why would we add them twice?\n\nTake care,\n\nBill\n\n", "msg_date": "Thu, 31 Jan 2002 08:28:10 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Wed, 30 Jan 2002, Tom Lane wrote:\n\n> Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > For example, doesn't 'DROP table a_table' drop the\n> > a_table table in a schema in the *path* if there's\n> > no a_table table in the current schema ?\n>\n> Sure. And that's exactly what it should do, IMHO.\n> Otherwise the notion that you can ignore your private\n> schema (at the front of the path) if you're not using\n> it falls down. Also, we wouldn't be able to implement\n> temp tables via a backend-local schema at the front of\n> the path.\n\nWell, I disagree on this one. :-) I'd vote drop should need a specific\nschema if it's not the current one. But I won't push the point. :-)\n\n> Any security concerns here should be addressed by putting\n> ACLs on the schemas you don't want altered; not by contorting\n> the notion of a search path to work for some operations and\n> not others.\n\nI'm not so concerned about security as being sure of operator intent. ACLs\naddress security (and should be used), but they don't address making sure\nyou delete exactly what you wanted.\n\nTake care,\n\nBill\n\n", "msg_date": "Thu, 31 Jan 2002 08:31:03 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Thu, 31 Jan 2002, Hiroshi Inoue wrote:\n\n> Tom Lane wrote:\n> >\n> > Hiroshi Inoue <Inoue@tpf.co.jp> writes:\n> > > For example, doesn't 'DROP table a_table' drop the\n> > > a_table table in a schema in the *path* if there's\n> > > no a_table table in the current schema ?\n> >\n> > Sure. And that's exactly what it should do, IMHO.\n> > Otherwise the notion that you can ignore your private\n> > schema (at the front of the path) if you're not using\n> > it falls down. Also, we wouldn't be able to implement\n> > temp tables via a backend-local schema at the front of\n> > the path.\n>\n> I don't think it's useful for tables other than temp\n> ones and I wouldn't use it other than for temp ones.\n\nI agree.\n\n> When we type 'rm a_file' in a shell environment\n> does the *rm* command search the PATH in finding\n> the a_file file ? Even though we need to implement\n> such a search mechanism we would use another path\n> different from the executable search PATH. I don't\n> think our *path* is an extension of SQL-path.\n>\n> I wouldn't complain unless we call the *path*\n> as SQL-path or an extension of SQL-path.\n\nI still don't get this. The path we're talking about is the same thing\n(with the same envirnment name and operational syntax) as SQL-paths,\nexcept that we use it to find tables too. Why does that make it not an SQL\npath?\n\nTake care,\n\nBill\n\n", "msg_date": "Thu, 31 Jan 2002 08:33:50 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund wrote:\n> \n> On Thu, 31 Jan 2002, Hiroshi Inoue wrote:\n> >\n> > I wouldn't complain unless we call the *path*\n> > as SQL-path or an extension of SQL-path.\n> \n> I still don't get this. The path we're talking about is the same thing\n> (with the same envirnment name and operational syntax) as SQL-paths,\n> except that we use it to find tables too. Why does that make it not an SQL\n> path?\n\nI don't think It's always good to follow the standard.\nHowever it's very wrong to change the meaning of words\nin the standard. It seems impossible to introduce SQL-path\nusing our *path*. The *path* is PostgreSQL specific and\nit would be configurable for us to be SQL99-compatible\n(without SQL-path) or SQL99-imcompatible using the *path*.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 01 Feb 2002 10:08:05 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" } ]
[ { "msg_contents": "I have an open-source project that I'm joining. I'd like to use a\nPostgreSQL-type license for the project. Could someone point out where\nthe license for PostgreSQL is located in the source?\n\nThanks.\n-Tony\n", "msg_date": "21 Jan 2002 15:49:33 -0800", "msg_from": "reina@nsi.edu (Tony Reina)", "msg_from_op": true, "msg_subject": "PostgreSQL License" } ]
[ { "msg_contents": "\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nRegarding the licensing thread:\n\nAny chance we can limit this topic (and perhaps future ones) \nto a single list? I think everyone involved reads both HACKERS \nand GENERAL. \n\nThanks,\nGreg Sabino Mullane <greg@turnstep.com>\nPGP Key: 0x14964AC8 200201212116\n\n\n-----BEGIN PGP SIGNATURE-----\nComment: http://www.turnstep.com/pgp.html\n\niQA/AwUBPEzLn7ybkGcUlkrIEQIrAgCfXaOtxzeI5l02ZJrTsr5wxFXQxlwAnjN8\nA7S2vLu/AvECgpBr58TjnRxi\n=ufqU\n-----END PGP SIGNATURE-----\n\n\n", "msg_date": "Tue, 22 Jan 2002 02:17:25 -0000", "msg_from": "\"Greg Sabino Mullane\" <greg@turnstep.com>", "msg_from_op": true, "msg_subject": "Cross posting" }, { "msg_contents": "\"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n> Regarding the licensing thread:\n\n> Any chance we can limit this topic (and perhaps future ones) \n> to a single list? I think everyone involved reads both HACKERS \n> and GENERAL. \n\nNo, I think it's appropriate to continue this thread on both.\nIt's reasonably on-topic for both, and there are people who\nread only one of the two lists.\n\nIf you are subscribed to multiple PG lists, it's a real good idea\nto set up your subscriptions so that you get just one copy of\ncross-posted articles, because you will see plenty of 'em ---\nand you're wasting your breath to suggest that that's wrong.\n\nIIRC, the magic recipe is:\n\nsend this one-line command to majordomo@postgresql.org\n set all unique YourEmailAddressHere\n\n(Hey Marc, is it possible to make this the default setting?\nSeems like this question comes up fairly often...)\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 21 Jan 2002 23:42:16 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Cross posting " } ]
[ { "msg_contents": "Did you guys know that TOra now has postgres support?\n\nhttp://www.globecom.se/tora/\n\nI think it's mostly in the new alpha version.\n\nLooks like it would be quite awesome.\n\nChris\n\n", "msg_date": "Tue, 22 Jan 2002 12:33:58 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": true, "msg_subject": "TOra has postgres support" } ]
[ { "msg_contents": "In regards to my previous email, look at the changelog for 1.3.2-alpha:\n\nhttp://sourceforge.net/project/shownotes.php?release_id=70037\n\nChris\n\n", "msg_date": "Tue, 22 Jan 2002 12:35:17 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": true, "msg_subject": "Re: TOra has postgres support" } ]
[ { "msg_contents": "Is anyone else noticing this? Perhaps it is a Postfix thing or a procmail\nthing but I keep getting messages joined together. It only happens with\nmessages from PostgreSQL lists. I get a bunch of messages in one until\nthere is one non-PostgreSQL message which seems to break the link. My\ntheory is that it is related to the TIP at the end. Is it possible to\nchange that so that it adds a newline at the end? I bet that would\nfix the problem.\n\nThanks.\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": "Tue, 22 Jan 2002 08:28:03 -0500 (EST)", "msg_from": "darcy@druid.net (D'Arcy J.M. Cain)", "msg_from_op": true, "msg_subject": "Messages appending" }, { "msg_contents": "On Tue, Jan 22, 2002 at 08:28:03AM -0500, D'Arcy J.M. Cain wrote:\n> Is anyone else noticing this? Perhaps it is a Postfix thing or a procmail\n> thing but I keep getting messages joined together. It only happens with\n> messages from PostgreSQL lists. I get a bunch of messages in one until\n> there is one non-PostgreSQL message which seems to break the link. My\n> theory is that it is related to the TIP at the end. Is it possible to\n> change that so that it adds a newline at the end? I bet that would\n> fix the problem.\n\nActually it ends with 2 newlines. I think you should change your local\nmail configuration.\n\n-- \nHolger Krug\nhkrug@rationalizer.com\n", "msg_date": "Tue, 22 Jan 2002 15:06:28 +0100", "msg_from": "Holger Krug <hkrug@rationalizer.com>", "msg_from_op": false, "msg_subject": "Re: Messages appending" }, { "msg_contents": "darcy@druid.net (D'Arcy J.M. Cain) writes:\n> Is anyone else noticing this? Perhaps it is a Postfix thing or a procmail\n> thing but I keep getting messages joined together.\n\nI've never seen that.\n\n> My theory is that it is related to the TIP at the end. Is it possible to\n> change that so that it adds a newline at the end?\n\nI don't see that either --- the messages all end with a newline for me.\n\nMaybe there's something wrong with your procmail script? If it were\ndropping the last newline as it stuffs the message into your inbox,\nthat'd probably result in messages getting concatenated together.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 09:58:21 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Messages appending " } ]
[ { "msg_contents": "How is it possible to give a user only read-only access to a database? Of\ncourse that's easy on a per table base, but what if the user must not be\nable to create his own tables? I was never in a situation where I needed\nsuch a setup but was just asked and frankly, I don't know.\n\nMichael\n-- \nMichael Meskes\nMichael@Fam-Meskes.De\nGo SF 49ers! Go Rhein Fire!\nUse Debian GNU/Linux! Use PostgreSQL!\n", "msg_date": "Tue, 22 Jan 2002 15:36:28 +0100", "msg_from": "Michael Meskes <meskes@postgresql.org>", "msg_from_op": true, "msg_subject": "Read-only access" } ]
[ { "msg_contents": "\nUsing the EXPLAIN command I have notice that PostgreSQL performs\nredundant Sort operations in several cases.\n(postgresql-7.1.2 on Linux)\n\nThe 3 examples use the following schema:\ncreate table t (a int, b int);\ncreate view v as select * from t order by a;\n\nThe first case containing a redundant sort operation:\n\nexplain select * from v order by a;\n\nNOTICE: QUERY PLAN:\n\nSort (cost=0.02..0.02 rows=1 width=8)\n -> Subquery Scan v (cost=0.01..0.01 rows=1 width=8)\n -> Sort (cost=0.01..0.01 rows=1 width=8)\n -> Seq Scan on t (cost=0.00..0.00 rows=1 width=8)\n\nAlthough the view v is already sorted on a the plan re-sorts it.\n\nThe next similar case is:\nexplain select * from (select * from t order by a) as k order by a;\n\nNOTICE: QUERY PLAN:\n\nSort (cost=0.02..0.02 rows=1 width=8)\n -> Subquery Scan k (cost=0.01..0.01 rows=1 width=8)\n -> Sort (cost=0.01..0.01 rows=1 width=8)\n -> Seq Scan on t (cost=0.00..0.00 rows=1 width=8)\n\nAlso the merge-join operation sorts the input even when it is already\nsorted as you can see in the followin statement:\n(I forced the use of merge-sort with:\nset ENABLE_HASHJOIN=0\nset ENABLE_INDEXSCAN=0;\nset ENABLE_NESTLOOP =0;\nbut I got the same behaviour on a more complex schema when the planner\nchoosed the merge-join)\n\nexplain select * from t NATURAL JOIN v;\n\nNOTICE: QUERY PLAN:\n\nMerge Join (cost=0.03..0.06 rows=1 width=16)\n -> Sort (cost=0.01..0.01 rows=1 width=8)\n -> Seq Scan on t (cost=0.00..0.00 rows=1 width=8)\n -> Sort (cost=0.02..0.02 rows=1 width=8)\n -> Subquery Scan v (cost=0.01..0.01 rows=1 width=8)\n -> Sort (cost=0.01..0.01 rows=1 width=8)\n -> Seq Scan on t (cost=0.00..0.00 rows=1 width=8)\n\nThe same happens with:\nexplain select * from v NATURAL JOIN (select * from t order by a) AS k;\n\nNOTICE: QUERY PLAN:\n\nMerge Join (cost=0.04..0.07 rows=1 width=16)\n -> Sort (cost=0.02..0.02 rows=1 width=8)\n -> Subquery Scan v (cost=0.01..0.01 rows=1 width=8)\n -> Sort (cost=0.01..0.01 rows=1 width=8)\n -> Seq Scan on t (cost=0.00..0.00 rows=1 width=8)\n -> Sort (cost=0.02..0.02 rows=1 width=8)\n -> Subquery Scan k (cost=0.01..0.01 rows=1 width=8)\n -> Sort (cost=0.01..0.01 rows=1 width=8)\n -> Seq Scan on t (cost=0.00..0.00 rows=1 width=8)\n\n\n\nQuestion:\n---------\nIs there any way to avoid those redundant sort operations?\n(I could even attempt to hack the source code if you can tell me where\nto start looking)\n\nThere is line in the release notes of 7.0:\n\"Prevent descending sort if result is already sorted(Hiroshi)\"\nbut I have tested the same examples with descending order and I get\nthe same results.\n\nThank you for your time.\n\nRegards,\nAris.\n\n\n", "msg_date": "Tue, 22 Jan 2002 17:48:30 +0200 (EET)", "msg_from": "Aris Tsois <atsois@dblab.ece.ntua.gr>", "msg_from_op": true, "msg_subject": "How to avoid redundant Sort operations? (pgsql 7.1.2)" }, { "msg_contents": "Aris Tsois <atsois@dblab.ece.ntua.gr> writes:\n> Is there any way to avoid those redundant sort operations?\n\nInformation about sort order doesn't propagate up through \"subquery\nscan\" nodes. There are a couple of reasons for this, one being that\npathkeys aren't returned as part of a completed Plan; there'd have to be\nsome uglification of the APIs of subquery_planner, grouping_planner, etc\nto return the appropriate pathkeys along with the finished plan.\nA more subtle problem is that pathkeys of a sub-plan aren't necessarily\nmeaningful for an outer plan (eg, the variables being sorted on might\nnot even be visible to the outer query). I think you'd have to do some\nkind of translation to see if you could restate the inner pathkeys in\nterms of the subplan's output variables.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 11:31:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: How to avoid redundant Sort operations? (pgsql 7.1.2) " } ]
[ { "msg_contents": "Hello All,\n For those on IRC, i am drauku/slipjack/chrish.\n\n First i would like to start off by coding a feature that DarcyB,\n nick from IRC, suggested as a starting point for me. A max connections\n settable limit. Since Bruce said that in 7.2 the pg_hda.conf gets\n reloaded into cache on a SIGHUP, i guess i could stick it in there\n and keep it backwards compatable? thoughts?\n\n\n Second, on this TODO item:\n * Point-in-time data recovery using backup and write-ahead log\n\n This is like journaling but with a database? Can someone please\n give me info on this? Thanks.\n\n Also, can anyone point out any \"newbie\" items that i could do to\n get started learning this api and system from the interals viewpoint?\n I am commited to coding for this project, and wanna get alot of stuff\n done so i will be at a place where i can help out with replication\n and all it's madness :)\n\nThanks,\nChris\n\n", "msg_date": "Tue, 22 Jan 2002 15:50:48 +0000", "msg_from": "Chris Humphries <chumphries@devis.com>", "msg_from_op": true, "msg_subject": "TODO question and claim" }, { "msg_contents": "sorry, i misunderstood what he said. since maxbackends is global,\nwould like something that isnt global, like relative to a db. here\nis his messages:\n\n--snip--\n\n<DarcyB> maxbackends is GLOBAL, not specific to a DB and/or \nAuthentication methood\n<DarcyB> For example if you have a postgresinstall, with a maxbackends of 64\n<chrish> authentication method?\n<DarcyB> but that postmaster has 3 DB's in it.. (accounting, crm, demo)\n<DarcyB> and you want to allow 32 connections to accounting 24 to crm \nand 8 to demo\n<DarcyB> ....\n<chrish> right, makes sence\n<DarcyB> as per auth methood, I want to allow only 2 \"remote\" \nconnections via SSL, and 16 via straight unix domain and 14 via \nstandatd TCP\n\n--snip--\n\nsorry for the communication error.\n\n-chris\n\n\nTom Lane wrote:\n\n> Chris Humphries <chumphries@devis.com> writes:\n> \n>> First i would like to start off by coding a feature that DarcyB,\n>> nick from IRC, suggested as a starting point for me. A max connections\n>> settable limit.\n>>\n> \n> Uh, how is that different from MaxBackends?\n> \n> \t\t\tregards, tom lane\n> \n\n\n", "msg_date": "Tue, 22 Jan 2002 16:53:43 +0000", "msg_from": "Chris Humphries <chumphries@devis.com>", "msg_from_op": true, "msg_subject": "Re: TODO question and claim" }, { "msg_contents": "Chris Humphries <chumphries@devis.com> writes:\n> First i would like to start off by coding a feature that DarcyB,\n> nick from IRC, suggested as a starting point for me. A max connections\n> settable limit.\n\nUh, how is that different from MaxBackends?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 16:16:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: TODO question and claim " } ]
[ { "msg_contents": "Hello All,\n Here is the todo item -> * Allow temporary views\n\n What exactly does this mean by temporary? by connection? it deletes\n itself in x seconds?\n\nThanks,\nchris\n\n", "msg_date": "Tue, 22 Jan 2002 16:24:31 +0000", "msg_from": "Chris Humphries <chumphries@devis.com>", "msg_from_op": true, "msg_subject": "TODO item question" }, { "msg_contents": "Chris Humphries wrote:\n> Hello All,\n> Here is the todo item -> * Allow temporary views\n> \n> What exactly does this mean by temporary? by connection? it deletes\n> itself in x seconds?\n\nDeletes on session exit, liek temporary tables.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Jan 2002 16:47:27 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: TODO item question" } ]
[ { "msg_contents": "\nIts wrap'd and on the main ftp site now, to be propogated as mirrors pull\nit ... will announce tomorrow, to give the mirrors a chance to grab, but\nif anyone wants to take a quick peek, make sure everything looks okay that\nwould be cool ... file sizes look about right based on the past betas ...\n\n\n", "msg_date": "Tue, 22 Jan 2002 14:33:54 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": true, "msg_subject": "RC1 finally wrapped ..." }, { "msg_contents": "The autoconf test for C++ doesn't work with standard-enforcing\ncompilers....\n\n\n[teg@halden teg]$ cat foo.C\n#include <string>\n\nint main(int argc, char **argv){\n\tstring foo=\"xyzzy\";\n\treturn 0;\n}\n[teg@halden teg]$ c++ foo.C -o foo\nfoo.C: In function `int main(int, char**)':\nfoo.C:4: `string' undeclared (first use this function)\nfoo.C:4: (Each undeclared identifier is reported only once for each function it \n appears in.)\nfoo.C:4: parse error before `=' token\n[teg@halden teg]$\n\nThe standard mandates that string is accessed in one of the following\nways:\n\n[teg@halden teg]$ cat foo2.C \n#include <string>\n\nusing namespace std;\n\nint main(int argc, char **argv){\n\tstring foo=\"xyzzy\";\n\treturn 0;\n}\n[teg@halden teg]$ cat foo3.C\n#include <string>\n\nint main(int argc, char **argv){\n\tstd::string foo=\"xyzzy\";\n\treturn 0;\n}\n[teg@halden teg]$ \n\nSome compilers accept the old way (and namespaces have been available\nfor quite some time now), others (like upcoming gcc 3.1) don't.\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "23 Jan 2002 11:49:09 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "C++ problems with RC1" }, { "msg_contents": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:\n> The autoconf test for C++ doesn't work with standard-enforcing\n> compilers....\n\nExactly what part of it doesn't work? AFAICT, the first test is\njust to see if \n\t#include <string>\nsucceeds, and if that works then we do not try the section you seem\nto be blaming. So it looks to me like a compiler that conforms\nto the C++-standard-of-the-month should work fine: both\nHAVE_CXX_STRING_HEADER and HAVE_NAMESPACE_STD should become set.\nWhat are you seeing?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 14:42:32 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: C++ problems with RC1 " }, { "msg_contents": "On Thu, 24 Jan 2002, Tom Lane wrote:\n\n> teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:\n> > The autoconf test for C++ doesn't work with standard-enforcing\n> > compilers....\n> \n> Exactly what part of it doesn't work? AFAICT, the first test is\n> just to see if \n> \t#include <string>\n> succeeds, and if that works then we do not try the section you seem\n> to be blaming. So it looks to me like a compiler that conforms\n> to the C++-standard-of-the-month should work fine: both\n> HAVE_CXX_STRING_HEADER and HAVE_NAMESPACE_STD should become set.\n> What are you seeing?\n\nI saw it failing... however, the cause for this failing was the use of \nmultiline literals (cc_version). The compilers warns about this being \ndeprecated, and autoconf thinks this means the test failed. See the other \npatch I posted yesterday.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n\n", "msg_date": "Thu, 24 Jan 2002 14:47:12 -0500 (EST)", "msg_from": "=?ISO-8859-1?Q?Trond_Eivind_Glomsr=F8d?= <teg@redhat.com>", "msg_from_op": false, "msg_subject": "Re: C++ problems with RC1 " }, { "msg_contents": "=?ISO-8859-1?Q?Trond_Eivind_Glomsr=F8d?= <teg@redhat.com> writes:\n>> What are you seeing?\n\n> I saw it failing... however, the cause for this failing was the use of \n> multiline literals (cc_version). The compilers warns about this being \n> deprecated, and autoconf thinks this means the test failed.\n\nAh. So with the \"head -1\" fix we should be good to go?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 14:56:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: C++ problems with RC1 " }, { "msg_contents": "On Thu, 24 Jan 2002, Tom Lane wrote:\n\n> =?ISO-8859-1?Q?Trond_Eivind_Glomsr=F8d?= <teg@redhat.com> writes:\n> >> What are you seeing?\n> \n> > I saw it failing... however, the cause for this failing was the use of \n> > multiline literals (cc_version). The compilers warns about this being \n> > deprecated, and autoconf thinks this means the test failed.\n> \n> Ah. So with the \"head -1\" fix we should be good to go?\n\nAutoconfwise, yes.\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n\n", "msg_date": "Thu, 24 Jan 2002 14:59:02 -0500 (EST)", "msg_from": "=?ISO-8859-1?Q?Trond_Eivind_Glomsr=F8d?= <teg@redhat.com>", "msg_from_op": false, "msg_subject": "Re: C++ problems with RC1 " } ]
[ { "msg_contents": "\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n> If you are subscribed to multiple PG lists, it's a real good idea\n> to set up your subscriptions so that you get just one copy of\n> cross-posted articles, because you will see plenty of 'em ---\n> and you're wasting your breath to suggest that that's wrong.\n\nDon't know if I agree that the discussion belonged on GENERAL, \nbut it's too late at this point. In the future, maybe we \ncould just post a final summary to the GENERAL list and leave \nthe other posts between developers on HACKERS.\n\nAt any rate, thank you for answering the real question I \nwas asking. :) After reading up on the majordomo docs, here is \nthe correct way to do it. Send the command \n\nset ListName unique YourEmailAddressHere\n\nto majordomo@postgresql.org, where ListName is the list that you \nwant to receive the singe copy of multiple posts on. You will then \nreceive a confirmation message from majordomo. For some reason, \nthe majordomo is very slow: it took from 15-30 minutes to reply \nto each of my commands.(?!)\n\n> (Hey Marc, is it possible to make this the default setting?\n> Seems like this question comes up fairly often...)\n\nSounds like a great idea to me. Or maybe mention it on the \nsubscription page or the welcome message.\n\nThanks,\nGreg Sabino Mullane <greg@turnstep.com>\nPGP Key: 0x14964AC8 200201221643\n\n-----BEGIN PGP SIGNATURE-----\nComment: http://www.turnstep.com/pgp.html\n\niQA/AwUBPE3gD7ybkGcUlkrIEQIOfwCg07fhJBDh0V2NWFl7gqQLIam99VMAn0Jh\nGV8tbCZHeNF1ym2Vm2FsOjks\n=dUI6\n-----END PGP SIGNATURE-----\n\n\n", "msg_date": "Tue, 22 Jan 2002 21:58:01 -0000", "msg_from": "\"Greg Sabino Mullane\" <greg@turnstep.com>", "msg_from_op": true, "msg_subject": "Re: Cross posting" }, { "msg_contents": "\"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n> After reading up on the majordomo docs, here is \n> the correct way to do it. Send the command \n\n> set ListName unique YourEmailAddressHere\n\n> to majordomo@postgresql.org, where ListName is the list that you \n> want to receive the singe copy of multiple posts on.\n\nI believe you want to set \"unique\" mode on *all* the PG lists that you\nare subscribed to; leastwise that's what works for me. Rather than\nissuing the command for each list individually, you can just use the\nshorthand\n\nset all unique YourEmailAddressHere\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 18:18:15 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Cross posting " } ]
[ { "msg_contents": "\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n>I believe you want to set \"unique\" mode on *all* the PG lists that you\n>are subscribed to; leastwise that's what works for me. Rather than\n>issuing the command for each list individually, you can just use the \n>shorthand\n\n>set all unique YourEmailAddressHere\n\nFirst thing I tried. Majordomo didn't like it:\n\n>>>> set all unique greg@turnstep.com\nIllegal list \"all\".\nNo valid commands processed.\n\n\nGreg Sabino Mullane\ngreg@turnstep.com\nPGP Key: 0x14964AC8 200201221848\n\n-----BEGIN PGP SIGNATURE-----\nComment: http://www.turnstep.com/pgp.html\n\niQA/AwUBPE36jLybkGcUlkrIEQIXhQCfRwSV3S4mknMtz3mBaHEGYhI7NmIAoJ+G\nL2jtcoA7kEl16xzFpoPJFdou\n=J5N9\n-----END PGP SIGNATURE-----\n\n\n", "msg_date": "Tue, 22 Jan 2002 23:50:05 -0000", "msg_from": "\"Greg Sabino Mullane\" <greg@turnstep.com>", "msg_from_op": true, "msg_subject": "Re: Cross posting" }, { "msg_contents": "\"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n>> set all unique YourEmailAddressHere\n\n> First thing I tried. Majordomo didn't like it:\n\n> set all unique greg@turnstep.com\n> Illegal list \"all\".\n\nHmph. It's documented to work ... wait a minute. The examples in the\nhelp file all use ALL, not all. Maybe it's case-sensitive?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 22 Jan 2002 19:11:35 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Cross posting " }, { "msg_contents": "On Tue, Jan 22, 2002 at 07:11:35PM -0500, Tom Lane wrote:\n> \"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n> >> set all unique YourEmailAddressHere\n> \n> > First thing I tried. Majordomo didn't like it:\n> \n> > set all unique greg@turnstep.com\n> > Illegal list \"all\".\n> \n> Hmph. It's documented to work ... wait a minute. The examples in the\n> help file all use ALL, not all. Maybe it's case-sensitive?\n\nYup, just tested it. Waiting on the confirmation now. 'all' returns an\nerror 'ALL' is successful.\n\nRoss\n", "msg_date": "Tue, 22 Jan 2002 18:46:08 -0600", "msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>", "msg_from_op": false, "msg_subject": "Re: Cross posting" } ]
[ { "msg_contents": "Hannu Krosing wrote:\n> On Wed, 2002-01-23 at 02:47, Bruce Momjian wrote:\n> > Chris Humphries wrote:\n> > > Hello All,\n> > > Here is the todo item -> * Allow temporary views\n> > > \n> > > What exactly does this mean by temporary? by connection? it deletes\n> > > itself in x seconds?\n> > \n> > Deletes on session exit, liek temporary tables.\n> \n> Do we have session _variables_ as a TODO item ?\n> \n> Currently the only way to implement session variables is to stuff them\n> in temp tables ?\n\nNo we don't and no one has asked for them, _yet_.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Jan 2002 21:30:15 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Re: TODO item question" }, { "msg_contents": "Bruce Momjian writes:\n\n> > Do we have session _variables_ as a TODO item ?\n> >\n> > Currently the only way to implement session variables is to stuff them\n> > in temp tables ?\n>\n> No we don't and no one has asked for them, _yet_.\n\nTables are the quintessential way to store data in SQL. Session data goes\ninto session-temporary tables. No need for session \"variables\" that I can\nsee.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Tue, 22 Jan 2002 22:58:13 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: TODO item question" } ]
[ { "msg_contents": "\n> > Switches set to historical:\n> \n> > schema search path = (user's own schema, \"any\" schema, postgres)\n> \n> > [ default creation schema = user's own schema ]\n> \n> > The searching in \"any\" schema (i.e., any owner) will let will find \n> > things that where defined the way they are today, i.e., possibly\n> > by several different users.\n> \n> No, it won't, because nothing will ever get put into that schema.\n> (At least not by existing pg_dump scripts, which are the things that\n> really need to see the historical behavior.) The\n> default-creation-schema variable has got to point at any/public/\n> whatever-we-call it, or you do not have the historical behavior.\n\nWhen configured for historical behavior would need to:\n1. have search path: temp, any, system\n2. guard against duplicate table names across all schemas (except temp schema)\n\nOr are you thinking about a per session behavior ?\nI would rather envision a per database behavior.\n\nMaybe the easy way out would be a \"default creation schema\" property for \neach user, that would default to the username. If you want everything in one \nschema simply alter the users.\n\nAndreas\n", "msg_date": "Wed, 23 Jan 2002 10:11:13 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> When configured for historical behavior would need to:\n> 1. have search path: temp, any, system\n> 2. guard against duplicate table names across all schemas (except temp schema)\n\nThis would be a *whole* lot simpler if we forgot the notion of \"any\"\nand made the search order look like\n\n\t(temp, private, public, system)\n\nwhere the public namespace is world-writable but the private per-user\nones are (typically at least) not.\n\nIt occurs to me that we can get both backward-compatible and SQL92\nsemantics with this same search path; the only thing that needs to\nbe different in the two cases is whether the default place to create\nobjects is your private schema or the public one. If you don't ever\nuse your private schema then it doesn't matter if it's on the search\npath or not. I would still prefer that the search path be a settable\noption, since a paranoid person might well wish to not have public in\nhis path at all ... but the default could be as-above.\n\n> Or are you thinking about a per session behavior ?\n> I would rather envision a per database behavior.\n> Maybe the easy way out would be a \"default creation schema\" property for \n> each user, that would default to the username. If you want everything in one \n> schema simply alter the users.\n\nI hadn't really gotten to the point of thinking about exactly what and\nwhere the control knobs should be. I suspect you are right that we will\nwant the default behavior to be selectable on a per-user or per-database\nbasis, which seems to eliminate the option of using GUC (at least in its\ncurrent form). We could easily add a field to pg_shadow or pg_database\nrespectively to determine the default behavior. It'd be nice though if\nthe behavior could be changed after connection by a SET statement, which\nwould be lots easier if the setting were GUC-controlled. Peter, you see\nany way to resolve that?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 10:44:34 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Tom Lane wrote:\n\n> \n> This would be a *whole* lot simpler if we forgot the notion of \"any\"\n> and made the search order look like\n> \n> \t(temp, private, public, system)\n> \n> where the public namespace is world-writable but the private per-user\n> ones are (typically at least) not.\n> \n> It occurs to me that we can get both backward-compatible and SQL92\n> semantics with this same search path; the only thing that needs to\n> be different in the two cases is whether the default place to create\n> objects is your private schema or the public one. If you don't ever\n> use your private schema then it doesn't matter if it's on the search\n> path or not. I would still prefer that the search path be a settable\n> option, since a paranoid person might well wish to not have public in\n> his path at all ... but the default could be as-above.\n> \n\n\nI think it would be desirable to be able to restrict users from \n\"publishing\" objects into the public schema. As an admin, I'd like some \ncontrol over the objects in this namespace. Hand-in-hand with this would \nbe the ability for the superuser to move (or \"promote\") an object from a \nprivate schema to the public one. This would allow a user to develop \ntheir own objects without interfering with others, but then make it \npublic with the superuser's assistance.\n\nThe search path you suggest above would then lead to the behavior that \nunqualified references to objects will see my own objects before the \npublic ones, and other people's private objects must be explicitly \nqualified.\n\nJoe\n\n\n\n", "msg_date": "Wed, 23 Jan 2002 08:56:15 -0800", "msg_from": "\"Joe Conway (wwc)\" <jconway@cox.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "\"Joe Conway (wwc)\" <jconway@cox.net> writes:\n> I think it would be desirable to be able to restrict users from \n> \"publishing\" objects into the public schema.\n\nSure. I'm envisioning that namespaces will have ACLs --- that's what\nwill keep private namespaces private. So, while public would by default\nbe world-writable (at least in the backwards-compatibility case),\nthere'd be nothing stopping you from marking it as read-only to some\nusers.\n\nCome to think of it, that's still another reason not to have an \"any\"\nwildcard: there's no way to put any restrictions on what appears in\nsuch a namespace.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 12:00:56 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Wed, 23 Jan 2002, Tom Lane wrote:\n\n> \"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> > When configured for historical behavior would need to:\n> > 1. have search path: temp, any, system\n> > 2. guard against duplicate table names across all schemas (except temp schema)\n>\n> This would be a *whole* lot simpler if we forgot the notion of \"any\"\n> and made the search order look like\n>\n> \t(temp, private, public, system)\n>\n> where the public namespace is world-writable but the private per-user\n> ones are (typically at least) not.\n>\n> It occurs to me that we can get both backward-compatible and SQL92\n> semantics with this same search path; the only thing that needs to\n> be different in the two cases is whether the default place to create\n> objects is your private schema or the public one. If you don't ever\n> use your private schema then it doesn't matter if it's on the search\n> path or not. I would still prefer that the search path be a settable\n> option, since a paranoid person might well wish to not have public in\n> his path at all ... but the default could be as-above.\n\ns/public/DEFAULT/ and add a way (createdb option) to make the default ACL\non DEFAULT such that anyone can create things and we are in agreement.\n\nOne of the parts of the schema system I'd envisioned (and tried to make)\nwas that there would be an IMPLIMENTATION_SCHEMA which owned all\nbuilt-ins, and a DEFAULT schema which was owned by the superuser. Making\nthe default schema path for a schema\nIMPLIMENTATION_SCHEMA:<SCHEMA_NAME>:DEFAULT is fine.\n\nMaking the default schema for creation settable to DEFAULT would be fine,\nand I think would remove objection. :-)\n\nTake care,\n\nBill\n\n", "msg_date": "Wed, 23 Jan 2002 14:49:32 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane wrote:\n> \"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> > When configured for historical behavior would need to:\n> > 1. have search path: temp, any, system\n> > 2. guard against duplicate table names across all schemas (except temp schema)\n> \n> This would be a *whole* lot simpler if we forgot the notion of \"any\"\n> and made the search order look like\n> \n> \t(temp, private, public, system)\n> \n> where the public namespace is world-writable but the private per-user\n> ones are (typically at least) not.\n\n[ I am just reading this schema thread now.]\n\nThe above private/public idea seems like a much better than 'any'. That\n'any' thing had me quite confused and the idea thought you would have\nduplicates that would only be found at runtime seems destined to random\nfalures.\n\nI assume 'private' above means search in my personal schema/namespace.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 22:23:22 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "> > Or are you thinking about a per session behavior ?\n> > I would rather envision a per database behavior.\n> > Maybe the easy way out would be a \"default creation schema\" property for \n> > each user, that would default to the username. If you want everything in one \n> > schema simply alter the users.\n> \n> I hadn't really gotten to the point of thinking about exactly what and\n> where the control knobs should be. I suspect you are right that we will\n> want the default behavior to be selectable on a per-user or per-database\n> basis, which seems to eliminate the option of using GUC (at least in its\n> current form). We could easily add a field to pg_shadow or pg_database\n> respectively to determine the default behavior. It'd be nice though if\n> the behavior could be changed after connection by a SET statement, which\n> would be lots easier if the setting were GUC-controlled. Peter, you see\n> any way to resolve that?\n\nI think we could set the database default at db creation time, then\nallow SET to modify that default per session; seems flexible enough. \nIt is basically a GUC value who's default is stored in pg_database\nrather than postgresql.conf. You could use postgresql.conf to set the\ndefault schema type at db creation time.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 22:26:43 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Tom Lane writes:\n\n> It'd be nice though if\n> the behavior could be changed after connection by a SET statement, which\n> would be lots easier if the setting were GUC-controlled. Peter, you see\n> any way to resolve that?\n\nWe had a text[] field to pg_shadow and/or pg_database containing\nname=value assignments which are executed just before the session starts.\nDoesn't look terribly difficult, and it's something I've always wanted to\ndo anyway.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Thu, 24 Jan 2002 23:00:57 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> We [add] a text[] field to pg_shadow and/or pg_database containing\n> name=value assignments which are executed just before the session starts.\n> Doesn't look terribly difficult, and it's something I've always wanted to\n> do anyway.\n\nSeems like a fine idea, with many uses besides this one.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 23:23:39 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "Peter Eisentraut wrote:\n> Tom Lane writes:\n> \n> > It'd be nice though if\n> > the behavior could be changed after connection by a SET statement, which\n> > would be lots easier if the setting were GUC-controlled. Peter, you see\n> > any way to resolve that?\n> \n> We had a text[] field to pg_shadow and/or pg_database containing\n> name=value assignments which are executed just before the session starts.\n> Doesn't look terribly difficult, and it's something I've always wanted to\n> do anyway.\n\nSo are thinking of \"dbname=schema_type\"? Seems this is really something\nthat should be in pg_database. If you create a database, who wants to\nedit postgresql.conf to set its default schema type? Why not set the\nGUC value from pg_database?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 23:33:52 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Peter Eisentraut wrote:\n> Tom Lane writes:\n> \n> > It'd be nice though if\n> > the behavior could be changed after connection by a SET statement, which\n> > would be lots easier if the setting were GUC-controlled. Peter, you see\n> > any way to resolve that?\n> \n> We had a text[] field to pg_shadow and/or pg_database containing\n> name=value assignments which are executed just before the session starts.\n> Doesn't look terribly difficult, and it's something I've always wanted to\n> do anyway.\n\nSorry, I see what you are saying now, that the name=value pairs would\nset in pg_database and pg_shadow and get executed on session startup. \nVery good.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 25 Jan 2002 00:55:32 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "On Thu, 24 Jan 2002, Bruce Momjian wrote:\n\n> I think we could set the database default at db creation time, then\n> allow SET to modify that default per session; seems flexible enough.\n> It is basically a GUC value who's default is stored in pg_database\n> rather than postgresql.conf. You could use postgresql.conf to set the\n> default schema type at db creation time.\n\nSpecifically to the question of schema pathing, why would you want it to\nbe session-settable? Either your DB app is designed to work w/ schemas, or\nit isn't. That's a pretty fundamental design concept. Given that, I don't\nsee how it can make sense to try to operate in the opposite mode as the\napp was designed for - that'll only lead to chaos.\n\nTake care,\n\nBill\n\n", "msg_date": "Fri, 25 Jan 2002 14:07:58 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n> Specifically to the question of schema pathing, why would you want it to\n> be session-settable? Either your DB app is designed to work w/ schemas, or\n> it isn't.\n\nSo that you can set the correct mode for your client application. It is\nsilly to suppose that an installation-wide or even database-wide setting\nis sufficient. Consider for example a database shared by multiple\npieces of client software; wouldn't you like to be able to upgrade them\nto schema-awareness one at a time?\n\nYou could possibly make a case for a single setting per user, but even\nthat makes an assumption (user == client software) that I think is not\nreasonable for us to force on all Postgres installations.\n\nBasically I haven't got a lot of patience for arguments that say we do\nnot need flexibility. There are more people out there, using Postgres\nin more different ways, than either you or I know about.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 17:26:14 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Fri, 25 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > Specifically to the question of schema pathing, why would you want it to\n> > be session-settable? Either your DB app is designed to work w/ schemas, or\n> > it isn't.\n>\n> So that you can set the correct mode for your client application. It is\n> silly to suppose that an installation-wide or even database-wide setting\n> is sufficient. Consider for example a database shared by multiple\n> pieces of client software; wouldn't you like to be able to upgrade them\n> to schema-awareness one at a time?\n\nWhat exactly does it mean to upgrade to schema-awareness? I know the jist\nof what you mean, but what does it entail? What steps? I ask as, when I\nthink of what it means in practical steps, an upgraded app won't have\nproblems with extra stuff pathed in. So the upgraded app will be fine with\nthe pathing set up to include all (not-upgraded) schemas. Also, if it does\nhave a problem with stuff pathed in, since you can easily set the new apps\nup to live in different schemas than the old ones, you can have upgraded &\nfrom-before schemas.\n\n> You could possibly make a case for a single setting per user, but even\n> that makes an assumption (user == client software) that I think is not\n> reasonable for us to force on all Postgres installations.\n\nBut we will have the ability to set the path per schema. Since\nschema-aware apps should be able to choose which schema they connect to (I\nenvision it being a connect parameter), the different apps can implicitly\nget different behaviors by connecting to schemas that are designed to be\nschema-savy, or connecting to ones which aren't (i.e. have all of the\nschema-unaware stuff pathed in).\n\n> Basically I haven't got a lot of patience for arguments that say we do\n> not need flexibility. There are more people out there, using Postgres\n> in more different ways, than either you or I know about.\n\nTom, please listen to what I'm saying. I'm trying to be as clear as I can\n& making sure I'm not working from details in my head and not my posts.\nI'm sorry if it isn't clear but I'm _not_ saying that we don't need the\nflexability you describe. We do.\n\nI'm saying that IT IS ALREADY THERE! The pathing built into schemas can be\nvery powerful. Powerful enough that I haven't heard of an example yet that\ncan't be taken care of with judicious use of pathing. And I don't think\nthe pathing needed is beyond mid-level admins (I don't see it as something\nwhich only say 5 people on the lists can get right). Yes, people will have\nto learn it, but it doesn't strike me as that hard a thing.\n\nWhat I am saying is that we don't need the solution you & Bruce mentioned\nto get the flexability you mentioned as the reason for adding it. So why\nadd the feature which isn't needed?\n\nOne of my objections to a \"mode\" supporting the old behavior is that, as I\nunderstand it, there would be a schema (\"public\") where different users\ncould own objects in the same schema. That goes against one of the\nadvantages I see for schemas: we can consolidate ownership info in the\nsystem tables. If you know what schema something is in, you know its\nowner. That means that adding schema support doesn't mean growing system\ntables, just renaming a column (the user id gets turned into the schema\nid).\n\nMaybe that's not such a big deal. But it seems when we're doing things\nright, things should get cleaner. Having to keep ownership info at both\nthe schema level and at the object level strikes me as not making things\ncleaner. That just seems to be going in the wrong direction.\n\nEspecially as, AFAICT, it wouldn't be hard to let the sysadmins have all\nthe flexability you want them to have (and also that I agree they should\nhave) in a system which is, at its core, very schema-savy (everything in\none schema is owned by the same user or group).\n\nI also agree that migration is important. Apps from 7.2 (and 7.1 and\nearlier as possible) should run on the schema-savy backend I describe. A\nmigration tool to take the dump from before and add update schema commands\nto path everything in (so it looks like one namespace) should make the old\napps keep working.\n\nThe one thing I'll concede could be useful would be for createuser to be\ntold to automatically set the new user's schema to include all the other\nschemas, and to update all the other user schemas to add this user. That\nway you can add new users to your DB when you're acting as if it didn't\nhave schemas.\n\nHmmm. If we made the above behavior a per-db-configurable default, the\npg_dump file wouldn't need to be changed. That would be good. It would\nmake the path updates O(nusers^2) rather than O(nusers), but that probably\nwon't be bad. And offering both options would probably be good.\n\nTake care,\n\nBill\n\n", "msg_date": "Fri, 25 Jan 2002 15:41:16 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bill Studenmund <wrstuden@netbsd.org> writes:\n> But we will have the ability to set the path per schema.\n\n?? I don't follow that at all. A namespace is something that's referred\nto by a search path, not vice versa. Or are you defining \"schema\" to\nmean some higher-level concept that incorporates a search path of\nmultiple primitive namespaces? Maybe that could work, but I'm not sure\nI see the point yet.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 19:04:15 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "On Fri, 25 Jan 2002, Tom Lane wrote:\n\n> Bill Studenmund <wrstuden@netbsd.org> writes:\n> > But we will have the ability to set the path per schema.\n>\n> ?? I don't follow that at all. A namespace is something that's referred\n> to by a search path, not vice versa. Or are you defining \"schema\" to\n> mean some higher-level concept that incorporates a search path of\n> multiple primitive namespaces? Maybe that could work, but I'm not sure\n> I see the point yet.\n\nOh. That would make a difference. We've been talking past each other.\n\nSQL schemas, as I understand the spec, are both. A shema is a container\nthat holds things like tables and views and functions (and for PostgreSQL\noperators and aggregates and I'd suggest index operators, etc.). It also\ncan include a schema path specification, which defines the search path\nused by routines (stored procedures & functions) contained in that schema.\n\nSo say I have schemas foo, bar, and baz. I can set the schema path for\nschema bar to be foo:bar:baz:IMPLIMENTATION_SCHEMA, and all routines in\nbar will look in those four schemas for types, functions and tables (and\neverything else we use the search path for).\n\n(*) IMPLIMENTATION_SCHEMA is required by the spec, and contains all the\nbuilt-ins. It's be implimentation_schema for pg. Also, if you have a path\nthat doesn't list it, the db is supposed to prepend it to the list.\n\nSo when migrating an app from a schema-unaware PostgreSQL to a\nschema-aware one, if we create a schema for each user, and make each\nsuch schema path in all the other such schemas, we make it such that all\nof the procedures in those schemas act like they have a unified namespace.\n\nThere also is also the concept of the CURRENT_PATH which is the schema\npath used for parsed queries (like ones typed into psql). I got lost in\nthe spec trying to find what this is supposed to default to, but what I\nunderstand other DBs to do is your CURRENT_PATH is set to the path of the\nschema you log into.\n\nAdd to this mix the default schema for user X is schema X (which I thought\nwas in the spec but I can't find now), and let's look at that example\nagain.\n\nSay we had users foo, bar and baz before. We made schemas foo, bar, and\nbaz. We set the default paths for each of these schemas to\nfoo:bar:baz:IMPLIMENTATION_SCHEMA. Now the routines in each of these\nschemas will see a unified namespace. Next, when we log in as users foo,\nbar, or baz, and our CURRENT_PATH ends up including the namespaces of the\nthree original users. So now all of our submitted queries also see a\nunified namespace.\n\nSo with a schema-savy backend, by adding PATH statements to the schemas\nthat pull in all of the previous schemas, we can make the old app behave\nas if it had a unified namespace.\n\nDoes that make sense?\n\nTake care,\n\nBill\n\nP.S. does anyone need copies of the spec? I found pdf's on the web a while\nback..\n\n", "msg_date": "Fri, 25 Jan 2002 17:35:11 -0800 (PST)", "msg_from": "Bill Studenmund <wrstuden@netbsd.org>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" } ]
[ { "msg_contents": "\n> PostQUEL-isms that no longer work:\n> \n> table.col.func\t\tMust rewrite as func(table.col)\n> \n> table.func1.func2\tMust rewrite as, eg, func2(func1(table.*))\n> \n> While there are a couple of examples of the above two constructs in the\n> regression tests, I doubt they are used much in the real world.\n\nImho OK. I only need table.func1 .\n\n> Another PostQUEL-ism that I would like to remove is col(tab) to mean\n> tab.col; I'd prefer to restrict the function syntax to functions only.\n> We could continue to support this for unqualified table names, but\n> given the above rules it could not work for a qualified table name,\n> eg, col(schema.tab) would be misinterpreted. Again, it seems unlikely\n> that many people are using this, so we may as well try to regularize\n> the syntax as much as we can.\n\nSounds ok too. Imho very hard to grok syntax anyway.\n\nWhat I do not like at all is the notion that \"table\" == \"table\".* .\n(IIRC there has already been some discussion where I objected to that.)\n\n\"table\" as function parameter imho passes an object of type \"table\"\nto the function. This involves type checking, and that the function only \nhas one argument.\n\n\"table\".* to the contrary is not an object, but one object (one parameter)\nper table column. This is imho easier to understand, since select table.* \nalso does it like that. Thus calling func(table.*) should imho rather be \nmapped to func (table.col1, table.col2 ...).\n\nAlso remember that the standard now has room for nested types.\ncreate table atab (\nx int,\ny int );\n\n( We use create table, standard iirc uses \"create type\".)\n\ncreate table btab (\nposition atab,\ninfo text );\n\nHow would you map btab.* here ? (x, y, info) ? Imho no.\nImho it should map to (atab, info) thus you need the \nnotion of passing an object anyway.\n\nAndreas\n", "msg_date": "Wed, 23 Jan 2002 10:29:10 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: Schemas vs. PostQUEL: resolving qualified identifiers" }, { "msg_contents": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> What I do not like at all is the notion that \"table\" == \"table\".* .\n> (IIRC there has already been some discussion where I objected to that.)\n\n> \"table\" as function parameter imho passes an object of type \"table\"\n> to the function. This involves type checking, and that the function only \n> has one argument.\n\n> \"table\".* to the contrary is not an object, but one object (one parameter)\n> per table column. This is imho easier to understand, since select table.* \n> also does it like that. Thus calling func(table.*) should imho rather be \n> mapped to func (table.col1, table.col2 ...).\n\nOkay, but then how will you refer unambiguously to the rowtype object?\nIf you write func(schema.tab) the system will misinterpret it as\nfunc(tab.col) --- which, in the worst case, might fail to fail because\nthere actually is such a column. We have to make some compromises here.\nI'm not all that thrilled with foo.* for rowtype either, but you haven't\noffered a workable alternative.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 10:06:19 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Schemas vs. PostQUEL: resolving qualified identifiers " }, { "msg_contents": "Tom Lane wrote:\n> \n> \"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at> writes:\n> > What I do not like at all is the notion that \"table\" == \"table\".* .\n> > (IIRC there has already been some discussion where I objected to that.)\n> \n> > \"table\" as function parameter imho passes an object of type \"table\"\n> > to the function. This involves type checking, and that the function only\n> > has one argument.\n> \n> > \"table\".* to the contrary is not an object, but one object (one parameter)\n> > per table column. This is imho easier to understand, since select table.*\n> > also does it like that. Thus calling func(table.*) should imho rather be\n> > mapped to func (table.col1, table.col2 ...).\n> \n> Okay, but then how will you refer unambiguously to the rowtype object?\n> If you write func(schema.tab) the system will misinterpret it as\n> func(tab.col) --- which, in the worst case, might fail to fail because\n> there actually is such a column. We have to make some compromises here.\n> I'm not all that thrilled with foo.* for rowtype either, but you haven't\n> offered a workable alternative.\n> \n\nWhat about casting with the keyord ROW?\n\nfunc(ROW table) \n\nalways refers to the row-type of table \"table\" even if there is\na column called \"table\".\n\n\n-- \nFernando Nasser\nRed Hat - Toronto E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Wed, 23 Jan 2002 13:12:37 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: Schemas vs. PostQUEL: resolving qualified identifiers" }, { "msg_contents": "Fernando Nasser <fnasser@redhat.com> writes:\n> Tom Lane wrote:\n>> Okay, but then how will you refer unambiguously to the rowtype object?\n\n> What about casting with the keyord ROW?\n> func(ROW table) \n> always refers to the row-type of table \"table\" even if there is\n> a column called \"table\".\n\nStrikes me as gratuituously different from the way everything else is\ndone. We have .* and %ROWTYPE and so forth, and they're all suffixes.\nThe closest analogy to your ROW syntax is CAST, but it doesn't alter the\ninitial interpretation of its argument.\n\nI was toying with the notion of inventing some new notation like\n\ttable.**\nI don't like double-asterisk much, but maybe there's some other symbol\nwe could use here?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 14:00:00 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Schemas vs. PostQUEL: resolving qualified identifiers " }, { "msg_contents": "Tom Lane wrote:\n> \n> Fernando Nasser <fnasser@redhat.com> writes:\n> > Tom Lane wrote:\n> >> Okay, but then how will you refer unambiguously to the rowtype object?\n> \n> > What about casting with the keyord ROW?\n> > func(ROW table)\n> > always refers to the row-type of table \"table\" even if there is\n> > a column called \"table\".\n> \n> Strikes me as gratuituously different from the way everything else is\n> done. We have .* and %ROWTYPE and so forth, and they're all suffixes.\n> The closest analogy to your ROW syntax is CAST, but it doesn't alter the\n> initial interpretation of its argument.\n> \n\nI didn't mean literally that way, I just wanted to add a keyword for\nsolving ambiguity (when there is one).\n\nYou are right, it should be:\n\nfunc(table%ROWTYPE) \n\n\n\n\n-- \nFernando Nasser\nRed Hat - Toronto E-Mail: fnasser@redhat.com\n2323 Yonge Street, Suite #300\nToronto, Ontario M4P 2C9\n", "msg_date": "Wed, 23 Jan 2002 16:57:08 -0500", "msg_from": "Fernando Nasser <fnasser@redhat.com>", "msg_from_op": false, "msg_subject": "Re: Schemas vs. PostQUEL: resolving qualified identifiers" } ]
[ { "msg_contents": "\n> I don't buy that. If all you're looking for is preserving\n> \n> foo.bar <==> bar(foo)\n> \n> for compatibility, then you can simply say that \"bar\" cannot be\n> schema-qualified in the left form (so it needs to live in the current or\n> the default schema). We currently only have one default schema, so that's\n> backward compatible. I think this syntax is a mistake, so I don't feel\n> compelled to provide more than backwards compatibility.\n\nThis syntax is actually my favorite :-) I use it heavily for calculated\ncolumns. I don't feel it is a mistake.\n\nAndreas\n", "msg_date": "Wed, 23 Jan 2002 10:59:18 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" } ]
[ { "msg_contents": "Hi all,\n\nI've been thinking implementing auditing for Postgres 7.3 and wanted to\nsee if anyone had any thoughts about it.\n\nAuditing would allow a user to log queries executed upon different\n'schema' objects - I use the loose sense of the word here. The user would\nbe able to define the type of query - insert, delete, etc - as well as\nchoose to log only those queries which were successful or otherwise.\n\nThe superuser would be able to audit unprivileged users. Unprivileged\nusers would only be able to produce an audit trail upon objects which\nhe/she owns or has been granted audit privileges to.\n\nThe audit trail would be written either to a new internal system table,\npg_audit, or optionally a file on the file system. I imagine that an\nexternal program would also be needed to read/dump the audit trail.\n\nSo what would an audit trail consist of?\n\ntimestamp\nquery type\nquery\nquery result (successful|unsuccessful)\naudit object oid\n\nI haven't really thought about this too hard just yet but thought I'd see\nif people considered this to be a useful addition to Postgres or not, or\nif I was going about this the wrong way.\n\nGavin\n\n", "msg_date": "Wed, 23 Jan 2002 21:18:57 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": true, "msg_subject": "Auditing and Postgres 7.3" }, { "msg_contents": "Hi Gavin,\n\nI can see the usefulness of this concept from a \"Data Security\" point of\nview.\n\nAt one place I worked, it was known one of the marketing people had a\nreputation of gathering customer details before leaving a job, just so\nhe had something to bargain a pay increase with for his next job. Don't\nknow why people hire a guy like that (I wouldn't), but these people\nexist.\n\nIt should definitely be optional, and if not turned on for an object I\ndon't think it should have an associated noticable performance penalty.\n\nMy thought is useful, but not sure how urgent when compared to other\nimprovements.\n\n:)\n\n+ Justin\n\n\nGavin Sherry wrote:\n> \n> Hi all,\n> \n> I've been thinking implementing auditing for Postgres 7.3 and wanted to\n> see if anyone had any thoughts about it.\n> \n> Auditing would allow a user to log queries executed upon different\n> 'schema' objects - I use the loose sense of the word here. The user would\n> be able to define the type of query - insert, delete, etc - as well as\n> choose to log only those queries which were successful or otherwise.\n> \n> The superuser would be able to audit unprivileged users. Unprivileged\n> users would only be able to produce an audit trail upon objects which\n> he/she owns or has been granted audit privileges to.\n> \n> The audit trail would be written either to a new internal system table,\n> pg_audit, or optionally a file on the file system. I imagine that an\n> external program would also be needed to read/dump the audit trail.\n> \n> So what would an audit trail consist of?\n> \n> timestamp\n> query type\n> query\n> query result (successful|unsuccessful)\n> audit object oid\n> \n> I haven't really thought about this too hard just yet but thought I'd see\n> if people considered this to be a useful addition to Postgres or not, or\n> if I was going about this the wrong way.\n> \n> Gavin\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Wed, 23 Jan 2002 21:53:04 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": false, "msg_subject": "Re: Auditing and Postgres 7.3" }, { "msg_contents": "On Wed, 23 Jan 2002, Justin Clift wrote:\n\n> Hi Gavin,\n> \n> I can see the usefulness of this concept from a \"Data Security\" point of\n> view.\n> \n> At one place I worked, it was known one of the marketing people had a\n> reputation of gathering customer details before leaving a job, just so\n> he had something to bargain a pay increase with for his next job. Don't\n> know why people hire a guy like that (I wouldn't), but these people\n> exist.\n\nThis is an administration/management issue. Whilst auditing of a database\nwould provide you with a large amount of data about the actions of, say,\nthe marketing department, it is not a solution to the problem. The real\nsolution is solved at the system privileges/application level.\n\nAn auditing trail is much more useful for application debugging, load\nassessment, planning etc.\n\n> \n> It should definitely be optional, and if not turned on for an object I\n> don't think it should have an associated noticable performance penalty.\n\nA user would turn auditing on. Eg\n\nAUDIT INSERT;\n\nor,\n\nAUDIT ALTER ON TABLE users WHENEVER NOT SUCCESSFUL;\n\nThis pretty much replicates the oracle syntax. How much it would different\nfrom this kind of syntax I don't know.\n\nAuditing would result in performance issues -- but new features generally\ndo. The thing with auditing is that it would generally not be used in\nproduction systems which relied on high performance. There is still the\nperformance cost of hitting the cache to see if the particular query is to\nbe audited. I would look at this cost when I started to implement it.\n\nThanks,\n\nGavin\n\n", "msg_date": "Wed, 23 Jan 2002 23:45:41 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": true, "msg_subject": "Re: Auditing and Postgres 7.3" }, { "msg_contents": "\nthe lack of a true full audit trail capabiity in postgres is perhaps \nit's biggest fundamental weakness as a \"commercial\" use system\n\nit has \"commercial\" use viability at this moment like the XT had \n\"commercial\" use viabilty in the early 80's\n\nie it's demand driven in a market where many (un aware or unconcrned) \npeople/businesses are prepared to pay for something that's really not \nthe real thing (hope i havn't broken and stupid copyright laws there)\n\nin fact. if i was to want to design a database system for \"commercial\" \nuse the very first thing i would start with would be the audit system\n\nobjects oriented? no, after audit\n\nreferenential integrety?, no, after audit\n\nreally - even just on a practicality basis the audit is essential\n\nthere needs to be a front end to the database - a completely new layer - \nthat layer feeds the database and no other and that layer is itself the \naudit trail\n\nit should be possible to run an audit trail backwards against a database \nand undo everything back to an earlier state (assuming that this is done \nin standalone mode)\n\nthe audit then IS the database - or rather it IS the data - all of it - \nand ideally it wold be in a form that is almost human readable\n\njust MHO\n\nm\n\n\n\n\nJustin Clift wrote:\n\n>Hi Gavin,\n>\n>I can see the usefulness of this concept from a \"Data Security\" point of\n>view.\n>\n>At one place I worked, it was known one of the marketing people had a\n>reputation of gathering customer details before leaving a job, just so\n>he had something to bargain a pay increase with for his next job. Don't\n>know why people hire a guy like that (I wouldn't), but these people\n>exist.\n>\n>It should definitely be optional, and if not turned on for an object I\n>don't think it should have an associated noticable performance penalty.\n>\n>My thought is useful, but not sure how urgent when compared to other\n>improvements.\n>\n>:)\n>\n>+ Justin\n>\n>\n>Gavin Sherry wrote:\n>\n>>Hi all,\n>>\n>>I've been thinking implementing auditing for Postgres 7.3 and wanted to\n>>see if anyone had any thoughts about it.\n>>\n>>Auditing would allow a user to log queries executed upon different\n>>'schema' objects - I use the loose sense of the word here. The user would\n>>be able to define the type of query - insert, delete, etc - as well as\n>>choose to log only those queries which were successful or otherwise.\n>>\n>>The superuser would be able to audit unprivileged users. Unprivileged\n>>users would only be able to produce an audit trail upon objects which\n>>he/she owns or has been granted audit privileges to.\n>>\n>>The audit trail would be written either to a new internal system table,\n>>pg_audit, or optionally a file on the file system. I imagine that an\n>>external program would also be needed to read/dump the audit trail.\n>>\n>>So what would an audit trail consist of?\n>>\n>>timestamp\n>>query type\n>>query\n>>query result (successful|unsuccessful)\n>>audit object oid\n>>\n>>I haven't really thought about this too hard just yet but thought I'd see\n>>if people considered this to be a useful addition to Postgres or not, or\n>>if I was going about this the wrong way.\n>>\n>>Gavin\n>>\n>>---------------------------(end of broadcast)---------------------------\n>>TIP 4: Don't 'kill -9' the postmaster\n>>\n>\n\n\n\n", "msg_date": "Wed, 23 Jan 2002 23:56:47 +1100", "msg_from": "Murray Prior Hobbs <murray@efone.com>", "msg_from_op": false, "msg_subject": "Re: Auditing and Postgres 7.3" }, { "msg_contents": "Murray,\n\nOn Wed, 23 Jan 2002, Murray Prior Hobbs wrote:\n\n> in fact. if i was to want to design a database system for \"commercial\" \n> use the very first thing i would start with would be the audit system\n> \n> objects oriented? no, after audit\n> \n> referenential integrety?, no, after audit\n> \n> really - even just on a practicality basis the audit is essential\n> \n> there needs to be a front end to the database - a completely new layer - \n> that layer feeds the database and no other and that layer is itself the \n> audit trail\n> \n> it should be possible to run an audit trail backwards against a database \n> and undo everything back to an earlier state (assuming that this is done \n> in standalone mode)\n\nYou seem to be confusing my defition of audit (track user queries, not\nthe effect they have on the database) with 'transaction logging' or\n'journalling'. The latter is the job of the write-ahead log already\nimplemented in Postgres.\n\nGavin\n\n\n", "msg_date": "Thu, 24 Jan 2002 00:01:21 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": true, "msg_subject": "Re: Auditing and Postgres 7.3" }, { "msg_contents": "On Wednesday 23 January 2002 07:56 am, Murray Prior Hobbs wrote:\n> the lack of a true full audit trail capabiity in postgres is perhaps\n> it's biggest fundamental weakness as a \"commercial\" use system\n\n> in fact. if i was to want to design a database system for \"commercial\"\n> use the very first thing i would start with would be the audit system\n\nUnderstand that Postgres was *never* designed to be a 'commercial' use system \nfrom the ground up. It was originally designed as a research platform. We \nare hammering at it becoming commercial-grade, though.\n\nGavin's idea sounds OK to me -- although you can get that information now \nfrom the query logs if you set the logging up. It's not per-table --- and I \nlike the per-table idea. This audit trail would make a handy debugging log \nas well.\n-- \nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Wed, 23 Jan 2002 08:09:41 -0500", "msg_from": "Lamar Owen <lamar.owen@wgcr.org>", "msg_from_op": false, "msg_subject": "Re: Auditing and Postgres 7.3" }, { "msg_contents": "I think that having an audit trail would be a very good feature for\nPostgreSQL. And I especially like the idea of superuser being able to\naudit unprivileged users (Turn it on for users one things are abusing\nthe system, etc) rather than just on specific tables.\n\nOn Wed, 2002-01-23 at 03:18, Gavin Sherry wrote:\n> Hi all,\n> \n> I've been thinking implementing auditing for Postgres 7.3 and wanted to\n> see if anyone had any thoughts about it.\n> \n> Auditing would allow a user to log queries executed upon different\n> 'schema' objects - I use the loose sense of the word here. The user would\n> be able to define the type of query - insert, delete, etc - as well as\n> choose to log only those queries which were successful or otherwise.\n> \n> The superuser would be able to audit unprivileged users. Unprivileged\n> users would only be able to produce an audit trail upon objects which\n> he/she owns or has been granted audit privileges to.\n> \n> The audit trail would be written either to a new internal system table,\n> pg_audit, or optionally a file on the file system. I imagine that an\n> external program would also be needed to read/dump the audit trail.\n> \n> So what would an audit trail consist of?\n> \n> timestamp\n> query type\n> query\n> query result (successful|unsuccessful)\n> audit object oid\n> \n> I haven't really thought about this too hard just yet but thought I'd see\n> if people considered this to be a useful addition to Postgres or not, or\n> if I was going about this the wrong way.\n> \n> Gavin\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n-- \n\nVirtually, \nNed Wolpert <ned.wolpert@knowledgenet.com>\n\nD08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45", "msg_date": "23 Jan 2002 08:26:47 -0700", "msg_from": "Ned Wolpert <ned.wolpert@knowledgenet.com>", "msg_from_op": false, "msg_subject": "Re: Auditing and Postgres 7.3" }, { "msg_contents": "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n> I've been thinking implementing auditing for Postgres 7.3 and wanted to\n> see if anyone had any thoughts about it.\n< snip >\n> So what would an audit trail consist of?\n>\n> timestamp\n> query type\n> query\n> query result (successful|unsuccessful)\n> audit object oid\n\nWe have implemented an audit trail at the application level several times for \nseveral different projects. While what you have described in this thread is \nmore aimed at debugging, what we have used it for is to see who changed what \nvalue to what when. We can show the complete history of all the values for \nparts of our schema, and who changed them when. Very useful for a number of \nsituation. This I would be a nice feature to have the database manage. \n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.0.6 (GNU/Linux)\nComment: For info see http://www.gnupg.org\n\niD8DBQE8Tty+8BXvT14W9HARAoFVAJ9fMHF9q0QhcRQSdmmGbTZX3P1vyACgkquy\nWU0WElwZoF6LOP9yNgIvf1c=\n=RazC\n-----END PGP SIGNATURE-----\n", "msg_date": "Wed, 23 Jan 2002 09:54:35 -0600", "msg_from": "\"Matthew T. O'Connor\" <matthew@zeut.net>", "msg_from_op": false, "msg_subject": "Re: Auditing and Postgres 7.3" } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]\n> Sent: 23 January 2002 00:02\n> To: Peter Eisentraut\n> Cc: Fernando Nasser; pgsql-hackers@postgresql.org\n> Subject: Re: RFD: schemas and different kinds of Postgres objects \n> \n> \n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > Tom Lane writes:\n> >> No, it doesn't work the same as today, because in that \n> implementation\n> >> both A and B can create the same tablename without \n> complaint. It then\n> >> becomes very unclear which instance other people will get \n> (unless your\n> >> \"any\" placeholder somehow implies a search order).\n> \n> > The \"search any schema\" switch is only intended for use with legacy\n> > databases, where duplicate names don't occur anyway.\n> \n> That's a mighty narrow view of the world. Do you think that \n> people had\n> better convert to SQL schemas before they ever again create a table?\n> The fact is that ordinary non-schema-aware usage will \n> certainly lead to\n> the above scenario.\n> \n> > that the switch probably doesn't make a whole lot of sense. \n> However, to\n> > get reproduceable behaviour anyway we can just define a \n> search order, such\n> > as by schema name.\n> \n> Or say that you get an \"ambiguous reference\" error if there \n> is more than\n> one possible candidate in the \"any\" namespace. (Although \n> that opens the\n> door for innocent creation of a table foo by one user to break other\n> people's formerly-working queries that reference some other foo.)\n> Bottom line for me is that this is an untried concept. I think the\n> concept of an \"any\" searchlist entry is risky enough that I don't much\n> want to hang the entire usability of the implementation on the\n> assumption that we won't find any fatal problems with \"any\".\n> \n> \n> However, the argument over whether SQL92's concept of ownership should\n> be taken as gospel is not really the argument I wanted to have in this\n> thread. Is it possible to go back to the original point concerning\n> whether there should be different namespace boundaries for different\n> types of objects? You aren't going to avoid those issues by \n> saying that\n> namespace == ownership is good enough.\n> \n> I'm particularly troubled by the idea of trying to apply this \"any\"\n> lookup concept to resolution of overloaded operators and functions.\n> Suppose I have a reference func(type1,type2) that I'm trying \n> to resolve,\n> and I have an inexact match (one requiring coercion) in my own schema.\n> Do I look to the \"any\" schema to see if there are better matches?\n> If so, what happens if the \"any\" schema contains multiple \n> possibilities\n> with identical signatures (presumably created by different \n> users)? ISTM\n> this will positively guarantee a resolution failure, since there's no\n> way for the resolver to prefer one over another. Thus, by creating\n> a \"func(foo,bar)\" function --- quite legally --- JRandomLuser might\n> break other people's formerly working queries that use other functions\n> named func. Although it's possible for this to happen now, it'll be\n> a lot more surprising if JRandomLuser thinks that his functions live\n> in his own private schema namespace.\n> \n> I'm thinking that the overloading concept is not going to play well\n> at all with multiple namespaces for functions or operators, and that\n> we'd be best off to say that there is only one namespace (per \n> database)\n> for these things.\n> \n> \t\t\tregards, tom lane\n> \nCould you just have a general rule of search in order of age (by OID)? This\nshould prevent changes to existing operation when new definitions come along\n(unless new definition is in new own schema or default).\nCheers,\n- Stuart\n", "msg_date": "Wed, 23 Jan 2002 11:03:16 -0000", "msg_from": "\"Henshall, Stuart - WCP\" <SHenshall@westcountrypublications.co.uk>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " }, { "msg_contents": "\"Henshall, Stuart - WCP\" <SHenshall@westcountrypublications.co.uk> writes:\n> Could you just have a general rule of search in order of age (by OID)?\n\nNo, unless you plan to abandon the whole notion of resolving ambiguous\noperator/function calls. (Which'd cut down our TODO list a good bit ;-)\nbut I don't think users would be happy...) OID/age ordering generally\nhas little to do with reasonable resolution behavior.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 09:59:39 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " } ]
[ { "msg_contents": "Hello,\n I would like to work on the show locks, and temp\n views todo items. These seem like a good place for\n me to start. Can anyone give me any pointers as to\n where i should look to get a list of the locks and\n where the view and temp tables code is for reference?\n\n\nthanks,\nchris\n\n", "msg_date": "Wed, 23 Jan 2002 11:40:50 +0000", "msg_from": "Chris Humphries <chumphries@devis.com>", "msg_from_op": true, "msg_subject": "TODO items and their related files?" }, { "msg_contents": "Chris Humphries wrote:\n> Hello,\n> I would like to work on the show locks, and temp\n> views todo items. These seem like a good place for\n> me to start. Can anyone give me any pointers as to\n> where i should look to get a list of the locks and\n> where the view and temp tables code is for reference?\n\nThe temp table code is in backend/utils/cache/temprel.c.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 23 Jan 2002 11:55:12 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: TODO items and their related files?" } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Murray Prior Hobbs [mailto:murray@efone.com] \n> Sent: 23 January 2002 12:57\n> To: Justin Clift\n> Cc: Gavin Sherry; pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] Auditing and Postgres 7.3\n> \n> it should be possible to run an audit trail backwards against \n> a database \n> and undo everything back to an earlier state (assuming that \n> this is done \n> in standalone mode)\n> \n> the audit then IS the database - or rather it IS the data - \n> all of it - \n> and ideally it wold be in a form that is almost human readable\n> \n\nI may be way off (often am in fact :-) ), but isn't this basically the time\ntravel that I believe was removed in 6.3?\n\n/Dave.\n", "msg_date": "Wed, 23 Jan 2002 13:13:02 -0000", "msg_from": "Dave Page <dpage@vale-housing.co.uk>", "msg_from_op": true, "msg_subject": "Re: Auditing and Postgres 7.3" } ]
[ { "msg_contents": "Dear all,\n\nI would like to know if \"Add OR REPLACE\" to-do item is on PostgreSQL 7.3 \nradar list.\n\nThere is a strong need for :\n- CREATE OR REPLACE VIEW,\n- CREATE OR REPLACE TRIGGER.\n\nPlease let me know if someone is working on theses features. This would help \npgAdmin II and other GUIs considerably.\n\nOtherwise I will have to learn more C and do it myself (which I am not sure \nto do because I am not a good programmer and do not know PostgreSQL \ninternals).\n\nThanks again to all of you,\nBest regards,\nJean-Michel POURE\n\n\n", "msg_date": "Wed, 23 Jan 2002 14:44:17 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": true, "msg_subject": "Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL\n\t7.3" }, { "msg_contents": "> - CREATE OR REPLACE VIEW,\n> - CREATE OR REPLACE TRIGGER.\n\nIsn't it the same as \n\nDROP VIEW name\nCREATE VIEW name\nor\nDROP TRIGGER name\nCREATE TRIGGER name\n?? \n\n --\nKaare Rasmussen --Linux, spil,-- Tlf: 3816 2582\nKaki Data tshirts, merchandize Fax: 3816 2501\nHowitzvej 75 �ben 14.00-18.00 Web: www.suse.dk\n2000 Frederiksberg L�rdag 11.00-17.00 Email: kar@kakidata.dk \n", "msg_date": "Wed, 23 Jan 2002 14:09:39 GMT", "msg_from": "\"Kaare Rasmussen\" <kar@kakidata.dk>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "On Wed, 23 Jan 2002, Jean-Michel POURE wrote:\n\n> Dear all,\n> \n> I would like to know if \"Add OR REPLACE\" to-do item is on PostgreSQL 7.3 \n> radar list.\n> \n> There is a strong need for :\n> - CREATE OR REPLACE VIEW,\n> - CREATE OR REPLACE TRIGGER.\n\nI intend to do this.\n\nGavin\n\n", "msg_date": "Thu, 24 Jan 2002 01:16:22 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation" }, { "msg_contents": "On Wed, 23 Jan 2002, Kaare Rasmussen wrote:\n\n> > - CREATE OR REPLACE VIEW,\n> > - CREATE OR REPLACE TRIGGER.\n> \n> Isn't it the same as \n> \n> DROP VIEW name\n> CREATE VIEW name\n> or\n> DROP TRIGGER name\n> CREATE TRIGGER name\n> ?? \n\nThe original OID is preserved.\n\nGavin\n\n", "msg_date": "Thu, 24 Jan 2002 01:22:22 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation" }, { "msg_contents": "On Wed, Jan 23, 2002 at 02:44:17PM +0100, Jean-Michel POURE wrote:\n> Otherwise I will have to learn more C and do it myself (which I am not sure \n> to do because I am not a good programmer and do not know PostgreSQL \n> internals).\n\nIt should be not very difficult. I think, the patch which implemented\nCREATE OR REPLACE FUNCTION should tell you almost all the stuff.\n\nIt was checked-in primarily at 2001/10/02 21:39:35. So something like\n\n$ cvs diff -D \"2001-10-02 21:00\" -D \"2001-10-03\"\n\nin `src/include' and `src/backend' sub-directories should do a great job for\nyou. (It really does !)\n\n-- \nHolger Krug\nhkrug@rationalizer.com\n", "msg_date": "Wed, 23 Jan 2002 15:43:00 +0100", "msg_from": "Holger Krug <hkrug@rationalizer.com>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "Holger Krug <hkrug@rationalizer.com> writes:\n> On Wed, Jan 23, 2002 at 02:44:17PM +0100, Jean-Michel POURE wrote:\n>> Otherwise I will have to learn more C and do it myself (which I am not sure \n>> to do because I am not a good programmer and do not know PostgreSQL \n>> internals).\n\n> It should be not very difficult. I think, the patch which implemented\n> CREATE OR REPLACE FUNCTION should tell you almost all the stuff.\n\nThere was, however, quite a bit of thrashing-about later to make it\nactually work reasonably well :-(\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 11:02:33 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "Le Mercredi 23 Janvier 2002 15:16, Gavin Sherry a �crit :\n> >�There is a strong need for :\n> >�- CREATE OR REPLACE VIEW,\n> >�- CREATE OR REPLACE TRIGGER.\n> I intend to do this.\n> Gavin\n\nGavin, you suddenly became the community hero. Can you hear the screems of \nyour fans? There is a crowd waiting for you. Where can I get a t-shirt with \nyour name on it?\n\nWith such features and the help of pgAdmin II, we can reach a new public of \nend-users. When do you think this can be done? \n\nThanks again.\n\nBest regards,\nJean-Michel POURE\n\n", "msg_date": "Wed, 23 Jan 2002 21:38:31 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": true, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "Jean-Michel POURE wrote:\n> Le Mercredi 23 Janvier 2002 15:16, Gavin Sherry a �crit :\n> > > There is a strong need for :\n> > > - CREATE OR REPLACE VIEW,\n> > > - CREATE OR REPLACE TRIGGER.\n> > I intend to do this.\n> > Gavin\n>\n> Gavin, you suddenly became the community hero. Can you hear the screems of\n> your fans? There is a crowd waiting for you. Where can I get a t-shirt with\n> your name on it?\n\n But please don't forget that simply overwriting an existing\n pg_proc tuple will not cause a persistent database connection\n to use the new version. PL/Tcl and PL/pgSQL for example cache\n the precompiled procedure based on it's oid. So at least\n think of a version count that get's bumped and checked in the\n PL handlers.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Wed, 23 Jan 2002 16:05:00 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation" }, { "msg_contents": "On Wed, 23 Jan 2002, Jean-Michel POURE wrote:\n\n> Le Mercredi 23 Janvier 2002 15:16, Gavin Sherry a �crit :\n> > >�There is a strong need for :\n> > >�- CREATE OR REPLACE VIEW,\n> > >�- CREATE OR REPLACE TRIGGER.\n> > I intend to do this.\n> > Gavin\n> \n\n> With such features and the help of pgAdmin II, we can reach a new public of \n> end-users. When do you think this can be done? \n\nIt depends when the patch would be put into a release. Its a small patch\nbut I am busy at the moment. I will probably do it in Feb.\n\nGavin\n\n", "msg_date": "Thu, 24 Jan 2002 11:20:43 +1100 (EST)", "msg_from": "Gavin Sherry <swm@linuxworld.com.au>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation" }, { "msg_contents": "> Isn't it the same as\n>\n> DROP VIEW name\n> CREATE VIEW name\n> or\n> DROP TRIGGER name\n> CREATE TRIGGER name\n\nTwo examples :\n1) Views with triggers\nIf you drop a view which has triggers and then re-recreate the view, the \ntriggers are lost.\n\n2) Server side code consistency\nLet's say you are working on a large view in pgAdmin II. If you drop a view \nand recreate it, you can never be sure that the new version of the view will \nba accepted by PostgeSQL.\n\ni.e. if the view definition is not correct, you loose your work.\n", "msg_date": "Thu, 24 Jan 2002 16:59:22 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": true, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "Le Mercredi 23 Janvier 2002 15:09, Kaare Rasmussen a �crit :\n> Isn't it the same as\n> DROP VIEW name\n> CREATE VIEW name\n> DROP TRIGGER name\n> CREATE TRIGGER name\n\nNo, CREATE OR REPLACE keeps oids, which is much more interesting.\n\nA few examples :\n\n1) Views with triggers.\nTriggers can be used to update views. But in the case of a simple \nDROP/CREATE, after dropping the view, the triggers are lost (depency problem).\n\nIFirthermore, if we had CREATE OR REPLACE, we could have pgAdmin II create \nthe underlying triggers automatically to update views...\n\n2) Server side code consistency\nIMHO, it is not possible to DROP / CREATE a view in a single transaction. \nTherefore, if you drop a view and the definition of the new view is \nincorrect, you loose the view. You can always save the old view definition, \nbut this is not serious programming...\n\n3) Future database IDE will be built upon abstraction layers (PEAR DB, \nMetatData, GnomeDB) to enable easy migration from one database to another \n(and make PostgreSQL world champion which is our goal). Abstraction layers \nwill not take into account things like DROP/CREATE.\n\nIn more general aspects :\n\nAt pgAdmin II, we would like to bundle pgAdmin with a Windows PostgreSQL \ninstaller wizard. And upload the package to free downloading sites. We need \nthese features to say : \"Look, PostgreSQL is the new AccessXP competitor\" or \nwhatever. This will bring a new audience to PostgreSQL.\n\nBest regards,\nJean-Michel POURE\n", "msg_date": "Thu, 24 Jan 2002 17:21:14 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": true, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "On Thu, Jan 24, 2002 at 05:21:14PM +0100, Jean-Michel POURE wrote:\n> Le Mercredi 23 Janvier 2002 15:09, Kaare Rasmussen a ?crit :\n> > Isn't it the same as\n> > DROP VIEW name\n> > CREATE VIEW name\n> > DROP TRIGGER name\n> > CREATE TRIGGER name\n> \n> No, CREATE OR REPLACE keeps oids, which is much more interesting.\n> \n> A few examples :\n> \n> 1) Views with triggers.\n> Triggers can be used to update views. But in the case of a simple \n> DROP/CREATE, after dropping the view, the triggers are lost (depency problem).\n> \n> IFirthermore, if we had CREATE OR REPLACE, we could have pgAdmin II create \n> the underlying triggers automatically to update views...\n\nJust a nomenclature/language thing: a trigger on a view won't do very\nmuch, and I think can not be created in 7.2. A trigger fires when\ntuples are about to be stored or accessed from storage: since a view\n_has_ no storage of it's own (well, none that's used) a trigger will\nnever fire. Rules, on the other hand, rewrite the SQL: that's how views\nare implemented. So, you mean ' VIEWs with additional rules'.\n\nRoss\n", "msg_date": "Thu, 24 Jan 2002 10:58:14 -0600", "msg_from": "\"Ross J. Reedstrom\" <reedstrm@rice.edu>", "msg_from_op": false, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" }, { "msg_contents": "Le Jeudi 24 Janvier 2002 17:58, vous avez �crit :\n> Rules, on the other hand, rewrite the SQL: that's how views\n> are implemented. �So, you mean ' VIEWs with additional rules'.\n\nYou are right. Thank you.\nJean-Michel POURE\n", "msg_date": "Thu, 24 Jan 2002 19:01:12 +0100", "msg_from": "Jean-Michel POURE <jm.poure@freesurf.fr>", "msg_from_op": true, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creation in\n\tPostgreSQL 7.3" } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Kaare Rasmussen [mailto:kar@kakidata.dk] \n> Sent: 23 January 2002 14:10\n> To: jm.poure@freesurf.fr\n> Cc: pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] Add OR REPLACE clauses to non-FUNCTION \n> object creation in PostgreSQL 7.3\n> \n> \n> > - CREATE OR REPLACE VIEW,\n> > - CREATE OR REPLACE TRIGGER.\n> \n> Isn't it the same as \n> \n> DROP VIEW name\n> CREATE VIEW name\n> or\n> DROP TRIGGER name\n> CREATE TRIGGER name\n> ?? \n\nNo. CREATE OR REPLACE will preserve the object OID and will not break any\ndependencies.\n\nRegards, Dave.\n", "msg_date": "Wed, 23 Jan 2002 14:24:07 -0000", "msg_from": "Dave Page <dpage@vale-housing.co.uk>", "msg_from_op": true, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creat" } ]
[ { "msg_contents": "I was talking to Tom Lane yesterday about our current postgresql.conf\nWAL options and we came up with the following TODO items I just added:\n\n---------------------------------------------------------------------------\n\n* Reorder postgresql.conf WAL items in order of importance\n* Remove wal_files postgresql.conf option because WAL files are now recycled\n* Find proper defaults for postgresql.conf WAL entries\n* Add checkpoint_min_warning postgresql.conf option to warn about\n checkpoints that are too frequent\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 23 Jan 2002 11:12:44 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "postgresql.conf WAL options" } ]
[ { "msg_contents": "GCC CVS now outputs a multiline version string:\n\n[teg@halden teg]$ gcc --version\ngcc (GCC) 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)\nCopyright (C) 2002 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n[teg@halden teg]$ \n\nIt also complains about multiline literals being deprecated, like\n\n#define CC_VERSION \"FOO\n\nBAR\n\"\n\nAutoconf thinks these warnings (which it will get for pretty much all\ntests, as this is in confdefs.h) means the test failed.\n\nOne way to work around this is:\n\n--- postgresql-7.2rc1/configure.in.multiline\tWed Jan 23 12:36:53 2002\n+++ postgresql-7.2rc1/configure.in\tWed Jan 23 12:37:26 2002\n@@ -297,7 +297,7 @@\n \n # Create compiler version string\n if test x\"$GCC\" = x\"yes\" ; then\n- cc_string=\"GCC `${CC} --version`\"\n+ cc_string=\"GCC `${CC} --version|head -n 1`\"\n else\n cc_string=$CC\n fi\n\n\n\n\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "23 Jan 2002 12:48:42 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": true, "msg_subject": "autoconf + newer gcc barfs " }, { "msg_contents": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:\n> GCC CVS now outputs a multiline version string:\n> [teg@halden teg]$ gcc --version\n> gcc (GCC) 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)\n> Copyright (C) 2002 Free Software Foundation, Inc.\n> This is free software; see the source for copying conditions. There is NO\n> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\nI put in a \"head -1\" step per your suggestion. However, this will still\nleave us with really ugly version strings, along the line of\n\nPostgreSQL 7.2rc1 on hppa-hp-hpux10.20, compiled by GCC gcc (GCC) 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)\n\nMay I suggest that gcc is being a little too verbose here? Perhaps\n\"gcc --version --verbose\" could do that, and plain \"gcc --version\"\ncould try to have some respect for compatibility with prior behavior.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 14:53:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: autoconf + newer gcc barfs " } ]
[ { "msg_contents": "I have talked in the past about a possible implementation of\nsavepoints/nested transactions. I would like to more formally outline\nmy ideas below.\n\nWe have talked about using WAL for such a purpose, but that requires WAL\nfiles to remain for the life of a transaction, which seems unacceptable.\nOther database systems do that, and it is a pain for administrators. I\nrealized we could do some sort of WAL compaction, but that seems quite\ncomplex too.\n\nBasically, under my plan, WAL would be unchanged. WAL's function is\ncrash recovery, and it would retain that. There would also be no\non-disk changes. I would use the command counter in certain cases to\nidentify savepoints.\n\nMy idea is to keep savepoint undo information in a private area per\nbackend, either in memory or on disk. We can either save the\nrelid/tids of modified rows, or if there are too many, discard the\nsaved ones and just remember the modified relids. On rollback to save\npoint, either clear up the modified relid/tids, or sequential scan\nthrough the relid and clear up all the tuples that have our transaction\nid and have command counters that are part of the undo savepoint.\n\nIt seems marking undo savepoint rows with a fixed aborted transaction id\nwould be the easiest solution.\n\nOf course, we only remember modified rows when we are in savepoints, and\nonly undo them when we rollback to a savepoint. Transaction processing\nremains the same.\n\nThere is no reason for other backend to be able to see savepoint undo\ninformation, and keeping it private greatly simplifies the\nimplementation.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 23 Jan 2002 13:19:05 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": true, "msg_subject": "Savepoints" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> Basically, under my plan, WAL would be unchanged. WAL's function is\n> crash recovery, and it would retain that. There would also be no\n> on-disk changes. I would use the command counter in certain cases to\n> identify savepoints.\n\nThis is a pointer to the previous August thread, where your original proposal\nwas posted, and some WAL/not WAL discussion took place. Just not to repeat the\nalready mentioned points. Oh, it's google archive just for fun, and to not\noverload hub.org ;-)\n\nhttp://groups.google.com/groups?hl=en&threadm=200108050432.f754Wdo11696%40candle.pha.pa.us&rnum=1&prev=/groups%3Fhl%3Den%26selm%3D200108050432.f754Wdo11696%2540candle.pha.pa.us\n\nRegards,\nHaroldo.\n", "msg_date": "Wed, 23 Jan 2002 16:15:12 -0300", "msg_from": "Haroldo Stenger <hstenger@adinet.com.uy>", "msg_from_op": false, "msg_subject": "Re: Savepoints" } ]
[ { "msg_contents": "If the installed perl is built with threads support, plperl won't\nbuild. Here is a fix for dealing properly with this, by Chip Turner\n(cturner@redhat.com) \n\n--- postgresql-7.2rc1/src/pl/plperl/plperl.c.back\tWed Jan 23 15:08:32 2002\n+++ postgresql-7.2rc1/src/pl/plperl/plperl.c\tWed Jan 23 15:34:49 2002\n@@ -80,6 +80,7 @@\n \n #include \"EXTERN.h\"\n #include \"perl.h\"\n+#include \"XSUB.h\"\n #include \"ppport.h\"\n \n \n@@ -124,7 +125,7 @@\n static plperl_proc_desc *compile_plperl_function(Oid fn_oid, bool is_trigger);\n \n static SV *plperl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc);\n-static void plperl_init_shared_libs(void);\n+static void plperl_init_shared_libs(pTHX);\n \n \n /*\n@@ -350,11 +351,11 @@\n *\n **********************************************************************/\n \n-extern void boot_DynaLoader _((CV * cv));\n-extern void boot_SPI _((CV * cv));\n+EXTERN_C void boot_DynaLoader(pTHX_ CV* cv);\n+EXTERN_C void boot_SPI(pTHX_ CV* cv);\n \n static void\n-plperl_init_shared_libs(void)\n+plperl_init_shared_libs(pTHX)\n {\n \tchar\t *file = __FILE__;\n \n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "23 Jan 2002 16:20:18 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": true, "msg_subject": "perl problems in RC1" }, { "msg_contents": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:\n> If the installed perl is built with threads support, plperl won't\n> build. Here is a fix for dealing properly with this, by Chip Turner\n> (cturner@redhat.com) \n\nUh ... how long has pTHX been a standard part of the Perl API?\nIn other words, how many configurations will this patch break?\n(Right offhand I see no pTHX or pTHX_ in my trusty old 5.00503 perl,\nfor example.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 17:02:46 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: perl problems in RC1 " } ]
[ { "msg_contents": "PL/Perl tries to handle an \"undef\" result from a Perl function (which\nshould convert to a SQL NULL) with code like so:\n\n /* XXX is this the approved way to check for an undef result? */\n if (perlret == &PL_sv_undef)\n {\n retval = (Datum) 0;\n fcinfo->isnull = true;\n }\n else\n {\n\t// handle non-null result\n }\n\nBut I find that it doesn't work, at least not on RH Linux 7.2 with\nperl 5.6.0. The if-test fails to notice undef results.\n\nAnyone know what the correct way to do this is?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 23 Jan 2002 18:16:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Checking for undefined in Perl interface code?" }, { "msg_contents": "man perlguts:\n If you want to know if this variable (or any other SV) is\n actually defined, you can call:\n\n SvOK(SV*)\n\n The scalar undef value is stored in an SV instance called\n PL_sv_undef. Its address can be used whenever an SV* is\n needed.\n\nMay be:\nif (! (SvOK(perlret) && perlret != &PL_sv_undef) ) {...\n\n\nTom Lane wrote:\n\n> PL/Perl tries to handle an \"undef\" result from a Perl function (which\n> should convert to a SQL NULL) with code like so:\n> \n> /* XXX is this the approved way to check for an undef result? */\n> if (perlret == &PL_sv_undef)\n> {\n> retval = (Datum) 0;\n> fcinfo->isnull = true;\n> }\n> else\n> {\n> \t// handle non-null result\n> }\n> \n> But I find that it doesn't work, at least not on RH Linux 7.2 with\n> perl 5.6.0. The if-test fails to notice undef results.\n> \n> Anyone know what the correct way to do this is?\n> \n> \t\t\tregards, tom lane\n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 4: Don't 'kill -9' the postmaster\n> \n> \n\n\n-- \nTeodor Sigaev\nteodor@stack.net\n\n\n", "msg_date": "Thu, 24 Jan 2002 12:25:48 +0300", "msg_from": "Teodor Sigaev <teodor@stack.net>", "msg_from_op": false, "msg_subject": "Re: Checking for undefined in Perl interface code?" }, { "msg_contents": "Teodor Sigaev <teodor@stack.net> writes:\n> May be:\n> if (! (SvOK(perlret) && perlret != &PL_sv_undef) ) {...\n\nApparently the correct way is\n\n\tif (! (perlret && SvOK(perlret))) ...\n\nThanks for the tip.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 11:54:56 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Checking for undefined in Perl interface code? " } ]
[ { "msg_contents": "> I have talked in the past about a possible implementation of\n> savepoints/nested transactions. I would like to more formally outline\n> my ideas below.\n\nWell, I would like to do the same -:)\n\n> ...\n> There is no reason for other backend to be able to see savepoint undo\n> information, and keeping it private greatly simplifies the\n> implementation.\n\nYes... and requires additional memory/disk space: we keep old records\nin data files and we'll store them again...\n\nHow about: use overwriting smgr + put old records into rollback\nsegments - RS - (you have to keep them somewhere till TX's running\nanyway) + use WAL only as REDO log (RS will be used to rollback TX'\nchanges and WAL will be used for RS/data files recovery).\nSomething like what Oracle does.\n\nVadim\n", "msg_date": "Wed, 23 Jan 2002 15:22:42 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "Re: Savepoints" }, { "msg_contents": "Mikheev, Vadim wrote:\n> > I have talked in the past about a possible implementation of\n> > savepoints/nested transactions. I would like to more formally outline\n> > my ideas below.\n> \n> Well, I would like to do the same -:)\n\nGood.\n\n> > ...\n> > There is no reason for other backend to be able to see savepoint undo\n> > information, and keeping it private greatly simplifies the\n> > implementation.\n> \n> Yes... and requires additional memory/disk space: we keep old records\n> in data files and we'll store them again...\n\nI was suggesting keeping only relid/tid or in some cases only relid. \nSeems like one or the other will fit all needs: relid/tid for update of\na few rows, relid for many rows updated in the same table. I saw no\nneed to store the actual data.\n\n> How about: use overwriting smgr + put old records into rollback\n> segments - RS - (you have to keep them somewhere till TX's running\n> anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> changes and WAL will be used for RS/data files recovery).\n> Something like what Oracle does.\n\nWhy record the old data rows rather than the tids? While the\ntransaction is running, the rows can't be moved anyway. Also, why store\nthem in a shared area. That has additional requirements because one old\ntransaction can require all transactions to keep their stuff around. \nWhy not just make it a private data file for each backend?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 23 Jan 2002 20:08:45 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Savepoints" }, { "msg_contents": "> > There is no reason for other backend to be able to see savepoint undo\n> > information, and keeping it private greatly simplifies the\n> > implementation.\n> \n> Yes... and requires additional memory/disk space: we keep old records\n> in data files and we'll store them again...\n> \n> How about: use overwriting smgr + put old records into rollback\n> segments - RS - (you have to keep them somewhere till TX's running\n> anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> changes and WAL will be used for RS/data files recovery).\n> Something like what Oracle does.\n\nI am sorry. I see what you are saying now. I missed the words\n\"overwriting smgr\". You are suggesting going to an overwriting storage\nmanager. Is this to be done only because of savepoints. Doesn't seem\nworth it when I have a possible solution without such a drastic change.\nAlso, overwriting storage manager will require MVCC to read through\nthere to get accurate MVCC visibility, right?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 23 Jan 2002 20:20:58 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Savepoints" }, { "msg_contents": "Bruce Momjian wrote:\n\n\n> I am sorry. I see what you are saying now. I missed the words\n> \"overwriting smgr\". You are suggesting going to an overwriting storage\n> manager.\n\n\nOverwriting storage managers don't suffer from unbounded growth of \ndatafiles until garbage collection (vacuum) is performed. In fact, \nthere's no need for a vacuum-style utility. The rollback segments only \nneed to keep around enough past history to rollback transactions that \nare executing.\n\nOf course, then the size of your transactions are limited by the size of \nyour rollback segments, which in Oracle are fixed in length when you \nbuild your database (there are ways to change this when you figure out \nthat you didn't pick a good number when creating it).\n\n >Is this to be done only because of savepoints.\n\nNot in traditional storage managers such as Oracle uses. The complexity \nof managing visibility and the like are traded off against the fact that \nyou're not stuck ever needing to garbage collect a database that \noccupies a roomful of disks.\n\nIt's a trade-off. PG's current storage manager seems to work awfully \nwell in a lot of common database scenarios, and Tom's new vacuum is \nmeant to help mitigate against the drawbacks. But overwriting storage \nmanagers certainly have their advantages, too.\n\n > Doesn't seem\n\n> worth it when I have a possible solution without such a drastic change.\n> Also, overwriting storage manager will require MVCC to read through\n> there to get accurate MVCC visibility, right?\n\n\nYep...\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Wed, 23 Jan 2002 18:05:36 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: Savepoints" }, { "msg_contents": "> -----Original Message-----\n> From: Mikheev, Vadim\n> \n> How about: use overwriting smgr + put old records into rollback\n> segments - RS - (you have to keep them somewhere till TX's running\n> anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> changes and WAL will be used for RS/data files recovery).\n> Something like what Oracle does.\n\nAs long as we use no overwriting manager\n1) Rollback(data) isn't needed in case of a db crash.\n2) Rollback(data) isn't needed to cancal a transaction entirely.\n3) We don't need to mind the transaction size so much.\n\nWe can't use the db any longer if a REDO recovery fails now.\nUnder overwriting smgr we can't use the db any longer either\nif rollback fails. How could PG be not less reliable than now ?\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 25 Jan 2002 01:34:29 +0900", "msg_from": "\"Hiroshi Inoue\" <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: Savepoints" } ]
[ { "msg_contents": "> So the failure-to-start-up problem can be blamed entirely on 7.1's\n> failure to do anything with LSN fields in pg_log pages. I was able to\n\nNo, first reported problem can be blamed on RAM failures.\n\n> So I am still dissatisfied with doing elog(STOP) for this condition,\n> as I regard it as an overly strong reaction to corrupted data;\n> moreover, it does nothing to fix the problem and indeed gets in\n> the way of fixing the problem.\n\nTotally agreed but..\n\n> I propose the attached patch.\n> What do you think?\n> \n...\n> + \tif (XLByteLT(LogwrtResult.Flush, record))\n> + \t\telog(InRecovery ? NOTICE : ERROR,\n\nI suggest also to set some flag here if InRecovery,\nto elog(STOP\n\nDATA FILE(S) CORRUPTED!\nRESTORE DATA FROM BACKUP OR\nRESET WAL TO DUMP/MANUALLY FIX ERRORS\n\n- or something like that -:) - after all data buffers\nflushed.\n\nWhat's wrong with this? It's not Ok automatically restart\nknowing about errors in data.\n\nVadim\n", "msg_date": "Wed, 23 Jan 2002 15:39:16 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "Re: Theory about XLogFlush startup failures" }, { "msg_contents": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM> writes:\n>> So I am still dissatisfied with doing elog(STOP) for this condition,\n>> as I regard it as an overly strong reaction to corrupted data;\n>> moreover, it does nothing to fix the problem and indeed gets in\n>> the way of fixing the problem.\n\n> ... It's not Ok automatically restart\n> knowing about errors in data.\n\nActually, I disagree. If we come across clearly corrupt data values\n(eg, bad length word for a varlena item, or even tuple-header errors \nsuch as a bad XID), we do not try to force the admin to restore the\ndatabase from backup, do we? A bogus LSN is bad, certainly, but it\nis not the end of the world and does not deserve a panic reaction.\nAt worst it tells us that one data page is corrupt. A robust system\nshould report that and keep plugging.\n\nWhat would be actually useful here is to report which page contains\nthe bad LSN, so that the admin could look at it and decide what to do.\nxlog.c doesn't know that, unfortunately. I'd be more interested in\nexpending work to make that happen than in expending work to make\na dbadmin's life more difficult --- and I rank forced stops in the\nlatter category.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 26 Jan 2002 12:52:34 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Theory about XLogFlush startup failures " }, { "msg_contents": "...\n> > ... It's not Ok automatically restart\n> > knowing about errors in data.\n...\n> At worst it tells us that one data page is corrupt. A robust system\n> should report that and keep plugging.\n\nHmm. I'm not sure that this needs an \"either-or\" resolution on the\ngeneral topic of error recovery. Back when I used Ingres, it had the\nfeature that corruption would mark the database as \"readonly\" (a mode\nI'd like us to have -- even without errors -- to help support upgrades,\nupdates, and error handling). So an administrator could evaluate the\ndamage without having further damage caused, but could allow users to\nrummage through database at the same time.\n\nI have a hard time believing that we should *always* allow the database\nto keep writing in the face of *any* detected error. I'm sure that is\nnot what Tom is saying, but in this case could further damage be caused\nby subsequent writing when we *already* know that there is some\ncorruption? If so, we should consider supporting some sort of error\nstate that prevents further damage. Vadim's solution uses the only\ncurrent mechanism available, which is to force the database to shut down\nuntil it can be evaluated. But if we had some stronger mechanisms to\nsupport limited operation, that would might help in this case and would\ncertainly help in other situations too.\n\n - Thomas\n", "msg_date": "Sun, 27 Jan 2002 01:16:45 +0000", "msg_from": "Thomas Lockhart <lockhart@fourpalms.org>", "msg_from_op": false, "msg_subject": "Re: Theory about XLogFlush startup failures" }, { "msg_contents": "Thomas Lockhart <lockhart@fourpalms.org> writes:\n> If so, we should consider supporting some sort of error\n> state that prevents further damage.\n\nThis seems reasonable (though I'd still question whether a bad LSN is\nsufficient reason to force the whole database into read-only mode).\n\n> Vadim's solution uses the only\n> current mechanism available, which is to force the database to shut down\n> until it can be evaluated.\n\nBut one of the big problems with his solution is that it gets in the way\nof evaluating the problem. A read-only mode seems like a better way.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 26 Jan 2002 22:53:52 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: Theory about XLogFlush startup failures " } ]
[ { "msg_contents": "Hi guys,\n\nMichael Devogelaere, the guy who writes the QMail-SQL package has\nrecently started moving away from using PostgreSQL to MySQL.\n\nIn his experience, MySQL works better. Now, he's just tested them over\nthe weekend, and what he reports is that PostgreSQL *crashes*. Doesn't\njust go slow, but *crashes*.\n\nWould someone be able to take a look into this?\n\n???\n\nRegards and best wishes,\n\nJustin Clift\n\n-------- Original Message --------\nSubject: Re: Qmail-SQL\nDate: Wed, 23 Jan 2002 15:17:12 +0100\nFrom: Michael Devogelaere <michael@digibel.be>\nTo: Justin Clift <justin@postgresql.org>\nReferences: <3C48F4B9.AC03E251@postgresql.org>\n<20020119122728.A9661@digibel.be>\n\n> > \n> > It makes me wonder if the poor performance of PostgreSQL is still\n> > relevant, and I'm wondering if you tuned the memory size of the\n> > PostgreSQL database when you tested it. The default memory allocation\n> > gives really high CPU load and low performance, but this can be adjusted\n> > much easier now.\n> I didn't tune anything, but i'll redo my tests this weekend and play a little\n> with it ;)\n\nOk. I worked a bit on it this weekend and put the results on \nhttp://qmail-sql.digibel.be/testing.html. I'm very sorry but\npostgresql was between 3 and 4 times slower than mysql and didn't\nsurvive all tests.\n\nKind regards,\nMichael Devogelaere.\n\n-----------------------------------------------------------------------\nSome people have told me they don't think a fat penguin really embodies \nthe grace of Linux, which just tells me they have never seen a angry \npenguin charging at them in excess of 100mph. They'd be a lot more \ncareful about what they say if they had -- Linus Torvalds\n", "msg_date": "Thu, 24 Jan 2002 10:50:52 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "\nOn Thu, 24 Jan 2002, Justin Clift wrote:\n\n> Michael Devogelaere, the guy who writes the QMail-SQL package has\n> recently started moving away from using PostgreSQL to MySQL.\n>\n> In his experience, MySQL works better. Now, he's just tested them over\n> the weekend, and what he reports is that PostgreSQL *crashes*. Doesn't\n> just go slow, but *crashes*.\n>\n> Would someone be able to take a look into this?\n\nI went to the page mentioned below and wanted to try grabbing the test\nscripts to see if I could replicate the crash, but got 404's for the\ntestscripts.tgz link on the page. The speed doesn't surprise me as much\nas the crash does.\n\n> -------- Original Message --------\n> Subject: Re: Qmail-SQL\n> Date: Wed, 23 Jan 2002 15:17:12 +0100\n> From: Michael Devogelaere <michael@digibel.be>\n> To: Justin Clift <justin@postgresql.org>\n> References: <3C48F4B9.AC03E251@postgresql.org>\n> <20020119122728.A9661@digibel.be>\n>\n> Ok. I worked a bit on it this weekend and put the results on\n> http://qmail-sql.digibel.be/testing.html. I'm very sorry but\n> postgresql was between 3 and 4 times slower than mysql and didn't\n> survive all tests.\n>\n> Kind regards,\n> Michael Devogelaere.\n\n\n", "msg_date": "Wed, 23 Jan 2002 16:24:17 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Stephan Szabo wrote:\n>\n> On Thu, 24 Jan 2002, Justin Clift wrote:\n>\n> > Michael Devogelaere, the guy who writes the QMail-SQL package has\n> > recently started moving away from using PostgreSQL to MySQL.\n> >\n> > In his experience, MySQL works better. Now, he's just tested them over\n> > the weekend, and what he reports is that PostgreSQL *crashes*. Doesn't\n> > just go slow, but *crashes*.\n> >\n> > Would someone be able to take a look into this?\n>\n> I went to the page mentioned below and wanted to try grabbing the test\n> scripts to see if I could replicate the crash, but got 404's for the\n> testscripts.tgz link on the page. The speed doesn't surprise me as much\n> as the crash does.\n\n As the doc says, all done totally untuned. And CRASH by\n itself doesn't say anything. A little more precise would be\n good.\n\n Other than that, once again one of these mostly read only\n scenarios with simple queries where it is well known that a\n real database cannot compete.\n\n\nJan\n\n>\n> > -------- Original Message --------\n> > Subject: Re: Qmail-SQL\n> > Date: Wed, 23 Jan 2002 15:17:12 +0100\n> > From: Michael Devogelaere <michael@digibel.be>\n> > To: Justin Clift <justin@postgresql.org>\n> > References: <3C48F4B9.AC03E251@postgresql.org>\n> > <20020119122728.A9661@digibel.be>\n> >\n> > Ok. I worked a bit on it this weekend and put the results on\n> > http://qmail-sql.digibel.be/testing.html. I'm very sorry but\n> > postgresql was between 3 and 4 times slower than mysql and didn't\n> > survive all tests.\n> >\n> > Kind regards,\n> > Michael Devogelaere.\n>\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n>\n> http://archives.postgresql.org\n>\n\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Wed, 23 Jan 2002 20:36:20 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Justin Clift wrote:\n\n> Hi guys,\n> \n> Michael Devogelaere, the guy who writes the QMail-SQL package has\n> recently started moving away from using PostgreSQL to MySQL.\n> \n> In his experience, MySQL works better. Now, he's just tested them over\n> the weekend, and what he reports is that PostgreSQL *crashes*. Doesn't\n> just go slow, but *crashes*.\n> \n> \n\n\nI tried to grab his scripts but both his \"here\" links return a 404 Not \nFound.\n\nOne interesting point ... he does:\n\n * A failing query for the user.\n * A query for the alias-user.\n * A query for alias-username in the dotqmails-table.\n * A query for alias-default in the dotqmails-table.\n\nFour queries that most likely can be done with a single query ... gotta \nwonder about these MySQL-trained wunderkinds and their ability to write \ndecent queries.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Wed, 23 Jan 2002 17:54:03 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On Wed, Jan 23, 2002 at 04:24:17PM -0800, Stephan Szabo wrote:\n> \n> On Thu, 24 Jan 2002, Justin Clift wrote:\n> \n> > Michael Devogelaere, the guy who writes the QMail-SQL package has\n> > recently started moving away from using PostgreSQL to MySQL.\nThat's not entirely true: i'm still using PostgreSQL and i don't even\nconsider moving to MySQL, since i'm using a more complicated database which\ndoesn't run on MySQL. But - sorry to tell it - in my opinion, MySQL is a\nlot faster for simple queries if one needs to connect/disconnect frequently.\nI suspect that PostgreSQL connects quite slowly and therefore performs\nbad in this kind of tests.\n\n> >\n> > Would someone be able to take a look into this?\n> \n> I went to the page mentioned below and wanted to try grabbing the test\n> scripts to see if I could replicate the crash, but got 404's for the\n> testscripts.tgz link on the page. The speed doesn't surprise me as much\n> as the crash does.\nThe link is fixed now.\n\nKind regards,\nMichael Devogelaere.\n", "msg_date": "Thu, 24 Jan 2002 15:11:45 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "> As the doc says, all done totally untuned. And CRASH by\n> itself doesn't say anything. A little more precise would be\n> good.\nOk: the client reported something like: \n\"Unexpected EOF from PostgreSQL-backend\". When looking with ps aux, i noted\nthat all postmaster-childs where <defunct>. I couldn't connect anymore with\npsql (i aborted the test and no other processes tried to access the database\nsince my machine was in single user mode). After killing the master process and\nrestarting, the database worked fine.\n> \n> Other than that, once again one of these mostly read only\n> scenarios with simple queries where it is well known that a\n> real database cannot compete.\nTrue: i planned two tests. One big read-only test and then another which would \nadd simulation of pop-logins. After a successful pop-login the field \n'lastlogin' is updated. But i didn't run that test since postgresql already \nfailed the simple read-only test.\n\nKind regards,\nMichael Devogelaere.\n", "msg_date": "Thu, 24 Jan 2002 15:28:15 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere wrote:\n\n > But - sorry to tell it - in my opinion, MySQL is a\n\n> lot faster for simple queries if one needs to connect/disconnect frequently.\n> I suspect that PostgreSQL connects quite slowly and therefore performs\n> bad in this kind of tests.\n\n\nSure, this is known. Serious applications pool persistent connections, \nthough, making it a non-issue for many of us.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Thu, 24 Jan 2002 08:12:54 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere wrote:\n> > As the doc says, all done totally untuned. And CRASH by\n> > itself doesn't say anything. A little more precise would be\n> > good.\n> Ok: the client reported something like:\n> \"Unexpected EOF from PostgreSQL-backend\". When looking with ps aux, i noted\n> that all postmaster-childs where <defunct>. I couldn't connect anymore with\n> psql (i aborted the test and no other processes tried to access the database\n> since my machine was in single user mode). After killing the master process and\n> restarting, the database worked fine.\n\n Looks like leftover or not fast enough reaped old connections\n that fill up all possible backend slots (default max 32).\n Persistent connections is definitely something that\n PostgreSQL likes.\n\n> >\n> > Other than that, once again one of these mostly read only\n> > scenarios with simple queries where it is well known that a\n> > real database cannot compete.\n> True: i planned two tests. One big read-only test and then another which would\n> add simulation of pop-logins. After a successful pop-login the field\n> 'lastlogin' is updated. But i didn't run that test since postgresql already\n> failed the simple read-only test.\n\n As said, \"simple read-only\" is not really something you want\n a full featured RDBMS for. Maybe you are better off with a\n simple and stupid system on the feature level of gdbm or\n MySql.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 24 Jan 2002 11:40:54 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Jan Wieck wrote:\n> \n<snip>\n> \n> As said, \"simple read-only\" is not really something you want\n> a full featured RDBMS for. Maybe you are better off with a\n> simple and stupid system on the feature level of gdbm or\n> MySql.\n> \n> Jan\n\nI'd agree with this on the query-level functionality... but...\n\nMichael, does Qmail-SQL *store* the email in the database? (haven't\nchecked)\n\nIf so, there's no way I'd want new customer inquiries or other\n*important* email stored in a system which didn't know how to fully\nrecover if the server crashes.\n\nImagine... 200,000 customer emails in a busy MySQL 3.23.x database, and\nthe UPS power cuts off.\n\nErk...\n\n+ Justin\n\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> #================================================== JanWieck@Yahoo.com #\n> \n> _________________________________________________________\n> Do You Yahoo!?\n> Get your free @yahoo.com address at http://mail.yahoo.com\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Fri, 25 Jan 2002 03:48:40 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On Fri, Jan 25, 2002 at 03:48:40AM +1100, Justin Clift wrote:\n> Jan Wieck wrote:\n> > \n> <snip>\n> > \n> > As said, \"simple read-only\" is not really something you want\n> > a full featured RDBMS for. Maybe you are better off with a\n> > simple and stupid system on the feature level of gdbm or\n> > MySql.\n> > \n> > Jan\n> \n> I'd agree with this on the query-level functionality... but...\n> \n> Michael, does Qmail-SQL *store* the email in the database? (haven't\n> checked)\nNo way ;) Only the user/authentication-management moved to the database.\n> \n> If so, there's no way I'd want new customer inquiries or other\n> *important* email stored in a system which didn't know how to fully\n> recover if the server crashes.\nNeither do i. But i know there exists a patch (qmail seems to consist merely\nof patches) which stores the mail in a database. Maybe you can use this to\n\"save\" helpdesk-calls ;)\n\nRegards,\nMichael.\n", "msg_date": "Thu, 24 Jan 2002 17:59:43 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "After reading about the patch, it seems that the database is only used for\nvirtualhost lookups and password/account verification -- it never mentioned\ndoing any more than that... I've just read over the docs once though, so no\none take my word as law yet.\n\nI'm going to install this later and play with it as I've been looking for a\nsolution like this for a while (though I'm a postfix user, I'd gladly switch\nif this patch works!). I'll see if I can get PG to crash with it and\ninvestigate further..\n\nJust in theory, I don't even trust MySQL to store my usernames and\npasswords, I've seen it take a dive too many times to use it for much of\nanything... They've released several versions since I last used it but it\nwas a lot less stable for me than older 6.X versions of PG when the load got\na little high...\n\nIf the patch just does a few simple queries, I'd think something along the\nlines of mSQL might be nice (though I've never used it, I've heard some nice\nthings about it for tiny databases).. PG's feature set is grossly underused\nfor applications like this... If I do use it I'll probably install another\ncopy of PG and turn down the sort mem and such to get a little better\nscalability -- spawning a new PG process every time someone checks their\nmail is going to cost me dearly with the way my PG is setup now..\n\nWell, we'll see how it goes.\n\n-Mitch\n\n> > As said, \"simple read-only\" is not really something you want\n> > a full featured RDBMS for. Maybe you are better off with a\n> > simple and stupid system on the feature level of gdbm or\n> > MySql.\n> >\n> > Jan\n>\n> I'd agree with this on the query-level functionality... but...\n>\n> Michael, does Qmail-SQL *store* the email in the database? (haven't\n> checked)\n>\n> If so, there's no way I'd want new customer inquiries or other\n> *important* email stored in a system which didn't know how to fully\n> recover if the server crashes.\n>\n> Imagine... 200,000 customer emails in a busy MySQL 3.23.x database, and\n> the UPS power cuts off.\n\n\n", "msg_date": "Thu, 24 Jan 2002 10:22:34 -0700", "msg_from": "\"Mitch Vincent\" <mitch@doot.org>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere <michael@digibel.be> writes:\n> Ok: the client reported something like: \n> \"Unexpected EOF from PostgreSQL-backend\".\n\nWhat showed up in the postmaster log when this happened? I would like\n*exact* error message texts, not approximations.\n\n> When looking with ps aux, i noted\n> that all postmaster-childs where <defunct>. I couldn't connect anymore with\n> psql\n\nWhat happened when you tried to connect with psql? Again, exact, not\napproximate.\n\nIt sounds like the postmaster got into a state where it was not\nresponding to SIGCHLD signals. We fixed one possible cause of that\nbetween 7.1 and 7.2, but without a more concrete report I have no way to\nknow if you saw the same problem or a different one. I'd have expected\nconnection attempts to unwedge the postmaster in any case.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 13:11:39 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "On Thu, Jan 24, 2002 at 01:11:39PM -0500, Tom Lane wrote:\n> Michael Devogelaere <michael@digibel.be> writes:\n> > Ok: the client reported something like: \n> > \"Unexpected EOF from PostgreSQL-backend\".\n> \n> What showed up in the postmaster log when this happened? I would like\n> *exact* error message texts, not approximations.\nNothing. I disabled all logging since the database responded too slowly\nwith logging turned on. So i cannot help you on this.\n> \n> > When looking with ps aux, i noted\n> > that all postmaster-childs where <defunct>. I couldn't connect anymore with\n> > psql\n> \n> What happened when you tried to connect with psql? Again, exact, not\n> approximate.\npsql: connectDBStart() -- connect() failed: No such file or directory\n\tIs the postmaster running locally\n\tand accepting connection on Unix socket ...\n\nKind regards,\nMichael Devogelaere.\n", "msg_date": "Thu, 24 Jan 2002 19:18:34 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere <michael@digibel.be> writes:\n> On Thu, Jan 24, 2002 at 01:11:39PM -0500, Tom Lane wrote:\n>> What showed up in the postmaster log when this happened? I would like\n>> *exact* error message texts, not approximations.\n> Nothing. I disabled all logging since the database responded too slowly\n> with logging turned on. So i cannot help you on this.\n\nIf you're not going to be cooperative, then I don't see how you expect\nus to fix the problem.\n\nFWIW, I don't believe for a moment that /dev/null'ing the postmaster log\nimproves performance measurably. I've done plenty of profiling in my\ntime, and never seen any indication that it's an issue; at least not at\nthe default verbosity level.\n\n>> What happened when you tried to connect with psql? Again, exact, not\n>> approximate.\n> psql: connectDBStart() -- connect() failed: No such file or directory\n> \tIs the postmaster running locally\n> \tand accepting connection on Unix socket ...\n\nNo such file?? Hard to believe that that could happen while the\npostmaster was still running. Unless something else had decided to\ndelete the socket file from /tmp. The postmaster certainly would not\ndo it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 13:45:47 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "Tom Lane wrote:\n> Michael Devogelaere <michael@digibel.be> writes:\n> > On Thu, Jan 24, 2002 at 01:11:39PM -0500, Tom Lane wrote:\n> >> What showed up in the postmaster log when this happened? I would like\n> >> *exact* error message texts, not approximations.\n> > Nothing. I disabled all logging since the database responded too slowly\n> > with logging turned on. So i cannot help you on this.\n>\n> If you're not going to be cooperative, then I don't see how you expect\n> us to fix the problem.\n>\n> FWIW, I don't believe for a moment that /dev/null'ing the postmaster log\n> improves performance measurably. I've done plenty of profiling in my\n> time, and never seen any indication that it's an issue; at least not at\n> the default verbosity level.\n>\n> >> What happened when you tried to connect with psql? Again, exact, not\n> >> approximate.\n> > psql: connectDBStart() -- connect() failed: No such file or directory\n> > Is the postmaster running locally\n> > and accepting connection on Unix socket ...\n>\n> No such file?? Hard to believe that that could happen while the\n> postmaster was still running. Unless something else had decided to\n> delete the socket file from /tmp. The postmaster certainly would not\n> do it.\n\n Haven't there been some over enthusiastic cleanup scripts in\n some Linux distro's, that removed the socket from /tmp\n because of it's age?\n\n Anyway, so in summary:\n\n 1. The test case was the *well known* MySQL favorite suite;\n Simple one-table read-only access with myriads of\n connect's.\n\n 2. The *well known* fact that PostgreSQL out of the box is\n not configured for production was ignored.\n\n 3. Any possibility to track down the reasons for problems\n was disabled.\n\n 4. Instead of investigating what the problem is, PostgreSQL\n was reported to *Crash*.\n\n It cannot get any more obvious.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 24 Jan 2002 14:14:45 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Hi Tom,\n\nTom Lane wrote:\n> \n<snip>\n> If you're not going to be cooperative, then I don't see how you expect\n> us to fix the problem.\n\nHey, lets not start a war here!\n\nMichael's been using PostgreSQL for a while, but hasn't had a chance to\nreally get into it. When he makes a mistake like this, it's not because\nof evil intentions!\n\n<snip> \n> No such file?? Hard to believe that that could happen while the\n> postmaster was still running. Unless something else had decided to\n> delete the socket file from /tmp. The postmaster certainly would not\n> do it.\n\nThis provides an interesting lead. There's at least one linux\ndistribution which does this. Part of the cron'd maintenance scripts\ndelete all the files in /tmp, and therefore play havoc....\n\nBut, I don't remember which distribution, although I don't think it was\nRedHat.\n\n???\n\nRegards and best wishes,\n\nJustin Clift\n\n\n> \n> regards, tom lane\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Fri, 25 Jan 2002 11:25:37 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Justin Clift <justin@postgresql.org> writes:\n>> No such file?? Hard to believe that that could happen while the\n>> postmaster was still running. Unless something else had decided to\n>> delete the socket file from /tmp. The postmaster certainly would not\n>> do it.\n\n> This provides an interesting lead. There's at least one linux\n> distribution which does this. Part of the cron'd maintenance scripts\n> delete all the files in /tmp, and therefore play havoc....\n\nYeah, I do recall that some versions had a tmp-scrubber that didn't make\nany exception for socket files. But it's kind of a big coincidence to\nassume that would happen just while Michael was running his benchmark.\nNot sure I credit it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 19:51:05 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "Tom Lane wrote:\n> Justin Clift <justin@postgresql.org> writes:\n> >> No such file?? Hard to believe that that could happen while the\n> >> postmaster was still running. Unless something else had decided to\n> >> delete the socket file from /tmp. The postmaster certainly would not\n> >> do it.\n> \n> > This provides an interesting lead. There's at least one linux\n> > distribution which does this. Part of the cron'd maintenance scripts\n> > delete all the files in /tmp, and therefore play havoc....\n> \n> Yeah, I do recall that some versions had a tmp-scrubber that didn't make\n> any exception for socket files. But it's kind of a big coincidence to\n> assume that would happen just while Michael was running his benchmark.\n> Not sure I credit it.\n\nWe added some PostgreSQL code to touch the socket file during\ncheckpoints, and I thought that was in 7.1.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 20:05:48 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "I said:\n> Yeah, I do recall that some versions had a tmp-scrubber that didn't make\n> any exception for socket files. But it's kind of a big coincidence to\n> assume that would happen just while Michael was running his benchmark.\n\n... or maybe not. I just looked back at Michael's benchmark page and\nobserved that the extrapolated time to complete the run in question was\nover 24 hours (and the first two parts of the script would've taken\nmore than 12). If he'd left the machine alone for a couple of days\nwhile the script ran, maybe it's credible that a /tmp-scrubber did its\nthing meanwhile.\n\nThat still leaves us with all the defunct postmaster children to explain\nthough. Hmm. I wonder exactly what the postmaster does when someone\nforcibly removes its socket file... probably system-dependent, but I\ncould certainly believe getting into a busy-wait loop of select/accept.\nThat doesn't look like it should prevent SIGCHLD from getting noticed,\nthough.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 20:12:15 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> We added some PostgreSQL code to touch the socket file during\n> checkpoints, and I thought that was in 7.1.\n\nYou're thinking about the socket lock file, which is a plain file.\n\nThe problem with socket files is that the file mod time usually doesn't\nchange even when it's in active use. That's why things like\n/tmp-scrubbers need to make an exception for socket files.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 20:14:44 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "> > > psql: connectDBStart() -- connect() failed: No such file or directory\n> > > Is the postmaster running locally\n> > > and accepting connection on Unix socket ...\n> >\n> > No such file?? Hard to believe that that could happen while the\n> > postmaster was still running. Unless something else had decided to\n> > delete the socket file from /tmp. The postmaster certainly would not\n> > do it.\n> Haven't there been some over enthusiastic cleanup scripts in\n> some Linux distro's, that removed the socket from /tmp\n> because of it's age?\nThe system was running in single user mode when running the tests (i think\ni already mentioned that). This was done to prevent the results from\nbeing influenced by daily/hourly cronjobs such as logrotate. The symptom\nyou're probably referring too is the daily run of 'tmpwatch':\n- since cron was disabled, tmpwatch didn't run\n- tmpwatch cleans empty directories and regular files. Sockets are leaved\n unchanged.\n> \n> Anyway, so in summary:\n> \n> 1. The test case was the *well known* MySQL favorite suite;\n> Simple one-table read-only access with myriads of\n> connect's.\nThat's correct: qmail-getpw is called myriads of times: each time a\nmail needs to be delivered locally. I don't care about whether this\nfavours one database or not: it's what happens on a busy mailserver.\n> \n> 2. The *well known* fact that PostgreSQL out of the box is\n> not configured for production was ignored.\n>From http://qmail-sql.digibel.be/testing.html:\n The first testround uses the database-configurations as shipped by Red\n Hat: postgresql 7.1.3 and mysql 3.23.41. No additional performance\n tuning was performed. \n\nIMHO i didn't ignore the lack of tuning. And i DO want to tune it, but\nit seemed fair to me to start the test with the default configuration as\nshipped by RedHat and then investigate the results of different tunings.\nBut the next tests were skipped since postgresql crashed.\n> \n> 3. Any possibility to track down the reasons for problems\n> was disabled.\nMy first idea was to log connects,queries and disconnects: i imagine most\ndatabase-admins turned logging on in their databases. With mysql it runs\nthese things when you turn on 'log=/var/log/..'. I configured postgresql\nto log the same and ran 1 'qmail-getpw' testrun:\n- with logging: 112 seconds.\n- without logging: 32 seconds.\nI suspect this has to with the fact that i configured postgresql to log\nto syslog. Don't blame me for this: it's the way RedHat ships postgresql.\nTo make things fair i disabled logging on both databases (mysql-\nperformance is not affected by logging, but it doesn't use syslog). This\nalso excluded vital debug-messages. Frankly: i didn't expect postgresql\nto crash but i'll turn them on a next time.\n> \n> 4. Instead of investigating what the problem is, PostgreSQL\n> was reported to *Crash*.\nYes: it *crashed*. Since i disabled all debugging i cannot help you\nwith investigating this problem. I hope i won't get the death penalty\nfor this ;)\n> \n> It cannot get any more obvious.\nPlease elaborate.\n\nMichael.\n", "msg_date": "Fri, 25 Jan 2002 02:16:15 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Tom Lane wrote:\n> Bruce Momjian <pgman@candle.pha.pa.us> writes:\n> > We added some PostgreSQL code to touch the socket file during\n> > checkpoints, and I thought that was in 7.1.\n> \n> You're thinking about the socket lock file, which is a plain file.\n> \n> The problem with socket files is that the file mod time usually doesn't\n> change even when it's in active use. That's why things like\n> /tmp-scrubbers need to make an exception for socket files.\n\nHard to imagine how X11 runs in such a case. Does it not go into\n/tmp/.X11_unix?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 20:17:19 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Justin Clift writes:\n\n> This provides an interesting lead. There's at least one linux\n> distribution which does this. Part of the cron'd maintenance scripts\n> delete all the files in /tmp, and therefore play havoc....\n\nDeleting a socket file doesn't create havoc, it simply means you can't\nconnect anymore.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Thu, 24 Jan 2002 20:44:30 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "I said:\n> That still leaves us with all the defunct postmaster children to explain\n> though. Hmm. I wonder exactly what the postmaster does when someone\n> forcibly removes its socket file... probably system-dependent, but I\n> could certainly believe getting into a busy-wait loop of select/accept.\n> That doesn't look like it should prevent SIGCHLD from getting noticed,\n> though.\n\nOn Linux (at least RH 7.2), the answer to what happens when the socket\nfile is removed is: nothing. Clients can't connect anymore, but the\npostmaster gets no error indicating that anything is wrong. So it sits.\n\nAnd that means that the 7.1-to-7.2 change I mentioned before is\nrelevant. In 7.1, the SIGCHLD signal handler blocked signals at its\nbeginning, and didn't think to unblock them on exit. So after servicing\none SIGCHLD interrupt, the postmaster would end up sitting at its\nselect() with signals blocked. Further SIGCHLDs would not get serviced\nuntil the next spin around the outer loop re-enabled interrupts.\nNormally, no big deal, but with no new connection requests coming in,\nthe postmaster wouldn't ever get around to wait()ing for its last few\nchildren. (7.2 re-enables signals at exit from the handler, so I don't\nthink it will show this problem; and indeed I don't see any zombies\nafter \"rm /tmp/.s.PGSQL.5432\" during a run of Michael's benchmark\nscript with 7.2. Not incidentally, I do observe a complete lack of any\ncomplaints out of the benchmark script; it keeps flailing along without\nany sign that all its database connection attempts are failing.)\n\nIn short: all the reported facts can be explained by the theory that\n*something* removed the socket file during that long test run.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 20:50:06 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "Peter Eisentraut wrote:\n> \n> Justin Clift writes:\n> \n> > This provides an interesting lead. There's at least one linux\n> > distribution which does this. Part of the cron'd maintenance scripts\n> > delete all the files in /tmp, and therefore play havoc....\n> \n> Deleting a socket file doesn't create havoc, it simply means you can't\n> connect anymore.\n\nSorry Peter,\n\nI wasn't being entirely accurate, more describing that Something Not\nWanted Happens. I'll try to be more accurate next time.\n\n:)\n\n+ Justin\n\n> \n> --\n> Peter Eisentraut peter_e@gmx.net\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Fri, 25 Jan 2002 12:52:18 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere wrote:\n> >\n> > 4. Instead of investigating what the problem is, PostgreSQL\n> > was reported to *Crash*.\n> Yes: it *crashed*. Since i disabled all debugging i cannot help you\n> with investigating this problem. I hope i won't get the death penalty\n> for this ;)\n> >\n> > It cannot get any more obvious.\n> Please elaborate.\n\n I hope you don't take any of my comments personal. Because\n they are not! It is just that I am tired and bored of these\n every so often repeated MySQL optimized \"benchmarks\".\n\n I see a clear difference between a database server process\n crash and a disabled service caused by misbehaving sysadmin\n scripts and/or bad service because of contra-optimized client\n behaviour.\n\n This is exactly the same style of reporting crashes or bad\n performace, the MySQL folks have practiced for years. I\n remember creating and dropping tables a couple thousand\n times, then VACUUM with a user that doesn't have permissions\n to vacuum system catalogs, and report bad performance because\n the system cache got successfully screwed up ... there was\n even a comment in the script saying \"this makes Postgres\n slow\" ... haha. Other reported *crashes* have been core\n dumps of the test-scripts, because Postgres dealt with datums\n bigger than the perl-client was able to swallow ... well, the\n test driver just reported a crash, not exactly where and why,\n does that really matter? MySQL shows success and Postgres\n does not, that's what counts.\n\n The lowest level still accepted Transaction Processing\n Council Benchmark, TPC-C, can be implemented with a SUT using\n MySQL. Do it using LAMP, if you want to learn what a database\n crash is ;-)\n\n There is a good reason why TPC has abandoned the TPC-1, TPC-A\n and TPC-B benchmarks. They are \"too simple\" to be of any\n meaning for benchmarking purposes these days. Yet all the\n stuff this huge crowd of MySQL-Lemmings is constantly\n babbling about is even more simple than that! They all have\n their reasons, the TPC members (basically all serious RDBMS\n vendors) on one side as well as the MySQL folks on the other.\n\n As a matter of fact, the MySQL folks are alone with their\n point of view that \"beeing fastest on a single-table-select\"\n is the most important criteria for a relational database\n management system. And as another matter of fact, Lemmings\n get what Lemmings deserve, MySQL!\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Thu, 24 Jan 2002 23:35:15 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Hello again,\n\nI've rerun the tests and got:\nNOTICE:\t Message from PostgreSQL backend:\n\tThe Postmaster has informed me that some other backend died abnormally\nand possibly corrupted shared memory.\n\tI have rolled back the current transaction and am going to terminate\nyour database system connection and exit.\n\tPlease reconnect to the database system and repeat your query.\n\nNothing showed up in the logs however. This time i aborted the test after the\nfirst errormessages and could reconnect to the database ! I don't know if this \nhas to do with the number of <defunct> postmasters: there only showed up 2 now \nand not a few screens as in the first crash. When typing 'ps aux' a few minutes\nlater they were all gone !\n\nKind regards,\nMichael Devogelaere.\n\n", "msg_date": "Fri, 25 Jan 2002 10:20:01 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On Fri, Jan 25, 2002 at 10:20:01AM +0100, Michael Devogelaere wrote:\n> I've rerun the tests and got:\n> NOTICE:\t Message from PostgreSQL backend:\n> \tThe Postmaster has informed me that some other backend died abnormally\n> and possibly corrupted shared memory.\n> \tI have rolled back the current transaction and am going to terminate\n> your database system connection and exit.\n> \tPlease reconnect to the database system and repeat your query.\n> \n> Nothing showed up in the logs however. This time i aborted the test after the\n> first errormessages and could reconnect to the database ! I don't know if this \n> has to do with the number of <defunct> postmasters: there only showed up 2 now \n> and not a few screens as in the first crash. When typing 'ps aux' a few minutes\n> later they were all gone !\n\nI know nothing about the reasons of your crash, if the message given\nabove suffices to determine the reason and how to configure the\ndatabase to get more reasonable log messages (actually about the last\npoint I know something, but you can read it at\n\n* http://developer.postgresql.org/docs/postgres/install-procedure.html\n* http://developer.postgresql.org/docs/postgres/runtime-config.html#LOGGING\n\nso I won't repeat that stuff here), but I know that for scenarios like\nyours connection pooling was invented. Connection pooling avoids the\ncreation of a new backend process for each single query. Did you ever\ntry your test with connection pooling ? Real databases *require*\nconnection pooling in such a case, MySQL or file systems\ndon't. (Actually when considering to use MySQL, why not using\nReiserFS. It's also kind of a database with hashs and all this stuff ;-)\n\nI know that another mail in this thread already mentioned connection\npooling, but I don't remember any answer from your side. Maybe it's\nworth an attempt.\n\n-- \nHolger Krug\nhkrug@rationalizer.com\n", "msg_date": "Fri, 25 Jan 2002 11:26:24 +0100", "msg_from": "Holger Krug <hkrug@rationalizer.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "At 11:26 AM 1/25/02 +0100, Holger Krug wrote:\n>so I won't repeat that stuff here), but I know that for scenarios like\n>yours connection pooling was invented. Connection pooling avoids the\n>creation of a new backend process for each single query. Did you ever\n>try your test with connection pooling ? Real databases *require*\n>connection pooling in such a case, MySQL or file systems\n\nIf the database crashes are not due to resource limits, connection pooling\ndoes not seem to be the real solution.\n\nIf postgresql crashes after X concurrent backends are respawned Y times I\nfigure something is wrong and should be fixed.\n\nRegards,\nLink.\n\n", "msg_date": "Fri, 25 Jan 2002 20:46:24 +0800", "msg_from": "Lincoln Yeoh <lyeoh@pop.jaring.my>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On Fri, Jan 25, 2002 at 08:46:24PM +0800, Lincoln Yeoh wrote:\n> If the database crashes are not due to resource limits, connection pooling\n> does not seem to be the real solution.\n\nThat's clear.\n\nBut the other part of his problem (`bad performance') suffers from his\nsetup (no connection pooling).\n\n-- \nHolger Krug\nhkrug@rationalizer.com\n", "msg_date": "Fri, 25 Jan 2002 14:47:03 +0100", "msg_from": "Holger Krug <hkrug@rationalizer.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Lincoln Yeoh wrote:\n> At 11:26 AM 1/25/02 +0100, Holger Krug wrote:\n> >so I won't repeat that stuff here), but I know that for scenarios like\n> >yours connection pooling was invented. Connection pooling avoids the\n> >creation of a new backend process for each single query. Did you ever\n> >try your test with connection pooling ? Real databases *require*\n> >connection pooling in such a case, MySQL or file systems\n>\n> If the database crashes are not due to resource limits, connection pooling\n> does not seem to be the real solution.\n\n The crash he reported this time looks like a backend dumping\n core. I wonder how he killed the postmaster the last time\n and if he by doing it with -9 corrupted the database?\n\n The entire discussion is somehow pointless. Tell some Riksha-\n puller to compare his Riksha with this brand new Ferrari, and\n wait his comments after the test drive. He'll probably won't\n get the damn thing moving, and if, it'd be a hell of a ride,\n so he will tell you that his Riksha has a much better\n handling and the Ferrari *crashed*.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Fri, 25 Jan 2002 09:05:52 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "> \n> The crash he reported this time looks like a backend dumping\n> core. I wonder how he killed the postmaster the last time\n> and if he by doing it with -9 corrupted the database?\nHe killed the database with -9, rebooted the machine, removed /var/lib/pgsql\nand created a new database from scratch. Then he populated the database again\nand ran the test again.\n> \n> The entire discussion is somehow pointless. Tell some Riksha-\n> puller to compare his Riksha with this brand new Ferrari, and\n> wait his comments after the test drive. He'll probably won't\n> get the damn thing moving, and if, it'd be a hell of a ride,\n> so he will tell you that his Riksha has a much better\n> handling and the Ferrari *crashed*.\nHe doesn't have a Riksha or a Ferrari. But he would hate it if the doors\nfell of his Ferrari after opening and closing them a few times ;)\n\nMichael.\n", "msg_date": "Fri, 25 Jan 2002 16:27:02 +0100", "msg_from": "Michael Devogelaere <michael@digibel.be>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere wrote:\n> >\n> > The crash he reported this time looks like a backend dumping\n> > core. I wonder how he killed the postmaster the last time\n> > and if he by doing it with -9 corrupted the database?\n> He killed the database with -9, rebooted the machine, removed /var/lib/pgsql\n> and created a new database from scratch. Then he populated the database again\n> and ran the test again.\n\n So you did a new initdb? And then you got a core dump. Ewe,\n that doesn't seem right.\n\n The test case is still on your web page? I think I should\n download it and take a closer look.\n\n> He doesn't have a Riksha or a Ferrari. But he would hate it if the doors\n> fell of his Ferrari after opening and closing them a few times ;)\n\n That's the problem with Ferrari. What makes them expensive is\n that you need 3 cars. The Ferrari, a useful reliable one, and\n the car for the mechanic.\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#================================================== JanWieck@Yahoo.com #\n\n\n\n_________________________________________________________\nDo You Yahoo!?\nGet your free @yahoo.com address at http://mail.yahoo.com\n\n", "msg_date": "Fri, 25 Jan 2002 11:34:38 -0500 (EST)", "msg_from": "Jan Wieck <janwieck@yahoo.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "\nOn Fri, 25 Jan 2002, Michael Devogelaere wrote:\n\n> Hello again,\n>\n> I've rerun the tests and got:\n> NOTICE:\t Message from PostgreSQL backend:\n> \tThe Postmaster has informed me that some other backend died abnormally\n> and possibly corrupted shared memory.\n> \tI have rolled back the current transaction and am going to terminate\n> your database system connection and exit.\n> \tPlease reconnect to the database system and repeat your query.\n>\n> Nothing showed up in the logs however. This time i aborted the test after the\n> first errormessages and could reconnect to the database ! I don't know if this\n> has to do with the number of <defunct> postmasters: there only showed up 2 now\n> and not a few screens as in the first crash. When typing 'ps aux' a few minutes\n> later they were all gone !\n\nHmm, did you get any core files in the database directory?\nAnd since I don't know what the test does and I'm not sure if locale is\nenabled in the default red hat package, as a low probability thing, you do\nhave a version of glibc >= 2.2.3?\n\nAs a side question, how far do you need to install qmail to use the test?\nI'd gotten the test files to run against a 7.1 server I set up, but didn't\nfeel comfortable doing a full install of qmail if possible.\n\n\n", "msg_date": "Fri, 25 Jan 2002 08:50:56 -0800 (PST)", "msg_from": "Stephan Szabo <sszabo@megazone23.bigpanda.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Michael Devogelaere <michael@digibel.be> writes:\n>> The crash he reported this time looks like a backend dumping\n>> core. I wonder how he killed the postmaster the last time\n>> and if he by doing it with -9 corrupted the database?\n\n> He killed the database with -9, rebooted the machine, removed /var/lib/pgsql\n> and created a new database from scratch. Then he populated the database again\n> and ran the test again.\n\nIn any case, the original report mentioned something that looked\nsuspiciously like a backend crash:\n\n: Ok: the client reported something like: \"Unexpected EOF from\n: PostgreSQL-backend\". When looking with ps aux, i noted that all\n: postmaster-childs where <defunct>. I couldn't connect anymore with psql\n: (i aborted the test and no other processes tried to access the database\n: since my machine was in single user mode). After killing the master\n: process and restarting, the database worked fine.\n\nThe disappearing-socket-file theory explains most of this, but (AFAICS)\nnot the \"unexpected EOF\" message. That was why I was pressing Michael\nfor more details to begin with.\n\nI've been running Michael's test script on an RH 7.2 box since yesterday\nafternoon, but have yet to reproduce any failure (other than the\nexpected symptoms from manually removing the socket file).\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 11:56:40 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:\n> As a side question, how far do you need to install qmail to use the test?\n> I'd gotten the test files to run against a 7.1 server I set up, but didn't\n> feel comfortable doing a full install of qmail if possible.\n\nI didn't want to do that either. I managed to get things running by\nunpacking the rpm, unpacking the qmail-1.03.tar.gz original sources,\napplying the qmail-sql-0.19.patch (and not any of the other ones,\nwhich might've been a mistake), then setting up the three needed config\nfiles by hand:\n\n$ cat sqltype.h\n/* Uncomment to choose postgresql */\n#define SQLTYPE PGSQLTYPE\n/* Uncomment to choose mysql */\n// #define SQLTYPE MYSQLTYPE\n$ cat sql.headers\n-I/usr/include/pgsql\n$ cat sql.lib\n-lpq\n$\n\nand then I was able to do \"make qmail-getpw\" which is the only\nexecutable you need for the benchmark. Put that somewhere, copy\nthe sqlserver.sample file to where qmail-getpw will look for it [1]\nand edit to taste, and you're set.\n\nCaution: I wasted some time running \"benchmarks\" that proved only\nto be exercising how fast the client could fail. qmail-getpw's\napproach to error handling seems to be (a) don't bother testing for\nvery many error conditions (eg, it coredumps on an empty sqlserver\ncontrol file), and (b) if it does detect a failure, exiting with a\nnonzero error code is a sufficient way of reporting it. Error messages\nare for wimps, apparently. So don't bother running the querydb script\nuntil you've made *sure* qmail-getpw is working. After running the\ninitdb script (watch out for name conflicts with ours!) you should get\n\n$ ./qmail-getpw alias0 domain0\nalias00existance_irrelevant_for_testing-alias00trash@devnull.biz$\n\nif all is well. Lack of output means you have a problem.\n\n\t\t\tregards, tom lane\n\n[1] I didn't bother making the expected /var/qmail/control/sqlserver,\nbut just put the sqlserver file in subdirectory control of where I\nwas running the tests. Works fine since qmail-getpw doesn't check\nwhether its chdir(\"/var/qmail\") succeeds.\n\n[2] No, I don't think I'll be trusting my email to this thing real soon.\nBut I'd like to know whether it really is provoking a PG crash.\n", "msg_date": "Fri, 25 Jan 2002 12:30:17 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "On Fri, 25 Jan 2002, Tom Lane wrote:\n\n> [2] No, I don't think I'll be trusting my email to this thing real soon.\n> But I'd like to know whether it really is provoking a PG crash.\n\nOne thing I've missed in this thread is where qmail-sql is. Since I\nrun nothing but qmail it's already installed on all of my machines and\nI just happen to have a 7.2b5 system pretty much sitting idle.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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": "Fri, 25 Jan 2002 12:54:27 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "> Caution: I wasted some time running \"benchmarks\" that proved only\n> to be exercising how fast the client could fail. qmail-getpw's\n> approach to error handling seems to be (a) don't bother testing for\n> very many error conditions (eg, it coredumps on an empty sqlserver\n> control file), and (b) if it does detect a failure, exiting with a\n> nonzero error code is a sufficient way of reporting it. Error messages\n> are for wimps, apparently.\n\n(b) is part of the qmail strategy - qmail is implemented as a set\nof independent processes with different owners and rights and they\ncommunicate problems through standard exit codes. \n\nWe can agree that it should be more forthcoming with meaningful \nhelp for people setting up the system, but it can't just write an \nmessage to STDOUT because its caller has probably already set up\na pipe to another process - any error message would normally find \nitself inserted into the mail queue!\n\n(a), in contrast, is definitely not normal for qmail and is the type\nof thing that should be fixed... even if all it does after detecting\na problem is return with a nonzero error code. :-)\n\nBear\n", "msg_date": "Fri, 25 Jan 2002 11:01:23 -0700 (MST)", "msg_from": "Bear Giles <bear@coyotesong.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On Fri, Jan 25, 2002 at 12:30:17PM -0500,\n Tom Lane <tgl@sss.pgh.pa.us> wrote:\n> \n> I didn't want to do that either. I managed to get things running by\n> unpacking the rpm, unpacking the qmail-1.03.tar.gz original sources,\n> applying the qmail-sql-0.19.patch (and not any of the other ones,\n> which might've been a mistake), then setting up the three needed config\n> files by hand:\n\nI run qmail without any of the patches and it works just fine. There could\nbe something about the sql patch that requires some other patch, but\nhopefully that would have been mentioned in the patch.\n\n> Caution: I wasted some time running \"benchmarks\" that proved only\n> to be exercising how fast the client could fail. qmail-getpw's\n> approach to error handling seems to be (a) don't bother testing for\n> very many error conditions (eg, it coredumps on an empty sqlserver\n> control file), and (b) if it does detect a failure, exiting with a\n\nThis is probably something caused by the patch. DJB's stuff doesn't\ncoredump.\n\n> nonzero error code is a sufficient way of reporting it. Error messages\n> are for wimps, apparently. So don't bother running the querydb script\n> until you've made *sure* qmail-getpw is working. After running the\n> initdb script (watch out for name conflicts with ours!) you should get\n\nThis (modifying qmail-getpw) seems like a poor way to do things. You could\nprobably do the same thing using a script that queries the database and writes\noutput that can be processed by unpatched qmail-pw2u (if you want some stuff\nto come from /etc/passwd) and qmail-newu. I use these (but not the sql\nstuff) since only a couple of accounts should get email and I have a\ncouple of lists set up as subusers of my normal account to simplify\nmaintainance (i.e. the list files are owned by me instead of their\nown accounts).\n\nThe idea of using a database to help handle local delivery is also bad.\ncdb is much faster for typical kinds of usage (users change MUCH less\noften than email arrives).\n\nIt would make a lot more sense to keep the authoritative information\nin a database and resync the cdb information after a change.\n\n", "msg_date": "Fri, 25 Jan 2002 12:50:07 -0600", "msg_from": "Bruno Wolff III <bruno@wolff.to>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Bear Giles <bear@coyotesong.com> writes:\n\n> > Caution: I wasted some time running \"benchmarks\" that proved only\n> > to be exercising how fast the client could fail. qmail-getpw's\n> > approach to error handling seems to be (a) don't bother testing for\n> > very many error conditions (eg, it coredumps on an empty sqlserver\n> > control file), and (b) if it does detect a failure, exiting with a\n> > nonzero error code is a sufficient way of reporting it. Error messages\n> > are for wimps, apparently.\n> \n> (b) is part of the qmail strategy - qmail is implemented as a set\n> of independent processes with different owners and rights and they\n> communicate problems through standard exit codes. \n> \n> We can agree that it should be more forthcoming with meaningful \n> help for people setting up the system, but it can't just write an \n> message to STDOUT because its caller has probably already set up\n> a pipe to another process - any error message would normally find \n> itself inserted into the mail queue!\n\nGaah. Has djb ever heard of syslog(3)? Or is that too insecure for\nhim?\n\n-Doug\n-- \nLet us cross over the river, and rest under the shade of the trees.\n --T. J. Jackson, 1863\n", "msg_date": "01 Feb 2002 13:58:33 -0500", "msg_from": "Doug McNaught <doug@wireboard.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Doug McNaught <doug@wireboard.com> writes:\n> Bear Giles <bear@coyotesong.com> writes:\n>> We can agree that it should be more forthcoming with meaningful \n>> help for people setting up the system, but it can't just write an \n>> message to STDOUT because its caller has probably already set up\n>> a pipe to another process - any error message would normally find \n>> itself inserted into the mail queue!\n\n> Gaah. Has djb ever heard of syslog(3)?\n\nOr stderr? There's a good reason why Unix has both stdout and stderr\nas part of the standard process model. stderr is for human-readable\nerror messages. In a noninteractive situation you can send it to\n/dev/null, if you don't believe in logging; but when a human is running\na program it's polite to say something on stderr before going belly-up.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 01 Feb 2002 14:32:28 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "On Fri, Feb 01, 2002 at 01:58:33PM -0500,\n Doug McNaught <doug@wireboard.com> wrote:\n> Bear Giles <bear@coyotesong.com> writes:\n> \n> Gaah. Has djb ever heard of syslog(3)? Or is that too insecure for\n> him?\n\nIts called multilog and he feels it is much better than syslog.\nInstead of using the network to send data around, a pipe is used.\nmultilog also does the log rotation (with configurable sizes) so\nthat you don't have to worry about that.\n", "msg_date": "Fri, 1 Feb 2002 14:10:50 -0600", "msg_from": "Bruno Wolff III <bruno@wolff.to>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On 1 Feb 2002, Doug McNaught wrote:\n\n> Bear Giles <bear@coyotesong.com> writes:\n>\n> > > Caution: I wasted some time running \"benchmarks\" that proved only\n> > > to be exercising how fast the client could fail. qmail-getpw's\n> > > approach to error handling seems to be (a) don't bother testing for\n> > > very many error conditions (eg, it coredumps on an empty sqlserver\n> > > control file), and (b) if it does detect a failure, exiting with a\n> > > nonzero error code is a sufficient way of reporting it. Error messages\n> > > are for wimps, apparently.\n> >\n> > (b) is part of the qmail strategy - qmail is implemented as a set\n> > of independent processes with different owners and rights and they\n> > communicate problems through standard exit codes.\n> >\n> > We can agree that it should be more forthcoming with meaningful\n> > help for people setting up the system, but it can't just write an\n> > message to STDOUT because its caller has probably already set up\n> > a pipe to another process - any error message would normally find\n> > itself inserted into the mail queue!\n>\n> Gaah. Has djb ever heard of syslog(3)? Or is that too insecure for\n> him?\n\nInsecure and slow. Check out multilog which is part of daemontools.\n\nhttp://cr.yp.to/daemontools/multilog.html\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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": "Fri, 1 Feb 2002 15:12:13 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "On Fri, Jan 25, 2002 at 11:01:23AM -0700,\n Bear Giles <bear@coyotesong.com> wrote:\n> \n> (a), in contrast, is definitely not normal for qmail and is the type\n> of thing that should be fixed... even if all it does after detecting\n> a problem is return with a nonzero error code. :-)\n\nThis was probably caused by an error in the patch rather than the original\ncode.\nUnless they have a very high rate of change for accounts, it seems that\nit would have been better to not use the database directly for account\ninformation. When stuff changed in the database, the cdb file could be\nrebuilt using stock qmail tools.\n", "msg_date": "Fri, 1 Feb 2002 14:14:16 -0600", "msg_from": "Bruno Wolff III <bruno@wolff.to>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL" }, { "msg_contents": "Vince Vielhaber <vev@michvhf.com> writes:\n>> Gaah. Has djb ever heard of syslog(3)? Or is that too insecure for\n>> him?\n\n> Insecure and slow. Check out multilog which is part of daemontools.\n> http://cr.yp.to/daemontools/multilog.html\n\nHmm, should we (do we?) have a pointer to this in our docs somewhere?\nI know I wrote a section of the Admin Guide that just handwaves about\nwhere to get log-rotation scripts.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 01 Feb 2002 15:58:19 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " }, { "msg_contents": "On Fri, 1 Feb 2002, Tom Lane wrote:\n\n> Vince Vielhaber <vev@michvhf.com> writes:\n> >> Gaah. Has djb ever heard of syslog(3)? Or is that too insecure for\n> >> him?\n>\n> > Insecure and slow. Check out multilog which is part of daemontools.\n> > http://cr.yp.to/daemontools/multilog.html\n>\n> Hmm, should we (do we?) have a pointer to this in our docs somewhere?\n> I know I wrote a section of the Admin Guide that just handwaves about\n> where to get log-rotation scripts.\n\nI don't believe so. Lemme look and see where it might fit best.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net\n 56K Nationwide 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": "Fri, 1 Feb 2002 16:05:22 -0500 (EST)", "msg_from": "Vince Vielhaber <vev@michvhf.com>", "msg_from_op": false, "msg_subject": "Re: PostgreSQL crashes with Qmail-SQL " } ]
[ { "msg_contents": "> > How about: use overwriting smgr + put old records into rollback\n> > segments - RS - (you have to keep them somewhere till TX's running\n> > anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> > changes and WAL will be used for RS/data files recovery).\n> > Something like what Oracle does.\n> \n> I am sorry. I see what you are saying now. I missed the words\n\nAnd I'm sorry for missing your notes about storing relid+tid only.\n\n> \"overwriting smgr\". You are suggesting going to an overwriting\n> storage manager. Is this to be done only because of savepoints.\n\nNo. One point I made a few monthes ago (and never got objections)\nis - why to keep old data in data files sooooo long?\nImagine long running TX (eg pg_dump). Why other TX-s must read\nagain and again completely useless (for them) old data we keep\nfor pg_dump?\n\n> Doesn't seem worth it when I have a possible solution without\n> such a drastic change.\n> Also, overwriting storage manager will require MVCC to read\n> through there to get accurate MVCC visibility, right?\n\nRight... just like now non-overwriting smgr requires *ALL*\nTX-s to read old data in data files. But with overwriting smgr\nTX will read RS only when it is required and as far (much) as\nit is required.\n\nSimple solutions are not always the best ones.\nCompare Oracle and InterBase. Both have MVCC.\nSmgr-s are different. What RDBMS is more cool?\nWhy doesn't Oracle use more simple non-overwriting smgr\n(as InterBase... and we do)?\n\nVadim\n", "msg_date": "Wed, 23 Jan 2002 18:03:11 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "Re: Savepoints" }, { "msg_contents": "\nOK, I have had time to think about this, and I think I can put the two\nproposals into perspective. I will use Vadim's terminology.\n\nIn our current setup, rollback/undo data is kept in the same file as our\nlive data. This data is used for two purposes, one, for rollback of\ntransactions, and perhaps subtransactions in the future, and second, for\nMVCC visibility for backends making changes.\n\nSo, it seems the real question is whether a database modification should\nwrite the old data into a separate rollback segment and modify the heap\ndata, or just create a new row and require the old row to be removed\nlater by vacuum.\n\nLet's look at this behavior without MVCC. In such cases, if someone\ntries to read a modified row, it will block and wait for the modifying\nbackend to commit or rollback, when it will then continue. In such\ncases, there is no reason for the waiting transaction to read the old\ndata in the redo segment because it can't continue anyway.\n\nNow, with MVCC, the backend has to read through the redo segment to get\nthe original data value for that row.\n\nNow, while rollback segments do help with cleaning out old UPDATE rows,\nhow does it improve DELETE performance? Seems it would just mark it as\nexpired like we do now.\n\nOne objection I always had to redo segments was that if I start a\ntransaction in the morning and walk away, none of the redo segments can\nbe recycled. I was going to ask if we can force some type of redo\nsegment compaction to keep old active rows and delete rows no longer\nvisible to any transaction. However, I now realize that our VACUUM has\nthe same problem. Tuples with XID >= GetOldestXmin() are not recycled,\nmeaning we have this problem in our current implementation too. (I\nwonder if our vacuum could be smarter about knowing which rows are\nvisible, perhaps by creating a sorted list of xid's and doing a binary\nsearch on the list to determine visibility.)\n\nSo, I guess the issue is, do we want to keep redo information in the\nmain table, or split it out into redo segments. Certainly we have to\neliminate the Oracle restrictions that redo segment size is fixed at\ninstall time.\n\nThe advantages of a redo segment is that hopefully we don't have\ntransactions reading through irrelevant undo information. The\ndisadvantage is that we now have redo information grouped into table\nfiles where a sequential scan can be performed. (Index scans of redo\ninfo are a performance problem currently.) We would have to somehow\nefficiently access redo information grouped into the redo segments. \nPerhaps a hash based in relid would help here. Another disadvantage is\nconcurrency. When we start modifying heap data in place, we have to\nprevent other backends from seeing that modification while we move the\nold data to the redo segment.\n\nI guess my feeling is that if we can get vacuum to happen automatically,\nhow is our current non-overwriting storage manager different from redo\nsegments?\n\nOne big advantage of redo segments would be that right now, if someone\nupdates a row repeatedly, there are lots of heap versions of the row\nthat are difficult to shrink in the table, while if they are in the redo\nsegments, we can more efficiently remove them, and there is only on heap\nrow.\n\nHow is recovery handled with rollback segments? Do we write old and new\ndata to WAL? We just write new data to WAL now, right? Do we fsync\nrollback segments?\n\nHave I outlined this accurately?\n\n---------------------------------------------------------------------------\n\nMikheev, Vadim wrote:\n> > > How about: use overwriting smgr + put old records into rollback\n> > > segments - RS - (you have to keep them somewhere till TX's running\n> > > anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> > > changes and WAL will be used for RS/data files recovery).\n> > > Something like what Oracle does.\n> > \n> > I am sorry. I see what you are saying now. I missed the words\n> \n> And I'm sorry for missing your notes about storing relid+tid only.\n> \n> > \"overwriting smgr\". You are suggesting going to an overwriting\n> > storage manager. Is this to be done only because of savepoints.\n> \n> No. One point I made a few monthes ago (and never got objections)\n> is - why to keep old data in data files sooooo long?\n> Imagine long running TX (eg pg_dump). Why other TX-s must read\n> again and again completely useless (for them) old data we keep\n> for pg_dump?\n> \n> > Doesn't seem worth it when I have a possible solution without\n> > such a drastic change.\n> > Also, overwriting storage manager will require MVCC to read\n> > through there to get accurate MVCC visibility, right?\n> \n> Right... just like now non-overwriting smgr requires *ALL*\n> TX-s to read old data in data files. But with overwriting smgr\n> TX will read RS only when it is required and as far (much) as\n> it is required.\n> \n> Simple solutions are not always the best ones.\n> Compare Oracle and InterBase. Both have MVCC.\n> Smgr-s are different. What RDBMS is more cool?\n> Why doesn't Oracle use more simple non-overwriting smgr\n> (as InterBase... and we do)?\n> \n> Vadim\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 24 Jan 2002 14:22:19 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Savepoints" } ]
[ { "msg_contents": "time '05:00' + interval '2 hours' <== Shown below beside the '-' Name.\n\ndate '2001-09-28' + interval '1 hour' <== also shown beside the '-'\nName.\n\n\n\nThe results look appropriate however, so flipping the +'s to -'s\nshould be enough.\n\n\n\nTable 4-16. Date/Time Operators\n\n Name Example Result\n + timestamp '2001-09-28 01:00' + interval '23 hours' timestamp\n'2001-09-29 00:00'\n + date '2001-09-28' + interval '1 hour' timestamp '2001-09-28\n01:00'\n + time '01:00' + interval '3 hours' time '04:00'\n - timestamp '2001-09-28 23:00' - interval '23 hours' timestamp\n'2001-09-28'\n - date '2001-09-28' + interval '1 hour' timestamp '2001-09-27\n23:00'\n - time '05:00' + interval '2 hours' time '03:00'\n - interval '2 hours' - time '05:00' time '03:00:00'\n * interval '1 hour' * int '3' interval '03:00'\n / interval '1 hour' / int '3' interval '00:20'\n\n--\nRod Taylor\n\nYour eyes are weary from staring at the CRT. You feel sleepy. Notice\nhow restful it is to watch the cursor blink. Close your eyes. The\nopinions stated above are yours. You cannot imagine why you ever felt\notherwise.\n\n\n", "msg_date": "Wed, 23 Jan 2002 21:32:16 -0500", "msg_from": "\"Rod Taylor\" <rbt@barchord.com>", "msg_from_op": true, "msg_subject": "Bad Docs example" }, { "msg_contents": "Thanks. Attached patch applied. Good eye.\n\n---------------------------------------------------------------------------\n\nRod Taylor wrote:\n> time '05:00' + interval '2 hours' <== Shown below beside the '-' Name.\n> \n> date '2001-09-28' + interval '1 hour' <== also shown beside the '-'\n> Name.\n> \n> \n> \n> The results look appropriate however, so flipping the +'s to -'s\n> should be enough.\n> \n> \n> \n> Table 4-16. Date/Time Operators\n> \n> Name Example Result\n> + timestamp '2001-09-28 01:00' + interval '23 hours' timestamp\n> '2001-09-29 00:00'\n> + date '2001-09-28' + interval '1 hour' timestamp '2001-09-28\n> 01:00'\n> + time '01:00' + interval '3 hours' time '04:00'\n> - timestamp '2001-09-28 23:00' - interval '23 hours' timestamp\n> '2001-09-28'\n> - date '2001-09-28' + interval '1 hour' timestamp '2001-09-27\n> 23:00'\n> - time '05:00' + interval '2 hours' time '03:00'\n> - interval '2 hours' - time '05:00' time '03:00:00'\n> * interval '1 hour' * int '3' interval '03:00'\n> / interval '1 hour' / int '3' interval '00:20'\n> \n> --\n> Rod Taylor\n> \n> Your eyes are weary from staring at the CRT. You feel sleepy. Notice\n> how restful it is to watch the cursor blink. Close your eyes. The\n> opinions stated above are yours. You cannot imagine why you ever felt\n> otherwise.\n> \n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n> \n> http://archives.postgresql.org\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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? bookindex.sgml\n? setindex.sgml\n? catalogs.gif\n? connections.gif\nIndex: func.sgml\n===================================================================\nRCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v\nretrieving revision 1.91\ndiff -c -r1.91 func.sgml\n*** func.sgml\t2002/01/20 22:19:55\t1.91\n--- func.sgml\t2002/01/25 02:38:20\n***************\n*** 2554,2566 ****\n \n <row>\n <entry> <literal>-</literal> </entry>\n! <entry><type>date</type> '2001-09-28' + <type>interval</type> '1 hour'</entry>\n <entry><type>timestamp</type> '2001-09-27 23:00'</entry>\n </row>\n \n <row>\n <entry> <literal>-</literal> </entry>\n! <entry><type>time</type> '05:00' + <type>interval</type> '2 hours'</entry>\n <entry><type>time</type> '03:00'</entry>\n </row>\n \n--- 2554,2566 ----\n \n <row>\n <entry> <literal>-</literal> </entry>\n! <entry><type>date</type> '2001-09-28' - <type>interval</type> '1 hour'</entry>\n <entry><type>timestamp</type> '2001-09-27 23:00'</entry>\n </row>\n \n <row>\n <entry> <literal>-</literal> </entry>\n! <entry><type>time</type> '05:00' - <type>interval</type> '2 hours'</entry>\n <entry><type>time</type> '03:00'</entry>\n </row>", "msg_date": "Thu, 24 Jan 2002 21:39:03 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: Bad Docs example" } ]
[ { "msg_contents": "Hi all,\n\nI've just added a new column to a table, and I am updating it to have a\nvalue. The table has only 18000 rows, and yet the query takes in the order\nof 10 minutes to complete. This is the process running:\n\n\nlast pid: 57224; load averages: 0.40, 0.50, 0.59 up 1+18:57:41\n19:00:34\n75 processes: 1 running, 74 sleeping\nCPU states: 6.6% user, 0.0% nice, 6.2% system, 0.8% interrupt, 86.4%\nidle\nMem: 234M Active, 76M Inact, 45M Wired, 18M Cache, 48M Buf, 952K Free\nSwap: 521M Total, 324K Used, 521M Free\n\n PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND\n56770 pgsql -6 0 24884K 20956K biord 2:14 10.11% 10.11% postgres\n\nMy postgresql.conf settings:\n\nmax_connections = 128\nsort_mem = 2048\nshared_buffers = 2048\nlog_timestamp = true\n\nThe machine has a Seagate SCSI 40mb/sec HDD, running at some fast mhz that I\ncan't quite remember (1Ghz?)\n\nSurely it should take a lot less than 10 minutes to touch 18000 rows!!!\n\nChris\n\n", "msg_date": "Thu, 24 Jan 2002 11:07:20 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": true, "msg_subject": "Query taking a long time..." }, { "msg_contents": "At 11:07 24/01/02 +0800, Christopher Kings-Lynne wrote:\n>\n>I've just added a new column to a table, and I am updating it to have a\n>value. The table has only 18000 rows, and yet the query takes in the order\n>of 10 minutes to complete. This is the process running:\n\nNo triggers or FK constraints etc?\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Thu, 24 Jan 2002 15:51:27 +1100", "msg_from": "Philip Warner <pjw@rhyme.com.au>", "msg_from_op": false, "msg_subject": "Re: Query taking a long time..." }, { "msg_contents": "> >I've just added a new column to a table, and I am updating it to have a\n> >value. The table has only 18000 rows, and yet the query takes\n> in the order\n> >of 10 minutes to complete. This is the process running:\n>\n> No triggers or FK constraints etc?\n\nGah! I just remembered that I have a trigger on the table that updates the\nfull text index on another table!\n\nSorry...\n\nChris\n\n", "msg_date": "Thu, 24 Jan 2002 13:10:06 +0800", "msg_from": "\"Christopher Kings-Lynne\" <chriskl@familyhealth.com.au>", "msg_from_op": true, "msg_subject": "Re: Query taking a long time..." } ]
[ { "msg_contents": "Hi guys,\n\nSorry to say this, but I'm feeling we're getting near to needing a\n7.1.4.\n\nA lot of places won't upgrade to 7.2 final until a few bug-fix point\nreleases are out the door anyway, and we all know that 7.1.3 is pretty\ngood.\n\nDo the Hackers think we've got time to generate a further bugfix release\nof 7.1.x, as it will still probably be in real-world production use for\nquite some time?\n\n:-)\n\nRegards and best wishes,\n\nJustin Clift\n\n-------- Original Message --------\nSubject: [GENERAL] Problem with btree index on 7.1.3\nDate: Thu, 24 Jan 2002 15:14:11 +0600\nFrom: Denis Perchine <dyp@perchine.com>\nOrganization: AcademSoft Ltd.\nTo: pgsql-general@postgresql.org\n\nHello,\n\non 7.1.3 I get:\nERROR: btree: index item size 3028 exceeds maximum 2713\n\nit seems like known problem, and I have a feeling that it is fixed in\n7.2 RC1,\nbut does anywhere a patch available for 7.1.3?\n\n--\nDenis\n\n---------------------------(end of broadcast)---------------------------\nTIP 5: Have you checked our extensive FAQ?\n\nhttp://www.postgresql.org/users-lounge/docs/faq.html\n", "msg_date": "Thu, 24 Jan 2002 21:01:29 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "7.1.4" }, { "msg_contents": "\nIs there anything in the v7.1.x BRANCH that warrants a v7.1.4 release?\n\nOn Thu, 24 Jan 2002, Justin Clift wrote:\n\n> Hi guys,\n>\n> Sorry to say this, but I'm feeling we're getting near to needing a\n> 7.1.4.\n>\n> A lot of places won't upgrade to 7.2 final until a few bug-fix point\n> releases are out the door anyway, and we all know that 7.1.3 is pretty\n> good.\n>\n> Do the Hackers think we've got time to generate a further bugfix release\n> of 7.1.x, as it will still probably be in real-world production use for\n> quite some time?\n>\n> :-)\n>\n> Regards and best wishes,\n>\n> Justin Clift\n>\n> -------- Original Message --------\n> Subject: [GENERAL] Problem with btree index on 7.1.3\n> Date: Thu, 24 Jan 2002 15:14:11 +0600\n> From: Denis Perchine <dyp@perchine.com>\n> Organization: AcademSoft Ltd.\n> To: pgsql-general@postgresql.org\n>\n> Hello,\n>\n> on 7.1.3 I get:\n> ERROR: btree: index item size 3028 exceeds maximum 2713\n>\n> it seems like known problem, and I have a feeling that it is fixed in\n> 7.2 RC1,\n> but does anywhere a patch available for 7.1.3?\n>\n> --\n> Denis\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n>\n> http://www.postgresql.org/users-lounge/docs/faq.html\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n>\n\n", "msg_date": "Thu, 24 Jan 2002 09:21:31 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: 7.1.4" }, { "msg_contents": "\n\"Marc G. Fournier\" wrote:\n> \n> Is there anything in the v7.1.x BRANCH that warrants a v7.1.4 release?\n\nHi Marc,\n\nI'm not sure, I'm just thinking about the few bugs which have trickled\nthrough about 7.1.3, and Tom's email a while ago saying that heaps of\nthe bugs which had been fixed were 7.1.3 ones.\n\nIt's a feeling, not an educated \"taken a close look at it\" thing.\n\nRegards and best wishes,\n\nJustin Clift\n\n> \n> On Thu, 24 Jan 2002, Justin Clift wrote:\n> \n> > Hi guys,\n> >\n> > Sorry to say this, but I'm feeling we're getting near to needing a\n> > 7.1.4.\n> >\n> > A lot of places won't upgrade to 7.2 final until a few bug-fix point\n> > releases are out the door anyway, and we all know that 7.1.3 is pretty\n> > good.\n> >\n> > Do the Hackers think we've got time to generate a further bugfix release\n> > of 7.1.x, as it will still probably be in real-world production use for\n> > quite some time?\n> >\n> > :-)\n> >\n> > Regards and best wishes,\n> >\n> > Justin Clift\n> >\n> > -------- Original Message --------\n> > Subject: [GENERAL] Problem with btree index on 7.1.3\n> > Date: Thu, 24 Jan 2002 15:14:11 +0600\n> > From: Denis Perchine <dyp@perchine.com>\n> > Organization: AcademSoft Ltd.\n> > To: pgsql-general@postgresql.org\n> >\n> > Hello,\n> >\n> > on 7.1.3 I get:\n> > ERROR: btree: index item size 3028 exceeds maximum 2713\n> >\n> > it seems like known problem, and I have a feeling that it is fixed in\n> > 7.2 RC1,\n> > but does anywhere a patch available for 7.1.3?\n> >\n> > --\n> > Denis\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> >\n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org\n> >\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Fri, 25 Jan 2002 01:57:44 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "Re: 7.1.4" }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n> Is there anything in the v7.1.x BRANCH that warrants a v7.1.4 release?\n\nAccording to CVS, the *only* stuff in the 7.1 branch since 7.1.3 is\n\n2001-10-01 05:38 inoue\n\n\t* src/: backend/executor/nodeTidscan.c, include/nodes/execnodes.h\n\t(REL7_1_STABLE): Keep the contents of TIDs not the pointers. Tid\n\tscan has been broken for 7.1.\n\n2001-09-12 13:14 tgl\n\n\t* src/backend/storage/lmgr/proc.c (REL7_1_STABLE): Back-patch\n\tdeadlock recovery fix into 7.1 tree, in case someone needs it.\n\n\nThe deadlock-recovery fix is somewhat interesting, but I hardly think it\nwarrants a 7.1.4.\n\nThere are other fixes in current sources that perhaps could be\nback-patched if we wanted to expend the time to do it. I don't...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 09:57:57 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1.4 " }, { "msg_contents": "Justin Clift <justin@postgresql.org> writes:\n> I'm not sure, I'm just thinking about the few bugs which have trickled\n> through about 7.1.3, and Tom's email a while ago saying that heaps of\n> the bugs which had been fixed were 7.1.3 ones.\n\nTrouble is, we mostly haven't bothered to back-patch the fixes. Putting\nout a 7.1.4 would involve going through the CVS logs, figuring out which\nentries represented fixes for old bugs that deserve back-patching, and\nthen applying the patch (possibly after changes to get it to apply\nagainst the older code). This'd be a huge amount of work --- cvs2cl\nreports more than a thousand separate commits since last September, so\neven trolling the log would be a significant effort. Testing the end\nresult would be a problem too...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 10:43:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1.4 " }, { "msg_contents": "Tom Lane wrote:\n> \n> \"Marc G. Fournier\" <scrappy@hub.org> writes:\n> > Is there anything in the v7.1.x BRANCH that warrants a v7.1.4 release?\n> \n<snip\n> The deadlock-recovery fix is somewhat interesting, but I hardly think it\n> warrants a 7.1.4.\n> \n> There are other fixes in current sources that perhaps could be\n> back-patched if we wanted to expend the time to do it. I don't...\n\nWas a thought. :)\n\nRegards and best wishes,\n\nJustin Clift\n\n\n> \n> regards, tom lane\n\n-- \n\"My grandfather once told me that there are two kinds of people: those\nwho work and those who take the credit. He told me to try to be in the\nfirst group; there was less competition there.\"\n - Indira Gandhi\n", "msg_date": "Fri, 25 Jan 2002 02:50:05 +1100", "msg_from": "Justin Clift <justin@postgresql.org>", "msg_from_op": true, "msg_subject": "Re: 7.1.4" }, { "msg_contents": "Tom,\n\n> > I'm not sure, I'm just thinking about the few bugs which have trickled\n> > through about 7.1.3, and Tom's email a while ago saying that heaps of\n> > the bugs which had been fixed were 7.1.3 ones.\n>\n> Trouble is, we mostly haven't bothered to back-patch the fixes. Putting\n> out a 7.1.4 would involve going through the CVS logs, figuring out which\n> entries represented fixes for old bugs that deserve back-patching, and\n> then applying the patch (possibly after changes to get it to apply\n> against the older code). This'd be a huge amount of work --- cvs2cl\n> reports more than a thousand separate commits since last September, so\n> even trolling the log would be a significant effort. Testing the end\n> result would be a problem too...\n\nThis is nice. But I hope that you are agree that it is not a good idea\nto switch production system to RC1 version. A bug I mentioned is a real\nproblem. Is it possible that it will be addressed? I could do this myself,\nbut as far as I remember the fix was done by you, and was quite large.\n\n--\nDenis\n", "msg_date": "Fri, 25 Jan 2002 00:28:14 +0600", "msg_from": "Denis Perchine <dyp@perchine.com>", "msg_from_op": false, "msg_subject": "Re: 7.1.4" }, { "msg_contents": "On Fri, 25 Jan 2002, Denis Perchine wrote:\n\n> This is nice. But I hope that you are agree that it is not a good idea\n> to switch production system to RC1 version. A bug I mentioned is a real\n> problem. Is it possible that it will be addressed? I could do this\n> myself, but as far as I remember the fix was done by you, and was quite\n> large.\n\nActually, I'm running a couple of production databases on a v7.2beta ...\none of them is quite heavily pounded to, as its used for logging and stats\nfor a FreeBSD Firewall bridging between the Internet and a B-Class network\n... hasn't failed me yet, and its been in production since before Xmas\ndue to the \"VACUUM doesn't lock tables\" addition ...\n\n\n", "msg_date": "Thu, 24 Jan 2002 14:47:37 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: 7.1.4" }, { "msg_contents": "Denis Perchine <dyp@perchine.com> writes:\n> This is nice. But I hope that you are agree that it is not a good idea\n> to switch production system to RC1 version.\n\n*Somebody* has got to make that leap of faith, you know. Do you think\nit magically gets more reliable when we slap a different label on it?\nThe way it gets more reliable is that people use it.\n\n> A bug I mentioned is a real\n> problem. Is it possible that it will be addressed? I could do this myself,\n> but as far as I remember the fix was done by you, and was quite large.\n\nIf it was a large fix then I'd be unlikely to regard it as safe to\nback-patch into 7.1.* anyway. Why do you think that 7.1.3 + a whole\nbunch of poorly-tested bugfixes would be safer to put into production\nthan RC1? RC1 has at least seen a fair amount of usage as an integrated\nwhole. A 7.1.4 with any but the most simple, obviously correct fixes\nwould not be more trustworthy in my eyes --- at least not till after it\nhad seen field testing. So people who think as you suggest wouldn't\nupdate anyway.\n\nIf you are running into a 7.1 bug that is fixed in 7.2, then I would say\nthat for your purposes 7.2 is already more stable than 7.1. You should\nbe planning to update ASAP, not asking the developers to expend large\namounts of not-very-productive work so that you can avoid updating.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 13:57:34 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: 7.1.4 " } ]
[ { "msg_contents": "\n\n> -----Original Message-----\n> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] \n> Sent: 24 January 2002 15:59\n> To: Kaare Rasmussen\n> Cc: pgsql-hackers@postgresql.org\n> Subject: Re: [HACKERS] Add OR REPLACE clauses to non-FUNCTION \n> object creation in PostgreSQL 7.3\n> \n> \n> > Isn't it the same as\n> >\n> > DROP VIEW name\n> > CREATE VIEW name\n> > or\n> > DROP TRIGGER name\n> > CREATE TRIGGER name\n> \n> Two examples :\n> 1) Views with triggers\n> If you drop a view which has triggers and then re-recreate \n> the view, the \n> triggers are lost.\n> \n> 2) Server side code consistency\n> Let's say you are working on a large view in pgAdmin II. If \n> you drop a view \n> and recreate it, you can never be sure that the new version \n> of the view will \n> ba accepted by PostgeSQL.\n\nNo strictly true 'cos if PostgreSQL throws an error, that trickles through\nthe pgSchema hierarchy back to pgAdmin which will *not* close the window you\nhave open, but will return you to the point you were at immediately before\nyou hit OK.\n\nBut there other other Bad Things (tm) that might happen - especially if\nyou're working on a live production database (tut tut :-) ).\n\nRegards, Dave.\n", "msg_date": "Thu, 24 Jan 2002 16:22:45 -0000", "msg_from": "Dave Page <dpage@vale-housing.co.uk>", "msg_from_op": true, "msg_subject": "Re: Add OR REPLACE clauses to non-FUNCTION object creat" } ]
[ { "msg_contents": "> > How about: use overwriting smgr + put old records into rollback\n> > segments - RS - (you have to keep them somewhere till TX's running\n> > anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> > changes and WAL will be used for RS/data files recovery).\n> > Something like what Oracle does.\n> \n> As long as we use no overwriting manager\n> 1) Rollback(data) isn't needed in case of a db crash.\n> 2) Rollback(data) isn't needed to cancal a transaction entirely.\n\n-1) But vacuum must read a huge amount of data to remove dirt.\n-2) But TX-s must read data they are not interested at all.\n\n> 3) We don't need to mind the transaction size so much.\n\n-3) The same with overwriting smgr and WAL used *only as REDO log*:\nwe are not required to keep WAL files for duration of transaction\n- as soon as server knows that changes logged in some WAL file\napplied to data files and RS on disk (and archived, for WAL-based\nBAR) that file may be reused/removed. Old data will still occupy\nspace in RS but their space in data files will be available\nfor reuse.\n\n> We can't use the db any longer if a REDO recovery fails now.\n\nReset WAL and use/dump it. Annoying? Agreed. Fix bugs and/or\nuse good RAM - whatever caused problem with restart.\n\n> Under overwriting smgr we can't use the db any longer either\n> if rollback fails.\n\nWhy should it fail? Bugs? Fix them.\n\n> How could PG be not less reliable than now ?\n\nIs today' RG more reliable than Oracle, Informix, DB2?\n\nVadim\n", "msg_date": "Thu, 24 Jan 2002 11:11:52 -0800", "msg_from": "\"Mikheev, Vadim\" <vmikheev@SECTORBASE.COM>", "msg_from_op": true, "msg_subject": "Re: Savepoints" }, { "msg_contents": "\"Mikheev, Vadim\" wrote:\n> \n> > > How about: use overwriting smgr + put old records into rollback\n> > > segments - RS - (you have to keep them somewhere till TX's running\n> > > anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> > > changes and WAL will be used for RS/data files recovery).\n> > > Something like what Oracle does.\n> >\n> > As long as we use no overwriting manager\n> > 1) Rollback(data) isn't needed in case of a db crash.\n> > 2) Rollback(data) isn't needed to cancal a transaction entirely.\n> \n> -1) But vacuum must read a huge amount of data to remove dirt.\n> -2) But TX-s must read data they are not interested at all.\n> \n> > 3) We don't need to mind the transaction size so much.\n> \n> -3) The same with overwriting smgr and WAL used *only as REDO log*:\n\nThe larger RS becomes the longer it would take time to cancel\nthe transaction whereas it is executed in a momemnt under no\noverwriting smgr and for example if RS exhausted all disk space\nis PG really safe ? Other backends would also fail because they\ncouldn't write RS any mode. Many transactions would execute\nUNDO operations simultaneously but there's no space to write\nWALs (UNDO operations must be written to WAL also) and PG\nsystem would abort. And could PG restart under such situations ?\nEven though there's a way to recover from the situation, I\nthink we should avoid such dangerous situations from the\nfirst. Basically recovery operations should never fail.\n \n> \n> > We can't use the db any longer if a REDO recovery fails now.\n> \n> Reset WAL and use/dump it. Annoying? Agreed. Fix bugs and/or\n> use good RAM - whatever caused problem with restart.\n\nAs I already mentioned recovery operations should never fail.\n> \n> > Under overwriting smgr we can't use the db any longer either\n> > if rollback fails.\n> \n> Why should it fail? Bugs? Fix them.\n\nRollback operations are executed much more often than\nREDO recovery and it is hard to fix such bugs once PG\nwas released. Most people in such troubles have no\ntime to persue the cause. In reality I replied to the\nPG restart troubles twice (with --wal-debug and pg_resetxlog\nsuggestions ) in Japan but got no further replies.\n\n> \n> > How could PG be not less reliable than now ?\n> \n> Is today' RG more reliable than Oracle, Informix, DB2?\n\nI have never been and would never be optiomistic\nabout recovery. Is 7.1 more reliable than 7.0 from the\nrecovery POV ? I see no reason why overwriting smgr is\nmore relaible than no overwriting smgr as for recovery.\n\nregards,\nHiroshi Inoue\n", "msg_date": "Fri, 25 Jan 2002 09:34:15 +0900", "msg_from": "Hiroshi Inoue <Inoue@tpf.co.jp>", "msg_from_op": false, "msg_subject": "Re: Savepoints" } ]
[ { "msg_contents": "OK, the fix for Trond's autoconf issue is in. I think we could roll\nRC2 now.\n\nAre we in docs freeze yet? I'm working on an overhaul of the plperl\nchapter of the programmer's guide, and plan to commit it sometime\ntoday or tomorrow. Unless I'm told not to.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 15:18:31 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Ready for RC2 I guess..." }, { "msg_contents": "Tom Lane <tgl@sss.pgh.pa.us> writes:\n\n> OK, the fix for Trond's autoconf issue is in. I think we could roll\n> RC2 now.\n\nPerl fix? :) (the ifdef cturner suggested should make it work on both)\n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "24 Jan 2002 15:48:52 -0500", "msg_from": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: Ready for RC2 I guess..." }, { "msg_contents": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:\n> Perl fix? :) (the ifdef cturner suggested should make it work on both)\n\nI didn't see anything from cturner on that ... perhaps it's hung up\nin the approval queue?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 16:07:02 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Ready for RC2 I guess... " }, { "msg_contents": "Tom Lane writes:\n\n> OK, the fix for Trond's autoconf issue is in. I think we could roll\n> RC2 now.\n>\n> Are we in docs freeze yet? I'm working on an overhaul of the plperl\n> chapter of the programmer's guide, and plan to commit it sometime\n> today or tomorrow. Unless I'm told not to.\n\nWell, a \"release candidate\" is \"no more changes unless it's broken\". An\n\"overhaul\" is probably better left for the next minor release.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Thu, 24 Jan 2002 17:25:53 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Ready for RC2 I guess..." }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n>> Are we in docs freeze yet? I'm working on an overhaul of the plperl\n>> chapter of the programmer's guide, and plan to commit it sometime\n>> today or tomorrow. Unless I'm told not to.\n\n> Well, a \"release candidate\" is \"no more changes unless it's broken\".\n\nTrue for code, but we have not in the past applied that standard to\ndocs.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 17:32:35 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Ready for RC2 I guess... " }, { "msg_contents": "Tom Lane writes:\n\n> > Well, a \"release candidate\" is \"no more changes unless it's broken\".\n>\n> True for code, but we have not in the past applied that standard to\n> docs.\n\nIn the past, the docs were frozen two weeks before the release candidate\nso that Thomas Lockhart could prepare them for publication. This time\nwe've been more relaxed, but I still think we have to stop somewhere. In\nparticular, a few days of rest is needed even for the docs, because:\n\n* To make sure the documents are built at least once in full so they are\npicked up when the release is built.\n\n* To make sure the documents still build on whatever toolchain\npostgresql.org is running. (There are occasional bugs in processors and\nstylesheets.)\n\n* To make sure everything looks OK when processed with whatever stylesheet\nversion postgresql.org uses.\n\n* To make sure everything is spell-checked and edited for mistakes.\n\n* To build the final edition of the man pages.\n\n* To build printed versions and avoid post-release editing because of\ncertain \"web-only\" constructs or other things that don't work in the print\nreleases.\n\nSome things to think about. If you think your changes don't affect these\nissues, go ahead, but \"overhaul\" leaves me wondering.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Thu, 24 Jan 2002 17:59:09 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: Ready for RC2 I guess... " }, { "msg_contents": "Peter Eisentraut <peter_e@gmx.net> writes:\n> In the past, the docs were frozen two weeks before the release candidate\n> so that Thomas Lockhart could prepare them for publication. This time\n> we've been more relaxed, but I still think we have to stop somewhere.\n\nSure. But I haven't yet heard Thomas ask for a docs freeze, so (unless\nI missed it) I would think I could still get some work done.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 18:10:10 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Ready for RC2 I guess... " }, { "msg_contents": "\nUmmmm, actually ... Thomas generally freezes the docs two weeks before the\n*release*, not the release candidate ... we've always accepted docs\nchanges up to the very last possible minute ...\n\nOn Thu, 24 Jan 2002, Tom Lane wrote:\n\n> Peter Eisentraut <peter_e@gmx.net> writes:\n> > In the past, the docs were frozen two weeks before the release candidate\n> > so that Thomas Lockhart could prepare them for publication. This time\n> > we've been more relaxed, but I still think we have to stop somewhere.\n>\n> Sure. But I haven't yet heard Thomas ask for a docs freeze, so (unless\n> I missed it) I would think I could still get some work done.\n>\n> \t\t\tregards, tom lane\n>\n\n", "msg_date": "Thu, 24 Jan 2002 20:35:12 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: Ready for RC2 I guess... " }, { "msg_contents": "\nOkay, she's rolled if someone wants to take a quick look at it ... unless\nsomething immediate blows with this one, will do an announce tomorrow\nnight ...\n\n\nOn Thu, 24 Jan 2002, Marc G. Fournier wrote:\n\n>\n> Ummmm, actually ... Thomas generally freezes the docs two weeks before the\n> *release*, not the release candidate ... we've always accepted docs\n> changes up to the very last possible minute ...\n>\n> On Thu, 24 Jan 2002, Tom Lane wrote:\n>\n> > Peter Eisentraut <peter_e@gmx.net> writes:\n> > > In the past, the docs were frozen two weeks before the release candidate\n> > > so that Thomas Lockhart could prepare them for publication. This time\n> > > we've been more relaxed, but I still think we have to stop somewhere.\n> >\n> > Sure. But I haven't yet heard Thomas ask for a docs freeze, so (unless\n> > I missed it) I would think I could still get some work done.\n> >\n> > \t\t\tregards, tom lane\n> >\n>\n>\n> ---------------------------(end of broadcast)---------------------------\n> TIP 6: Have you searched our list archives?\n>\n> http://archives.postgresql.org\n>\n\n", "msg_date": "Thu, 24 Jan 2002 22:25:00 -0400 (AST)", "msg_from": "\"Marc G. Fournier\" <scrappy@hub.org>", "msg_from_op": false, "msg_subject": "Re: Ready for RC2 I guess... " }, { "msg_contents": "\"Marc G. Fournier\" <scrappy@hub.org> writes:\n> Okay, she's rolled if someone wants to take a quick look at it ...\n\ntarfile looks okay from here.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 22:11:34 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Ready for RC2 I guess... " } ]
[ { "msg_contents": "teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:\n> Reposting, it didn't seem to make the list yesterday.\n\nOkay, done that way it looks like it won't break anything. Patch\napplied.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 16:41:51 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: [Chip Turner <cturner@redhat.com>] Re: perl problems in RC1 " } ]
[ { "msg_contents": "We know that backend startup time is something we'd like to cut down as\nmuch as possible, but has anyone ever looked at backend *shutdown* time?\n\nI'm sitting here watching Michael Devogelaere's benchmark with \"top\",\nand despite the fact that there's only one client process at a time,\nthere's frequently two or three backends running. Sometimes four.\nThe only way I can see to explain this is that it takes a fair amount\nof time for the backend to exit after the client disconnects.\n\nSample \"ps -ef\" run showing four active backends and one client:\n\ntgl 17647 1 1 21:18 ? 00:02:31 postmaster -i -F\ntgl 24844 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd\ntgl 24852 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd\ntgl 24856 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd\ntgl 24859 17113 0 23:29 pts/1 00:00:00 /home/tgl/qmail/qmail-getpw alia\ntgl 24860 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd\n\nWhile it clearly takes some amount of time to clean out our entries in\nthe PROC array, etc, this trace suggests that the cost is a lot higher\nthan one would've expected. Anyone have an idea what's going on here?\n\n(BTW, the above processes are 7.1.3, but I doubt 7.2 is better.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 23:38:22 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Backend shutdown time?" }, { "msg_contents": "I said:\n> While it clearly takes some amount of time to clean out our entries in\n> the PROC array, etc, this trace suggests that the cost is a lot higher\n> than one would've expected. Anyone have an idea what's going on here?\n\nOh, never mind, I figured it out: the backends are all nice'd because\nthey're background processes. As long as the client side wants cycles\n(which it will, until it issues a query to the next backend) it's\nhard for the exiting backend(s) to get any cycles at all.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 24 Jan 2002 23:42:56 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": true, "msg_subject": "Re: Backend shutdown time? " } ]
[ { "msg_contents": "Hi all,\n Is there anyway to restrict the database owner to access only to his/her database? because if I assign the dba right to the database owner, he/she will be able to access other databases in the same server. Is there anyway to restrict that?\n\n\nRegards,\nLau NH\n\n\n\n\n\n\n\n\nHi all,\n   Is there anyway to restrict the \ndatabase owner to access only to his/her database?  because if I assign the \ndba right to the database owner, he/she will be able to access other databases \nin the same server.  Is there anyway to restrict that?\n \n \nRegards,Lau NH", "msg_date": "Fri, 25 Jan 2002 13:39:14 +0800", "msg_from": "\"Lau NH\" <launh@perridot.com>", "msg_from_op": true, "msg_subject": "Database access right" } ]
[ { "msg_contents": "\nHi ,\nLook at pg_hba.conf file usually under /usr/local/pgsql/data .\nregards\nOmid Omoomi\n\n>From: \"Lau NH\" <launh@perridot.com>\n>To: <pgsql-admin@postgresql.org>, <pgsql-hackers@postgresql.org>\n>Subject: [ADMIN] Database access right\n>Date: Fri, 25 Jan 2002 13:39:14 +0800\n>\n>Hi all,\n> Is there anyway to restrict the database owner to access only to \n>his/her database? because if I assign the dba right to the database owner, \n>he/she will be able to access other databases in the same server. Is there \n>anyway to restrict that?\n>\n>\n>Regards,\n>Lau NH\n>\n\n\n_________________________________________________________________\nChat with friends online, try MSN Messenger: http://messenger.msn.com\n\n", "msg_date": "Fri, 25 Jan 2002 08:12:31 ", "msg_from": "\"omid omoomi\" <oomoomi@hotmail.com>", "msg_from_op": true, "msg_subject": "Re: Database access right" }, { "msg_contents": "My case is like this, my database server has a grant DBA \"postgres\" who can\naccess all the database, and I have individual database's dba, e.g. \"user1\"\nas dba for database \"db1\", \"user2\" as dba for database \"db2\", and so on.\nHow am I going to set this up in pg_hba.conf?\n\nRegards,\nLau NH\n\n----- Original Message -----\nFrom: \"omid omoomi\" <oomoomi@hotmail.com>\nTo: <launh@perridot.com>; <pgsql-admin@postgresql.org>;\n<pgsql-hackers@postgresql.org>\nSent: Friday, January 25, 2002 8:12 AM\nSubject: Re: [ADMIN] Database access right\n\n\n>\n> Hi ,\n> Look at pg_hba.conf file usually under /usr/local/pgsql/data .\n> regards\n> Omid Omoomi\n>\n> >From: \"Lau NH\" <launh@perridot.com>\n> >To: <pgsql-admin@postgresql.org>, <pgsql-hackers@postgresql.org>\n> >Subject: [ADMIN] Database access right\n> >Date: Fri, 25 Jan 2002 13:39:14 +0800\n> >\n> >Hi all,\n> > Is there anyway to restrict the database owner to access only to\n> >his/her database? because if I assign the dba right to the database\nowner,\n> >he/she will be able to access other databases in the same server. Is\nthere\n> >anyway to restrict that?\n> >\n> >\n> >Regards,\n> >Lau NH\n> >\n>\n>\n> _________________________________________________________________\n> Chat with friends online, try MSN Messenger: http://messenger.msn.com\n\n", "msg_date": "Fri, 25 Jan 2002 16:46:13 +0800", "msg_from": "\"Lau NH\" <launh@perridot.com>", "msg_from_op": false, "msg_subject": "Re: Database access right" } ]
[ { "msg_contents": "Hi all,\n\nSince I was at first Oracle DBA, I've been told many times at\nprofessional trainings that when there is a table wich primary key is\ngenerated by a sequence, it is worth create a RTREE index on it rather\nthan a BTREE (for index balancing reasons).\n\nBut, I wanted to try it with my PostgreSQL 7.1.3 and:\n\n---\ncontacts=# \\d t_contact\n Table \"t_contact\"\n Attribute | Type |\nModifier \n-------------------+------------------------+--------------------------------------------------\n cnt_id | integer | not null default nextval('contact_id_seq'::text)\n\n[snipped all other columns...]\n\ncontacts=# drop index t_contacts_pkey;\nDROP\n\ncontacts=# create unique index t_contacts_pkey on t_contact using rtree\n(cnt_id);\nERROR: DefineIndex: unique indices are only available with the btree\naccess method\n\ncontacts=# create index t_contacts_pkey on t_contact using rtree\n(cnt_id);\nERROR: DefineIndex: opclass \"int4_ops\" not supported by access method\n\"rtree\"\n---\n\nSo I think there are 2 possible reasons:\n\n1) PostgreSQL has strong algorithms to manage indexes greatly, avoiding\nthis kind of BTREE index being unbalanced time passing ( I mean a kind\nof automatic detection of unbalanced BTREE => triggers a DROP and CREATE\nindex...)\n\n2) It is not yet implemented and you want to do it for the next version\n:)\n\nWhih of 1) & 2) is true?\n\nWhere to find more information about index management in PostgreSQL?\n\nThanks a lot.\n\n\n-- \nJean-Paul ARGUDO \t\tIDEALX S.A.S\nConsultant bases de donn�es\t\t\t15-17, av. de S�gur\nhttp://IDEALX.com/ \t\t\t\tF-75007 PARIS\n", "msg_date": "Fri, 25 Jan 2002 09:56:18 +0100", "msg_from": "Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com>", "msg_from_op": true, "msg_subject": "RTREE Index on primary key generated by a sequence" }, { "msg_contents": "On Fri, Jan 25, 2002 at 09:56:18AM +0100,\n Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com> wrote:\n> Hi all,\n> \n> Since I was at first Oracle DBA, I've been told many times at\n> professional trainings that when there is a table wich primary key is\n> generated by a sequence, it is worth create a RTREE index on it rather\n> than a BTREE (for index balancing reasons).\n\nThe documentation gives the specific algorithms used:\nThe B-tree index is an implementation of Lehman-Yao high-concurrency\n B-trees. The R-tree index method implements standard R-trees using\n Guttman's quadratic split algorithm. The hash index is an\n implementation of Litwin's linear hashing. We mention the algorithms\n used solely to indicate that all of these access methods are fully\n dynamic and do not have to be optimized periodically (as is the case\n with, for example, static hash access methods).\n", "msg_date": "Fri, 25 Jan 2002 07:54:18 -0600", "msg_from": "Bruno Wolff III <bruno@wolff.to>", "msg_from_op": false, "msg_subject": "Re: RTREE Index on primary key generated by a sequence" }, { "msg_contents": "Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com> writes:\n> Since I was at first Oracle DBA, I've been told many times at\n> professional trainings that when there is a table wich primary key is\n> generated by a sequence, it is worth create a RTREE index on it rather\n> than a BTREE (for index balancing reasons).\n\nHuh?\n\nRTREEs are for two-or-more-dimensional data (the implementation in PG\nonly handles 2-D, IIRC). So they're not applicable to scalar data.\nIn any case, the claim that RTREEs are more readily balanced than BTREEs\nseems totally unfounded to me.\n\nIn PG, the btree implementation is by far the best-tested,\nbest-optimized index access method we have; for example, it's the only\none that has decent support for concurrent access. If you want to use\none of the other ones, I'd recommend you have a darn good reason.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 10:19:25 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTREE Index on primary key generated by a sequence " }, { "msg_contents": "Tom,\n\nSince my english is not so fluent, I found on the net a little\nexplication about Reverse Key Indexes (not RTREE, sorry :).\n\nAs an explication, you could read there the point 9 :\nhttp://oracle.oreilly.com/news/oraclepp_0900.html\n\nWich I copy here : �\n\n\n9.Use Reverse Key Indexes. An index block\ntypically references more rows than are\ncontained in each data block for the\ncorresponding table. When an index is based on\na column that increases in a sequential\nfashion, and two or more instances are\ninserting data into the underlying\ntable, there is a strong likelihood that both\ninstances will be contending for the\nsame index block. This is because sequential\nindex entries are likely to be in the\nsame block. Reverse key indexes reverse the\nbytes in each index entry, causing\nsequential entries to be dispersed across the\nindex tree. Hence, there is less chance\nof contention for the same index block. One\ntrade-off involved with using this\ntechnique is that by its nature, reverse key indexes\ncannot be used as the basis for an index\nrange scan. \n\n�\n\n\nThanks.\n\n-- \nJean-Paul ARGUDO \t\tIDEALX S.A.S\nConsultant bases de donn�es\t\t\t15-17, av. de S�gur\nhttp://IDEALX.com/ \t\t\t\tF-75007 PARIS\n", "msg_date": "Fri, 25 Jan 2002 16:55:58 +0100", "msg_from": "Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com>", "msg_from_op": true, "msg_subject": "Re: RTREE Index on primary key generated by a sequence" }, { "msg_contents": ">>>Bruno Wolff III said:\n > The documentation gives the specific algorithms used:\n > The B-tree index is an implementation of Lehman-Yao high-concurrency\n > B-trees. The R-tree index method implements standard R-trees using\n > Guttman's quadratic split algorithm. The hash index is an\n > implementation of Litwin's linear hashing. We mention the algorithms\n > used solely to indicate that all of these access methods are fully\n > dynamic and do not have to be optimized periodically (as is the case\n > with, for example, static hash access methods).\n\nI was under the impression that hash indexes were not recommended for \nconcurrent updates etc?\n\nDaniel\n\n", "msg_date": "Fri, 25 Jan 2002 17:58:28 +0200", "msg_from": "Daniel Kalchev <daniel@digsys.bg>", "msg_from_op": false, "msg_subject": "Re: RTREE Index on primary key generated by a sequence " }, { "msg_contents": "Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com> writes:\n> Since my english is not so fluent, I found on the net a little\n> explication about Reverse Key Indexes (not RTREE, sorry :).\n\n> As an explication, you could read there the point 9 :\n> http://oracle.oreilly.com/news/oraclepp_0900.html\n\n> ... Reverse key indexes reverse the\n> bytes in each index entry, causing\n> sequential entries to be dispersed across the\n> index tree.\n\nHmm. I think you could implement that with a custom index opclass\nconsisting of operators that flipped the bytes before comparison.\nNot clear that it'd really buy you enough to be worth the trouble,\nbut if someone wants to try it...\n\n> ... One\n> trade-off involved with using this\n> technique is that by its nature, reverse key indexes\n> cannot be used as the basis for an index\n> range scan. \n\nThe way this would show up in Postgres is that you would use the\nstandard integer = operator as the = member of the opclass, but\nall the other members would be byte-reversed-comparison operators\nthat would never be useful in real-world queries.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 11:32:37 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RTREE Index on primary key generated by a sequence " }, { "msg_contents": "Okay Tom,\n\nThat closes the thread ;-)\n\nThanks for such expertise, hope one day I'll reach a 10% of yours :-)\n\nRegards,\n\n-- \nJean-Paul ARGUDO \t\tIDEALX S.A.S\nConsultant bases de donn�es\t\t\t15-17, av. de S�gur\nhttp://IDEALX.com/ \t\t\t\tF-75007 PARIS\n", "msg_date": "Fri, 25 Jan 2002 17:43:50 +0100", "msg_from": "Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com>", "msg_from_op": true, "msg_subject": "Re: RTREE Index on primary key generated by a sequence" }, { "msg_contents": "Tom Lane wrote:\n> \n> Jean-Paul ARGUDO <jean-paul.argudo@IDEALX.com> writes:\n> > Since my english is not so fluent, I found on the net a little\n> > explication about Reverse Key Indexes (not RTREE, sorry :).\n> \n> > As an explication, you could read there the point 9 :\n> > http://oracle.oreilly.com/news/oraclepp_0900.html\n> \n> > ... Reverse key indexes reverse the\n> > bytes in each index entry, causing\n> > sequential entries to be dispersed across the\n> > index tree.\n> \n> Hmm. I think you could implement that with a custom index opclass\n> consisting of operators that flipped the bytes before comparison.\n> Not clear that it'd really buy you enough to be worth the trouble,\n> but if someone wants to try it...\n> \n> > ... One\n> > trade-off involved with using this\n> > technique is that by its nature, reverse key indexes\n> > cannot be used as the basis for an index\n> > range scan.\n> \n> The way this would show up in Postgres is that you would use the\n> standard integer = operator as the = member of the opclass, but\n> all the other members would be byte-reversed-comparison operators\n> that would never be useful in real-world queries.\n\nNever is too strong word. I guess that if index block contention is\nserious enough problem for insert-intensive aplication and you need \nonly = access then this could be a good thing. \n\nOTOH it will probably be not so good for cache usage and update \nlocality so it may not be as good as it sounds even for the above\nscenario.\n\n---------------\nHannu\n", "msg_date": "Fri, 25 Jan 2002 19:28:02 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: RTREE Index on primary key generated by a sequence" } ]
[ { "msg_contents": "\n> Tom Lane wrote:\n> \n> > \n> > This would be a *whole* lot simpler if we forgot the notion of \"any\"\n> > and made the search order look like\n> > \n> > \t(temp, private, public, system)\n\nI am starting to see the advantages and like it. I also like the exact \nname \"public\" for the public schema.\n\nAndreas\n", "msg_date": "Fri, 25 Jan 2002 12:34:48 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Zeugswetter Andreas SB SD wrote:\n> \n> > Tom Lane wrote:\n> > \n> > > \n> > > This would be a *whole* lot simpler if we forgot the notion of \"any\"\n> > > and made the search order look like\n> > > \n> > > \t(temp, private, public, system)\n> \n> I am starting to see the advantages and like it. I also like the exact \n> name \"public\" for the public schema.\n\nI wonder if we should think about a 'group' area so people in a group\ncan create things that others in the group can see, but not people\noutside the group.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 25 Jan 2002 11:52:04 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects" }, { "msg_contents": "Bruce Momjian <pgman@candle.pha.pa.us> writes:\n>> I am starting to see the advantages and like it. I also like the exact \n>> name \"public\" for the public schema.\n\n> I wonder if we should think about a 'group' area so people in a group\n> can create things that others in the group can see, but not people\n> outside the group.\n\nI see no reason to hard-wire such a concept. Given createable\nnamespaces, ACLs for namespaces, and a settable namespace search path,\npeople can set up group namespaces or anything else they want.\n\nThe (temp, private, public, system) path is suggested as default because\nit's the minimum we need to support both SQL92 and backwards-compatible\nbehaviors. I don't think we should put in special-purpose features\nbeyond that, when we can instead offer a general mechanism with which\npeople can build the special-purpose features they want.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 12:04:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: RFD: schemas and different kinds of Postgres objects " } ]
[ { "msg_contents": "Please apply small patch to contrib/oid2name\n\n--- oid2name.c.orig Thu Jan 10 14:07:44 2002\n+++ oid2name.c Fri Jan 25 14:42:01 2002\n@@ -152,7 +152,7 @@\n case 'h':\n fprintf(stderr, \"\\n\\\n Usage: pg_oid2name [-d database [-x] ] [-t table | -o oid] \\n\\\n- dafault action display all databases\\n\\\n+ default action display all databases\\n\\\n -d database database to oid2name\\n\\\n -x display system tables\\n\\\n -t table | -o oid search for table name (-t) or\\n\\\n\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Fri, 25 Jan 2002 14:51:41 +0300 (GMT)", "msg_from": "Oleg Bartunov <oleg@sai.msu.su>", "msg_from_op": true, "msg_subject": "typo in contrib/oid2name" }, { "msg_contents": "Oleg Bartunov <oleg@sai.msu.su> writes:\n> - dafault action display all databases\\n\\\n> + default action display all databases\\n\\\n\nFixed. Thanks.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 10:40:56 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: typo in contrib/oid2name " } ]
[ { "msg_contents": "Hi,\n\nIs't late to submit new contrib module for 7.2 ?\nIt's almost ready and tested, we have to write README.tree.\n\nNew module creates new data types 'tree', 'treequery' for tree-like data and\nprovides indexed access methods using Btree or GiST.\nNode represents as a path to the root, so record like '3.4' means\n4-th child of 3-rd child of the root node.\nDue-to bit-representation there is a limitation to the number of\nchildren - 64 and defined in compile time (valid values - 8,16,32,64).\nFor practical purposes 64 children looks quite enough.\ninsert,delete operations should be ok, while move operations\nis a pain - one should update all paths of children nodes.\nBut search is very fast, we use data from Open Directory catalog (www.dmoz.org)\nfor testing:\n\nSelect all countries:\n\ndmoz64=# explain analyze select * from dmoz where tid <* '18.*.0';\nNOTICE: QUERY PLAN:\n\nIndex Scan using tid_g_idx on dmoz (cost=0.00..1094.10 rows=277 width=100) (actual time=3.54..23.76 rows=56 loops=1)\nTotal runtime: 23.96 msec\n\nEXPLAIN\ndmoz64=#\n\n name | strid | id | tid\n---------------------+-------------------------------+--------+-------\n Tagalog | Top/World/Tagalog | 276537 | 18.18\n Taiwanese | Top/World/Taiwanese | 276566 | 18.19\n Tamil | Top/World/Tamil | 276567 | 18.20\n Telugu | Top/World/Telugu | 276568 | 18.21\n Thai | Top/World/Thai | 276601 | 18.22\n Ukrainian | Top/World/Ukrainian | 276602 | 18.23\n Vietnamese | Top/World/Vietnamese | 276603 | 18.24\n Japanese | Top/World/Japanese | 268629 | 18.31\n Kiswahili | Top/World/Kiswahili | 268630 | 18.32\n Afrikaans | Top/World/Afrikaans | 256813 | 18.1\n Italiano | Top/World/Italiano | 266163 | 18.30\n Interlingua | Top/World/Interlingua | 266144 | 18.29\n Indonesia | Top/World/Indonesia | 265859 | 18.28\n Croatian | Top/World/Croatian | 257063 | 18.12\n....................................................................\n\n\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Fri, 25 Jan 2002 17:08:38 +0300 (GMT)", "msg_from": "Oleg Bartunov <oleg@sai.msu.su>", "msg_from_op": true, "msg_subject": "new module contrib/tree for 7.2 ?" }, { "msg_contents": "Oleg Bartunov <oleg@sai.msu.su> writes:\n> Is't late to submit new contrib module for 7.2 ?\n\nSorry, too late. I've been lax on a lot of other questions, but large\nchunks of new code are *not* going in at this point, contrib or no.\nSave it for 7.3.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 10:26:07 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: new module contrib/tree for 7.2 ? " }, { "msg_contents": "Oleg Bartunov wrote:\n> \n> Hi,\n> \n> Is't late to submit new contrib module for 7.2 ?\n> It's almost ready and tested, we have to write README.tree.\n> \n> New module creates new data types 'tree', 'treequery' for tree-like data and\n> provides indexed access methods using Btree or GiST.\n> Node represents as a path to the root, so record like '3.4' means\n> 4-th child of 3-rd child of the root node.\n> Due-to bit-representation there is a limitation to the number of\n> children - 64 and defined in compile time (valid values - 8,16,32,64).\n\nHow hard it would be to automatically expand it so that 65th node will \nmake it flow over to next bitfield and the whole level will then \naccommodate 64*64 = 4096 child nodes ?\n\n> For practical purposes 64 children looks quite enough.\n> insert,delete operations should be ok, while move operations\n> is a pain - one should update all paths of children nodes.\n> But search is very fast, we use data from Open Directory catalog (www.dmoz.org)\n> for testing:\n\nCould you send it to me for personal testing if it is not accepted to\ncontrib for 7.2 ?\n\n-------------\nHannu\n", "msg_date": "Fri, 25 Jan 2002 18:03:27 +0200", "msg_from": "Hannu Krosing <hannu@tm.ee>", "msg_from_op": false, "msg_subject": "Re: new module contrib/tree for 7.2 ?" }, { "msg_contents": "Hannu Krosing wrote:\n\n> Oleg Bartunov wrote:\n> \n>>Hi,\n>>\n>>Is't late to submit new contrib module for 7.2 ?\n>>It's almost ready and tested, we have to write README.tree.\n>>\n>>New module creates new data types 'tree', 'treequery' for tree-like data and\n>>provides indexed access methods using Btree or GiST.\n>>Node represents as a path to the root, so record like '3.4' means\n>>4-th child of 3-rd child of the root node.\n>>Due-to bit-representation there is a limitation to the number of\n>>children - 64 and defined in compile time (valid values - 8,16,32,64).\n>>\n> \n> How hard it would be to automatically expand it so that 65th node will \n> make it flow over to next bitfield and the whole level will then \n> accommodate 64*64 = 4096 child nodes ?\n\n\nHmmm...the OpenACS 4 tree implementation uses BIT VARYING for the key. \nThe first 128 immediate children of a node have a one-byte key (leading \n0 and 7 bits for the key), the next 2 billionish immediate children have \nfour-byte keys (leading 1 and 31 bits for the key). After that you get \nno more immediate children but two billion plus seems sufficient!\n\nMany trees have no nodes with more than 128 immediate children, of \ncourse, so these always have keys with one byte per level. Being able \nto handle essentially \"infinitely flat\" trees without intervention is \nawfully nice, though.\n\nUsing \"between\" and a simple set of functions you can get btree-indexed \naccess to all subtrees. Getting the set of parents for a node is a bit \nmore tricky - we use a recursive SQL function to build the set of parent \nkeys. This is almost clean using CREATE OR REPLACE in PG 7.2 - you \nfirst define the function with a dummy body, then do the C OR R with the \nreal body. The C OR R allows you to recursively reference the function \nsince it was previously defined with a dummy body ...\n\nIf you want to grab the subtree and spit out the rows in order (as in \ngrabbing rows to display a folder/file style hierarchy) a simple \"order \nby\" on the key works, and there's a \"treelevel()\" function that can be \nused to drive indention.\n\n\nThis has been well-tested on a handful of OpenACS 4/PG production \nwebsites and gives fast, indexed, tree operations.\n\nI had looked at doing something like Oleg's describing but fell upon BIT \nVARYING and the fact that byte-aligned/byte-multiple lengthed bit \nstrings are handled efficiently internally (having source to your RDBMS \nis so nice at times). The advantage of this is that no non-standard \ntype, operators for indexing, etc need to be added to PG. There are \njust some PL/pgSQL functions and triggers on the tree table (to build \nthe keys on insert/update).\n\nWhen I find some time I thought I'd bundle this up and make it available \nseparately but at the moment you have to grab the OpenACS 4 tarball.\n\nHannu or anyone else, if you're curious shoot me some private e-mail and \n I'll tell you where to grab the pieces.\n\n\n-- \nDon Baccus\nPortland, OR\nhttp://donb.photo.net, http://birdnotes.net, http://openacs.org\n\n", "msg_date": "Fri, 25 Jan 2002 08:55:02 -0800", "msg_from": "Don Baccus <dhogaza@pacifier.com>", "msg_from_op": false, "msg_subject": "Re: new module contrib/tree for 7.2 ?" }, { "msg_contents": "\nThis has been saved for the 7.3 release:\n\n\thttp://candle.pha.pa.us/cgi-bin/pgpatches2\n\n---------------------------------------------------------------------------\n\nOleg Bartunov wrote:\n> Hi,\n> \n> Is't late to submit new contrib module for 7.2 ?\n> It's almost ready and tested, we have to write README.tree.\n> \n> New module creates new data types 'tree', 'treequery' for tree-like data and\n> provides indexed access methods using Btree or GiST.\n> Node represents as a path to the root, so record like '3.4' means\n> 4-th child of 3-rd child of the root node.\n> Due-to bit-representation there is a limitation to the number of\n> children - 64 and defined in compile time (valid values - 8,16,32,64).\n> For practical purposes 64 children looks quite enough.\n> insert,delete operations should be ok, while move operations\n> is a pain - one should update all paths of children nodes.\n> But search is very fast, we use data from Open Directory catalog (www.dmoz.org)\n> for testing:\n> \n> Select all countries:\n> \n> dmoz64=# explain analyze select * from dmoz where tid <* '18.*.0';\n> NOTICE: QUERY PLAN:\n> \n> Index Scan using tid_g_idx on dmoz (cost=0.00..1094.10 rows=277 width=100) (actual time=3.54..23.76 rows=56 loops=1)\n> Total runtime: 23.96 msec\n> \n> EXPLAIN\n> dmoz64=#\n> \n> name | strid | id | tid\n> ---------------------+-------------------------------+--------+-------\n> Tagalog | Top/World/Tagalog | 276537 | 18.18\n> Taiwanese | Top/World/Taiwanese | 276566 | 18.19\n> Tamil | Top/World/Tamil | 276567 | 18.20\n> Telugu | Top/World/Telugu | 276568 | 18.21\n> Thai | Top/World/Thai | 276601 | 18.22\n> Ukrainian | Top/World/Ukrainian | 276602 | 18.23\n> Vietnamese | Top/World/Vietnamese | 276603 | 18.24\n> Japanese | Top/World/Japanese | 268629 | 18.31\n> Kiswahili | Top/World/Kiswahili | 268630 | 18.32\n> Afrikaans | Top/World/Afrikaans | 256813 | 18.1\n> Italiano | Top/World/Italiano | 266163 | 18.30\n> Interlingua | Top/World/Interlingua | 266144 | 18.29\n> Indonesia | Top/World/Indonesia | 265859 | 18.28\n> Croatian | Top/World/Croatian | 257063 | 18.12\n> ....................................................................\n> \n> \n> \n> \tRegards,\n> \t\tOleg\n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 25 Jan 2002 12:04:58 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: new module contrib/tree for 7.2 ?" }, { "msg_contents": "\nOleg, can you send over a patch?\n\n---------------------------------------------------------------------------\n\nOleg Bartunov wrote:\n> Hi,\n> \n> Is't late to submit new contrib module for 7.2 ?\n> It's almost ready and tested, we have to write README.tree.\n> \n> New module creates new data types 'tree', 'treequery' for tree-like data and\n> provides indexed access methods using Btree or GiST.\n> Node represents as a path to the root, so record like '3.4' means\n> 4-th child of 3-rd child of the root node.\n> Due-to bit-representation there is a limitation to the number of\n> children - 64 and defined in compile time (valid values - 8,16,32,64).\n> For practical purposes 64 children looks quite enough.\n> insert,delete operations should be ok, while move operations\n> is a pain - one should update all paths of children nodes.\n> But search is very fast, we use data from Open Directory catalog (www.dmoz.org)\n> for testing:\n> \n> Select all countries:\n> \n> dmoz64=# explain analyze select * from dmoz where tid <* '18.*.0';\n> NOTICE: QUERY PLAN:\n> \n> Index Scan using tid_g_idx on dmoz (cost=0.00..1094.10 rows=277 width=100) (actual time=3.54..23.76 rows=56 loops=1)\n> Total runtime: 23.96 msec\n> \n> EXPLAIN\n> dmoz64=#\n> \n> name | strid | id | tid\n> ---------------------+-------------------------------+--------+-------\n> Tagalog | Top/World/Tagalog | 276537 | 18.18\n> Taiwanese | Top/World/Taiwanese | 276566 | 18.19\n> Tamil | Top/World/Tamil | 276567 | 18.20\n> Telugu | Top/World/Telugu | 276568 | 18.21\n> Thai | Top/World/Thai | 276601 | 18.22\n> Ukrainian | Top/World/Ukrainian | 276602 | 18.23\n> Vietnamese | Top/World/Vietnamese | 276603 | 18.24\n> Japanese | Top/World/Japanese | 268629 | 18.31\n> Kiswahili | Top/World/Kiswahili | 268630 | 18.32\n> Afrikaans | Top/World/Afrikaans | 256813 | 18.1\n> Italiano | Top/World/Italiano | 266163 | 18.30\n> Interlingua | Top/World/Interlingua | 266144 | 18.29\n> Indonesia | Top/World/Indonesia | 265859 | 18.28\n> Croatian | Top/World/Croatian | 257063 | 18.12\n> ....................................................................\n> \n> \n> \n> \tRegards,\n> \t\tOleg\n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 22 Feb 2002 21:25:57 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: new module contrib/tree for 7.2 ?" }, { "msg_contents": "On Fri, 22 Feb 2002, Bruce Momjian wrote:\n\n>\n> Oleg, can you send over a patch?\n>\n\nAs soon as I write documentation :-) I hope I could use this weekend\n\n\tOleg\n\n> ---------------------------------------------------------------------------\n>\n> Oleg Bartunov wrote:\n> > Hi,\n> >\n> > Is't late to submit new contrib module for 7.2 ?\n> > It's almost ready and tested, we have to write README.tree.\n> >\n> > New module creates new data types 'tree', 'treequery' for tree-like data and\n> > provides indexed access methods using Btree or GiST.\n> > Node represents as a path to the root, so record like '3.4' means\n> > 4-th child of 3-rd child of the root node.\n> > Due-to bit-representation there is a limitation to the number of\n> > children - 64 and defined in compile time (valid values - 8,16,32,64).\n> > For practical purposes 64 children looks quite enough.\n> > insert,delete operations should be ok, while move operations\n> > is a pain - one should update all paths of children nodes.\n> > But search is very fast, we use data from Open Directory catalog (www.dmoz.org)\n> > for testing:\n> >\n> > Select all countries:\n> >\n> > dmoz64=# explain analyze select * from dmoz where tid <* '18.*.0';\n> > NOTICE: QUERY PLAN:\n> >\n> > Index Scan using tid_g_idx on dmoz (cost=0.00..1094.10 rows=277 width=100) (actual time=3.54..23.76 rows=56 loops=1)\n> > Total runtime: 23.96 msec\n> >\n> > EXPLAIN\n> > dmoz64=#\n> >\n> > name | strid | id | tid\n> > ---------------------+-------------------------------+--------+-------\n> > Tagalog | Top/World/Tagalog | 276537 | 18.18\n> > Taiwanese | Top/World/Taiwanese | 276566 | 18.19\n> > Tamil | Top/World/Tamil | 276567 | 18.20\n> > Telugu | Top/World/Telugu | 276568 | 18.21\n> > Thai | Top/World/Thai | 276601 | 18.22\n> > Ukrainian | Top/World/Ukrainian | 276602 | 18.23\n> > Vietnamese | Top/World/Vietnamese | 276603 | 18.24\n> > Japanese | Top/World/Japanese | 268629 | 18.31\n> > Kiswahili | Top/World/Kiswahili | 268630 | 18.32\n> > Afrikaans | Top/World/Afrikaans | 256813 | 18.1\n> > Italiano | Top/World/Italiano | 266163 | 18.30\n> > Interlingua | Top/World/Interlingua | 266144 | 18.29\n> > Indonesia | Top/World/Indonesia | 265859 | 18.28\n> > Croatian | Top/World/Croatian | 257063 | 18.12\n> > ....................................................................\n> >\n> >\n> >\n> > \tRegards,\n> > \t\tOleg\n> > _____________________________________________________________\n> > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> > Sternberg Astronomical Institute, Moscow University (Russia)\n> > Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\n> > phone: +007(095)939-16-83, +007(095)939-23-83\n> >\n> >\n> > ---------------------------(end of broadcast)---------------------------\n> > TIP 5: Have you checked our extensive FAQ?\n> >\n> > http://www.postgresql.org/users-lounge/docs/faq.html\n> >\n>\n>\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Sat, 23 Feb 2002 11:46:59 +0300 (GMT)", "msg_from": "Oleg Bartunov <oleg@sai.msu.su>", "msg_from_op": true, "msg_subject": "Re: new module contrib/tree for 7.2 ?" }, { "msg_contents": "\nSorry, didn't make 7.2, but can be added to 7.3 anytime.\n\n---------------------------------------------------------------------------\n\nOleg Bartunov wrote:\n> Hi,\n> \n> Is't late to submit new contrib module for 7.2 ?\n> It's almost ready and tested, we have to write README.tree.\n> \n> New module creates new data types 'tree', 'treequery' for tree-like data and\n> provides indexed access methods using Btree or GiST.\n> Node represents as a path to the root, so record like '3.4' means\n> 4-th child of 3-rd child of the root node.\n> Due-to bit-representation there is a limitation to the number of\n> children - 64 and defined in compile time (valid values - 8,16,32,64).\n> For practical purposes 64 children looks quite enough.\n> insert,delete operations should be ok, while move operations\n> is a pain - one should update all paths of children nodes.\n> But search is very fast, we use data from Open Directory catalog (www.dmoz.org)\n> for testing:\n> \n> Select all countries:\n> \n> dmoz64=# explain analyze select * from dmoz where tid <* '18.*.0';\n> NOTICE: QUERY PLAN:\n> \n> Index Scan using tid_g_idx on dmoz (cost=0.00..1094.10 rows=277 width=100) (actual time=3.54..23.76 rows=56 loops=1)\n> Total runtime: 23.96 msec\n> \n> EXPLAIN\n> dmoz64=#\n> \n> name | strid | id | tid\n> ---------------------+-------------------------------+--------+-------\n> Tagalog | Top/World/Tagalog | 276537 | 18.18\n> Taiwanese | Top/World/Taiwanese | 276566 | 18.19\n> Tamil | Top/World/Tamil | 276567 | 18.20\n> Telugu | Top/World/Telugu | 276568 | 18.21\n> Thai | Top/World/Thai | 276601 | 18.22\n> Ukrainian | Top/World/Ukrainian | 276602 | 18.23\n> Vietnamese | Top/World/Vietnamese | 276603 | 18.24\n> Japanese | Top/World/Japanese | 268629 | 18.31\n> Kiswahili | Top/World/Kiswahili | 268630 | 18.32\n> Afrikaans | Top/World/Afrikaans | 256813 | 18.1\n> Italiano | Top/World/Italiano | 266163 | 18.30\n> Interlingua | Top/World/Interlingua | 266144 | 18.29\n> Indonesia | Top/World/Indonesia | 265859 | 18.28\n> Croatian | Top/World/Croatian | 257063 | 18.12\n> ....................................................................\n> \n> \n> \n> \tRegards,\n> \t\tOleg\n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n> \n> \n> ---------------------------(end of broadcast)---------------------------\n> TIP 5: Have you checked our extensive FAQ?\n> \n> http://www.postgresql.org/users-lounge/docs/faq.html\n> \n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n pgman@candle.pha.pa.us | (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, 7 Mar 2002 20:16:26 -0500 (EST)", "msg_from": "Bruce Momjian <pgman@candle.pha.pa.us>", "msg_from_op": false, "msg_subject": "Re: new module contrib/tree for 7.2 ?" } ]
[ { "msg_contents": "Vadim wrote:\n> How about: use overwriting smgr + put old records into rollback\n> segments - RS - (you have to keep them somewhere till TX's running\n> anyway) + use WAL only as REDO log (RS will be used to rollback TX'\n> changes and WAL will be used for RS/data files recovery).\n> Something like what Oracle does.\n\nWe have all the info we need in WAL and in the old rows,\nwhy would you want to write them to RS ?\nYou only need RS for overwriting smgr.\n\nAndreas\n", "msg_date": "Fri, 25 Jan 2002 15:21:22 +0100", "msg_from": "\"Zeugswetter Andreas SB SD\" <ZeugswetterA@spardat.at>", "msg_from_op": true, "msg_subject": "Re: Savepoints" } ]
[ { "msg_contents": "\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nI am in the process of adding some external interfaces to the temporary \nrelations (started as a goal of being able to view temporary \ntables in psql with \\d). How do I choose a new OID when adding something \nto include/catalog/pg_proc.h? The comments say to \"keep the following \nordered by OID\" and then \"OIDS 1 - 99\" but then we jump right into \nOIDs 1242,1243,1244,31,1245, etc. What are the guidelines for choosing a \nnew number when creating (for example) a pg_tempname() function?\n\nThanks,\nGreg Sabino Mullane greg@turnstep.com\nPGP Key: 0x14964AC8 200201251014\n\n-----BEGIN PGP SIGNATURE-----\nComment: http://www.turnstep.com/pgp.html\n\niD8DBQE8UXiwvJuQZxSWSsgRAkmqAJ4zrgtNILaqjcCcGxRWc9ab4q3WfwCg0zjD\n+c2X3pa13Z1QF4+keJQFs3U=\n=2Nan\n-----END PGP SIGNATURE-----\n\n\n", "msg_date": "Fri, 25 Jan 2002 15:25:49 -0000", "msg_from": "\"Greg Sabino Mullane\" <greg@turnstep.com>", "msg_from_op": true, "msg_subject": "New system OIDS inside include/catalog/pg_proc.h" }, { "msg_contents": "\"Greg Sabino Mullane\" <greg@turnstep.com> writes:\n> I am in the process of adding some external interfaces to the temporary \n> relations (started as a goal of being able to view temporary \n> tables in psql with \\d).\n\nI think you're wasting your time to think about this now. By the time\n7.3 comes out, we will have an entirely new approach to temp tables:\nthey'll be named with the same names the user sees, and live in\nper-backend temp schemas to avoid name conflicts with permanent tables.\nSo any code based on working with the existing temp-name mapper will\nbe in the scrap heap before it can get released :-(\n\n> How do I choose a new OID when adding something \n> to include/catalog/pg_proc.h? \n\nSee unused_oids.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 25 Jan 2002 11:04:12 -0500", "msg_from": "Tom Lane <tgl@sss.pgh.pa.us>", "msg_from_op": false, "msg_subject": "Re: New system OIDS inside include/catalog/pg_proc.h " }, { "msg_contents": "Greg Sabino Mullane writes:\n\n> What are the guidelines for choosing a\n> new number when creating (for example) a pg_tempname() function?\n\nJust pick the first one that's available.\n\n~/pgsql/src/include/catalog$ ./unused_oids\n3 - 11\n90\n99\n109 - 111\n143\n652\n1076 - 1077\n2019\n2071 - 9999\n\nMaybe the single-digits should stay reserved for some truly important\nobjects or magic use, but for any old functionI'd start at 90, or if you\nmake a group of three functions use 109-111, or if you make a group of 25\nobjects, start at 2071. In short, it doesn't matter, but try to make a\nlittle sense.\n\n-- \nPeter Eisentraut peter_e@gmx.net\n\n", "msg_date": "Fri, 25 Jan 2002 11:11:34 -0500 (EST)", "msg_from": "Peter Eisentraut <peter_e@gmx.net>", "msg_from_op": false, "msg_subject": "Re: New system OIDS inside include/catalog/pg_proc.h" } ]