threads
listlengths
1
2.99k
[ { "msg_contents": "I'm wanting to run pgsql 7.0.3 release and pgsql current cvs on the same \nmachine without them conflicting (if possible). Can someone explain what I \nshould look out for when trying to do this?\n\nI assume I'll have to configure --with-pgport=5433 (something other than \n5432).\n\nHow will the use of the environment variables PGDATA and PGLIB be affected if \nI have them still pointing at the release version?\n\nI'm wanting to begin keeping an updated pgsql-cvs installation running and \nmaybe get active in working on the sources. Maybe I can start out with \ndocumentation stuff. I've been following this list long enough and still \nenjoy it so I want to try towards contributing stuff.\n\n-- \n-------- Robert B. Easter [email protected] ---------\n- CompTechNews Message Board http://www.comptechnews.com/ -\n- CompTechServ Tech Services http://www.comptechserv.com/ -\n---------- http://www.comptechnews.com/~reaster/ ------------\n", "msg_date": "Fri, 22 Dec 2000 21:48:49 -0500", "msg_from": "\"Robert B. Easter\" <[email protected]>", "msg_from_op": true, "msg_subject": "Considerations for running current cvs pgsql and pgsql release on\n\tsame machine?" }, { "msg_contents": "\"Robert B. Easter\" <[email protected]> writes:\n> I'm wanting to run pgsql 7.0.3 release and pgsql current cvs on the same \n> machine without them conflicting (if possible). Can someone explain what I \n> should look out for when trying to do this?\n\nI routinely run multiple versions at the same time. You need a separate\nport, install directory, and data directory for each. Easiest way to do\nthis is to configure the non-default versions with\n\n./configure --with-pgport=nnn --prefix=/path/to/someplace\n\nto establish their ports and install dirs, and then initdb each version\nwith the appropriate data directory specified. A user then doesn't have\nto do much except make his PATH point at the PREFIX/bin dir for the\nversion he wants to use at the moment.\n\nYou may also find that you have to pump up your kernel's IPC resource\nparameters in order to start up multiple postmasters.\n\n> How will the use of the environment variables PGDATA and PGLIB be\n> affected if I have them still pointing at the release version?\n\nThey had better have the right values while initdb'ing or starting\neach individual version. There's no good reason to have either one\nset in the general environment, or actually to set them at all --- you\ncan get the same results with command line switches to initdb and\npostmaster, with much less chance of bad side-effects.\n\nA tip I find handy is to make sure that the databases available under\neach live postmaster have distinct names. This helps to avoid the\nmistake of testing against 7.0.2 when you thought you were testing\nagainst 7.0.3 or current or whatever...\n\n> I've been following this list long enough and still \n> enjoy it so I want to try towards contributing stuff.\n\nWelcome aboard!\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 22 Dec 2000 22:05:06 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Considerations for running current cvs pgsql and pgsql release on\n\tsame machine?" }, { "msg_contents": "On Friday 22 December 2000 22:05, Tom Lane wrote:\n> I routinely run multiple versions at the same time. You need a separate\n> port, install directory, and data directory for each. Easiest way to do\n> this is to configure the non-default versions with\n>\n> ../configure --with-pgport=nnn --prefix=/path/to/someplace\n>\n> to establish their ports and install dirs, and then initdb each version\n> with the appropriate data directory specified. A user then doesn't have\n> to do much except make his PATH point at the PREFIX/bin dir for the\n> version he wants to use at the moment.\n>\n> You may also find that you have to pump up your kernel's IPC resource\n> parameters in order to start up multiple postmasters.\n>\n> > How will the use of the environment variables PGDATA and PGLIB be\n> > affected if I have them still pointing at the release version?\n>\n> They had better have the right values while initdb'ing or starting\n> each individual version. There's no good reason to have either one\n> set in the general environment, or actually to set them at all --- you\n> can get the same results with command line switches to initdb and\n> postmaster, with much less chance of bad side-effects.\n>\n> A tip I find handy is to make sure that the databases available under\n> each live postmaster have distinct names. This helps to avoid the\n> mistake of testing against 7.0.2 when you thought you were testing\n> against 7.0.3 or current or whatever...\n\nThanks for these tips. I took out all global PG environment variables from \n/etc/profile. The way I did it, was to make a directory /etc/pgsql.d and in \nthere have files pgsql.sh and pgcvs.sh for production and cvs test \nenvironments. Each sets up the variables:\n\n# Change these two\nPGHOME=/usr/local/pgsql or /home/pgcvs/pgsql\nPGPORT=5432 or 5433\n\nPGLIB=$PGHOME/lib\nPGDATA=$PGHOME/data\nLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGLIB\nMANPATH=$MANPATH:$PGHOME/man\nPATH=$PGHOME/bin\nexport PGHOME PGPORT PGLIB PGDATA LD_LIBRARY_PATH MANPATH PATH\n\nThese two files are then included into .profile in user directories like:\n\n# Pgsql prod\n.. /etc/pgsql.d/pgsql.sh\n\nor\n\n# Pgsql cvs dev\n.. /etc/pgsql.d/pgcvs.sh\n\nThe cvs development version runs under user pgcvs while the production runs \nunder user postgres as normal. The only little problem about this setup is \nthat I can almost just run pgsql.sh and pgcvs.sh to switch between the two \nenvironments while logged in as a user. But if I do, PATH, MANPATH and \nLD_LIBRARY path, because they append, don't replace one thing for another. \nI'm sure that can be fixed with some simple bash/awk/sed trick but I haven't \ntried yet. The next thing is to setup another local-only httpd on port 8080 \nor whatever and get another php to compile with the cvs libs so I can test \nweb stuff.\n\n\n-- \n-------- Robert B. Easter [email protected] ---------\n- CompTechNews Message Board http://www.comptechnews.com/ -\n- CompTechServ Tech Services http://www.comptechserv.com/ -\n---------- http://www.comptechnews.com/~reaster/ ------------\n", "msg_date": "Sat, 23 Dec 2000 02:45:23 -0500", "msg_from": "\"Robert B. Easter\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Considerations for running current cvs pgsql and pgsql release on\n\tsame machine?" } ]
[ { "msg_contents": "Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\nreadline hooks in our source tree could cause RMS/GNU to force us to a\nGNU license.\n\nObviously, we could remove readline hooks and ship a BSD line editing\nlibrary, but does this make any sense to you? It doesn't make sense to\nme, but he was quite certain.\n\nOur ODBC library is also GNU licensed, but I am told this is not a\nproblem because it doesn't link into the backend. However, neither does\nreadline. However, readline does link into psql.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 23 Dec 2000 09:56:07 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "GNU readline and BSD license" }, { "msg_contents": "> Bruce Momjian writes:\n> \n> > Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\n> > readline hooks in our source tree could cause RMS/GNU to force us to a\n> > GNU license.\n> \n> This sort of thing is complete nonsense.\n> \n> By the same logic you could argue that the system(\"cp template1 ...\")\n> calls could force us to a GNU license, because 'cp' is from GNU fileutils.\n\nWell, his issue was that 'cp' is not in the binary, while readline\n_could_ be in the binary. My issue is that we only optionally link\nin the library. We don't actually ship the library with our code.\n\nHonestly, it made no sense to me either, and if it hadn't been Rasmus, I\nwould have written it off immediately.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 23 Dec 2000 10:44:20 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Bruce Momjian writes:\n\n> Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\n> readline hooks in our source tree could cause RMS/GNU to force us to a\n> GNU license.\n\nThis sort of thing is complete nonsense.\n\nBy the same logic you could argue that the system(\"cp template1 ...\")\ncalls could force us to a GNU license, because 'cp' is from GNU fileutils.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 23 Dec 2000 16:46:12 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, 23 Dec 2000, Bruce Momjian wrote:\n\n> Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\n> readline hooks in our source tree could cause RMS/GNU to force us to a\n> GNU license.\n> \n> Obviously, we could remove readline hooks and ship a BSD line editing\n> library, but does this make any sense to you? It doesn't make sense to\n> me, but he was quite certain.\nUnfortunately he's right, since GPL software is incompatible with any\nnon-GPL software. Stallman publically admitted that he intentionally\nreleased readline under GPL, not LGPL, to force more people into GPLing\ntheir code. \n\n", "msg_date": "Sat, 23 Dec 2000 10:52:23 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "> On Sat, 23 Dec 2000, Bruce Momjian wrote:\n> \n> > Rasmus Lerdorf, the big PHP developer, told me that the existence of GNU\n> > readline hooks in our source tree could cause RMS/GNU to force us to a\n> > GNU license.\n> > \n> > Obviously, we could remove readline hooks and ship a BSD line editing\n> > library, but does this make any sense to you? It doesn't make sense to\n> > me, but he was quite certain.\n\n> Unfortunately he's right, since GPL software is incompatible with any\n> non-GPL software. Stallman publicly admitted that he intentionally\n> released readline under GPL, not LGPL, to force more people into GPLing\n> their code. \n\nOK, but does shipping our code with hooks obligate us? We don't ship\nreadline.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 23 Dec 2000 10:54:54 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, 23 Dec 2000, Bruce Momjian wrote:\n\n> OK, but does shipping our code with hooks obligate us? We don't ship\n> readline.\nOh, oops. I didn't know readline wasn't in the postgres tree. Then,\nobviously, distribution of .tar.gz does not obligate postgres to anything,\nHOWEVER, the problem arises with distribution of binaries (.rpm and\nothers) which are linked against libreadline _statically_ (basically, we\ncan't do it). Our RPM distrib is linked dynamically, but I don't know\nabout other binaries...\n\n From my understanding of GPL, if it is linked dynamically, we are exempt\nsince it does not constitute a 'derived package'.\n\n-alex\n\n", "msg_date": "Sat, 23 Dec 2000 11:06:14 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "* Bruce Momjian <[email protected]> [001223 06:59] wrote:\n> Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\n> readline hooks in our source tree could cause RMS/GNU to force us to a\n> GNU license.\n> \n> Obviously, we could remove readline hooks and ship a BSD line editing\n> library, but does this make any sense to you? It doesn't make sense to\n> me, but he was quite certain.\n> \n> Our ODBC library is also GNU licensed, but I am told this is not a\n> problem because it doesn't link into the backend. However, neither does\n> readline. However, readline does link into psql.\n\nFreeBSD has a freely available library called 'libedit' that could\nbe shipped with postgresql, it's under the BSD license.\n\nIf you have access to a FreeBSD box see the editline(3) manpage,\nor go to: \nhttp://www.freebsd.org/cgi/man.cgi?query=editline&apropos=0&sektion=0&manpath=FreeBSD+4.2-RELEASE&format=html\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Sat, 23 Dec 2000 08:42:43 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "> FreeBSD has a freely available library called 'libedit' that could\n> be shipped with postgresql, it's under the BSD license.\n\nYes, that is our solution if we have a real problem here.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 23 Dec 2000 11:48:13 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\n> readline hooks in our source tree could cause RMS/GNU to force us to a\n> GNU license.\n> \n> Obviously, we could remove readline hooks and ship a BSD line editing\n> library, but does this make any sense to you? It doesn't make sense to\n> me, but he was quite certain.\n> \n\nThe sole psql program could be GNU-licenced...\njust my 2p.\n\nFabrice\n", "msg_date": "Sat, 23 Dec 2000 18:09:21 +0100", "msg_from": "Fabrice Scemama <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> OK, but does shipping our code with hooks obligate us?\n\nIt does not; if RMS thinks it does, he's full of it.\n\nIf push actually comes to shove, I'd simply remove the readline hooks,\nbut the entire issue is nonsense.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 23 Dec 2000 12:10:38 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > OK, but does shipping our code with hooks obligate us?\n> \n> It does not; if RMS thinks it does, he's full of it.\n>\n> If push actually comes to shove, I'd simply remove the readline hooks,\n> but the entire issue is nonsense.\n\nThat is my opinion too.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Sat, 23 Dec 2000 12:14:59 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, Dec 23, 2000 at 08:42:43AM -0800, Alfred Perlstein wrote:\n> \n> FreeBSD has a freely available library called 'libedit' that could\n> be shipped with postgresql, it's under the BSD license.\n> \n> If you have access to a FreeBSD box see the editline(3) manpage,\n> or go to: \n> http://www.freebsd.org/cgi/man.cgi?query=editline&apropos=0&sektion=0&manpath=FreeBSD+4.2-RELEASE&format=html\n\nGood plan - AFAIK there isn't anything gnu readline can do that libedit can't..\n\nPatrick\n", "msg_date": "Sat, 23 Dec 2000 19:42:43 +0000", "msg_from": "Patrick Welche <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, 23 Dec 2000, Bruce Momjian wrote:\n\n> > FreeBSD has a freely available library called 'libedit' that could\n> > be shipped with postgresql, it's under the BSD license.\n> \n> Yes, that is our solution if we have a real problem here.\n\nIs there a reason *not* to move towards that for v7.2 so that the\nfunctions we are making optional with readline are automatic? Since we\ncould then ship the code, we could make it a standard vs optional\n\"feature\" ...\n\nMy thought would be to put 'make history feaure standard using libedit'\nonto the TODO list and take it from there ...\n\n", "msg_date": "Fri, 29 Dec 2000 18:10:13 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "* The Hermit Hacker <[email protected]> [001229 14:11] wrote:\n> On Sat, 23 Dec 2000, Bruce Momjian wrote:\n> \n> > > FreeBSD has a freely available library called 'libedit' that could\n> > > be shipped with postgresql, it's under the BSD license.\n> > \n> > Yes, that is our solution if we have a real problem here.\n> \n> Is there a reason *not* to move towards that for v7.2 so that the\n> functions we are making optional with readline are automatic? Since we\n> could then ship the code, we could make it a standard vs optional\n> \"feature\" ...\n> \n> My thought would be to put 'make history feaure standard using libedit'\n> onto the TODO list and take it from there ...\n\nI doubt I'd have the time to do it, but if you guys want to use\nlibedit it'd probably be a good idea at least to reduce the amount\nof potential GPL tainting in the source code.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Fri, 29 Dec 2000 14:12:58 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Fri, 29 Dec 2000, The Hermit Hacker wrote:\n\n> On Sat, 23 Dec 2000, Bruce Momjian wrote:\n> \n> > > FreeBSD has a freely available library called 'libedit' that could\n> > > be shipped with postgresql, it's under the BSD license.\n> > \n> > Yes, that is our solution if we have a real problem here.\n> \n> Is there a reason *not* to move towards that for v7.2 so that the\n> functions we are making optional with readline are automatic? Since we\n> could then ship the code, we could make it a standard vs optional\n> \"feature\" ...\n\nAlso, it might be beneficial to _not_ link postmaster/postgres against\nlibreadline - I don't see where either of those programs need it - sure,\npsql, but the backends? ...\n\nmorannon:~>ldd `which postgres`\n libz.so.1 => /usr/lib/libz.so.1 (0x40019000)\n libcrypt.so.1 => /lib/libcrypt.so.1 (0x40028000)\n libnsl.so.1 => /lib/libnsl.so.1 (0x40055000)\n libdl.so.2 => /lib/libdl.so.2 (0x4006c000)\n libm.so.6 => /lib/libm.so.6 (0x40070000)\n libreadline.so.3 => /lib/libreadline.so.3 (0x4008d000)\n libtermcap.so.2 => /usr/lib/libtermcap.so.2 (0x400b5000)\n libncurses.so.4 => /lib/libncurses.so.4 (0x400b9000)\n libc.so.6 => /lib/libc.so.6 (0x400ff000)\n /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)\nmorannon:~>ldd `which psql`\n libpq.so.2.1 => /usr/lib/libpq.so.2.1 (0x40019000)\n libz.so.1 => /usr/lib/libz.so.1 (0x40028000)\n libcrypt.so.1 => /lib/libcrypt.so.1 (0x40037000)\n libnsl.so.1 => /lib/libnsl.so.1 (0x40064000)\n libdl.so.2 => /lib/libdl.so.2 (0x4007b000)\n libm.so.6 => /lib/libm.so.6 (0x4007f000)\n libreadline.so.3 => /lib/libreadline.so.3 (0x4009d000)\n libtermcap.so.2 => /usr/lib/libtermcap.so.2 (0x400c4000)\n libncurses.so.4 => /lib/libncurses.so.4 (0x400c8000)\n libc.so.6 => /lib/libc.so.6 (0x4010e000)\n /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)\n\npostgres/postmaster very likely don't need either libreadline, nor\nlibncurses... Unless there's something I'm missing.\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": "Fri, 29 Dec 2000 16:15:09 -0600 (CST)", "msg_from": "\"Dominic J. Eidson\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Fri, 29 Dec 2000, Alfred Perlstein wrote:\n\n> * The Hermit Hacker <[email protected]> [001229 14:11] wrote:\n> > On Sat, 23 Dec 2000, Bruce Momjian wrote:\n> > \n> > > > FreeBSD has a freely available library called 'libedit' that could\n> > > > be shipped with postgresql, it's under the BSD license.\n> > > \n> > > Yes, that is our solution if we have a real problem here.\n> > \n> > Is there a reason *not* to move towards that for v7.2 so that the\n> > functions we are making optional with readline are automatic? Since we\n> > could then ship the code, we could make it a standard vs optional\n> > \"feature\" ...\n> > \n> > My thought would be to put 'make history feaure standard using libedit'\n> > onto the TODO list and take it from there ...\n> \n> I doubt I'd have the time to do it, but if you guys want to use\n> libedit it'd probably be a good idea at least to reduce the amount\n> of potential GPL tainting in the source code.\n\nI'm all for trying to take it on ... Bruce, put me down for it ...\n\n", "msg_date": "Fri, 29 Dec 2000 18:17:17 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Alfred Perlstein wrote:\n> \n> * The Hermit Hacker <[email protected]> [001229 14:11] wrote:\n> > On Sat, 23 Dec 2000, Bruce Momjian wrote:\n> >\n> > > > FreeBSD has a freely available library called 'libedit' that could\n> > > > be shipped with postgresql, it's under the BSD license.\n> > >\n> > > Yes, that is our solution if we have a real problem here.\n> >\n> > Is there a reason *not* to move towards that for v7.2 so that the\n> > functions we are making optional with readline are automatic? Since we\n> > could then ship the code, we could make it a standard vs optional\n> > \"feature\" ...\n> >\n> > My thought would be to put 'make history feaure standard using libedit'\n> > onto the TODO list and take it from there ...\n> \n> I doubt I'd have the time to do it, but if you guys want to use\n> libedit it'd probably be a good idea at least to reduce the amount\n> of potential GPL tainting in the source code.\n\nHow different is the feature set? Otherwise, sounds like a great idea\nto me, and reduces the dependencies substantially -- and makes history\navailable to all the supported platforms without requiring libreadline\nalready installed.\n\nConsider that a 'vote' of 'aye'.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Fri, 29 Dec 2000 17:20:24 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Lamar Owen <[email protected]> writes:\n> How different is the feature set?\n\nI was going to ask the same thing. If it's an exact replacement then\nOK, but I do not want to put up with non-Emacs-compatible keybindings,\nto mention just one likely issue.\n\nThe whole thing really strikes me as make-work anyway. Linux is GPL'd;\ndoes anyone want to argue that we shouldn't run on Linux? Since we\nare not including libreadline in our distribution, there is NO reason\nto worry about using it when it's available. Wanting to find a\nreplacement purely because of the license amounts to license bigotry,\nIMHO.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 18:43:38 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "On Fri, 29 Dec 2000, Tom Lane wrote:\n\n> Lamar Owen <[email protected]> writes:\n> > How different is the feature set?\n> \n> I was going to ask the same thing. If it's an exact replacement then\n> OK, but I do not want to put up with non-Emacs-compatible keybindings,\n> to mention just one likely issue.\n> \n> The whole thing really strikes me as make-work anyway. Linux is GPL'd;\n> does anyone want to argue that we shouldn't run on Linux? Since we\n> are not including libreadline in our distribution, there is NO reason\n> to worry about using it when it's available. Wanting to find a\n> replacement purely because of the license amounts to license bigotry,\n> IMHO.\n\nActually, IMHO, the pro to moving to libedit is that we could include it\nas part of the distribution and make history a *standard* feature\n... licensing started the thread, but I think its gone beyond that were we\nhave a way of providing an feature that is currently option as part of the\nsystem as a whole ...\n\n\"one less package that you need to install\" ...\n\n", "msg_date": "Fri, 29 Dec 2000 19:49:33 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "* Tom Lane <[email protected]> [001229 15:43] wrote:\n> Lamar Owen <[email protected]> writes:\n> > How different is the feature set?\n> \n> I was going to ask the same thing. If it's an exact replacement then\n> OK, but I do not want to put up with non-Emacs-compatible keybindings,\n> to mention just one likely issue.\n> \n> The whole thing really strikes me as make-work anyway. Linux is GPL'd;\n> does anyone want to argue that we shouldn't run on Linux? Since we\n> are not including libreadline in our distribution, there is NO reason\n> to worry about using it when it's available. Wanting to find a\n> replacement purely because of the license amounts to license bigotry,\n> IMHO.\n\nRasmus Lerdorf warned one of you guys that simply linking to GNU\nreadline can contaminate code with the GPL.\n\nReadline isn't LGPL which permits linking without lincense issues,\nit is GPL which means that if you link to it, you must be GPL as\nwell.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Fri, 29 Dec 2000 15:51:41 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "The Hermit Hacker writes:\n\n> Is there a reason *not* to move towards that for v7.2 so that the\n> functions we are making optional with readline are automatic? Since we\n> could then ship the code, we could make it a standard vs optional\n> \"feature\" ...\n>\n> My thought would be to put 'make history feaure standard using libedit'\n> onto the TODO list and take it from there ...\n\nIn my mind this is a pointless waste of developer time because there is no\nproblem to solve here. I'm sure we all have better things to do than\nporting libedit to a dozen systems and then explaining to users why the\ntarball is bloated and their carefully composed readline configuration\ndoesn't work anymore.\n\nIf there is something functionally wrong with Readline then let's talk\nabout it, but let's not replace it with something because some PHP dude\nsaid that RMS said something.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 01:08:18 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "* Peter Eisentraut <[email protected]> [001229 16:01] wrote:\n> The Hermit Hacker writes:\n> \n> > Is there a reason *not* to move towards that for v7.2 so that the\n> > functions we are making optional with readline are automatic? Since we\n> > could then ship the code, we could make it a standard vs optional\n> > \"feature\" ...\n> >\n> > My thought would be to put 'make history feaure standard using libedit'\n> > onto the TODO list and take it from there ...\n> \n> In my mind this is a pointless waste of developer time because there is no\n> problem to solve here. I'm sure we all have better things to do than\n> porting libedit to a dozen systems and then explaining to users why the\n> tarball is bloated and their carefully composed readline configuration\n> doesn't work anymore.\n> \n> If there is something functionally wrong with Readline then let's talk\n> about it, but let's not replace it with something because some PHP dude\n> said that RMS said something.\n\n>From http://www.gnu.org/copyleft/gpl.html\n\n This General Public License does not permit incorporating your\n program into proprietary programs. If your program is a subroutine\n library, you may consider it more useful to permit linking\n proprietary applications with the library. If this is what you\n want to do, use the GNU Library General Public License instead\n of this License.\n\nMy understanding (from the recent discussion) is that Postgresql\nhas certain dependancies on libreadline and won't compile/work\nwithout it, if true this effectively forces anyone wishing to derive\na viable commercial product based on Postgresql to switch to the\nGPL or port to libedit anyway.\n\nIf readline is completely optional then there's really no problem.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Fri, 29 Dec 2000 16:09:47 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Alfred Perlstein <[email protected]> writes:\n> Rasmus Lerdorf warned one of you guys that simply linking to GNU\n> readline can contaminate code with the GPL.\n\n> Readline isn't LGPL which permits linking without lincense issues,\n> it is GPL which means that if you link to it, you must be GPL as\n> well.\n\nI do not believe that. In fact, I'll go further and say \"Horsepucky!\"\nThe GPL applies to works that \"contain or are derived from\" a GPL'd\nprogram. Linking to a separately distributed library does not cause\npsql either to contain or to be derived from libreadline.\n\nIf we distributed binary executables that contained statically linked\ncopies of libreadline, then indeed we'd have a problem. We do not,\nAFAIK, and we have no intention of doing so in the future.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 19:15:05 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> Actually, IMHO, the pro to moving to libedit is that we could include it\n> as part of the distribution and make history a *standard* feature\n\nHow big is libedit? If it's tiny, that might be a good argument ...\nbut I don't want to see us bulking up our distro with something that\npeople could and should get directly from its source.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 19:16:49 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "\nthelab# du -sk libedit\n402 libedit\nthelab# ls\nMakefile el.h map.c refresh.h tokenizer.c\nTEST emacs.c map.h search.c tokenizer.h\nchared.c hist.c parse.c search.h tty.c\nchared.h hist.h parse.h sig.c tty.h\ncommon.c history.c prompt.c sig.h vi.c\neditline.3 key.c prompt.h sys.h\neditrc.5 key.h read.c term.c\nel.c makelist refresh.c term.h\n\nits tiny ...\n\nwe'd be adding a whole 79k to the 6meg distribution:\n\n> ls -lt /tmp/libedit.tar.gz\n-rw-r--r-- 1 scrappy wheel 79025 Dec 29 20:38 /tmp/libedit.tar.gz\n\nand providing all the functionality that ppl who don't have libreadline\nalready installed don't get ...\n\nOn Fri, 29 Dec 2000, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > Actually, IMHO, the pro to moving to libedit is that we could include it\n> > as part of the distribution and make history a *standard* feature\n>\n> How big is libedit? If it's tiny, that might be a good argument ...\n> but I don't want to see us bulking up our distro with something that\n> people could and should get directly from its source.\n>\n> \t\t\tregards, tom lane\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Fri, 29 Dec 2000 20:39:57 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "* Tom Lane <[email protected]> [001229 16:38] wrote:\n> The Hermit Hacker <[email protected]> writes:\n> > Actually, IMHO, the pro to moving to libedit is that we could include it\n> > as part of the distribution and make history a *standard* feature\n> \n> How big is libedit? If it's tiny, that might be a good argument ...\n> but I don't want to see us bulking up our distro with something that\n> people could and should get directly from its source.\n\n~350k\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Fri, 29 Dec 2000 16:41:14 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Alfred Perlstein <[email protected]> writes:\n> My understanding (from the recent discussion) is that Postgresql\n> has certain dependancies on libreadline and won't compile/work\n> without it,\n\nThen you're working from a misconception.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 20:00:25 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "On Fri, 29 Dec 2000, Tom Lane wrote:\n\n> Alfred Perlstein <[email protected]> writes:\n> > My understanding (from the recent discussion) is that Postgresql\n> > has certain dependancies on libreadline and won't compile/work\n> > without it,\n>\n> Then you're working from a misconception.\n\nI think the misconception that he might be working on here is the point\nsomeone brought up that when configure runs, it is adding -lreadline to\nthe backend compile, even though that I don't think there is any reason\nfor doing such?\n\n\n", "msg_date": "Fri, 29 Dec 2000 21:04:56 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "* The Hermit Hacker <[email protected]> [001229 17:06] wrote:\n> On Fri, 29 Dec 2000, Tom Lane wrote:\n> \n> > Alfred Perlstein <[email protected]> writes:\n> > > My understanding (from the recent discussion) is that Postgresql\n> > > has certain dependancies on libreadline and won't compile/work\n> > > without it,\n> >\n> > Then you're working from a misconception.\n> \n> I think the misconception that he might be working on here is the point\n> someone brought up that when configure runs, it is adding -lreadline to\n> the backend compile, even though that I don't think there is any reason\n> for doing such?\n\nI thought psql required libreadline, I'm not sure who said it.\n\nIf nothing requires it then there's not much point in moving to\nlibedit from a devel cost/benifit analysis.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Fri, 29 Dec 2000 17:09:09 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> someone brought up that when configure runs, it is adding -lreadline to\n> the backend compile, even though that I don't think there is any reason\n> for doing such?\n\nThere isn't --- configure is just sloppy in that it supplies the same\nlibrary list for all programs we build. (This might be a fair amount\nof work to change; never looked at it.)\n\nHowever, I don't see what that has to do with the licensing argument.\nWe stand or fall on psql's use of libreadline, and having useless\ndependencies from other executables doesn't alter anything that I can\nsee.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 20:27:49 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "The Hermit Hacker writes:\n\n> Actually, IMHO, the pro to moving to libedit is that we could include it\n> as part of the distribution and make history a *standard* feature\n\nHistory already is a standard feature, you just need to have readline\ninstalled. In a world of source code users need to cope with package\ndependencies, and it's not like readline is the most esoteric package in\nthe world. Gradually adding operating system level things into a package\npurely to convenience some users is a way to piss of the users at large\nbecause you're overriding their operating system setup.\n\nIf libedit could be used as an alternative to readline depending on your\noperating system setup then there's nothing wrong with that. NetBSD\nalready went the other way around and made libedit compatible with\nreadline.\n\nBut given that readline availability during the last five years was\napparently just fine I don't understand this discussion at all.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 02:34:24 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "On Fri, Dec 29, 2000 at 07:15:05PM -0500, Tom Lane wrote:\n> Alfred Perlstein <[email protected]> writes:\n> > Rasmus Lerdorf warned one of you guys that simply linking to GNU\n> > readline can contaminate code with the GPL.\n> \n> > Readline isn't LGPL which permits linking without lincense issues,\n> > it is GPL which means that if you link to it, you must be GPL as\n> > well.\n> \n> I do not believe that. In fact, I'll go further and say \"Horsepucky!\"\n> The GPL applies to works that \"contain or are derived from\" a GPL'd\n> program. Linking to a separately distributed library does not cause\n> psql either to contain or to be derived from libreadline.\n\n\tRMS already made a big stink about this, claiming that BeOS's use\nof an emulation layer to link to some GPL'ed network drivers was enough\nto force the GPL'ing of the kernel. Be backed down (and re-licensed\nthe code from the source, IIRC). Sun recently released a \"driver\nporting kit\" that allowed similar drivers to be used in Solaris. There\nwas some outcry on Slashdot, but I'm not sure how it ended up.\n\n\tI wouldn't mind having someone tell RMS to fuck off, though.\n\n-- \nAdam Haberlach |A cat spends her life conflicted between a\[email protected] |deep, passionate, and profound desire for\nhttp://www.newsnipple.com |fish and an equally deep, passionate, and\n'88 EX500 |profound desire to avoid getting wet.\n", "msg_date": "Fri, 29 Dec 2000 17:37:41 -0800", "msg_from": "Adam Haberlach <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Fri, 29 Dec 2000, Alfred Perlstein wrote:\n\n> * The Hermit Hacker <[email protected]> [001229 17:06] wrote:\n> > On Fri, 29 Dec 2000, Tom Lane wrote:\n> >\n> > > Alfred Perlstein <[email protected]> writes:\n> > > > My understanding (from the recent discussion) is that Postgresql\n> > > > has certain dependancies on libreadline and won't compile/work\n> > > > without it,\n> > >\n> > > Then you're working from a misconception.\n> >\n> > I think the misconception that he might be working on here is the point\n> > someone brought up that when configure runs, it is adding -lreadline to\n> > the backend compile, even though that I don't think there is any reason\n> > for doing such?\n>\n> I thought psql required libreadline, I'm not sure who said it.\n\nPurely optional feature(s) .. if readline isn't found, they aren't enabled\n...\n\n\n", "msg_date": "Fri, 29 Dec 2000 21:39:51 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, 30 Dec 2000, Peter Eisentraut wrote:\n\n> The Hermit Hacker writes:\n>\n> > Actually, IMHO, the pro to moving to libedit is that we could include it\n> > as part of the distribution and make history a *standard* feature\n>\n> History already is a standard feature, you just need to have readline\n> installed.\n\nSo, history is optional depending on whether or not readline is installed\n... if it was standard, it would be enabled regardless of any other\ndependencies ...\n\n\n", "msg_date": "Fri, 29 Dec 2000 21:41:18 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> But given that readline availability during the last five years was\n> apparently just fine I don't understand this discussion at all.\n\nIndeed. You could make a better case that we shouldn't be including\nin our distro the ODBC driver (LGPL) or the several contrib modules\nthat are GPL'd than that psql's optional use of libreadline means\nwe are in violation of GPL.\n\nI'm okay with including those things because of the GPL's \"mere\naggregation\" exception --- none of the rest of the system uses any\nof those modules, so our inclusion of them in the distro looks like\nmere aggregation to me. But it's a much closer judgment call than\nthe readline situation.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 20:42:34 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "Adam Haberlach <[email protected]> writes:\n> \tRMS already made a big stink about this, claiming that BeOS's use\n> of an emulation layer to link to some GPL'ed network drivers was enough\n> to force the GPL'ing of the kernel.\n\nDid BeOS make distributions that included the GPL'd code?\nWas the GPL'd code essential for useful use of their system?\n\nWe can answer \"no\" to both of those points for Postgres vs. readline,\nso the Be case doesn't look like precedent to me.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 20:46:40 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> If libedit could be used as an alternative to readline depending on your\n> operating system setup then there's nothing wrong with that.\n\nI have no objection to being able to work with either one, if someone's\nexcited about making that happen. I'd still think it a waste of effort,\nbut as long as it's not my effort I can hardly complain...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 20:48:36 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> If there is something functionally wrong with Readline then let's talk\n> about it, but let's not replace it with something because some PHP dude\n> said that RMS said something.\n\nncftp used to be for non-commercial use only and had hooks to be\nlinked against readline. RMS threatened legal action, which caused\nthe developer to change the license to GPL, which was what RMS wanted.\n\nSo, whatever your opinion of his reasoning and motives, etc., it is\nundoubtedly RMS's intention to use readline as a point of leverage to\nget projects to go GPL.\n\nPersonally, I agree with him. Many don't.\n\nMike.\n", "msg_date": "29 Dec 2000 20:51:03 -0500", "msg_from": "Michael Alan Dorman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Fri, Dec 29, 2000 at 08:46:40PM -0500, Tom Lane wrote:\n> Adam Haberlach <[email protected]> writes:\n> > \tRMS already made a big stink about this, claiming that BeOS's use\n> > of an emulation layer to link to some GPL'ed network drivers was enough\n> > to force the GPL'ing of the kernel.\n> \n> Did BeOS make distributions that included the GPL'd code?\n\tYes. IIRC (this happened about the time I got here more then two years\nago), Be released binary versions of the drivers with the standard\ndistribution as well as source to them as sample code. RMS's main claim\nwas that although the GPL'ed source was released as source, it had to\nlink to the kernel to be useful, and therefore could not be distributed\nwithout source to the kernel.\n\n> Was the GPL'd code essential for useful use of their system?\n\tNo.\n\n-- \nAdam Haberlach |A cat spends her life conflicted between a\[email protected] |deep, passionate, and profound desire for\nhttp://www.newsnipple.com |fish and an equally deep, passionate, and\n'88 EX500 |profound desire to avoid getting wet.\n", "msg_date": "Fri, 29 Dec 2000 17:58:25 -0800", "msg_from": "Adam Haberlach <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "> But given that readline availability during the last five years was\n> apparently just fine I don't understand this discussion at all.\n\nI agree with Peter and others on this topic, though the occasional\ndiscussion helps to clarify things...\n\n - Thomas\n", "msg_date": "Sat, 30 Dec 2000 02:06:01 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On 29 Dec 2000, Michael Alan Dorman wrote:\n\n> Peter Eisentraut <[email protected]> writes:\n> > If there is something functionally wrong with Readline then let's talk\n> > about it, but let's not replace it with something because some PHP dude\n> > said that RMS said something.\n> \n> ncftp used to be for non-commercial use only and had hooks to be\n> linked against readline. RMS threatened legal action, which caused\n> the developer to change the license to GPL, which was what RMS wanted.\nProblem with ncftp was developers distributing binaries commercially which\nwere linked to libreadline.\n\nAs I said before, postgres doesn't have this problem since neither RPMs\nnor other binaries do that.\n\n", "msg_date": "Fri, 29 Dec 2000 21:26:23 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Adam Haberlach wrote:\n> \n> On Fri, Dec 29, 2000 at 08:46:40PM -0500, Tom Lane wrote:\n> > Adam Haberlach <[email protected]> writes:\n> > > RMS already made a big stink about this, claiming that BeOS's use\n> > > of an emulation layer to link to some GPL'ed network drivers was enough\n> > > to force the GPL'ing of the kernel.\n> >\n> > Did BeOS make distributions that included the GPL'd code?\n> Yes. IIRC (this happened about the time I got here more then two years\n> ago), Be released binary versions of the drivers with the standard\n> distribution as well as source to them as sample code. RMS's main claim\n> was that although the GPL'ed source was released as source, it had to\n> link to the kernel to be useful, and therefore could not be distributed\n> without source to the kernel.\n> \n> > Was the GPL'd code essential for useful use of their system?\n> No.\n\nI can't believe this thread continues. No portion of Postgres is derived\nfrom readline, and no modifications are made to readline. \"readline\" is\nnot distributed with the source. If you read the COPYING supplied with\nreadline, look at the last paragraph of section 2 under \"Terms and\nConditions\"\n\n>> In addition, mere aggregation of another work not based on the Program\n>> with the Program (or with a work based on the Program) on a volume of\n>> a storage or distribution medium does not bring the other work under\n>> the scope of this License. \n\nI think it can safely be said that there is no readline issue.\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Sat, 30 Dec 2000 10:17:21 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Lamar Owen <[email protected]> writes:\n\n> How different is the feature set? Otherwise, sounds like a great idea\n> to me, and reduces the dependencies substantially -- and makes history\n> available to all the supported platforms without requiring libreadline\n> already installed.\n\nIt bloats on platforms having readline but not libedit.\n\nAs long as it isn't necesarry for postgresql to function, I don't see\nany risk of tainting. \n\n-- \nTrond Eivind Glomsr�d\nRed Hat, Inc.\n", "msg_date": "30 Dec 2000 15:04:28 -0500", "msg_from": "[email protected] (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=)", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, Dec 30, 2000 at 02:34:24AM +0100, Peter Eisentraut wrote:\n> \n> If libedit could be used as an alternative to readline depending on your\n> operating system setup then there's nothing wrong with that. NetBSD\n> already went the other way around and made libedit compatible with\n> readline.\n\nI had an attempt at fooling configure to look in libedit rather than\nreadline, and all was OK except our libedit doesn't have \"rl_special_prefixes\"\nso tab-complete:105 is unhappy - I don't know what it is meant to do...\n\nRe licence business, one could argue hooks are there to use NetBSD libedit ;)\n\nCheers,\n\nPatrick\n", "msg_date": "Sat, 30 Dec 2000 21:34:16 +0000", "msg_from": "Patrick Welche <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "At 7:15 PM -0500 12/29/00, Tom Lane wrote:\n>Alfred Perlstein <[email protected]> writes:\n>> Rasmus Lerdorf warned one of you guys that simply linking to GNU\n>> readline can contaminate code with the GPL.\n>\n>> Readline isn't LGPL which permits linking without lincense issues,\n>> it is GPL which means that if you link to it, you must be GPL as\n>> well.\n>\n>I do not believe that. In fact, I'll go further and say \"Horsepucky!\"\n>The GPL applies to works that \"contain or are derived from\" a GPL'd\n>program. Linking to a separately distributed library does not cause\n>psql either to contain or to be derived from libreadline.\n\n\nSome very highly paid lawyers disagree with you.\n\nThat doesn't make them right, but keep in mind that no one has defined \"derivitive work\" in a court of law. And RMS isn't a lawyer.\n\nI agree readline doesn't taint PG, but IMHO, the more distance between the GPL and PG, the better.\n\n-pmb\n\n--\n\"Every time you provide an option, you're asking the user to make a decision.\n That means they will have to think about something and decide about it.\n It's not necessarily a bad thing, but, in general, you should always try to\n minimize the number of decisions that people have to make.\"\n http://joel.editthispage.com/stories/storyReader$51\n\n\n", "msg_date": "Sat, 30 Dec 2000 15:35:37 -0800", "msg_from": "Peter Bierman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sat, 30 Dec 2000, Peter Bierman wrote:\n\n> At 7:15 PM -0500 12/29/00, Tom Lane wrote:\n> >Alfred Perlstein <[email protected]> writes:\n> >> Rasmus Lerdorf warned one of you guys that simply linking to GNU\n> >> readline can contaminate code with the GPL.\n> >\n> >> Readline isn't LGPL which permits linking without lincense issues,\n> >> it is GPL which means that if you link to it, you must be GPL as\n> >> well.\n> >\n> >I do not believe that. In fact, I'll go further and say \"Horsepucky!\"\n> >The GPL applies to works that \"contain or are derived from\" a GPL'd\n> >program. Linking to a separately distributed library does not cause\n> >psql either to contain or to be derived from libreadline.\n> \n> \n> Some very highly paid lawyers disagree with you.\n> \n> That doesn't make them right, but keep in mind that no one has defined \"derivitive work\" in a court of law. And RMS isn't a lawyer.\n> \n> I agree readline doesn't taint PG, but IMHO, the more distance between the GPL and PG, the better.\nOK. For the last time, here's the story about linking, as agreed upon by\nalmost damn everyone:\n\na) dynamic linking is kosher, as of GPL2\nb) static linking is OK, but you may NOT redistribute resulting libraries.\n\nI hope the above will put the discussion about readline to an end, as\nPostgres does not distribute statically linked binaries.\n\n\n-alex\n\n", "msg_date": "Sat, 30 Dec 2000 22:17:53 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Patrick Welche writes:\n\n> I had an attempt at fooling configure to look in libedit rather than\n> readline, and all was OK except our libedit doesn't have \"rl_special_prefixes\"\n> so tab-complete:105 is unhappy - I don't know what it is meant to do...\n\nI've removed the statement for now, since it was being used incorrectly\nanyway, but for the future I suggest that NetBSD catch up, if it wants to\nstay compatible.\n\n - Variable: char * rl_special_prefixes\n The list of characters that are word break characters, but should\n be left in TEXT when it is passed to the completion function.\n Programs can use this to help determine what kind of completing to\n do. For instance, Bash sets this variable to \"$@\" so that it can\n complete shell variables and hostnames.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sun, 31 Dec 2000 13:06:40 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "On Sun, Dec 31, 2000 at 01:06:40PM +0100, Peter Eisentraut wrote:\n> \n> I've removed the statement for now, since it was being used incorrectly\n> anyway, but for the future I suggest that NetBSD catch up, if it wants to\n> stay compatible.\n\nThank you, and Jaromir tells me he'll commit a fix to NetBSD within days!\n\nHappy New Year,\n\nPatrick\n", "msg_date": "Sun, 31 Dec 2000 14:18:19 +0000", "msg_from": "Patrick Welche <[email protected]>", "msg_from_op": false, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "> > >I do not believe that. In fact, I'll go further and say \"Horsepucky!\"\n> > >The GPL applies to works that \"contain or are derived from\" a GPL'd\n> > >program. Linking to a separately distributed library does not cause\n> > >psql either to contain or to be derived from libreadline.\n> > \n> > \n> > Some very highly paid lawyers disagree with you.\n> > \n> > That doesn't make them right, but keep in mind that no one has defined \"derivitive work\" in a court of law. And RMS isn't a lawyer.\n> > \n> > I agree readline doesn't taint PG, but IMHO, the more distance between the GPL and PG, the better.\n> OK. For the last time, here's the story about linking, as agreed upon by\n> almost damn everyone:\n> \n> a) dynamic linking is kosher, as of GPL2\n> b) static linking is OK, but you may NOT redistribute resulting libraries.\n> \n> I hope the above will put the discussion about readline to an end, as\n> Postgres does not distribute statically linked binaries.\n\nI read through this large thread, and it is good to see that readline\nis not an issue for us. Only binary distributions that statically link\nin libreadline are a problem.\n\nIf people feel that this is a significant restriction, we can start\ndistributing libedit, or the binary packager can link libedit into their\nbinary.\n\nI hesitate to add the libedit code to our already large distribution,\nand I think several others agreed.\n\nI am concerned about RMS's heavy-handed agenda in regards to the GPL,\nbut it appears he is not irrational in his requirements.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n \n", "msg_date": "Mon, 1 Jan 2001 22:42:58 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Patrick Welche writes:\n\n> On Sun, Dec 31, 2000 at 01:06:40PM +0100, Peter Eisentraut wrote:\n> >\n> > I've removed the statement for now, since it was being used incorrectly\n> > anyway, but for the future I suggest that NetBSD catch up, if it wants to\n> > stay compatible.\n>\n> Thank you, and Jaromir tells me he'll commit a fix to NetBSD within days!\n\nBtw., what would be involved in using NetBSD's libedit transparently for\nPostgreSQL? In particular these questions arise:\n\n* What library name to look for\n\n* What header files to look for\n\n* Is history automatically included with line editing?\n\n* How to avoid using an old or non-NetBSD libedit\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Tue, 2 Jan 2001 18:14:01 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "NetBSD libedit (Re: GNU readline and BSD license)" }, { "msg_contents": "> On Sat, Dec 30, 2000 at 02:34:24AM +0100, Peter Eisentraut wrote:\n> > \n> > If libedit could be used as an alternative to readline depending on your\n> > operating system setup then there's nothing wrong with that. NetBSD\n> > already went the other way around and made libedit compatible with\n> > readline.\n> \n> I had an attempt at fooling configure to look in libedit rather than\n> readline, and all was OK except our libedit doesn't have \"rl_special_prefixes\"\n> so tab-complete:105 is unhappy - I don't know what it is meant to do...\n> \n> Re licence business, one could argue hooks are there to use NetBSD libedit ;)\n\nAgreed. It would be nice to have configure look for libedit or\nlibreadline, and use either automatically.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 2 Jan 2001 21:22:42 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "Added to TODO:\n\n* Allow libedit to be used in place of libreadline\n\n> On Sun, Dec 31, 2000 at 01:06:40PM +0100, Peter Eisentraut wrote:\n> > \n> > I've removed the statement for now, since it was being used incorrectly\n> > anyway, but for the future I suggest that NetBSD catch up, if it wants to\n> > stay compatible.\n> \n> Thank you, and Jaromir tells me he'll commit a fix to NetBSD within days!\n> \n> Happy New Year,\n> \n> Patrick\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 2 Jan 2001 21:24:12 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" } ]
[ { "msg_contents": "Bruce Momjian wrote:\n> \n> > Bruce Momjian wrote:\n> > >\n> > > Rasmus Lerdorf, the big PHP developer, told me that the existance of GNU\n> > > readline hooks in our source tree could cause RMS/GNU to force us to a\n> > > GNU license.\n> > >\n> > > Obviously, we could remove readline hooks and ship a BSD line editing\n> > > library, but does this make any sense to you? It doesn't make sense to\n> > > me, but he was quite certain.\n> > >\n> > > Our ODBC library is also GNU licensed, but I am told this is not a\n> > > problem because it doesn't link into the backend. However, neither does\n> > > readline. However, readline does link into psql.\n> >\n> > Readline is LGPL is it not? If you are merely linking to a shared\n> > library assumed to be on the system, and do not actually incorporate\n> > readline code within psql, you should be fine.\n> \n> According to him, it is GPL, not LGPL, and looking at the COPYING file\n> in readline, it seems he is correct.\n\nWow, I never noticed that, I always assumed it was LGPL.\n\nAnyway, it makes no difference. \n\nUnder Terms and conditions:\n\n(1) Postgres does not distribute readline as part of the source, the\nuser must obtain it themselves.\n\n(2) Postgres does not alter or include the readline library does it? If\nso, you would have to share your changes. There is an important\nparagraph:\n\n>> In addition, mere aggregation of another work not based on the Program\n>> with the Program (or with a work based on the Program) on a volume of\n>> a storage or distribution medium does not bring the other work under\n>> the scope of this License. \n\n(3) Postgres already distributes source, although it does not appear\nthat is required. pgsql inc's desire to have a two year closed source,\nthey would have to make sure they made available any changes they make\nto GNU source.\n\n(4) Again Postgres does not distribute readline, so no problem.\n\n(5) The postgres team neither modifies or distributes the readline code.\n(section 5)\n\nThe rest Do not seem to apply.\n\n\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Sat, 23 Dec 2000 11:20:46 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GNU readline and BSD license" }, { "msg_contents": "> (3) Postgres already distributes source, although it does not appear\n> that is required. pgsql inc's desire to have a two year closed source,\n> they would have to make sure they made available any changes they make\n> to GNU source.\n\nThis is a misinterpretation of our intent. As we've said repeatedly in\nthe past, any restricted distribution of our products would apply to\n*layered* products and to other items not considered part of the\nPostgreSQL core, and for a period of time allowing cost recovery. No\nhard two year limit, and no restricted distro on anything one might\nreasonably feel entitled to receiving gratis.\n\nSorry for any confusion.\n\n - Thomas\n", "msg_date": "Tue, 26 Dec 2000 18:08:47 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: GNU readline and BSD license" }, { "msg_contents": "Thomas Lockhart wrote:\n> \n> > (3) Postgres already distributes source, although it does not appear\n> > that is required. pgsql inc's desire to have a two year closed source,\n> > they would have to make sure they made available any changes they make\n> > to GNU source.\n> \n> This is a misinterpretation of our intent. As we've said repeatedly in\n> the past, any restricted distribution of our products would apply to\n> *layered* products and to other items not considered part of the\n> PostgreSQL core, and for a period of time allowing cost recovery. No\n> hard two year limit, and no restricted distro on anything one might\n> reasonably feel entitled to receiving gratis.\n> \n> Sorry for any confusion.\n\nThere was no confusion. I understand what pgsql inc. wants to do and I\nhave no problem with it, in principle. My only concern was, and I think\nit was done to death and clarified, was the implication that some core\nPostgres code would be released in this way. It was a miscommunication,\na regrettable one. It has been made abundantly clear that this will not\nbe the case.\n\nI made mention of pgsql in my earlier post because I understood that\nthey wanted to make add-on projects for Postgres, which were not\nimmediately open source, and the GPL license may present some\nramifications. In particular, one paragraph seemed to imply that simply\nusing one or more GPL packages, without modification, did not force an\nentire project to require a GPL license.\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Tue, 26 Dec 2000 13:12:36 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Re: GNU readline and BSD license" } ]
[ { "msg_contents": "for my pgcat utility i now know i have to use \\nnn octal quoting for\nnonprintables in the generated INSERT commands. but in testing, i\nfound the following oddity. this is in 7.1-b1 (cvs-current).\n\n\tvixie=> create table foo ( bar text );\n\tCREATE\n\tvixie=> insert into foo values ( 'a\\033b' );\n\tINSERT 728084 1\n\tvixie=> select length(bar) from foo;\n\tlength\n\t------\n\t 3\n\t(1 row)\n\ngreat! it stored the escape. and since SELECT's front/back end protocol\nis counted-string rather than quoted text, it comes back reliably (though\ni still intend to try a binary cursor at some point, just to do it.) BUT:\n\n\tvixie=> delete from foo;\n\tDELETE 1\n\tvixie=> insert into foo values ( 'a\\0b' );\n\tINSERT 728085 1\n\tvixie=> select length(bar) from foo;\n\tlength\n\t------\n\t 1\n\t(1 row)\n\n\tvixie=> drop table foo;\n\tDROP\n\tvixie=> \\q\n\nthis is not what i was hoping for at ALL. evidently the implementation of\ntext assumes NUL-termination in other places than the parser. ultimately\nthis means that pgsql will need a \"blob\" type whose presentation format is\nuuencode or some such. but is there a workaround for this using \"text\"?\n\nhow would someone be expected to store, say, a GIF image in a TOAST text?\n", "msg_date": "Sat, 23 Dec 2000 10:59:11 -0800", "msg_from": "Paul A Vixie <[email protected]>", "msg_from_op": true, "msg_subject": "how do i store \\0 inside a text attribute?" }, { "msg_contents": "Paul A Vixie <[email protected]> writes:\n> this is not what i was hoping for at ALL. evidently the implementation of\n> text assumes NUL-termination in other places than the parser.\n\nYes. The entire datatype I/O system is based on null-terminated\nstrings, so there's no easy way to fix this. If it were just an\ninternal problem then maybe we'd bite the bullet and do it, but\nbreaking every user-defined datatype in existence seems too high\na price to pay for this problem.\n\n> ultimately\n> this means that pgsql will need a \"blob\" type whose presentation format is\n> uuencode or some such.\n\nSee bytea, though its presentation format leaves something to be desired\nIMHO.\n\n> how would someone be expected to store, say, a GIF image in a TOAST text?\n\nOne would not. A TOASTed bytea is the appropriate column type.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 18:59:49 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: how do i store \\0 inside a text attribute? " }, { "msg_contents": "> See bytea, though its presentation format leaves something to be desired IMHO\n> \n> > how would someone be expected to store, say, a GIF image in a TOAST text?\n> \n> One would not. A TOASTed bytea is the appropriate column type.\n\nthanks -- that's EXACTLY what i needed.\n", "msg_date": "Fri, 29 Dec 2000 17:30:19 -0800", "msg_from": "Paul A Vixie <[email protected]>", "msg_from_op": true, "msg_subject": "Re: how do i store \\0 inside a text attribute? " }, { "msg_contents": "> > See bytea, though its presentation format leaves something to be desired IMHO\n> > \n> > > how would someone be expected to store, say, a GIF image in a TOAST text?\n> > \n> > One would not. A TOASTed bytea is the appropriate column type.\n> \n> thanks -- that's EXACTLY what i needed.\n> \n\nbytea was not really used very much until people started asking to do\nthis kind of think.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 1 Jan 2001 22:45:41 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: how do i store \\0 inside a text attribute?" } ]
[ { "msg_contents": "Hey... I'm just learning how to do all this db stuff and I'm kinda\ncrippled because I've never used SQL.\n\nHere is what I'm doing. I've got pgaccess working, it works greate, I\ncreate databases and sql queries with it.\n\nI've got JRun running for my servlet engine, it also works great.\n\nNow when try to connect to my database through java... nothing happens.\n\nI'm using the following code to connect to the db:\n\n/*\n * Query0.java\n *\n * Created on December 23, 2000, 12:42 PM\n */\n\nimport java.io.*;\nimport javax.servlet.*;\nimport javax.servlet.http.*;\nimport java.sql.*;\n\n/**\n *\n * @author avelar\n * @version\n */\npublic class Query0 extends HttpServlet {\n\n /** Creates new Query0 */\n public Query0() {\n }\n\n public void doGet (HttpServletRequest req, HttpServletResponse res)\nthrows ServletException, IOException {\n res.setContentType(\"text/html\");\n PrintWriter out = res.getWriter();\n String theName = req.getParameter(\"theName\"); //theName is the\nNAME attribute of the input field in submitting form\n String queryResult = lookup(theName); // does all database work\n String title = \"Query Result: Phone Number for \" + theName;\n wrapInHTMLPage(out, queryResult, title); // does all output HTML\nwork\n }\n\n public void doPost (HttpServletRequest req, HttpServletResponse res)\nthrows ServletException, IOException {\n doGet(req, res);\n }\n\n public void wrapInHTMLPage(PrintWriter out, String queryResult,\nString title) throws IOException {\n out.println(\"<HTML><HEAD><TITLE> \" + title + \"\n</TITLE></HEAD>\");\n out.println(\"<BODY><H1>\" + title + \"</H1>\");\n out.println(\"<H2>Version 1.0g</H2>\");\n out.println(queryResult);\n out.println(\"</BODY></HTML>\");\n }\n\n public String lookup (String key) {\n // variables for data base work\n String driverName = \"postgresql.Driver\";\n String dbURL = \"jdbc:postgresql://localhost5432/phonebook\";\n String queryString = \"select t0.\\\"theName\\\",t0.\\\"theAddress\\\"\nfrom \\\"PhoneBookTbl\\\" t0 order by t0.\\\"theName\\\" desc\";\n\n try {\n Class.forName(driverName);\n Connection con = DriverManager.getConnection(dbURL,\n\"avelar\", \"daewoo\");\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(queryString);\n if (null == rs) {\n return \"db failure on \" + key;\n }\n if (!rs.next()) {\n return \"no such name as \" + key;\n }\n return rs.getString(1);\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }\n}\n\nI've made sure that the pg_hba.conf file is setup properly... what am I\nmissing?\n\n", "msg_date": "Sun, 24 Dec 2000 03:13:03 GMT", "msg_from": "\"Mike S. Avelar\" <[email protected]>", "msg_from_op": true, "msg_subject": "Java and Postgresql" } ]
[ { "msg_contents": "Sorry for intruding, but the following question did not get much \nattention on the \"General\" list. However, I still need the answer ...\n\n</LurkingMode>\n\n<NewbieMode>\n\nCould some kind soul explain this to me ?\n\ntest1=# select distinct \"Cle\" from \"Utilisateurs\";\nCle\n-----\n1\n2\n3\n4\n(4 rows)\n\ntest1=# select distinct \"CleUtil\" from \"Histoires\";\nCleUtil\n---------\n1\n\n(2 rows) -- Uuhhh !\n\ntest1=# select count(*) as NbRec from \"Histoires\" where \"CleUtil\" is null;\nnbrec\n-------\n2\n(1 row) -- Ah Ahh ... I have NULLs.\n\ntest1=# select distinct \"Cle\" from \"Utilisateurs\" where \"Cle\" in\ntest1-# (select distinct \"CleUtil\" from \"Histoires\");\nCle\n-----\n1\n(1 row) -- That's OK ...\n\ntest1=# select distinct \"Cle\" from \"Utilisateurs\" where \"Cle\" not in\ntest1-# (select distinct \"CleUtil\" from \"Histoires\");\nCle\n-----\n(0 rows) -- That's definitively *NOT* OK ! However\n\ntest1=# select distinct \"Cle\" from \"Utilisateurs\" where \"Cle\" not in\ntest1-# (select distinct \"CleUtil\" from \"Histoires\" where \"CleUtil\" is\nnot null);\nCle\n-----\n2\n3\n4\n(3 rows) -- That's what I expected in the first place.\n\nCould someone explain to me why not eliminating nulls destroys the\npotential results of the query ? In other words, for any X not null, X\nnot in (some NULLs) is false.\n\n</NewbieMode>\n\n<LurkingMode>\n\nEmmanuel Charpentier\n\n", "msg_date": "Sun, 24 Dec 2000 08:57:24 +0100", "msg_from": "\"Emmanuel Charpentier,,,\" <[email protected]>", "msg_from_op": true, "msg_subject": "NULLS and <> : Discrepancies ?" }, { "msg_contents": "> Could someone explain to me why not eliminating nulls destroys the\n> potential results of the query ? In other words, for any X not null, X\n> not in (some NULLs) is false.\n\nYou already know the answer: comparisons to NULL always evaluate to\nfalse. You may conclude that this exposes a flaw in SQL9x's definition\nof three-value logic, but is the result you should expect for a\nstandards-compliant SQL implementation.\n\n - Thomas\n\n(I was going to say \"almost always\" rather than \"always\" but I'm not\nrecalling a counter example and don't have time to look it up. Sorry\nabout that... ;)\n", "msg_date": "Fri, 29 Dec 2000 22:56:32 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: NULLS and <> : Discrepancies ?" }, { "msg_contents": "Thomas Lockhart <[email protected]> writes:\n>> Could someone explain to me why not eliminating nulls destroys the\n>> potential results of the query ? In other words, for any X not null, X\n>> not in (some NULLs) is false.\n\n> You already know the answer: comparisons to NULL always evaluate to\n> false.\n\nThomas, I'm surprised at you! Comparisons to NULL do not yield false,\nthey yield NULL.\n\nSo, given\n\n\tfoo NOT IN (bar, NULL)\n\nwe may rewrite this as\n\n\tNOT (foo IN (bar, NULL))\n\n\tNOT (foo = bar OR foo = NULL)\n\n\tNOT (false OR NULL)\n\n\tNOT (NULL)\n\n\tNULL\n\nOn the other hand\n\n\tfoo NOT IN (foo, NULL)\n\n\tNOT (foo IN (foo, NULL))\n\n\tNOT (foo = foo OR foo = NULL)\n\n\tNOT (true OR NULL)\n\n\tNOT (true)\n\n\tfalse\n\nSo the correct statement of the behavior is that the result of NOT IN is\nalways either FALSE or NULL if there are any NULLs involved. This is\nperfectly correct if you recall the interpretation of NULL as \"don't\nknow\". The truth value of \"foo = NULL\" is not FALSE, it is UNKNOWN,\nbecause you don't know what the NULL is ... it could be foo.\n\nIt happens that WHERE treats a NULL condition result the same as FALSE,\nie don't select the row, but they are not the same thing.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 19:29:55 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: NULLS and <> : Discrepancies ? " } ]
[ { "msg_contents": "I had meant to send this to the list as well.\n\n------- Forwarded Message\n\nDate: Fri, 22 Dec 2000 23:13:56 +0000\nFrom: \"Oliver Elphick\" <[email protected]>\nTo: Tom Lane <[email protected]>\nSubject: Re: [HACKERS] RI problem with inherited table \n\nTom Lane wrote:\n >Hm. The short-term answer seems to be to modify the queries generated\n >by the RI triggers to say \"ONLY foo\". I am not sure whether we\n >understand the semantics involved in allowing a REFERENCES target to be\n >taken as an inheritance tree rather than just one table, but certainly\n >the current implementation won't handle that correctly.\n\nMay I propose these semantics as a basis for future development:\n\n1. An inheritance hierarchy (starting at any point in a tree) should be\nequivalent to an updatable view of all the tables at the point of\nreference and below. By default, all descendant tables are combined\nwith the ancestor for all purposes. The keyword ONLY must be used to\nalter this behaviour. Only inherited columns of descendant tables are\nvisible from higher in the tree. Columns may not be dropped in descendants.\nIf columns are added to ancestors, they must be inserted correctly in\ndescendants so as to preserve column ordering and inheritance. If\na column is dropped in an ancestor, it is dropped in all descendants.\n\n2. Insertion into a hierarchy means insertion into the table named in\nthe INSERT statement; updating or deletion affects whichever table(s)\nthe affected rows are found in. Updating cannot move a row from one\ntable to another.\n\n3. Inheritance of a table implies inheriting all its constraints unless\nONLY is used or the constraints are subsequently dropped; again, dropping\noperates through all descendant tables. A primary key, foreign key or\nunique constraint cannot be dropped or modified for a descendant. A\nunique index on a column is shared by all tables below the table for\nwhich it is declared. It cannot be dropped for any descendant.\n\nIn other words, only NOT NULL and CHECK constraints can be dropped in\ndescendants.\n\nIn multiple inheritance, a column may inherit multiple unique indices\nfrom its several ancestors. All inherited constraints must be satisfied\ntogether (though check constraints may be dropped).\n\n4. RI to a table implies the inclusion of all its descendants in the\ncheck. Since a referenced column may be uniquely indexed further up\nthe hierarchy than in the table named, the check must ensure that\nthe referenced value occurs in the right segment of the hierarchy. RI\nto one particular level of the hierarchy, excluding descendants, requires\nthe use of ONLY in the constraint.\n\n5. Dropping a table implies dropping all its descendants.\n\n6. Change of permissions on a table propagates to all its descendants.\nPermissions on descendants may be looser than those on ancestors; they\nmay not be more restrictive.\n\n\nThis scheme is a lot more restrictive than C++'s or Eiffel's definition\nof inheritance, but it seems to me to make the concept truly useful,\nwithout introducing excessive complexity.\n\n------- End of Forwarded Message\n\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"And she gave birth to her first-born son; and she \n wrapped him in swaddling clothes, and laid Him in a \n manger; because there was no room for them in the \n inn.\" Luke 2:7 \n\n\n", "msg_date": "Sun, 24 Dec 2000 13:23:43 +0000", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: RI problem with inherited table (fwd)" } ]
[ { "msg_contents": "This line works:\n/usr/local/pgsql/bin/postmaster -N 32 -B 928 -i -S\n-D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n\nWhere as this line:\n\n/usr/local/pgsql/bin/postmaster -N 32 -B 1024 -i -S\n-D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n\ndoes not.\n\nAny ideas? \nI have 256M of memory, RedHat Linux 7.0, CVS version of Postgres as of a\ncouple days ago.\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Sun, 24 Dec 2000 13:52:43 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": true, "msg_subject": "Upper limit on number of buffers?" }, { "msg_contents": "* mlw <[email protected]> [001224 18:06] wrote:\n> This line works:\n> /usr/local/pgsql/bin/postmaster -N 32 -B 928 -i -S\n> -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> \n> Where as this line:\n> \n> /usr/local/pgsql/bin/postmaster -N 32 -B 1024 -i -S\n> -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> \n> does not.\n> \n> Any ideas? \n> I have 256M of memory, RedHat Linux 7.0, CVS version of Postgres as of a\n> couple days ago.\n\nGiving us the exact reason it \"doesn't work\" would be helpful, perhaps\nthe error message?\n\nI'm just going to guess that you need to consult your OS's\ndocumentation and figure out how to raise the amount of system V\nshared memory available.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Sun, 24 Dec 2000 19:04:03 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Upper limit on number of buffers?" }, { "msg_contents": "> * mlw <[email protected]> [001224 18:06] wrote:\n> > This line works:\n> > /usr/local/pgsql/bin/postmaster -N 32 -B 928 -i -S\n> > -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> >\n> > Where as this line:\n> >\n> > /usr/local/pgsql/bin/postmaster -N 32 -B 1024 -i -S\n> > -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> >\n> > does not.\n> >\n> > Any ideas?\n> > I have 256M of memory, RedHat Linux 7.0, CVS version of Postgres as of a\n> > couple days ago.\n>\n> I'm just going to guess that you need to consult your OS's\n> documentation and figure out how to raise the amount of system V\n> shared memory available.\n\nI think Alfred is probably correct. I've run into this before myself. See\nthe following link:\n\nhttp://www.postgresql.org/devel-corner/docs/admin/kernel-resources.htm#SYSVI\nPC\n\nThe relevant section reads:\n\nLinux\n\nThe default shared memory limit (both SHMMAX and SHMALL) is 32 MB in 2.2\nkernels, but it can be changed in the proc file system (without reboot). For\nexample, to allow 128 MB:\n\n$ echo 134217728 >/proc/sys/kernel/shmall\n$ echo 134217728 >/proc/sys/kernel/shmmax\nYou could put these commands into a script run at boot-time.\n\nOther parameters are sufficiently sized for any application. If you want to\nsee for yourself look into /usr/src/linux/include/asm-xxx/shmparam.h and\n/usr/src/linux/include/linux/sem.h.\n\nHope this helps,\n\nJoe\n\n\n", "msg_date": "Sun, 24 Dec 2000 19:25:04 -0800", "msg_from": "\"Joe Conway\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Upper limit on number of buffers?" }, { "msg_contents": "/proc/sys/kernel/shmmax\n\n\tOleg\nOn Sun, 24 Dec 2000, mlw wrote:\n\n> Date: Sun, 24 Dec 2000 13:52:43 -0500\n> From: mlw <[email protected]>\n> To: Hackers List <[email protected]>\n> Subject: [HACKERS] Upper limit on number of buffers?\n> \n> This line works:\n> /usr/local/pgsql/bin/postmaster -N 32 -B 928 -i -S\n> -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> \n> Where as this line:\n> \n> /usr/local/pgsql/bin/postmaster -N 32 -B 1024 -i -S\n> -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> \n> does not.\n> \n> Any ideas? \n> I have 256M of memory, RedHat Linux 7.0, CVS version of Postgres as of a\n> couple days ago.\n> \n> -- \n> http://www.mohawksoft.com\n> \n\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: [email protected], http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Mon, 25 Dec 2000 07:47:58 +0300 (GMT)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Upper limit on number of buffers?" }, { "msg_contents": "Oleg Bartunov wrote:\n> \n> /proc/sys/kernel/shmmax\n\nI think I am getting a lot of \"Homer Simpson\" awards this year. The\nkiller is that I have dealt with this problem on another project. Thanks\nguys.\n \n\n> Oleg\n> On Sun, 24 Dec 2000, mlw wrote:\n> \n> > Date: Sun, 24 Dec 2000 13:52:43 -0500\n> > From: mlw <[email protected]>\n> > To: Hackers List <[email protected]>\n> > Subject: [HACKERS] Upper limit on number of buffers?\n> >\n> > This line works:\n> > /usr/local/pgsql/bin/postmaster -N 32 -B 928 -i -S\n> > -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> >\n> > Where as this line:\n> >\n> > /usr/local/pgsql/bin/postmaster -N 32 -B 1024 -i -S\n> > -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n> >\n> > does not.\n> >\n> > Any ideas?\n> > I have 256M of memory, RedHat Linux 7.0, CVS version of Postgres as of a\n> > couple days ago.\n> >\n> > --\n> > http://www.mohawksoft.com\n> >\n> \n> _____________________________________________________________\n> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,\n> Sternberg Astronomical Institute, Moscow University (Russia)\n> Internet: [email protected], http://www.sai.msu.su/~megera/\n> phone: +007(095)939-16-83, +007(095)939-23-83\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Mon, 25 Dec 2000 18:26:51 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Upper limit on number of buffers?" } ]
[ { "msg_contents": "pg_class doesn't seem to have any pointers regarding if the name for an item was automatically generated or was given by the user. If it did store that as a bool, it could be determined whether to use:\n\nCONSTRAINT \"table_pkey\" PRIMARY KEY (\"table\")\n\nor\n\nPRIMARY KEY (\"table\")\n\nin a dump.\n\nBy not keeping the auto-generated names (and generating them again with the next creation) it should allow postgres to name things with a sequence number in them without the user getting miffed about it. If in the dump I see PRIMARY KEY(\"table\") and the database already drops the keys on DROP TABLE, I don't care if it's named pg_325342_pkey internally or instead of something more legible.\n\nThis would help prevent the current issue with users replacing auto-named entities, or in my case prevent multiple auto-named entites recieving the same name (checks were doing this as I had given the table and column long names myself, PG created names which were duplicate). Took a little while to figure out why the CREATE TABLE wasn't working.\n\n\nAn addition to pg_relcheck along the same lines. Add a foreign key of pg_relcheck.OID called pg_attribute.rcrelid. When NULL we know that the attribute was added as a table clause rather than a column clause. This (I believe) combined with the above would enable pg_dump to more accurately rebuild the statement used to create the table in the first place, or atleast what a human is more likley to type in if they were rebuilding manually.\n\nIf the above makes sense with the backend logic, I'll start tinkering to see what I can get done.\n\n\nP.S. Please bear with me, I might actually become useful in a few months once I've figured out enough of the PostgreSQL internals and C. Normally I'm coding embedded devices in assembly or higher level php / perl.\n\n--\nRod Taylor\n\nThere are always four sides to every story: your side, their side, the truth, and what really happened.", "msg_date": "Sun, 24 Dec 2000 17:00:08 -0500", "msg_from": "\"Rod Taylor\" <[email protected]>", "msg_from_op": true, "msg_subject": "Thoughts regarding pg_dump" } ]
[ { "msg_contents": " > * mlw <[email protected]> [001224 18:06] wrote:\n > > This line works:\n > > /usr/local/pgsql/bin/postmaster -N 32 -B 928 -i -S\n > > -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n > >\n > > Where as this line:\n > >\n > > /usr/local/pgsql/bin/postmaster -N 32 -B 1024 -i -S\n > > -D/home/postgres/pgdev -o \"-F -fs -S 4096\"\n > >\n > > does not.\n > >\n > > Any ideas?\n > > I have 256M of memory, RedHat Linux 7.0, CVS version of Postgres as of\na\n > > couple days ago.\n >\n > I'm just going to guess that you need to consult your OS's\n > documentation and figure out how to raise the amount of system V\n > shared memory available.\n\n I think Alfred is probably correct. I've run into this before myself. See\nthe following link:\n\n\nhttp://www.postgresql.org/devel-corner/docs/admin/kernel-resources.htm#SYSVI\nPC\n\n The relevant section reads:\n\n Linux\n\n The default shared memory limit (both SHMMAX and SHMALL) is 32 MB in 2.2\nkernels, but it can be changed in the proc file system (without reboot). For\nexample, to allow 128 MB:\n\n $ echo 134217728 >/proc/sys/kernel/shmall\n$ echo 134217728 >/proc/sys/kernel/shmmax\nYou could put these commands into a script run at boot-time.\n\n Other parameters are sufficiently sized for any application. If you want to\n see for yourself look into /usr/src/linux/include/asm-xxx/shmparam.h and\n /usr/src/linux/include/linux/sem.h.\n\n Hope this helps,\n\n Joe\n\n\n\n", "msg_date": "Sun, 24 Dec 2000 20:20:33 -0800", "msg_from": "\"Joe Conway\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Upper limit on number of buffers?" }, { "msg_contents": "On Sun, 24 Dec 2000, Joe Conway wrote:\n\n> Linux\n> \n> The default shared memory limit (both SHMMAX and SHMALL) is 32 MB in 2.2\n> kernels, but it can be changed in the proc file system (without reboot). For\n> example, to allow 128 MB:\n> \n> $ echo 134217728 >/proc/sys/kernel/shmall\n> $ echo 134217728 >/proc/sys/kernel/shmmax\n> You could put these commands into a script run at boot-time.\n\nOn redhat 6.2 I know that you can use /etc/sysctl.conf to do this as well.\n\nJust add this to /etc/sysctl.conf.\n\nkernel.shmall = 134217728\nkernel.shmmax = 134217728\n\nAfter this, your tunables will be restored every time that the system boots.\n\nMike\n\n", "msg_date": "Fri, 29 Dec 2000 11:29:21 -0600 (CST)", "msg_from": "Michael J Schout <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Upper limit on number of buffers?" }, { "msg_contents": "Michael J Schout wrote:\n> \n> On Sun, 24 Dec 2000, Joe Conway wrote:\n> \n> On redhat 6.2 I know that you can use /etc/sysctl.conf to do this as well.\n> \n> Just add this to /etc/sysctl.conf.\n> \n> kernel.shmall = 134217728\n> kernel.shmmax = 134217728\n> \n> After this, your tunables will be restored every time that the system boots.\n\nI can confirm that that applies under Debian as well, although there is\nalso some stuff in the startup script for Debian to configure files max\nspecifically for PostgreSQL.\n\nCheers,\n\t\t\t\tAndrew.\n-- \n_____________________________________________________________________\n Andrew McMillan, e-mail: [email protected]\nCatalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington\nMe: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267\n", "msg_date": "Mon, 01 Jan 2001 11:18:03 +1300", "msg_from": "Andrew McMillan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Upper limit on number of buffers?" } ]
[ { "msg_contents": "Hey there,\n\nI get this error but I think this is supposed to work:\n\nThe table has some duplicates such as Munich I want the number of distinct cities:\n\nabenew=> select * from ct;\nname| age| city\n---- +--- +------\njow | 10| london\ntim | 15| paris\nkim | 17| munich\nte | 19| munich\n(8 rows)\n\nMy query is as follows:\n\ntester => select count(distinct city) from ct;\nERROR: parser: parse error at or near \"distinct\"\n\nAny guidance would be appreciated...\nThanks\nAbe\n\n\n\n\n\n\n\nHey there,\n \nI get this error but I think this is supposed to \nwork:\n \nThe table has some duplicates such as Munich I \nwant the number of distinct cities:\n \nabenew=> select * from ct;name|    age|    \ncity----        \n+---      +------jow  | \n    10|     londontim | \n     15|     pariskim | \n    17|     munichte   \n|      19|     munich(8 \nrows)\n \nMy query is as follows:\n \ntester => select count(distinct city) from \nct;ERROR:  parser: parse error at or near \"distinct\"\n \nAny guidance would be appreciated...\nThanks\nAbe", "msg_date": "Mon, 25 Dec 2000 23:12:50 -0000", "msg_from": "\"Abe\" <[email protected]>", "msg_from_op": true, "msg_subject": "COUNT(Distinct city) HELP!!!" }, { "msg_contents": "Abe wrote:\n> \n> Part 1.1 Type: Plain Text (text/plain)\n> Encoding: quoted-printable\n\nTry this:\nselect count(distinct (city) ) from ct\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Mon, 25 Dec 2000 18:23:19 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": false, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" }, { "msg_contents": "\nI believe that functionality was added in version 7.0,\nare you using an earlier version?\n\nOn Mon, 25 Dec 2000, Abe wrote:\n\n> Hey there,\n> \n> I get this error but I think this is supposed to work:\n> \n> The table has some duplicates such as Munich I want the number of distinct cities:\n> \n> abenew=> select * from ct;\n> name| age| city\n> ---- +--- +------\n> jow | 10| london\n> tim | 15| paris\n> kim | 17| munich\n> te | 19| munich\n> (8 rows)\n> \n> My query is as follows:\n> \n> tester => select count(distinct city) from ct;\n> ERROR: parser: parse error at or near \"distinct\"\n> \n> Any guidance would be appreciated...\n> Thanks\n> Abe\n> \n\n", "msg_date": "Mon, 25 Dec 2000 17:27:30 -0800 (PST)", "msg_from": "Stephan Szabo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" }, { "msg_contents": "On Mon, Dec 25, 2000 at 11:12:50PM -0000, some SMTP stream spewed forth: \n> Hey there,\n> \n> I get this error but I think this is supposed to work:\n\nHrm, it works here on 7.0.2 where each field is \"text\".\n\n=> select version();\n version\n-----------------------------------------------------------------\n PostgreSQL 7.0.2 on i386-unknown-freebsdelf4.0, compiled by cc\n(1 row)\n\n\nI wish that I could actually *help* you, but I can not. ;-(\n\nG'luck.\n\ngh\n\n> \n> The table has some duplicates such as Munich I want the number of distinct cities:\n> \n> abenew=> select * from ct;\n> name| age| city\n> ---- +--- +------\n> jow | 10| london\n> tim | 15| paris\n> kim | 17| munich\n> te | 19| munich\n> (8 rows)\n> \n> My query is as follows:\n> \n> tester => select count(distinct city) from ct;\n> ERROR: parser: parse error at or near \"distinct\"\n> \n> Any guidance would be appreciated...\n> Thanks\n> Abe\n", "msg_date": "Mon, 25 Dec 2000 20:08:24 -0600", "msg_from": "GH <[email protected]>", "msg_from_op": false, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" }, { "msg_contents": "Abe wrote:\n> \n> Hey there,\n> \n> Just tried that - No luck - I am using version 6.5.0 - Maybe its just not\n> available in this version.\n> Any alternatives ?\n\nI have tried this on version 7.02. I assume 6.5 did not support it.\n\n> \n> Thanks Guys,\n> Abe\n> ----- Original Message -----\n> From: \"mlw\" <[email protected]>\n> To: \"Abe\" <[email protected]>; \"Hackers List\" <[email protected]>\n> Sent: Monday, December 25, 2000 11:23 PM\n> Subject: Re: COUNT(Distinct city) HELP!!!\n> \n> > Abe wrote:\n> > >\n> > > Part 1.1 Type: Plain Text (text/plain)\n> > > Encoding: quoted-printable\n> >\n> > Try this:\n> > select count(distinct (city) ) from ct\n> > --\n> > http://www.mohawksoft.com\n> >\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Mon, 25 Dec 2000 21:39:47 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": false, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" }, { "msg_contents": "Hey there,\n\nJust tried that - No luck - I am using version 6.5.0 - Maybe its just not\navailable in this version.\nAny alternatives ?\n\nThanks Guys,\nAbe\n----- Original Message -----\nFrom: \"mlw\" <[email protected]>\nTo: \"Abe\" <[email protected]>; \"Hackers List\" <[email protected]>\nSent: Monday, December 25, 2000 11:23 PM\nSubject: Re: COUNT(Distinct city) HELP!!!\n\n\n> Abe wrote:\n> >\n> > Part 1.1 Type: Plain Text (text/plain)\n> > Encoding: quoted-printable\n>\n> Try this:\n> select count(distinct (city) ) from ct\n> --\n> http://www.mohawksoft.com\n>\n\n", "msg_date": "Tue, 26 Dec 2000 02:41:56 -0000", "msg_from": "\"Abe\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" }, { "msg_contents": "or u can also try\n\nselect count(*) \nfrom\n\t(select distinct city from ct);\n\nHope this helps\nAnand\n\nOn Mon, Dec 25, 2000 at 05:27:30PM -0800, Stephan Szabo wrote:\n>\n>I believe that functionality was added in version 7.0,\n>are you using an earlier version?\n>\n>On Mon, 25 Dec 2000, Abe wrote:\n>\n>> Hey there,\n>> \n>> I get this error but I think this is supposed to work:\n>> \n>> The table has some duplicates such as Munich I want the number of distinct cities:\n>> \n>> abenew=> select * from ct;\n>> name| age| city\n>> ---- +--- +------\n>> jow | 10| london\n>> tim | 15| paris\n>> kim | 17| munich\n>> te | 19| munich\n>> (8 rows)\n>> \n>> My query is as follows:\n>> \n>> tester => select count(distinct city) from ct;\n>> ERROR: parser: parse error at or near \"distinct\"\n>> \n>> Any guidance would be appreciated...\n>> Thanks\n>> Abe\n>> \n", "msg_date": "Tue, 26 Dec 2000 12:13:43 +0530", "msg_from": "Anand Raman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" }, { "msg_contents": "No Joy,\nunfortunately - It may well be time to upgrade.\n\nThanks,\nAbe\n\n\n----- Original Message -----\nFrom: \"Anand Raman\" <[email protected]>\nTo: <[email protected]>\nSent: Tuesday, December 26, 2000 6:43 AM\nSubject: Re: [GENERAL] COUNT(Distinct city) HELP!!!\n\n\n> or u can also try\n>\n> select count(*)\n> from\n> (select distinct city from ct);\n>\n> Hope this helps\n> Anand\n>\n> On Mon, Dec 25, 2000 at 05:27:30PM -0800, Stephan Szabo wrote:\n> >\n> >I believe that functionality was added in version 7.0,\n> >are you using an earlier version?\n> >\n> >On Mon, 25 Dec 2000, Abe wrote:\n> >\n> >> Hey there,\n> >>\n> >> I get this error but I think this is supposed to work:\n> >>\n> >> The table has some duplicates such as Munich I want the number of\ndistinct cities:\n> >>\n> >> abenew=> select * from ct;\n> >> name| age| city\n> >> ---- +--- +------\n> >> jow | 10| london\n> >> tim | 15| paris\n> >> kim | 17| munich\n> >> te | 19| munich\n> >> (8 rows)\n> >>\n> >> My query is as follows:\n> >>\n> >> tester => select count(distinct city) from ct;\n> >> ERROR: parser: parse error at or near \"distinct\"\n> >>\n> >> Any guidance would be appreciated...\n> >> Thanks\n> >> Abe\n> >>\n>\n\n", "msg_date": "Tue, 26 Dec 2000 12:14:02 -0000", "msg_from": "\"Abe\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: COUNT(Distinct city) HELP!!!" } ]
[ { "msg_contents": "I've been searching the lists and found a similar question but there have no \nreplies.\n\nWhat I would like to be able to do in Postgres is give users/groups the \nability to execute stored procedures on a per procedure basis.\n\nI am looking into the Rules system, thinking that this is acheiveable through \nthe use of query rewriting, dummy tables and _insert, _delete, _update rules. \n \n\nI see in the internals.ps (docs directory) file there is an example (2.5.8 / \npg 49-50) of creating a dummy table and a rule that gets executed when \nsomeone issues a SELECT on that dummy table. \n\nThe rule defines the actual query which is executed, so the *user* is none \nthe wiser. That's a start.\n\nIt seems that keeping track of *dummy* tables could get hairy and somone \ncleaning up could accidentally remove a dummy table and disable a whole mess \nof things inadvertenty. \n\nIt would appear to be possible to set ACLs on a dummy table to only allow \ncertain users/groups to execute the select, insert, update or delete on the \ndummy table itself. Thereby using the built-in postgres security to intervene \nand before the rules are ever executed. \n\nThere is an example of the use of a rule to prevent an insert on a table that \nuses a special naming convention, <tablename>_insert that automatically gets \nexecuted when the INSERT is issued. (and similarly for the \n<tablename>_select, <tablename>_update and <tablename>_delete)\n(PostgreSQL: Introduction and Concepts / Momjian, pg. 149)\n\nNow if I'm way off and these scenarios are not possible, it would be nice to \nhave ACL's on entries in the pg_proc table or an additional entry in pg_class \nfor each stored proc/function (but that seems unlikely as it seems this would \naffect other parts of the postgres subsystem) and have the 'traffic-cop' \ncheck the permissions on the functions for us.\n\nThanks.\n\nJohn Moschetto\nattendee OSDN/OSDB Summit \nOct 30-31 2000 - Hayes Mansion\nSan Jose, California\n\n__________________________________________________________________\nGet your own FREE, personal Netscape Webmail account today at \nhttp://webmail.netscape.com/\n", "msg_date": "Tue, 26 Dec 2000 12:24:08 -0500", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "Permissions on Stored Procedures" } ]
[ { "msg_contents": "\nHello,\n\nI have noticed some errors in the 7.1 Documentation.\nSpecifically, in the sections involving inheritance.\n\nIn Chapter 8. it shows syntax of:\n create table <name> UNDER <name> ( ... )\n\nIn Reference Manual CREATE TABLE shows syntax of:\n create table <name> ( ... ) under <name>\n\nIn psql, \\h create table shows syntax of:\n create table <name> ( ... ) inherits (<name>)\n\nIt seems that the last one is correct -- or at least works for me.\n\nThanks,\nPaul\n\nPS -- Version 7.1 is great! -- Thank You.\n\n--\nPaul Govereau\[email protected]\[email protected]\n", "msg_date": "Tue, 26 Dec 2000 16:52:51 -0500", "msg_from": "Paul Govereau <[email protected]>", "msg_from_op": true, "msg_subject": "Inheritance docs error." }, { "msg_contents": "Paul Govereau writes:\n\n> I have noticed some errors in the 7.1 Documentation.\n> Specifically, in the sections involving inheritance.\n>\n> In Chapter 8. it shows syntax of:\n> create table <name> UNDER <name> ( ... )\n>\n> In Reference Manual CREATE TABLE shows syntax of:\n> create table <name> ( ... ) under <name>\n>\n> In psql, \\h create table shows syntax of:\n> create table <name> ( ... ) inherits (<name>)\n>\n> It seems that the last one is correct -- or at least works for me.\n\nThey are all correct: UNDER is the new SQL99 syntax, INHERITS is the\ntraditional Postgres syntax. The reason that psql \\h shows the old syntax\nis that the current snapshots are distributed with the old (7.0)\ndocumentation, whereas you probably got the first two things off the web.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 15:47:20 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Inheritance docs error." }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n>> It seems that the last one is correct -- or at least works for me.\n\n> They are all correct: UNDER is the new SQL99 syntax, INHERITS is the\n> traditional Postgres syntax.\n\nCurrent docs do appear to be erroneous: they claim the UNDER phrase goes\nwhere INHERIT does, which is not what the grammar thinks. I haven't\nlooked at SQL99 to see which is right.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 30 Dec 2000 13:05:05 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Inheritance docs error. " }, { "msg_contents": "Tom Lane writes:\n\n> Peter Eisentraut <[email protected]> writes:\n> >> It seems that the last one is correct -- or at least works for me.\n>\n> > They are all correct: UNDER is the new SQL99 syntax, INHERITS is the\n> > traditional Postgres syntax.\n>\n> Current docs do appear to be erroneous: they claim the UNDER phrase goes\n> where INHERIT does, which is not what the grammar thinks. I haven't\n> looked at SQL99 to see which is right.\n\nThe grammar appears to be correct to the extent that SQL99 wants the UNDER\nbefore the column list, so I corrected the documentation at that point.\nHowever, the syntax as a whole is not SQL99-compliant.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 20:12:32 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Inheritance docs error. " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n>>>> They are all correct: UNDER is the new SQL99 syntax, INHERITS is the\n>>>> traditional Postgres syntax.\n>> \n>> Current docs do appear to be erroneous: they claim the UNDER phrase goes\n>> where INHERIT does, which is not what the grammar thinks. I haven't\n>> looked at SQL99 to see which is right.\n\n> The grammar appears to be correct to the extent that SQL99 wants the UNDER\n> before the column list, so I corrected the documentation at that point.\n> However, the syntax as a whole is not SQL99-compliant.\n\nHmm. After looking at the SQL99 syntax, it seems that what we've done\nwith our grammar is to take the old INHERITS functionality and plaster\na vaguely-SQL-like syntax on it. I have to wonder whether this is a\ngood idea. I think it'll get in the way when and if we want to offer\ntrue SQL99 UNDER behavior, which is only marginally related to INHERITS.\n(In particular, SQL99 seems to want an explicit specification of the\nstructured type that's being inherited.)\n\nI am strongly inclined to rip out the pseudo-UNDER clause and support\nonly the old-style INHERITS syntax for 7.1. UNDER is adding no\nfunctionality and I think we will eventually regret using an SQL keyword\nfor non-SQL semantics.\n\nComments?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 30 Dec 2000 15:08:46 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Inheritance docs error. " }, { "msg_contents": "Tom Lane writes:\n\n> I am strongly inclined to rip out the pseudo-UNDER clause and support\n> only the old-style INHERITS syntax for 7.1. UNDER is adding no\n> functionality and I think we will eventually regret using an SQL keyword\n> for non-SQL semantics.\n\nI agree.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sun, 31 Dec 2000 13:16:02 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [DOCS] Inheritance docs error. " }, { "msg_contents": "Tom Lane wrote:\n> \n> Peter Eisentraut <[email protected]> writes:\n> >>>> They are all correct: UNDER is the new SQL99 syntax, INHERITS is the\n> >>>> traditional Postgres syntax.\n> >>\n> >> Current docs do appear to be erroneous: they claim the UNDER phrase goes\n> >> where INHERIT does, which is not what the grammar thinks. I haven't\n> >> looked at SQL99 to see which is right.\n> \n> > The grammar appears to be correct to the extent that SQL99 wants the UNDER\n> > before the column list, so I corrected the documentation at that point.\n> > However, the syntax as a whole is not SQL99-compliant.\n> \n> Hmm. After looking at the SQL99 syntax, it seems that what we've done\n> with our grammar is to take the old INHERITS functionality and plaster\n> a vaguely-SQL-like syntax on it. I have to wonder whether this is a\n> good idea. I think it'll get in the way when and if we want to offer\n> true SQL99 UNDER behavior, which is only marginally related to INHERITS.\n> (In particular, SQL99 seems to want an explicit specification of the\n> structured type that's being inherited.)\n> \n> I am strongly inclined to rip out the pseudo-UNDER clause and support\n> only the old-style INHERITS syntax for 7.1. UNDER is adding no\n> functionality and I think we will eventually regret using an SQL keyword\n> for non-SQL semantics.\n> \n> Comments?\n\nI'm all for it, as UNDER and INHERITS seem to offer different benefits.\n\nAs UNDER is strictly single-inheritance, the best way to implement it\nseems\nto use a single file for all tables \"under\" the root table which will\ngive us \nalmost automatic primary keys and other constraints which are much\ntrickier to \nimplement or even to define for multimple inheritance (e.g. how do you\n\"inherit\" \na primary key from two parents' primary keys)\n\nSo just leave it out until we have a _real_ under implementation, or\nelse \nsomeone will use it and lock us into backwards-compatibility trap.\n\n\n--------------\nHannu\n", "msg_date": "Mon, 01 Jan 2001 05:57:55 +0200", "msg_from": "Hannu Krosing <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Inheritance docs error." }, { "msg_contents": "I thought about this UNDER/INHERITS stuff months ago and wrote this file:\n\nhttp://www.comptechnews.com/~reaster/pgoo.html\n\nIt might have something of value to someone. I'm not sure everything in the \nfile is correct though.\n\nI remember the idea of UNDER is to be compatible with storing data from a \nJava program, which only does single inheritance of classes and multiple for \ninterface types. UNDER and INHERIT are different enough to be completely \nseparate and coexisting.\n\nIt's an interesting subject, but I don't have anything much else to say about \nthis topic since I have no plans to implement it! I'd have to study postgres \nfor another year probably first! :)\n\n\nOn Sunday 31 December 2000 22:57, Hannu Krosing wrote:\n> Tom Lane wrote:\n> > Peter Eisentraut <[email protected]> writes:\n> > >>>> They are all correct: UNDER is the new SQL99 syntax, INHERITS is\n> > >>>> the traditional Postgres syntax.\n> > >>\n> > >> Current docs do appear to be erroneous: they claim the UNDER phrase\n> > >> goes where INHERIT does, which is not what the grammar thinks. I\n> > >> haven't looked at SQL99 to see which is right.\n> > >\n> > > The grammar appears to be correct to the extent that SQL99 wants the\n> > > UNDER before the column list, so I corrected the documentation at that\n> > > point. However, the syntax as a whole is not SQL99-compliant.\n> >\n> > Hmm. After looking at the SQL99 syntax, it seems that what we've done\n> > with our grammar is to take the old INHERITS functionality and plaster\n> > a vaguely-SQL-like syntax on it. I have to wonder whether this is a\n> > good idea. I think it'll get in the way when and if we want to offer\n> > true SQL99 UNDER behavior, which is only marginally related to INHERITS.\n> > (In particular, SQL99 seems to want an explicit specification of the\n> > structured type that's being inherited.)\n> >\n> > I am strongly inclined to rip out the pseudo-UNDER clause and support\n> > only the old-style INHERITS syntax for 7.1. UNDER is adding no\n> > functionality and I think we will eventually regret using an SQL keyword\n> > for non-SQL semantics.\n> >\n> > Comments?\n>\n> I'm all for it, as UNDER and INHERITS seem to offer different benefits.\n>\n> As UNDER is strictly single-inheritance, the best way to implement it\n> seems\n> to use a single file for all tables \"under\" the root table which will\n> give us\n> almost automatic primary keys and other constraints which are much\n> trickier to\n> implement or even to define for multimple inheritance (e.g. how do you\n> \"inherit\"\n> a primary key from two parents' primary keys)\n>\n> So just leave it out until we have a _real_ under implementation, or\n> else\n> someone will use it and lock us into backwards-compatibility trap.\n>\n>\n> --------------\n> Hannu\n\n-- \n-------- Robert B. Easter [email protected] ---------\n- CompTechNews Message Board http://www.comptechnews.com/ -\n- CompTechServ Tech Services http://www.comptechserv.com/ -\n---------- http://www.comptechnews.com/~reaster/ ------------\n", "msg_date": "Tue, 2 Jan 2001 01:59:55 -0500", "msg_from": "\"Robert B. Easter\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Inheritance docs error." }, { "msg_contents": "> I am strongly inclined to rip out the pseudo-UNDER clause and support\n> only the old-style INHERITS syntax for 7.1. UNDER is adding no\n> functionality and I think we will eventually regret using an SQL keyword\n> for non-SQL semantics.\n\nI agree with you, Hannu, et al. If it isn't making a good effort in\ntruely supporting SQL9x, then it isn't yet worth having in the parser.\n\n - Thomas\n", "msg_date": "Tue, 02 Jan 2001 07:11:52 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Inheritance docs error." }, { "msg_contents": "\"Robert B. Easter\" <[email protected]> writes:\n> I thought about this UNDER/INHERITS stuff months ago and wrote this file:\n> http://www.comptechnews.com/~reaster/pgoo.html\n\nGood analysis, especially the fundamental point that UNDER is only\ndesigned to support single inheritance, whereas INHERITS allows multiple\ninheritance.\n\nThe current grammar treats UNDER as interchangeable with INHERITS,\nincluding allowing multiple names to be listed as UNDER. That would\ncertainly be a fatal mistake, since it would create a backwards\ncompatibility problem as soon as we wanted to support any of the\nfeatures of UNDER that require single inheritance.\n\n> I'm not sure everything in the file is correct though.\n\nOne thing that bothered me is that my reading of the SQL99 draft\ndisallows the UNDER syntax you are using. I read:\n\n <table definition> ::=\n CREATE [ <table scope> ] TABLE <table name>\n <table contents source>\n [ ON COMMIT <table commit action> ROWS ]\n\n <table contents source> ::=\n <table element list>\n | OF <user-defined type>\n [ <subtable clause> ]\n [ <table element list> ]\n\n <subtable clause> ::=\n UNDER <supertable clause>\n\n <supertable clause> ::= <supertable name>\n\nIt looks to me like \"UNDER <table name>\" cannot appear without a\npreceding \"OF <user-defined type>\". I am not clear on the semantic\nimplications of the OF clause.\n\n\nAnyway, we seem to have a clear consensus to pull the UNDER clause from\nthe grammar and stick with INHERITS for 7.1. I will take care of that\nin the next day or so.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 02 Jan 2001 12:48:56 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Inheritance docs error. " }, { "msg_contents": "Tom Lane wrote:\n> \n> One thing that bothered me is that my reading of the SQL99 draft\n> disallows the UNDER syntax you are using. I read:\n> \n> <table definition> ::=\n> CREATE [ <table scope> ] TABLE <table name>\n> <table contents source>\n> [ ON COMMIT <table commit action> ROWS ]\n> \n> <table contents source> ::=\n> <table element list>\n> | OF <user-defined type>\n> [ <subtable clause> ]\n> [ <table element list> ]\n> \n> <subtable clause> ::=\n> UNDER <supertable clause>\n> \n> <supertable clause> ::= <supertable name>\n> \n> It looks to me like \"UNDER <table name>\" cannot appear without a\n> preceding \"OF <user-defined type>\". I am not clear on the semantic\n> implications of the OF clause.\n\nto me it seems that only this is OR-d : <table element list> | OF\n<user-defined type>\n\nand the rest ([ <subtable clause> ],[ <table element list> ])is just\noptional\n\n> Anyway, we seem to have a clear consensus to pull the UNDER clause from\n> the grammar and stick with INHERITS for 7.1. I will take care of that\n> in the next day or so.\n\nGood.\n\n-----------\nHannu\n", "msg_date": "Wed, 03 Jan 2001 11:30:51 +0200", "msg_from": "Hannu Krosing <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Inheritance docs error." }, { "msg_contents": "Hannu Krosing <[email protected]> writes:\n> Tom Lane wrote:\n> > <table contents source> ::=\n> > <table element list>\n> > | OF <user-defined type>\n> > [ <subtable clause> ]\n> > [ <table element list> ]\n> \n> to me it seems that only this is OR-d : <table element list> | OF\n> <user-defined type>\n> and the rest ([ <subtable clause> ],[ <table element list> ])is just\n> optional\n\nThe grammar is less than perfectly clear, isn't it? But that reading\njust doesn't make any sense, because it would allow <table contents\nsource> to be (among other things) <table element list> <table element list>\nwhich I am sure is not what they intend. The last line has to be part\nof the second alternative, it seems to me, and therefore the\nnext-to-last line is too.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 03 Jan 2001 11:40:43 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Inheritance docs error. " }, { "msg_contents": "Hannu Krosing writes:\n\n> > <table contents source> ::=\n> > <table element list>\n> > | OF <user-defined type>\n> > [ <subtable clause> ]\n> > [ <table element list> ]\n\n> to me it seems that only this is OR-d : <table element list> | OF\n> <user-defined type>\n>\n> and the rest ([ <subtable clause> ],[ <table element list> ])is just\n> optional\n\nNope. In that case it would read\n\n <table contents source> ::=\n { <table element list>\n | OF <user-defined type> }\n [ <subtable clause> ]\n [ <table element list> ]\n\nbecause ISO/IEC 9075-1:1999 section 6.1 says:\n\n | The alternative operator. The vertical bar indicates that the\n portion of the formula following the bar is an alternative\n to the portion preceding the bar. If the vertical bar appears\n at a position where it is not enclosed in braces or square\n brackets, it specifies a complete alternative for the element\n defined by the production rule. If the vertical bar appears\n in a portion of a formula enclosed in braces or square\n brackets, it specifies alternatives for the contents of the\n innermost pair of such braces or brackets.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Wed, 3 Jan 2001 17:54:26 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: Inheritance docs error." } ]
[ { "msg_contents": "I have been asked by the major PHP developer Rasmus Lerdorf to see if\nthe PostgreSQL/PHP interface needs any improvements.\n\nIs the current PostgreSQL interface module in PHP adequate? Does it\nsupport all the current libpq features?\n\nIf not, would someone submit some patches to the PHP folks. They want\nus to work well with PHP. They are basically encouraging us to improve\nit in any way we can.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 27 Dec 2000 00:56:26 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "PHP and PostgreSQL " }, { "msg_contents": "Bruce Momjian wrote:\n> \n> I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> the PostgreSQL/PHP interface needs any improvements.\n> \n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n> \n> If not, would someone submit some patches to the PHP folks. They want\n> us to work well with PHP. They are basically encouraging us to improve\n> it in any way we can.\n\nIn a current project, I am using Postgres, Oracle, and PHP. I think\nPHP's API is very complete and usable, I can't think of anything we've\nrun into that was a result of PHP lacking a feature.\n\nThe only thing I'd like to see would be an Oracle construct moved to\nPostgres. The idea that we can \"prepare\" a statement then execute it\nmultiple times without going through the planner more than once. This\nwould also require the ability to create and set arbitrary variables in\na Postgres session. \n\nSince these are programmatic queries, only a handful of different SQL\nqueries are ever executed. The ability to cache the planned query tree\n(is this the right terminology?) in a shared block, and simply reuse it,\nin the multiple back-ends, with a new variable value, would speed up\nsome of the more complex queries, I guess.\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Wed, 27 Dec 2000 08:46:15 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> the PostgreSQL/PHP interface needs any improvements.\n> \n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n> \n> If not, would someone submit some patches to the PHP folks. They want\n> us to work well with PHP. They are basically encouraging us to improve\n> it in any way we can.\n\nIf I can put my 0.02 Euros, I think there are two issues that deserve to\nbe fixed, both are relative to persistent connections.\n\nThe first is that the transaction state is (obviously) kept between\nconnections. This is not a problem in itself, but there are some\nsituations where the transaction block is not closed with COMMIT or\nABORT with the obvious consequencies when the connection is reused (and\nwith the locks not released). As a workaround I registered a shutdown\nfuncion that sends an ABORT command every time a script finishes his\nprocessing but this results in a \"Not in trasaction block\" error most of\nthe time (harmless but pretty annoying).\nIMHO there should be some sort of lightweight reset that puts the\nconnection in its pristine state without the need to fork a backend\nagaing and reopen the TCP connection.\n\nThe second is that if PostgreSQL is restarted, PHP doesn't detect that\nand an error message is seen for every persistent connection. IMHO PHP\nshould detect a closed connection and clear the connections pool.\n\nBye!\n\n-- \n Daniele\n\n-------------------------------------------------------------------------------\n Daniele Orlandi - Utility Line Italia - http://www.orlandi.com\n Via Mezzera 29/A - 20030 - Seveso (MI) - Italy\n-------------------------------------------------------------------------------\n", "msg_date": "Wed, 27 Dec 2000 14:39:14 +0000", "msg_from": "Daniele Orlandi <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "I'd say the most important thing would be to get it upto speed with 7.1.\nMake sure PHP supports large objects and the TOAST properly.\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\nhttp://www.rutgersinsurance.com\n----- Original Message -----\nFrom: \"Bruce Momjian\" <[email protected]>\nTo: \"PostgreSQL-development\" <[email protected]>;\n\"PostgreSQL-interfaces\" <[email protected]>\nSent: Wednesday, December 27, 2000 12:56 AM\nSubject: [INTERFACES] PHP and PostgreSQL\n\n\n> I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> the PostgreSQL/PHP interface needs any improvements.\n>\n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n>\n> If not, would someone submit some patches to the PHP folks. They want\n> us to work well with PHP. They are basically encouraging us to improve\n> it in any way we can.\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n\n", "msg_date": "Wed, 27 Dec 2000 11:24:26 -0500", "msg_from": "\"Adam Lang\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL " }, { "msg_contents": "Adam Lang wrote:\n> \n> I'd say the most important thing would be to get it upto speed with 7.1.\n> Make sure PHP supports large objects and the TOAST properly.\n\nWhat would be the problem there? As I understand TOAST, the application shouldn't take any\nnotice of it's inner workings whatsoever . . . also, I've used TOAST with PHP (i.e. I've\nmanaged to insert more than 8 k into a row with the rowsize set to 8 k), without any\ntrouble. I don't know about large objects but as I heard, the interface didn't change?!\n\n- Frank\n", "msg_date": "Wed, 27 Dec 2000 18:03:39 +0100", "msg_from": "Frank Joerdens <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "I have been searching without luck on a howto on how to create locales for \npostgres. Could somebody please point me in the general direction? Thanks.\n\n:wq\nTim Uckun\nDue Diligence Inc. http://www.diligence.com/ Americas Background \nInvestigation Expert.\nIf your company isn't doing background checks, maybe you haven't considered \nthe risks of a bad hire.\n\n", "msg_date": "Wed, 27 Dec 2000 10:18:01 -0700", "msg_from": "Tim Uckun <[email protected]>", "msg_from_op": false, "msg_subject": "Creating locales." }, { "msg_contents": "I thought I saw mention on the interfaces list that the ODBC driver needed\nto be modified to properly use the large objects.\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\nhttp://www.rutgersinsurance.com\n----- Original Message -----\nFrom: \"Frank Joerdens\" <[email protected]>\nTo: \"Adam Lang\" <[email protected]>\nCc: \"Bruce Momjian\" <[email protected]>; \"PostgreSQL-development\"\n<[email protected]>; \"PostgreSQL-interfaces\"\n<[email protected]>\nSent: Wednesday, December 27, 2000 12:03 PM\nSubject: Re: [INTERFACES] PHP and PostgreSQL\n\n\n> Adam Lang wrote:\n> >\n> > I'd say the most important thing would be to get it upto speed with 7.1.\n> > Make sure PHP supports large objects and the TOAST properly.\n>\n> What would be the problem there? As I understand TOAST, the application\nshouldn't take any\n> notice of it's inner workings whatsoever . . . also, I've used TOAST with\nPHP (i.e. I've\n> managed to insert more than 8 k into a row with the rowsize set to 8 k),\nwithout any\n> trouble. I don't know about large objects but as I heard, the interface\ndidn't change?!\n>\n> - Frank\n\n", "msg_date": "Wed, 27 Dec 2000 13:46:44 -0500", "msg_from": "\"Adam Lang\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "I agree, but I figured that if the 7.1 upgrade breaks some of the large\nobject interface in the ODBC code, it may possibly break some of the\ninterface in the php-psql code. That's why I said it should probably be\nchecked. ;)\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\nhttp://www.rutgersinsurance.com\n----- Original Message -----\nFrom: \"Frank Joerdens\" <[email protected]>\nTo: \"Adam Lang\" <[email protected]>\nCc: \"PostgreSQL-development\" <[email protected]>;\n\"PostgreSQL-interfaces\" <[email protected]>\nSent: Wednesday, December 27, 2000 5:22 PM\nSubject: Re: [INTERFACES] PHP and PostgreSQL\n\n\n> Adam Lang wrote:\n> >\n> > I thought I saw mention on the interfaces list that the ODBC driver\nneeded\n> > to be modified to properly use the large objects.\n>\n> You normally wouldn't use ODBC to access Postgres from PHP but rather\n> the Postgres-specific interface. You _can_ use ODBC as well but normally\n> that doesn't provide any advantage. If your concern is database\n> abstraction, there are several libraries for PHP that provide it in\n> varying degrees, ODBC would be just one, possibly not optimal, solution\n> for the problem. Generally, from following the PHP lists and looking at\n> columns on, for instance, phpbuilder.com, PHP folks don't seem to\n> concerned with the abstraction issue, as far as I can make out anyway\n> (just my impression). Rasmus' question, IMHO, was about the PHP/Postgres\n> interface, not about ODBC.\n>\n> - Frank\n\n", "msg_date": "Wed, 27 Dec 2000 16:30:46 -0500", "msg_from": "\"Adam Lang\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "Adam Lang wrote:\n> \n> I thought I saw mention on the interfaces list that the ODBC driver needed\n> to be modified to properly use the large objects.\n\nYou normally wouldn't use ODBC to access Postgres from PHP but rather\nthe Postgres-specific interface. You _can_ use ODBC as well but normally\nthat doesn't provide any advantage. If your concern is database\nabstraction, there are several libraries for PHP that provide it in\nvarying degrees, ODBC would be just one, possibly not optimal, solution\nfor the problem. Generally, from following the PHP lists and looking at\ncolumns on, for instance, phpbuilder.com, PHP folks don't seem to\nconcerned with the abstraction issue, as far as I can make out anyway\n(just my impression). Rasmus' question, IMHO, was about the PHP/Postgres\ninterface, not about ODBC.\n\n- Frank\n", "msg_date": "Wed, 27 Dec 2000 23:22:24 +0100", "msg_from": "Frank Joerdens <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "Adam Lang wrote:\n> \n> I thought I saw mention on the interfaces list that the ODBC driver needed\n> to be modified to properly use the large objects.\n\nYou normally wouldn't use ODBC to access Postgres from PHP but rather\nthe Postgres-specific interface. You _can_ use ODBC as well but normally\nthat doesn't provide any advantage. If your concern is database\nabstraction, there are several libraries for PHP that provide it in\nvarying degrees, ODBC would be just one, possibly not optimal, solution\nfor the problem. Generally, from following the PHP lists and looking at\ncolumns on, for instance, phpbuilder.com, PHP folks don't seem to\nconcerned with the abstraction issue, as far as I can make out anyway\n(just my impression).\n\n- Frank\n", "msg_date": "Wed, 27 Dec 2000 23:22:45 +0100", "msg_from": "Frank Joerdens <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "On Wed, Dec 27, 2000 at 12:56:26AM -0500, Bruce Momjian wrote:\n> I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> the PostgreSQL/PHP interface needs any improvements.\n> \n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n> \n> If not, would someone submit some patches to the PHP folks. They want\n> us to work well with PHP. They are basically encouraging us to improve\n> it in any way we can.\n\n\tI use PHP and Postgres together quite a bit, and find the APIs\ncomplete enough for most things. However, just last week I implemented\n\npg_lolseek($loid, $offset $whence)\nand\npg_lotell($loid)\n\nFor some stuff that we are working on. They are pretty straightforward,\nand I can package them up and submit them if someone wants.\n\n-- \nAdam Haberlach |A cat spends her life conflicted between a\[email protected] |deep, passionate, and profound desire for\nhttp://www.newsnipple.com |fish and an equally deep, passionate, and\n'88 EX500 |profound desire to avoid getting wet.\n", "msg_date": "Wed, 27 Dec 2000 17:58:35 -0800", "msg_from": "Adam Haberlach <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PHP and PostgreSQL" }, { "msg_contents": "You do not need create locale specially for postgres. Postgres uses\nsystem locale. You could look at /usr/share/locale \n\n\tregards,\n\t\tOleg\nOn Wed, 27 Dec 2000, Tim Uckun wrote:\n\n> Date: Wed, 27 Dec 2000 10:18:01 -0700\n> From: Tim Uckun <[email protected]>\n> To: [email protected]\n> Subject: [HACKERS] Creating locales.\n> \n> I have been searching without luck on a howto on how to create locales for \n> postgres. Could somebody please point me in the general direction? Thanks.\n> \n> :wq\n> Tim Uckun\n> Due Diligence Inc. http://www.diligence.com/ Americas Background \n> Investigation Expert.\n> If your company isn't doing background checks, maybe you haven't considered \n> the risks of a bad hire.\n> \n\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: [email protected], http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Sat, 30 Dec 2000 12:34:19 +0300 (GMT)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Creating locales." }, { "msg_contents": "Tim Uckun wrote:\n> \n> I have been searching without luck on a howto on how to create locales for\n> postgres. Could somebody please point me in the general direction? Thanks.\n> \n\nPostgreSQL uses system locales (even to the extent that I was unable to\nget \nit use any other locale by setting LC_* variables in\n/etc/init.d/rc.d/postgres)\n\nI did have to modify my locale (et_EE) to _not_ group \\xff (&yumlaut;)\nwith \nother y-s but to sort it after all other \"standard\" chars to work\nproperly \nwith LIKE optimisations. Perhaps the right approach would be to leave\n\\xff \nalone and to choose some character in the 128-159 range for \nbigger-than-any-other-char but as \\xff is not used in estonian i was\nable \nto do away with just moving it.\n\nOTOH, it may be a good idea to start a repository for locales that are \nspecifilally modified to work well with postgres. \n\nWe may want to move the locale stuff inside the backend someday as\nmandated \nby SQL standards and then some work would be already done.\n\n--------\nHannu\n", "msg_date": "Sat, 30 Dec 2000 13:43:30 +0200", "msg_from": "Hannu Krosing <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Creating locales." }, { "msg_contents": "Yes, please send them over to the PHP folks. Thanks.\n\n> On Wed, Dec 27, 2000 at 12:56:26AM -0500, Bruce Momjian wrote:\n> > I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> > the PostgreSQL/PHP interface needs any improvements.\n> > \n> > Is the current PostgreSQL interface module in PHP adequate? Does it\n> > support all the current libpq features?\n> > \n> > If not, would someone submit some patches to the PHP folks. They want\n> > us to work well with PHP. They are basically encouraging us to improve\n> > it in any way we can.\n> \n> \tI use PHP and Postgres together quite a bit, and find the APIs\n> complete enough for most things. However, just last week I implemented\n> \n> pg_lolseek($loid, $offset $whence)\n> and\n> pg_lotell($loid)\n> \n> For some stuff that we are working on. They are pretty straightforward,\n> and I can package them up and submit them if someone wants.\n> \n> -- \n> Adam Haberlach |A cat spends her life conflicted between a\n> [email protected] |deep, passionate, and profound desire for\n> http://www.newsnipple.com |fish and an equally deep, passionate, and\n> '88 EX500 |profound desire to avoid getting wet.\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 1 Jan 2001 22:56:52 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "\nWould to send this over to the PHP folks for inclusion? Thanks.\n\n> On Wed, Dec 27, 2000 at 12:56:26AM -0500, Bruce Momjian wrote:\n> > I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> > the PostgreSQL/PHP interface needs any improvements.\n> > \n> > Is the current PostgreSQL interface module in PHP adequate? Does it\n> > support all the current libpq features?\n> > \n> > If not, would someone submit some patches to the PHP folks. They want\n> > us to work well with PHP. They are basically encouraging us to improve\n> > it in any way we can.\n> \n> \tI use PHP and Postgres together quite a bit, and find the APIs\n> complete enough for most things. However, just last week I implemented\n> \n> pg_lolseek($loid, $offset $whence)\n> and\n> pg_lotell($loid)\n> \n> For some stuff that we are working on. They are pretty straightforward,\n> and I can package them up and submit them if someone wants.\n> \n> -- \n> Adam Haberlach |A cat spends her life conflicted between a\n> [email protected] |deep, passionate, and profound desire for\n> http://www.newsnipple.com |fish and an equally deep, passionate, and\n> '88 EX500 |profound desire to avoid getting wet.\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 22 Jan 2001 23:55:56 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL" }, { "msg_contents": "On Mon, Jan 22, 2001 at 11:55:56PM -0500, Bruce Momjian wrote:\n> > On Wed, Dec 27, 2000 at 12:56:26AM -0500, Bruce Momjian wrote:\n> > > I have been asked by the major PHP developer Rasmus Lerdorf to see if\n> > > the PostgreSQL/PHP interface needs any improvements.\n> > > \n> > > Is the current PostgreSQL interface module in PHP adequate? Does it\n> > > support all the current libpq features?\n> > > \n> > > If not, would someone submit some patches to the PHP folks. They want\n> > > us to work well with PHP. They are basically encouraging us to improve\n> > > it in any way we can.\n> > \n> > \tI use PHP and Postgres together quite a bit, and find the APIs\n> > complete enough for most things. However, just last week I implemented\n> > \n> > pg_lolseek($loid, $offset $whence)\n> > and\n> > pg_lotell($loid)\n> > \n> > For some stuff that we are working on. They are pretty straightforward,\n> > and I can package them up and submit them if someone wants.\n> > \n\n> Would to send this over to the PHP folks for inclusion? Thanks.\n\n\tI sent them patches against the at-the-time up-to-date CVS tree back\nwhen this first came up, they said that they failed, so I sent them another\nset, and have not heard back from them. It doesn't seem to show up in the\ncvs logs.\n\n\tI'll bug someone again and see if I can find out what happened. I mean,\nthey only have 240 people with write access to the cvs tree...\n\n-- \nAdam Haberlach |A cat spends her life conflicted between a\[email protected] |deep, passionate, and profound desire for\nhttp://www.newsnipple.com |fish and an equally deep, passionate, and\n'88 EX500 |profound desire to avoid getting wet.\n", "msg_date": "Tue, 23 Jan 2001 10:09:08 -0800", "msg_from": "Adam Haberlach <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL" } ]
[ { "msg_contents": "\n> > You can remove the randomness by setting the Seed \n> configuration value,\n> \n> True, but that's not the default setup.\n\nI would set Seed per default. Even worse than a bad query path\nis an unpredictable query path. I see no argument, that a random Seed\nwould buy us anything.\n\nAndreas\n", "msg_date": "Wed, 27 Dec 2000 09:57:39 +0100", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "AW: GEQO status? " }, { "msg_contents": "\n> I would set Seed per default. Even worse than a bad query path\n> is an unpredictable query path. I see no argument, that a random Seed\n> would buy us anything.\n\nThis kindof bugs me -- if you leave it stuck at a preset value, it makes it\npossible to never delve into parts of solution space that have more optimal\nsolutions than the default seed will ever find. Surely a random seed would\nmake the solution better on average over a large number of queries.\n\nOn the other hand, if the system as a whole is working well, it should not\nmatter what the seed is.\n\n\n- Andrew\n\n", "msg_date": "Wed, 27 Dec 2000 22:59:08 +1100", "msg_from": "\"Andrew Snow\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: GEQO status? " } ]
[ { "msg_contents": "\n> For 7.1, I propose that we only allow creation of child tables to the\n> owner of the parent table.\n\nOr dba. Sounds reasonable, maybe even sufficient to me.\n\n(Informix has a separate right (called under) to grant inheritability to others\n(just to support your separate right point).)\n\nAndreas\n", "msg_date": "Wed, 27 Dec 2000 10:38:57 +0100", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "AW: Inheritance is a security loophole!" } ]
[ { "msg_contents": "\nThere is something busted in the snapshots, that leads to a wrong\nconfigure file. The file is equal to configure.in (not autoconf'ed).\nFirst noticed shortly before Christmas.\n\nAndreas\n", "msg_date": "Wed, 27 Dec 2000 11:03:30 +0100", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "configure in snapshout == configure.in " }, { "msg_contents": "Zeugswetter Andreas SB <[email protected]> writes:\n> There is something busted in the snapshots, that leads to a wrong\n> configure file. The file is equal to configure.in (not autoconf'ed).\n> First noticed shortly before Christmas.\n\nLast week I tried to do a \"make clean\" in some subdirectory that's\nnot cleaned by a toplevel clean -- I think it was doc/src/sgml, but it\nmight have been a contrib dir -- and make went absolutely nuts. When\nthe dust settled I had a toplevel configure file that was identical to\nconfigure.in, just like you describe, and I couldn't do anything because\nmake kept trying to re-execute configure before it would do anything else.\n\nAfter I re-fetched a valid copy of configure, I couldn't replicate the\nbehavior, so I thought maybe I'd mistyped. But if it's happening in the\nsnapshot build too, then something is rotten in the makefiles.\n\nI've seen some other bizarre behavior from make lately, like failing to\nrebuild utils/SUBSYS.o when some of the utils subdirectories contained\nnewer SUBSYS.o files. Again, hard to replicate, but I've seen it.\nI'm starting to wonder if our spiffy new makefiles are stressing any\nbuggy areas of gmake...\n\nFWIW, I'm running GNU Make version 3.79.1, which is the latest release\nlast I checked.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 27 Dec 2000 10:29:31 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: configure in snapshout == configure.in " }, { "msg_contents": "Tom Lane writes:\n\n> Last week I tried to do a \"make clean\" in some subdirectory that's\n> not cleaned by a toplevel clean -- I think it was doc/src/sgml, but it\n> might have been a contrib dir -- and make went absolutely nuts. When\n> the dust settled I had a toplevel configure file that was identical to\n> configure.in, just like you describe, and I couldn't do anything because\n> make kept trying to re-execute configure before it would do anything else.\n\nIt's in contrib/rserv/Makefile\n\n%: %.in\n sed -e \"s:_OBJWD_:$(libdir)/contrib:g\" \\\n -e \"s:_DLSUFFIX_:$(DLSUFFIX):g\" \\\n -e \"s:@SQLDIR@:$(libdir)/contrib:g\" \\\n -e \"s:@BINDIR@:$(bindir):g\" \\\n -e \"s:@LIBDIR@:$(libdir)/contrib:g\" < $< > $@\n chmod 775 $@\n\nwhich also triggers in src/Makefile.global\n\n$(top_builddir)/config.status: $(top_srcdir)/configure\n cd $(top_builddir) && ./config.status --recheck\n\nwhen configure.in is older than configure, which is not all that unlikely.\n\nI guess the rule in rserv's makefile needs to be qualified better.\n\n> I've seen some other bizarre behavior from make lately, like failing to\n> rebuild utils/SUBSYS.o when some of the utils subdirectories contained\n> newer SUBSYS.o files. Again, hard to replicate, but I've seen it.\n> I'm starting to wonder if our spiffy new makefiles are stressing any\n> buggy areas of gmake...\n\nI'm aware of that problem. It's pretty easy to replicate actually, if you\ntouch a file two or more directories deep under src/backend you will get\nan incomplete build. I'm thinking that we should convert the\nsubdirectories' rules for building their subdirectories back to a straigh\nfor-loop and not the cuteness that the backend/Makefile tries to do to get\nparallel make's working efficiently. Eventually the solution would be to\nput all the rules in one makefile and not rely on recursion at all, but\nthat's for another day's debate.\n\n> FWIW, I'm running GNU Make version 3.79.1, which is the latest release\n> last I checked.\n\n... but not necessarily the best. :-(\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Wed, 27 Dec 2000 19:44:38 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: configure in snapshout == configure.in " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> when configure.in is older than configure, which is not all that unlikely.\n\nNewer than, I think you meant. Yes, that's quite possible just after a\n\"cvs update\".\n\n> I guess the rule in rserv's makefile needs to be qualified better.\n\nAgreed.\n\n>> FWIW, I'm running GNU Make version 3.79.1, which is the latest release\n>> last I checked.\n\n> ... but not necessarily the best. :-(\n\nWhat do you recommend? IIRC, I updated to this version because it fixed\na bug that was biting me in gmake 3.78.1.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 27 Dec 2000 13:47:14 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: configure in snapshout == configure.in " }, { "msg_contents": "Tom Lane writes:\n\n> >> FWIW, I'm running GNU Make version 3.79.1, which is the latest release\n> >> last I checked.\n>\n> > ... but not necessarily the best. :-(\n>\n> What do you recommend? IIRC, I updated to this version because it fixed\n> a bug that was biting me in gmake 3.78.1.\n\n3.76.1 works best for me. 3.79.1 is okay, especially since it has a\nnumber of nice new features. Everything in between is sheer folly.\n\nThe most annoying thing is that rule chains of the form\n\nall: foo.so\n\n%.so: %.o\n\t$(LD) ...\n\n# implicit %.o: %.c here\n\nbroke after 3.76.1 and have not been repaired. (I'm not sure exactly what\nthe cause is as I have not been able to reproduce this with a dummy\nmakefile, but it probably has something to do with the fact that two\nimplicit rules are chained, with some other things interacting.)\n\nWhen you first run 'make all' it will build foo.o and foo.so, then delete\nfoo.o because it's intermediate. That's okay. Then you run 'make all'\nagain (or perhaps via 'make install'), it will notice the missing foo.o\nfile and rebuild it and foo.so. That's stupid.\n\nNow I figured that I could avoid the deleting of the intermediate file\naltogether by mentioning the target .SECONDARY:, but that will break in\n3.78 if the %.c file is itself build from somewhere. In that case it will\njust bark with \"not rule to make foo.c\" or so.\n\nYou can see me cursing about this in the cvs logs, and this experience\nmade me install all the gmake versions I could find and try then regularly\nwhen attempting something cute. (So all recent gmake versions *should*\nwork with PostgreSQL, but I won't guarantee the corner cases.)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Thu, 28 Dec 2000 18:57:26 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: configure in snapshout == configure.in " } ]
[ { "msg_contents": "\n\n> I would set Seed per default. Even worse than a bad query path\n> is an unpredictable query path. I see no argument, that a random Seed\n> would buy us anything.\n\nThis kindof bugs me -- if you leave it stuck at a preset value, it makes it\npossible to never delve into parts of solution space that have more optimal\nsolutions than the default seed will ever find. Surely a random seed would\nmake the solution better on average over a large number of queries.\n\nOn the other hand, if the system as a whole is working well, it should not\nmatter what the seed is.\n\n\n- Andrew\n\n\n", "msg_date": "Thu, 28 Dec 2000 00:49:44 +1100", "msg_from": "\"Andrew Snow\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: GEQO status? " } ]
[ { "msg_contents": "\n\tI have been asked by the major PHP developer Rasmus Lerdorf to see\nif\n\tthe PostgreSQL/PHP interface needs any improvements.\n\n\tIs the current PostgreSQL interface module in PHP adequate? Does it\n\tsupport all the current libpq features?\n\n\nThe only problem we have run into (and I have heard of others having this\nproblem also) is with persistent connections. I have seen discussion on\npersistent connection problems but I'm not sure the problem was ever\nresolved. The problem we have seen is that when using persistent\nconnections the web server doesn't seen to reuse the connections or somthing\nto that effect. The result being that we eventually use up our postgres\nlimit of 48 connections and nothing can connect to postgre anymore. It is\npossible that this is a configuration problem that we haven't sufficiently\ninvestigated, but I meniton it because I have heard other talk of this.\nAnyone have more information?\n\nMatthew\n\n", "msg_date": "Wed, 27 Dec 2000 07:54:59 -0600", "msg_from": "Matthew <[email protected]>", "msg_from_op": true, "msg_subject": "RE: [HACKERS] PHP and PostgreSQL " }, { "msg_contents": "Yeah, this is not a \"bug\", but a feature. :)\n\nIn a nutshell, the persistent connection number is not how many persistent\nconnections there are available to the webserver. It is the number\navailable per webserver PROCESS.\n\nSo, if you have 5 persistent connections, but 10 webserver processes open,\nyou have 50 persistent connections open.\n\nAdam Lang\nSystems Engineer\nRutgers Casualty Insurance Company\nhttp://www.rutgersinsurance.com\n----- Original Message -----\nFrom: \"Matthew\" <[email protected]>\nTo: \"'Bruce Momjian'\" <[email protected]>; \"PostgreSQL-development\"\n<[email protected]>; \"PostgreSQL-interfaces\"\n<[email protected]>\nSent: Wednesday, December 27, 2000 8:54 AM\nSubject: [INTERFACES] RE: [HACKERS] PHP and PostgreSQL\n\n\n>\n> I have been asked by the major PHP developer Rasmus Lerdorf to see\n> if\n> the PostgreSQL/PHP interface needs any improvements.\n>\n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n>\n>\n> The only problem we have run into (and I have heard of others having this\n> problem also) is with persistent connections. I have seen discussion on\n> persistent connection problems but I'm not sure the problem was ever\n> resolved. The problem we have seen is that when using persistent\n> connections the web server doesn't seen to reuse the connections or\nsomthing\n> to that effect. The result being that we eventually use up our postgres\n> limit of 48 connections and nothing can connect to postgre anymore. It is\n> possible that this is a configuration problem that we haven't sufficiently\n> investigated, but I meniton it because I have heard other talk of this.\n> Anyone have more information?\n>\n> Matthew\n\n", "msg_date": "Wed, 27 Dec 2000 09:14:40 -0500", "msg_from": "\"Adam Lang\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RE: [HACKERS] PHP and PostgreSQL " }, { "msg_contents": "> The only problem we have run into (and I have heard of others having this\n> problem also) is with persistent connections. I have seen discussion on\n> persistent connection problems but I'm not sure the problem was ever\n> resolved. The problem we have seen is that when using persistent\n> connections the web server doesn't seen to reuse the connections or\nsomthing\n> to that effect. The result being that we eventually use up our postgres\n> limit of 48 connections and nothing can connect to postgre anymore. It is\n> possible that this is a configuration problem that we haven't sufficiently\n> investigated, but I meniton it because I have heard other talk of this.\n> Anyone have more information?\n\nThe *real* problem with persistent connections is:\n\nScript1: BEGIN;\nScript1: UPDATE table set row = 'things';\nScript2: Insert into table (id) values ('bad data');\nScript1: COMMIT;\n\nSince script2 managed to do a BAD insert in the middle of script1's\ntransaction, the transaction in script1 fails. Obvious solution? Don't do\nconnection sharing when a transaction is enabled. The whole persistent\nconnection thing is only valid for mysql as it's the only thing that doesn't\nreally support transactions (and even thats partially changed).\n\nThey need to look for stuff going through (keywords like BEGIN) and 'lock'\nthat connection to the single entity that opened it.\n\nIt's much easier to write your own. I wrote a few functions like:\n\nget_connection('DB PARMS');\nbegin_transaction();\n\ncommit_transaction();\nclose_connection();\n\nAll of this is done in a class which has knowledge of all connections that a\nscript is currently using. Beginning a transaction locks down the\nconnection from use by any other handler, they're all bumped to another one.\nProblem? It requires atleast 1 connection per page, but since they're\nactually dropped at close it's not so bad.\n\n", "msg_date": "Wed, 27 Dec 2000 10:09:59 -0500", "msg_from": "\"Rod Taylor\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL " }, { "msg_contents": "Matthew wrote:\n> \n> I have been asked by the major PHP developer Rasmus Lerdorf to see\n> if\n> the PostgreSQL/PHP interface needs any improvements.\n> \n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n> \n> The only problem we have run into (and I have heard of others having this\n> problem also) is with persistent connections. I have seen discussion on\n> persistent connection problems but I'm not sure the problem was ever\n> resolved. The problem we have seen is that when using persistent\n> connections the web server doesn't seen to reuse the connections or somthing\n> to that effect. The result being that we eventually use up our postgres\n> limit of 48 connections and nothing can connect to postgre anymore. It is\n> possible that this is a configuration problem that we haven't sufficiently\n> investigated, but I meniton it because I have heard other talk of this.\n> Anyone have more information?\n> \nI have not seen this, though now that you mention it, I will be on the\nlookout.\n\nWe have a load balenced system with [n] apache servers, each with a\nlocal Postgres database that receives updates from a master.\n\nOn the local web servers, we have done a good deal of load testing. Our\napache instances are pretty persistent, i.e. we do not have a time out\nor maximum number of transactions. I never see more more postgres\ninstances than I have apache instances. We are using pg_pConnect to\nconnect to the postgres system.\n\nThe behavior may differ if the database is on a different system.\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Wed, 27 Dec 2000 10:15:42 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "Matthew wrote:\n> \n> I have been asked by the major PHP developer Rasmus Lerdorf to see\n> if\n> the PostgreSQL/PHP interface needs any improvements.\n> \n> Is the current PostgreSQL interface module in PHP adequate? Does it\n> support all the current libpq features?\n> \n> The only problem we have run into (and I have heard of others having this\n> problem also) is with persistent connections. I have seen discussion on\n> persistent connection problems but I'm not sure the problem was ever\n> resolved. The problem we have seen is that when using persistent\n> connections the web server doesn't seen to reuse the connections or somthing\n> to that effect. The result being that we eventually use up our postgres\n> limit of 48 connections and nothing can connect to postgre anymore. It is\n> possible that this is a configuration problem that we haven't sufficiently\n> investigated, but I meniton it because I have heard other talk of this.\n> Anyone have more information?\n\nPersistent connections behave exactly as advertised. Each apache process\nsets up and maintains persistent connections as needed. The problem is\nthat for a typical web server, there are so many subprocesses that\npersistent connections are probably consume more resources than they\nsave, unless they are combined with connection pooling across ALL the\napache processes.\n\nImplementation of connection pooling is by far the most serious\nshortcoming of the current implementation, IMHO. \n\nI would dearly love to see this addressed as our postgresql database\nsees connections from about 300 servers for 6 databases. Since our\npostgresql server cannot support 1800 simultaneous active backends,\npersistent connections are useless without pooling. So instead we\ninitiate 10 or more backends every second for generally very simple\nqueries. Most of the queries are pretty simple, so I would not be at all\nsurprised if we sent more system resources opening connections than we\ndo actually answering queries\n\n-- \nKarl DeBisschop [email protected]\nLearning Network/Information Please http://www.infoplease.com\nNetsaint Plugin Developer [email protected]\n", "msg_date": "Wed, 27 Dec 2000 11:45:04 -0500", "msg_from": "Karl DeBisschop <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] PHP and PostgreSQL" }, { "msg_contents": "This is interesting. I always wondered how the persistent connection\nstuff handled this, and not I see that it doesn't.\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> > The only problem we have run into (and I have heard of others having this\n> > problem also) is with persistent connections. I have seen discussion on\n> > persistent connection problems but I'm not sure the problem was ever\n> > resolved. The problem we have seen is that when using persistent\n> > connections the web server doesn't seen to reuse the connections or\n> somthing\n> > to that effect. The result being that we eventually use up our postgres\n> > limit of 48 connections and nothing can connect to postgre anymore. It is\n> > possible that this is a configuration problem that we haven't sufficiently\n> > investigated, but I meniton it because I have heard other talk of this.\n> > Anyone have more information?\n> \n> The *real* problem with persistent connections is:\n> \n> Script1: BEGIN;\n> Script1: UPDATE table set row = 'things';\n> Script2: Insert into table (id) values ('bad data');\n> Script1: COMMIT;\n> \n> Since script2 managed to do a BAD insert in the middle of script1's\n> transaction, the transaction in script1 fails. Obvious solution? Don't do\n> connection sharing when a transaction is enabled. The whole persistent\n> connection thing is only valid for mysql as it's the only thing that doesn't\n> really support transactions (and even thats partially changed).\n> \n> They need to look for stuff going through (keywords like BEGIN) and 'lock'\n> that connection to the single entity that opened it.\n> \n> It's much easier to write your own. I wrote a few functions like:\n> \n> get_connection('DB PARMS');\n> begin_transaction();\n> \n> commit_transaction();\n> close_connection();\n> \n> All of this is done in a class which has knowledge of all connections that a\n> script is currently using. Beginning a transaction locks down the\n> connection from use by any other handler, they're all bumped to another one.\n> Problem? It requires atleast 1 connection per page, but since they're\n> actually dropped at close it's not so bad.\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 1 Jan 2001 22:57:38 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "At my work we were happily cruising along using PHP/Postgres persistent\nconnections. This was all happy until we installed Phorum. Phorum has its\nown database abstraction layer, quite separate to all our own database\nclasses.\n\nNow what happens is if someone browses the phorums for a little while, and\nthen switches to pages that use our own db classes, you get random slowdowns\n(ie. a select occurs, and then times out after 2 mins or so).\n\nIf you use psql, and perform the select you get a 'shared memory corruption'\nand 'timed out waiting for lock' errors.\n\nOur basic theory is that somehow locks aren't being properly released by\nphorum, or the connection pooling is stuffed - although Phorum doesn't use\nthe LOCK or BEGIN/COMMIT commands. Actually, we did notice that Phorum\nissues a COMMIT whenever it closes a connection, even tho it never issues a\nBEGIN. If we avoid running any Phorum scripts - no problems occur.\n\nIn an attempt to fix the problem, we configured phplib and Phorum to use\nnon-persistent postgresql connections. This worked fine, until now we have\na particular script, no different to the rest, that cannot acquire a\nconnection - it just gets an invalid resource handle. We switched phplib\nback to persistent connections, and it works fine again - nothing else was\nchanged!\n\nSo my advice to the PHP people is to just fix Postgres connection handling!\n\nChris\n\n> -----Original Message-----\n> From: [email protected]\n> [mailto:[email protected]]On Behalf Of Bruce Momjian\n> Sent: Tuesday, January 02, 2001 11:58 AM\n> To: Rod Taylor\n> Cc: [email protected]\n> Subject: Re: [HACKERS] PHP and PostgreSQL\n>\n>\n> This is interesting. I always wondered how the persistent connection\n> stuff handled this, and not I see that it doesn't.\n>\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > > The only problem we have run into (and I have heard of others\n> having this\n> > > problem also) is with persistent connections. I have seen\n> discussion on\n> > > persistent connection problems but I'm not sure the problem was ever\n> > > resolved. The problem we have seen is that when using persistent\n> > > connections the web server doesn't seen to reuse the connections or\n> > somthing\n> > > to that effect. The result being that we eventually use up\n> our postgres\n> > > limit of 48 connections and nothing can connect to postgre\n> anymore. It is\n> > > possible that this is a configuration problem that we haven't\n> sufficiently\n> > > investigated, but I meniton it because I have heard other\n> talk of this.\n> > > Anyone have more information?\n> >\n> > The *real* problem with persistent connections is:\n> >\n> > Script1: BEGIN;\n> > Script1: UPDATE table set row = 'things';\n> > Script2: Insert into table (id) values ('bad data');\n> > Script1: COMMIT;\n> >\n> > Since script2 managed to do a BAD insert in the middle of script1's\n> > transaction, the transaction in script1 fails. Obvious\n> solution? Don't do\n> > connection sharing when a transaction is enabled. The whole persistent\n> > connection thing is only valid for mysql as it's the only thing\n> that doesn't\n> > really support transactions (and even thats partially changed).\n> >\n> > They need to look for stuff going through (keywords like BEGIN)\n> and 'lock'\n> > that connection to the single entity that opened it.\n> >\n> > It's much easier to write your own. I wrote a few functions like:\n> >\n> > get_connection('DB PARMS');\n> > begin_transaction();\n> >\n> > commit_transaction();\n> > close_connection();\n> >\n> > All of this is done in a class which has knowledge of all\n> connections that a\n> > script is currently using. Beginning a transaction locks down the\n> > connection from use by any other handler, they're all bumped to\n> another one.\n> > Problem? It requires atleast 1 connection per page, but since they're\n> > actually dropped at close it's not so bad.\n> >\n> >\n>\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n>\n\n", "msg_date": "Tue, 2 Jan 2001 11:59:45 +0800", "msg_from": "\"Christopher Kings-Lynne\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: PHP and PostgreSQL" }, { "msg_contents": "It was obviously designed with MySQL's \"Nobody needs transactions for\nwebwork\" type of situation in mind.\n\n> This is interesting. I always wondered how the persistent connection\n> stuff handled this, and not I see that it doesn't.\n>\n> [ Charset ISO-8859-1 unsupported, converting... ]\n> > > The only problem we have run into (and I have heard of others having\nthis\n> > > problem also) is with persistent connections. I have seen discussion\non\n> > > persistent connection problems but I'm not sure the problem was ever\n> > > resolved. The problem we have seen is that when using persistent\n> > > connections the web server doesn't seen to reuse the connections or\n> > somthing\n> > > to that effect. The result being that we eventually use up our\npostgres\n> > > limit of 48 connections and nothing can connect to postgre anymore.\nIt is\n> > > possible that this is a configuration problem that we haven't\nsufficiently\n> > > investigated, but I meniton it because I have heard other talk of\nthis.\n> > > Anyone have more information?\n> >\n> > The *real* problem with persistent connections is:\n> >\n> > Script1: BEGIN;\n> > Script1: UPDATE table set row = 'things';\n> > Script2: Insert into table (id) values ('bad data');\n> > Script1: COMMIT;\n> >\n> > Since script2 managed to do a BAD insert in the middle of script1's\n> > transaction, the transaction in script1 fails. Obvious solution? Don't\ndo\n> > connection sharing when a transaction is enabled. The whole persistent\n> > connection thing is only valid for mysql as it's the only thing that\ndoesn't\n> > really support transactions (and even thats partially changed).\n> >\n> > They need to look for stuff going through (keywords like BEGIN) and\n'lock'\n> > that connection to the single entity that opened it.\n> >\n> > It's much easier to write your own. I wrote a few functions like:\n> >\n> > get_connection('DB PARMS');\n> > begin_transaction();\n> >\n> > commit_transaction();\n> > close_connection();\n> >\n> > All of this is done in a class which has knowledge of all connections\nthat a\n> > script is currently using. Beginning a transaction locks down the\n> > connection from use by any other handler, they're all bumped to another\none.\n> > Problem? It requires atleast 1 connection per page, but since they're\n> > actually dropped at close it's not so bad.\n> >\n> >\n>\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n>\n\n", "msg_date": "Mon, 1 Jan 2001 23:08:16 -0500", "msg_from": "\"Rod Taylor\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL" }, { "msg_contents": "\"Christopher Kings-Lynne\" <[email protected]> writes:\n> Now what happens is if someone browses the phorums for a little while, and\n> then switches to pages that use our own db classes, you get random slowdowns\n> (ie. a select occurs, and then times out after 2 mins or so).\n> If you use psql, and perform the select you get a 'shared memory corruption'\n> and 'timed out waiting for lock' errors.\n\nUgh. We would like to think that client misbehavior couldn't cause such\nthings. Can you dig into this some more, and provide further details on\nwhat is happening and what the sequence of client requests is?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 01 Jan 2001 23:59:56 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PHP and PostgreSQL " }, { "msg_contents": "Does this requested chagne have to do with Apache or PostgreSQL?\n\nw wrote:\n> > \n> > I have been asked by the major PHP developer Rasmus Lerdorf to see\n> > if\n> > the PostgreSQL/PHP interface needs any improvements.\n> > \n> > Is the current PostgreSQL interface module in PHP adequate? Does it\n> > support all the current libpq features?\n> > \n> > The only problem we have run into (and I have heard of others having this\n> > problem also) is with persistent connections. I have seen discussion on\n> > persistent connection problems but I'm not sure the problem was ever\n> > resolved. The problem we have seen is that when using persistent\n> > connections the web server doesn't seen to reuse the connections or somthing\n> > to that effect. The result being that we eventually use up our postgres\n> > limit of 48 connections and nothing can connect to postgre anymore. It is\n> > possible that this is a configuration problem that we haven't sufficiently\n> > investigated, but I meniton it because I have heard other talk of this.\n> > Anyone have more information?\n> \n> Persistent connections behave exactly as advertised. Each apache process\n> sets up and maintains persistent connections as needed. The problem is\n> that for a typical web server, there are so many subprocesses that\n> persistent connections are probably consume more resources than they\n> save, unless they are combined with connection pooling across ALL the\n> apache processes.\n> \n> Implementation of connection pooling is by far the most serious\n> shortcoming of the current implementation, IMHO. \n> \n> I would dearly love to see this addressed as our postgresql database\n> sees connections from about 300 servers for 6 databases. Since our\n> postgresql server cannot support 1800 simultaneous active backends,\n> persistent connections are useless without pooling. So instead we\n> initiate 10 or more backends every second for generally very simple\n> queries. Most of the queries are pretty simple, so I would not be at all\n> surprised if we sent more system resources opening connections than we\n> do actually answering queries\n> \n> -- \n> Karl DeBisschop [email protected]\n> Learning Network/Information Please http://www.infoplease.com\n> Netsaint Plugin Developer [email protected]\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 2 Jan 2001 02:16:53 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL" }, { "msg_contents": "Bruce Momjian wrote:\n> \n> Does this requested chagne have to do with Apache or PostgreSQL?\n> \nI suspect it is a request that live postgresql processes can linger\naround after a connection is completed and be re-assigned to a new\nconnection as soon as one comes along. This will save the startup cost\nof a new postgresql process. This is what apache does.\n\n\n-- \nhttp://www.mohawksoft.com\n", "msg_date": "Tue, 02 Jan 2001 08:31:46 -0500", "msg_from": "mlw <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL" }, { "msg_contents": "\nOn Tue, 2 Jan 2001, mlw wrote:\n\n> Bruce Momjian wrote:\n> > \n> > Does this requested chagne have to do with Apache or PostgreSQL?\n> > \n> I suspect it is a request that live postgresql processes can linger\n> around after a connection is completed and be re-assigned to a new\n> connection as soon as one comes along. This will save the startup cost\n> of a new postgresql process. This is what apache does.\n\n I don't think is really going to provide much of an impact. Postgres\nhas to do a lot more initialization per session than Apache. Mainly\nbecause Postgres has to deal with a stateful protocol, not a stateless one\nlike Apache. Besides, as already has been tested, session startup time is\nminimal.\n\n> -- \n> http://www.mohawksoft.com\n\nTom\n\n", "msg_date": "Tue, 2 Jan 2001 20:32:03 -0800 (PST)", "msg_from": "Tom Samplonius <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL" }, { "msg_contents": "Tom Samplonius <[email protected]> writes:\n> ... Besides, as already has been tested, session startup time is\n> minimal.\n\nWell, mumble ...\n\nI think the startup time is negligible if you are issuing a reasonable\nnumber of queries per session (say a few dozen). But if you connect,\nissue one query, and disconnect, then undoubtedly you will find that\nperformance sucks.\n\nWe could probably do more to improve this situation on the server side,\nbut IMHO it makes most sense to address the issue on the client side\nvia connection reuse. The main reason for this is that a significant\namount of the startup time for a standard connection consists of\nauthentication overhead and context setup overhead (such as setting the\ntimezone and character set encoding that the client wants to use).\nA general-purpose connection-reuse facility on the server end cannot\neliminate these overheads, whereas it's trivial to avoid them within\nthe context of a multi-threaded client.\n\nBottom line: better to solve it by fixing Apache or PHP.\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 03 Jan 2001 01:07:16 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL " }, { "msg_contents": "Tom Lane wrote:\n[ . . . ]\n> A general-purpose connection-reuse facility on the server end cannot\n> eliminate these overheads, whereas it's trivial to avoid them within\n> the context of a multi-threaded client.\n\nPHP 4.04 does provide support for AOLServer now (which is multithreaded). I haven't had\ntime to play with it, and it moreover isn't certified for production use yet:\n\n---------------------------------- snip ----------------------------------\nNOTE: You should not use this module in production. PHP is not 100% stable\n yet in threaded mode. To increase reliability enable the Global Lock\n by removing #define NO_GLOBAL_LOCK in main/main.c. Also don't use\n php_value as it will lead to races in a sub-system (use an ini file\n instead).\n---------------------------------- snap ----------------------------------\n(from the php/sapi/aolserver/README)\n\nBut it might be the way to go forward with the connection pooling issue. Maybe the PHP\npeople could use some help from the Postgres developers there? I think it has been pointed\nout in the context of this thread that Apache, as a multi-process server, could not\nproperly handle connection pooling because it's not feasible to pool connections across\nseveral Apache children (or was that the problem?).\n\nRegards, Frank\n", "msg_date": "Wed, 03 Jan 2001 14:44:32 +0100", "msg_from": "Frank Joerdens <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [INTERFACES] Re: PHP and PostgreSQL" } ]
[ { "msg_contents": "> Reviewed. No problem :-)\n> Would anyone commit it? Thanks.\n\nIs this something to commit to the source tree, or something to post on\nthe postgresql.org web site? We may as well get it on the web site in\neither case. Vince?\n\n - Thomas\n", "msg_date": "Wed, 27 Dec 2000 16:42:09 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": true, "msg_subject": "Re: About PQsetClientEncoding(),\"SET NAMES\",and \"SETCLIENT_ENCODING\"" }, { "msg_contents": "C.C. Hsieh wrote:\n\n> Tatsuo Ishii wrote:\n>\n> > Here are the patches I promised against PHP\n> > 3.0.15 or later.\n> >\n> > To set the client encoding to BIG5:\n> >\n> > pg_setclientencoding($cid, \"BIG5\");\n> >\n> > ($cid is the connection id)\n> >\n> > To get the current client encoding:\n> >\n> > pg_clientencoding($cid);\n> >\n> > Note that these fucntions are already included in the latest PHP4.\n>\n> Thank you!\n> Your README.mb has been translate into Chinese (Big5 encoding) in the\n> attachement.\n> Would someone like to review it?\n\nReviewed. No problem :-)\nWould anyone commit it? Thanks.\n\n> After translating it, I still have one question: (Sorry, I have not read the\n> source code.)\n> What is the difference among \"libpq -- PQsetClientEncoding()\",\n> \"SQL command -- SET NAMES\", and\n> \"SQL command -- SET CLIENT_ENCODING\"?\n> For example: If we use PHP (>4.0.2), which way is correct or mostly correct?\n>\n> 1. pg_setclientencoding($cid, \"BIG5\")\n> 2. pg_exec(\"SET NAMES 'BIG5'\")\n> 3. pg_exec(\"SET CLIENT_ENCODING TO 'BIG5'\")\n>\n> --\n> Chih-Chang Hsieh\n\n- Kevin\n\n", "msg_date": "Wed, 27 Dec 2000 20:16:36 +0000", "msg_from": "Kevin Lo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: About PQsetClientEncoding(),\"SET NAMES\",and \"SETCLIENT_ENCODING\" " } ]
[ { "msg_contents": "After re-reading my original *idea* about using rules to grant access to \nstored procedures, I think the better way would be not to implement the code \nas stored procedures/functions at all. \n\nLeave that for the more complex low-level add-ons to database functionality .\n\nUsing rules and views along with the current_user variable may be cleaner. \n(and easier?)\n\nThe CREATE_RULE manpage describes this kinda rule that ckecks to see who the \ncurrent_user is. I suppose this can also be used in any SQL fashion.\ni,e, current_user IN ('a','b','c') Or a subselect. Is there a current_group \nvariable?\n\n>Deny Joe access to the salary of employees in the shoe department \n>(current_user returns the name of the current user):\n>\n>CREATE RULE example_3 AS\n>ON\n>SELECT TO emp.salary WHERE old.dept = \"shoe\" AND current_user = \"Joe\"\n>DO INSTEAD NOTHING; \n\nAfter some experimenting, is seems that current_user also works with VIEWS \nwhich see to be the way to go for ON SELECT RULES anyway.\n\nSo with this it seems safe to say that you can grant access to SQL queries in \nPostgres through RULES and VIEWS but this does not seems as robust as actual \nfunctions whose capabilities are nto as limited as code/queries stored in \nRULES or VIEW.\n\nStill, does anyone have any comments on adding entries to pg_class for \nfunctions to have ACLs or adding an ACL column to the pg_proc class?\n\n__________________________________________________________________\nGet your own FREE, personal Netscape Webmail account today at \nhttp://webmail.netscape.com/\n", "msg_date": "Wed, 27 Dec 2000 12:41:01 -0500", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "Re: Permissions on Stored Procedures ==> current_user" } ]
[ { "msg_contents": "hi,\n\n This is a revised patch that I sent earlier to allow building\npg-7.1 with gcc as well as DEC's cc. I've had good results with this\napplied. Could some other Alpha users try this out. Even better, could\nan Alpha asm guru look over the asm that I'm using (instead of the\noriginal asm in the file).\n\nin brief:\n the original s_lock.h file tested for __alpha and __osf__ to use\nthe builtin __INTERLOCKED_BITSS_QUAD for our TAS. I've changed this\nto check for the DEC compiler (__DECC || __DECCXX), removed the\n__asm__(...) which appeared to be gcc-specific, and moved the whole\n#if (__alpha) block inside the #else of #if defined(__GNUC__).\n\n brent", "msg_date": "Wed, 27 Dec 2000 19:48:48 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "[patch] src/include/storage/s_lock.h" }, { "msg_contents": "Brent Verner <[email protected]> writes:\n> This is a revised patch that I sent earlier to allow building\n> pg-7.1 with gcc as well as DEC's cc. I've had good results with this\n> applied. Could some other Alpha users try this out. Even better, could\n> an Alpha asm guru look over the asm that I'm using (instead of the\n> original asm in the file).\n\ntas() is not supposed to contain a loop. It can succeed or fail, but\nit should not wait.\n\nThe code now in s_lock.h does seem rather gratuitously obscure about\nthe instructions it uses to load constants. I'd suggest\n\nstatic __inline__ int\ntas(volatile slock_t *lock)\n{\n register slock_t _res;\n\n__asm__(\" ldq $0, %0 \\n\\\n bne $0, 2f \\n\\\n ldq_l $0, %0 \\n\\\n bne $0, 2f \\n\\\n mov 1, $0 \\n\\\n stq_c $0, %0 \\n\\\n beq $0, 2f \\n\\\n mov 0, %1 \\n\\\n mb \\n\\\n jmp $31, 3f \\n\\\n 2: mov 1, %1 \\n\\\n 3: nop \": \"=m\"(*lock), \"=r\"(_res): :\"0\");\n\n return (int) _res;\n}\n\nAs you say, the first two instructions don't seem to be really\nnecessary. I suppose the idea is to avoid setting the processor\nlock address register unless there's a pretty good chance of\nacquiring the lock ... but why bother? Does LDQ_L take a long\ntime to execute? Seems like avoiding the extra two instructions\nwould be a win most of the time.\n\n regards, tom lane\n", "msg_date": "Wed, 27 Dec 2000 21:37:24 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Alpha tas() patch" }, { "msg_contents": "On 27 Dec 2000 at 21:37 (-0500), Tom Lane wrote:\n| Brent Verner <[email protected]> writes:\n| > This is a revised patch that I sent earlier to allow building\n| > pg-7.1 with gcc as well as DEC's cc. I've had good results with this\n| > applied. Could some other Alpha users try this out. Even better, could\n| > an Alpha asm guru look over the asm that I'm using (instead of the\n| > original asm in the file).\n| \n| tas() is not supposed to contain a loop. It can succeed or fail, but\n| it should not wait.\n| \n| The code now in s_lock.h does seem rather gratuitously obscure about\n| the instructions it uses to load constants. I'd suggest\n| \n| static __inline__ int\n| tas(volatile slock_t *lock)\n| {\n| register slock_t _res;\n| \n| __asm__(\" ldq $0, %0 \\n\\\n| bne $0, 2f \\n\\\n| ldq_l $0, %0 \\n\\\n| bne $0, 2f \\n\\\n| mov 1, $0 \\n\\\n| stq_c $0, %0 \\n\\\n| beq $0, 2f \\n\\\n| mov 0, %1 \\n\\\n| mb \\n\\\n| jmp $31, 3f \\n\\\n| 2: mov 1, %1 \\n\\\n| 3: nop \": \"=m\"(*lock), \"=r\"(_res): :\"0\");\n| \n| return (int) _res;\n| }\n\nanother loop-free version of TAS that /seems/ to work as desired. WRT to your\nseeing the shutdown lock failure, what are you doing to provoke this bug?, \nbecause I have not seen it with either version of the TAS that I've used.\n\n\tbrent\n\n\n#define TAS(lock) tas_dbv(lock)\n#define S_UNLOCK(lock) do { __asm__(\"mb\"); *(lock) = 0; } while (0)\n\nstatic\n__inline__\nint\ntas(volatile slock_t* __lock)\n{\n register slock_t __rv;\n register slock_t __temp;\n\n __asm__\n __volatile__\n (\n \"1: ldq_l %0, %1 \\n\" /* load (and lock) __lock */\n \" and %0, 1, %2 \\n\" /* if bit 1 is set, store 1 in __rv */\n \" bne %2, 2f \\n\" /* if __rv != 0, already locked. leave */\n \" xor %0, 1, %0 \\n\" /* set bit 1 in slock_t */\n \" stq_c %0, %1 \\n\" /* store __lock, only stores if we locked */\n \" mb \\n\" /* memory block (necessary?) */\n \" 2: nop \\n\" /* exit point */\n : \"=&r\" (__temp),\n \"=m\" (*__lock),\n \"=&r\" (__rv)\n : \"m\" (*__lock)\n );\n\n return (int) __rv;\n}\n\n", "msg_date": "Thu, 28 Dec 2000 09:35:59 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Alpha tas() patch" }, { "msg_contents": "Hi,\n\n\tI missed the beginning of this thread. Are you doing this for Tru64 or\nfor Linux? For Tru64 there are macros in /usr/include/alpha/builtins.h\nwhich do the job.\n\nDoing this in assembler is totally non-trivial, as most versions are\nonly liable to work on single-processor machines and not on SMP boxes\n(the problem with the previous linux TAS, I believe).\n\nAdriaan\n", "msg_date": "Thu, 28 Dec 2000 17:03:26 +0200", "msg_from": "Adriaan Joubert <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Alpha tas() patch" }, { "msg_contents": "Brent Verner <[email protected]> writes:\n> another loop-free version of TAS that /seems/ to work as desired.\n\nSince it doesn't check to see if the stq_c succeeded, it can't possibly\nbe right...\n\n> WRT to your seeing the shutdown lock failure, what are you doing to\n> provoke this bug?\n\n\"pg_ctl stop\".\n\nI am wondering if the machine I am testing on is different from yours.\nI know there are multiple revisions of Alpha hardware out there; is\nthere a way to test which mask rev is running a particular machine?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 10:48:19 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Alpha tas() patch " }, { "msg_contents": "On 28 Dec 2000 at 17:03 (+0200), Adriaan Joubert wrote:\n| Hi,\n| \n| \tI missed the beginning of this thread. Are you doing this for Tru64 or\n| for Linux? For Tru64 there are macros in /usr/include/alpha/builtins.h\n| which do the job.\n\ngcc + Tru64, since gcc-2.95.2 doesn't implement the builtins defined in\nalpha/builtins.h. Having never seen linux on an Alpha box, I can only assume \nthat the asm (instruction-wise) would be(have) the same.\n\n\tbrent\n", "msg_date": "Thu, 28 Dec 2000 11:06:22 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Re: Alpha tas() patch" }, { "msg_contents": "Adriaan Joubert <[email protected]> writes:\n> For Tru64 there are macros in /usr/include/alpha/builtins.h\n> which do the job.\n\nIt would be interesting to see the assembly code that those macros\nexpand to.\n\n> Doing this in assembler is totally non-trivial, as most versions are\n> only liable to work on single-processor machines and not on SMP boxes\n> (the problem with the previous linux TAS, I believe).\n\nYou've said that before, but whether it's difficult or not is completely\nirrelevant. We have to develop a version that works; there is no\nalternative.\n\nHas anyone dug into the kernel sources to see what's used there for\ncross-processor locks? It should be pretty much the same problem.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 11:16:40 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Alpha tas() patch " }, { "msg_contents": "On 28 Dec 2000 at 10:48 (-0500), Tom Lane wrote:\n| Brent Verner <[email protected]> writes:\n| > another loop-free version of TAS that /seems/ to work as desired.\n| \n| Since it doesn't check to see if the stq_c succeeded, it can't possibly\n| be right...\n\nright, I just realized that while composing a now-deleted response to \nAdriaan :-)\n\nback to the TAS-loop issue. when using \n\n| > WRT to your seeing the shutdown lock failure, what are you doing to\n| > provoke this bug?\n| \n| \"pg_ctl stop\".\n\nI see this with the version of TAS() that you recently suggested, but not \nwith either of the versions I'd hacked up.\n\n| I am wondering if the machine I am testing on is different from yours.\n| I know there are multiple revisions of Alpha hardware out there; is\n| there a way to test which mask rev is running a particular machine?\n\nI have no clue right now, but I'll look into it.\n\n\tbrent\n", "msg_date": "Thu, 28 Dec 2000 11:54:58 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Alpha tas() patch" }, { "msg_contents": "Brent Verner <[email protected]> writes:\n> I see this with the version of TAS() that you recently suggested, but not \n> with either of the versions I'd hacked up.\n\nHm. Your second version might incorrectly appear to work because it's\nnot checking for stq_c failure. The first one loops until it succeeds,\nso if the deal is that stq_c might work sometimes but not always\n(dependent on, say, cache miss effects) then that might explain why it\nworks. Clearly there's more here to worry about than the available\ndocumentation suggests.\n\nAwhile back I received some mail from a guy at Compaq saying that a\ntaken branch between ldq_l and stq_c is no good, apparently because some\nversions of the processor will clear the lock register when any transfer\nof control occurs. But it sounded like a not-taken conditional branch\nis OK. Nonetheless, it's interesting that the\n__INTERLOCKED_TESTBITSS_QUAD macro doesn't use any branch at all between\nthose two instructions. Maybe we should try it that way.\n\nIs there any documentation on exactly what __INTERLOCKED_TESTBITSS_QUAD\nis supposed to do? It looks like it's computing which bit to set in the\nquadword, but I'm not sure I'm interpreting the code correctly.\n\nI'm going to instrument my version a little more to see exactly which\nstep is failing ... I suspect it's the stq_c result test but want to\nprove that before trying alternatives.\n\nBTW, is your machine single- or multi-processor?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 12:41:44 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Alpha tas() patch " }, { "msg_contents": "On 28 Dec 2000 at 12:41 (-0500), Tom Lane wrote:\n| Brent Verner <[email protected]> writes:\n| > I see this with the version of TAS() that you recently suggested, but not \n| > with either of the versions I'd hacked up.\n| \n| Hm. Your second version might incorrectly appear to work because it's\n| not checking for stq_c failure. The first one loops until it succeeds,\n| so if the deal is that stq_c might work sometimes but not always\n| (dependent on, say, cache miss effects) then that might explain why it\n| works. Clearly there's more here to worry about than the available\n| documentation suggests.\n\nwhat have I stumbled into :). 'damnit Jim!, I'm just a perl hacker.'\n\n| Awhile back I received some mail from a guy at Compaq saying that a\n| taken branch between ldq_l and stq_c is no good, apparently because some\n| versions of the processor will clear the lock register when any transfer\n| of control occurs. But it sounded like a not-taken conditional branch\n| is OK. Nonetheless, it's interesting that the\n| __INTERLOCKED_TESTBITSS_QUAD macro doesn't use any branch at all between\n| those two instructions. Maybe we should try it that way.\n\nI agree with this assessment from my reading of the asm docs so far. there\nis also the (w)mb instruction whose importance/effect I'm not sure of...\n\n| Is there any documentation on exactly what __INTERLOCKED_TESTBITSS_QUAD\n| is supposed to do? It looks like it's computing which bit to set in the\n| quadword, but I'm not sure I'm interpreting the code correctly.\n\nyes, WRT to the 'which bit', since __INTERLOCKED_TESTBITSS_QUAD takes \nas second arg, which is the bit to set.\n\n| I'm going to instrument my version a little more to see exactly which\n| step is failing ... I suspect it's the stq_c result test but want to\n| prove that before trying alternatives.\n\nmy understanding of the ldq_l/stc_q interaction, is: (forgive me if you\nalready grok all of this, I'm mostly thinking out loud.)\n\nldq_l $0, $1 # $0 = $1;\naddq $0, 1, $2 # $2 = $0 + 1;\nstq_c $2, $1 # $1 = $2;\ncmpeq $2, $1, $3 # $3 = $2 == $1 ? 1 : 0\n\nif $3 == 1 we successfully modified the locked value ($1). I /believe/ this\nwill hold true across multi-processors as well, as all of the builtins\nI've seen asm for seem to have similar structure.\n\n| BTW, is your machine single- or multi-processor?\n\nsingle.\n\n\tbrent\n", "msg_date": "Thu, 28 Dec 2000 16:10:56 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Alpha tas() patch" }, { "msg_contents": "Brent Verner <[email protected]> writes:\n> what have I stumbled into :). 'damnit Jim!, I'm just a perl hacker.'\n\nI've found an online version of the AXP Architecture Handbook at \nftp://ftp.netbsd.org/pub/NetBSD/misc/dec-docs/index.html\nin particular the file ec-qd2ka-te.ps.gz listed near the top of\nthe page. After perusing same, it seems that the tas() code presently\nin CVS sources *is correct*, although not very transparently written\n(for example, \"or $31, 1, $0\" would be more clearly expressed as\n\"mov 1, $0\"). See sections 4.2.4, 4.2.5, 4.11.4, and 5.5, especially\nthe sample code for a software critical section in 5.5.3.\n\nAt this point my opinion is that there's nothing functionally wrong\nwith the existing Alpha assembly code in s_lock.h, and that the\nCreateCheckPoint failure is due to CreateCheckPoint misusing the routine\n(see my recent message to pghackers).\n\nI believe that we should change s_lock.h to use the inline assembly code\nwhen using gcc on Alpha, regardless of OS.\n\nThe more interesting question is what to do for non-gcc compilers.\nThe INTERLOCKED_TESTBITSS_QUAD macro is not really suitable, primarily\nbecause it does not include an \"mb\" instruction. (It also violates the\narchitecture manual's recommendation to not do redundant stores into a\nlock word, but that's not so critical.) Is there anything in\n<alpha/builtins.h> that provides access to the memory-barrier\ninstruction?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 16:33:56 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Alpha tas() patch " }, { "msg_contents": "On 28 Dec 2000 at 17:40 (-0500), Tom Lane wrote:\n| Okay ... I guess the LOCK_LONG macros are our best shot. Here is a\n| proposed new Alpha section for s_lock.h. Would you try it and let me\n| know how it works for you?\n| \n| Note that this will NOT fix the CreateCheckPoint shutdown error; don't\n| worry about that. The thing to look at is whether the parallel regress\n| tests pass.\n\nafter fresh CVS update: geometry, float8, and oid are still failing, and I\nnow am seeing the CheckPoint shutdown bug, which leaves the db in an unusable\nstate after running the regression tests.\n\nmnemosyne:~/src/gcc-pgsql\npgadmin$ pg_ctl start\npostmaster successfully started up\nmnemosyne:~/src/gcc-pgsql\npgadmin$ DEBUG: starting up\nDEBUG: database system was interrupted at 2000-12-28 21:28:39\nDEBUG: CheckPoint record at (0, 1563064)\nDEBUG: Redo record at (0, 1563064); Undo record at (0, 0); Shutdown TRUE\nDEBUG: NextTransactionId: 615; NextOid: 18720\nDEBUG: database system was not properly shut down; automatic recovery in progress...\nDEBUG: redo starts at (0, 1563128)\n \nmnemosyne:~/src/gcc-pgsql\npgadmin$ Startup failed - abort\n\n", "msg_date": "Thu, 28 Dec 2000 21:45:56 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Alpha tas() patch" }, { "msg_contents": "> after fresh CVS update: geometry, float8, and oid are still failing,\n\nYou're running this on DEC's cc, right? Geometry and float8 are a\nmatter of fixing the expected output, I think. I'm surprised that the\nOID test is failing for you --- it passes for me on that Debian box.\nCould you step through the oidin_subr routine in\nsrc/backend/utils/adt/oid.c and see what it's getting for intermediate\nresults?\n\n> I now am seeing the CheckPoint shutdown bug, which leaves the db in an\n> unusable state after running the regression tests.\n\n> mnemosyne:~/src/gcc-pgsql\n> pgadmin$ pg_ctl start\n> postmaster successfully started up\n> mnemosyne:~/src/gcc-pgsql\n> pgadmin$ DEBUG: starting up\n> DEBUG: database system was interrupted at 2000-12-28 21:28:39\n> DEBUG: CheckPoint record at (0, 1563064)\n> DEBUG: Redo record at (0, 1563064); Undo record at (0, 0); Shutdown TRUE\n> DEBUG: NextTransactionId: 615; NextOid: 18720\n> DEBUG: database system was not properly shut down; automatic recovery in progress...\n> DEBUG: redo starts at (0, 1563128)\n \n> mnemosyne:~/src/gcc-pgsql\n> pgadmin$ Startup failed - abort\n\nOh, that's interesting. On the Debian box, restart works fine after\nCheckPoint barfs. We need to look into that and find out why --- if\nrestart fails in this situation, it would imply that restart after a\nsystem crash would probably fail too. Can you trace through it and\nfigure out where it's failing?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 23:08:05 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Alpha tas() patch " }, { "msg_contents": "On 28 Dec 2000 at 23:08 (-0500), Tom Lane wrote:\n| > after fresh CVS update: geometry, float8, and oid are still failing,\n| \n| You're running this on DEC's cc, right? Geometry and float8 are a\n| matter of fixing the expected output, I think. I'm surprised that the\n| OID test is failing for you --- it passes for me on that Debian box.\n| Could you step through the oidin_subr routine in\n| src/backend/utils/adt/oid.c and see what it's getting for intermediate\n| results?\n\nno, these results are with gcc, sorry for not stating that :(. With DEC's \ncc, I do not see the CheckPoint bug, the oid and geometry regression tests\nstill fail (same result as before new TAS code, so the it appears that\n__LOCK_LONG_RETRY() does the right thing for us).\n\n| > I now am seeing the CheckPoint shutdown bug, which leaves the db in an\n| > unusable state after running the regression tests.\n\n| > mnemosyne:~/src/gcc-pgsql\n| > pgadmin$ Startup failed - abort\n| \n| Oh, that's interesting. On the Debian box, restart works fine after\n| CheckPoint barfs. We need to look into that and find out why --- if\n| restart fails in this situation, it would imply that restart after a\n| system crash would probably fail too. Can you trace through it and\n| figure out where it's failing?\n\nYes, I'll dig into this, but won't be able to do so until late(r) in\nthe day.\n\ncheers.\n\tbrent\n", "msg_date": "Thu, 28 Dec 2000 23:58:13 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Alpha tas() patch" }, { "msg_contents": "Can someone comment on this? It looks OK to me.\n\n> hi,\n> \n> This is a revised patch that I sent earlier to allow building\n> pg-7.1 with gcc as well as DEC's cc. I've had good results with this\n> applied. Could some other Alpha users try this out. Even better, could\n> an Alpha asm guru look over the asm that I'm using (instead of the\n> original asm in the file).\n> \n> in brief:\n> the original s_lock.h file tested for __alpha and __osf__ to use\n> the builtin __INTERLOCKED_BITSS_QUAD for our TAS. I've changed this\n> to check for the DEC compiler (__DECC || __DECCXX), removed the\n> __asm__(...) which appeared to be gcc-specific, and moved the whole\n> #if (__alpha) block inside the #else of #if defined(__GNUC__).\n> \n> brent\n> \n\n[ Attachment, skipping... ]\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 2 Jan 2001 02:30:07 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [patch] src/include/storage/s_lock.h" }, { "msg_contents": "Never mind. I see the followup thread now.\n\n> hi,\n> \n> This is a revised patch that I sent earlier to allow building\n> pg-7.1 with gcc as well as DEC's cc. I've had good results with this\n> applied. Could some other Alpha users try this out. Even better, could\n> an Alpha asm guru look over the asm that I'm using (instead of the\n> original asm in the file).\n> \n> in brief:\n> the original s_lock.h file tested for __alpha and __osf__ to use\n> the builtin __INTERLOCKED_BITSS_QUAD for our TAS. I've changed this\n> to check for the DEC compiler (__DECC || __DECCXX), removed the\n> __asm__(...) which appeared to be gcc-specific, and moved the whole\n> #if (__alpha) block inside the #else of #if defined(__GNUC__).\n> \n> brent\n> \n\n[ Attachment, skipping... ]\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 2 Jan 2001 02:34:11 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [patch] src/include/storage/s_lock.h" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> Can someone comment on this? It looks OK to me.\n\nI've been working off-list with Brent and some of the other Alpha beta\ntesters. I think as of a few hours ago we should pass regress tests on\nall Alpha platforms except NetBSD, where there seem to be some problems\nwith NaN values. It looks like this is a NetBSD bug and not ours.\n\nThe currently committed Alpha spinlock code should work if I'm reading\nthe Alpha AXP Architecture Manual correctly, but there still seems to be\nconcern about it in some quarters. Further testing would be a good\nidea, especially on multi-CPU Alphas.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 02 Jan 2001 02:47:31 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [patch] src/include/storage/s_lock.h " } ]
[ { "msg_contents": "\n> > There is something busted in the snapshots, that leads to a wrong\n> > configure file. The file is equal to configure.in (not autoconf'ed).\n> > First noticed shortly before Christmas.\n> \n> Last week I tried to do a \"make clean\" in some subdirectory that's\n> not cleaned by a toplevel clean -- I think it was doc/src/sgml, but it\n> might have been a contrib dir -- and make went absolutely nuts. \n\nSorry, my wording was not well put. The bad configure file is already in the\nsnapshot tar file, thus something must be broken in the snapshot build process.\n\nAndreas\n", "msg_date": "Thu, 28 Dec 2000 10:14:53 +0100", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "AW: configure in snapshout == configure.in " } ]
[ { "msg_contents": "just committed. initdb is required.\n*I didn't do any serious tests yet*, simple regression only.\nI'll run more tests in the next couple of days.\nPleeeease, help with this.\n\nVadim\n\n\n", "msg_date": "Thu, 28 Dec 2000 05:51:10 -0800", "msg_from": "\"Vadim Mikheev\" <[email protected]>", "msg_from_op": true, "msg_subject": "New WAL version (CRC & data pages backup)" } ]
[ { "msg_contents": "Hello,\n\nWhile working on the next release of Tangram, I have encountered the\nfollowing problem in version 7.0.2. Given the following tables:\n\nSpringfield=> select version();\n version\n---------------------------------------------------------------\n PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.95.2\n(1 row)\n \nSpringfield=> select * from Person;\n id | classid\n------+---------\n 1006 | 6\n 2006 | 6\n 3006 | 6\n 4006 | 6\n 5006 | 6\n(5 rows)\n \nSpringfield=> select * from NP;\n id | ia_ref | credit | name | firstname | ia_slot | is_ref | partner | age\n------+--------+--------+------+-----------+---------+--------+---------+-----\n 1006 | | | | Bart | | | |\n 2006 | | | | Lisa | | | |\n 3006 | | | | Maggie | | | |\n 5006 | | | | Marge | | | |\n 4006 | | | | Homer | | | |\n(5 rows)\n \nSpringfield=> select * from s_children;\n coll | item\n------+------\n 5006 | 3006\n 5006 | 1006\n 5006 | 2006\n 4006 | 1006\n 4006 | 3006\n 4006 | 2006\n(6 rows)\n\n...I run the following two queries:\n\nSpringfield=> SELECT t4.firstName\n FROM Person t1, NP t2, s_children tl1001, Person t3, NP t4\n WHERE (tl1001.coll = t1.id AND tl1001.item = t3.id)\n AND t2.id = t1.id AND t4.id = t3.id;\n firstname\n-----------\n Bart\n Bart\n Maggie\n Maggie\n(4 rows)\n \nSpringfield=> SELECT t2.firstName, t4.firstName\n FROM Person t1, NP t2, s_children tl1001, Person t3, NP t4\n WHERE (tl1001.coll = t1.id AND tl1001.item = t3.id)\n AND t2.id = t1.id AND t4.id = t3.id;\n firstname | firstname\n-----------+-----------\n Homer | Bart\n Homer | Lisa\n Homer | Maggie\n(3 rows)\n\nBoth result sets seem wrong; even more bizarre, adding a column in the\nprojection affects the result set.\n\nIn addition, Tangram's test suite runs flawlessly against Sybase,\nMysql, Oracle and Postgres 6.4.2.\n-- \nJean-Louis Leroy\nhttp://users.skynet.be/jll\n", "msg_date": "28 Dec 2000 18:32:01 +0100", "msg_from": "Jean-Louis Leroy <[email protected]>", "msg_from_op": true, "msg_subject": "Possible SELECT bug in 7.0.2" }, { "msg_contents": "Jean-Louis Leroy <[email protected]> writes:\n> Both result sets seem wrong; even more bizarre, adding a column in the\n> projection affects the result set.\n> In addition, Tangram's test suite runs flawlessly against Sybase,\n> Mysql, Oracle and Postgres 6.4.2.\n\nSeems fishy, but there's not enough info here to diagnose the problem.\n\nDoes EXPLAIN show nested mergejoin plans for the failing queries?\nIf so, that's a known bug that is fixed in 7.0.3. If not, I'd like\nto see enough info to reproduce the problem --- a pg_dump database\ndump and a procedure for reproducing the error after reload would\ndo nicely ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 30 Dec 2000 00:33:42 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Possible SELECT bug in 7.0.2 " } ]
[ { "msg_contents": "I have been digging into the observed failure\n\nFATAL: Checkpoint lock is busy while data base is shutting down\n\non some Alpha machines. It apparently doesn't happen on all Alphas,\nbut it's quite reproducible on some of them.\n\nThe bottom line turns out to be that on the Alpha hardware, it is\npossible for TAS() to fail even when the lock is initially zero,\nbecause that hardware's locking protocol will fail to acquire the\nlock if the ldq_l/stq_c sequence is interrupted. TAS() *must* be\ncalled in a retry loop on Alphas. Thus, the coding presently in\nxlog.c,\n\n while (TAS(&(XLogCtl->chkp_lck)))\n {\n struct timeval delay = {2, 0};\n\n if (shutdown)\n elog(STOP, \"Checkpoint lock is busy while data base is shutting down\");\n (void) select(0, NULL, NULL, NULL, &delay);\n }\n\nis no good because it does not allow for multiple retries.\n\nOffhand I see no good reason why the above-quoted code isn't just\n\n S_LOCK(&(XLogCtl->chkp_lck));\n\nand propose to fix this problem by reducing it to that. If the lock\nis held when it shouldn't be, we'll fail with a stuck-spinlock error.\n\nIt also bothers me that xlog.c contains several places where there is a\npotentially infinite wait for a lock. It seems to me that these should\ntime out with stuck-spinlock messages. Do you object to such a change?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 15:54:50 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "On Thu, Dec 28, 2000 at 03:54:50PM -0500, Tom Lane wrote:\n> I have been digging into the observed failure\n> \n> FATAL: Checkpoint lock is busy while data base is shutting down\n> \n> on some Alpha machines. It apparently doesn't happen on all Alphas,\n> but it's quite reproducible on some of them.\n> \n> The bottom line turns out to be that on the Alpha hardware, it is\n> possible for TAS() to fail even when the lock is initially zero,\n> because that hardware's locking protocol will fail to acquire the\n> lock if the ldq_l/stq_c sequence is interrupted. TAS() *must* be\n> called in a retry loop on Alphas. \n\nAs I understand it, this is normal semantics for the load-locked/\nstore-conditional primitive. The idea is that the normal case is fast, \nbut anything that might interfere with absolute correctness causes it \nto fail and need to be retried (generally just once). \n\n> It also bothers me that xlog.c contains several places where there is a\n> potentially infinite wait for a lock. It seems to me that these should\n> time out with stuck-spinlock messages. Do you object to such a change?\n\nA spinlock held for more than a few cycles indicates a bug.\n\nI wonder about the advisability of using spinlocks in user-level code \nwhich might be swapped out any time. Normally, spinlocks are taken in \nkernel code with great care about interrupts and context switches while\nthe lock is held. I don't know how one could take the necessary \nprecautions at user level. \n\nNathan Myers\[email protected]\n", "msg_date": "Thu, 28 Dec 2000 13:47:44 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "[email protected] (Nathan Myers) writes:\n> I wonder about the advisability of using spinlocks in user-level code \n> which might be swapped out any time.\n\nThe reason we use spinlocks is that we expect the lock to succeed (not\nblock) the majority of the time, and we want the code to fall through\nas quickly as possible in that case. In particular we do *not* want to\nexpend a kernel call when we are able to acquire the lock immediately.\nIt's not a true \"spin\" lock because we don't sit in a tight loop when\nwe do have to wait for the lock --- we use select() to delay for a small\ninterval before trying again. See src/backend/storage/buffer/s_lock.c.\n\nThe design is reasonable, even if a little bit offbeat.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 17:12:22 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten " }, { "msg_contents": "On Thu, Dec 28, 2000 at 05:12:22PM -0500, Tom Lane wrote:\n> [email protected] (Nathan Myers) writes:\n> > I wonder about the advisability of using spinlocks in user-level code \n> > which might be swapped out any time.\n> \n> The reason we use spinlocks is that we expect the lock to succeed (not\n> block) the majority of the time, and we want the code to fall through\n> as quickly as possible in that case. In particular we do *not* want to\n> expend a kernel call when we are able to acquire the lock immediately.\n\nMost implementations of mutex and semaphore do no system call if they \nget the lock; if they fail to get the lock, they block in the kernel \nwithout any need for complicated \"back-off\" loops. \n\n> It's not a true \"spin\" lock because we don't sit in a tight loop when\n> we do have to wait for the lock --- we use select() to delay for a small\n> interval before trying again. See src/backend/storage/buffer/s_lock.c.\n> \n> The design is reasonable, even if a little bit offbeat.\n\nI suspect \"a little bit offbeat\" qualifies as an extreme understatement. \nIn particular, it's not really a spinlock, in the standard sense.\n\nThe code is based on some odd assumptions. A select() with 0 delay \nreturns immediately unless there is an interrupt during its (very short!) \ntime in kernel space. On a single processor this is extremely unlikely \nto result in a change to the lock. I suspect\n\n #define S_NSPINCYCLE 2\n #define S_MAX_BUSY 1000 * S_NSPINCYCLE\n\n int s_spincycle[S_NSPINCYCLE] = {1,10000};\n\nwould give better results, assuming we want to keep the existing\nmechanism.\n\nNathan Myers\[email protected]\n", "msg_date": "Thu, 28 Dec 2000 15:17:51 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "On Thu, 28 Dec 2000, Nathan Myers wrote:\n\n> The code is based on some odd assumptions. A select() with 0 delay \n> returns immediately unless there is an interrupt during its (very short!) \n\nIf you look closely, it's a select with a 2 second timeout.\n\n>>> { 2, 0 }\n\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": "Thu, 28 Dec 2000 17:26:23 -0600 (CST)", "msg_from": "\"Dominic J. Eidson\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is\n verboten" }, { "msg_contents": "On Thu, Dec 28, 2000 at 05:26:23PM -0600, Dominic J. Eidson wrote:\n> On Thu, 28 Dec 2000, Nathan Myers wrote:\n> \n> > The code is based on some odd assumptions. A select() with 0 delay \n> > returns immediately unless there is an interrupt during its (very short!) \n> \n> If you look closely, it's a select with a 2 second timeout.\n> \n> >>> { 2, 0 }\n\nI don't see that in src/backend/storage/buffer/s_lock.c:\n\n delay.tv_sec = 0;\n delay.tv_usec = s_spincycle[spin % S_NSPINCYCLE];\n (void) select(0, NULL, NULL, NULL, &delay);\n\nNathan Myers\[email protected]\n", "msg_date": "Thu, 28 Dec 2000 16:10:30 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "[email protected] (Nathan Myers) writes:\n> On Thu, Dec 28, 2000 at 05:12:22PM -0500, Tom Lane wrote:\n>> The reason we use spinlocks is that we expect the lock to succeed (not\n>> block) the majority of the time, and we want the code to fall through\n>> as quickly as possible in that case. In particular we do *not* want to\n>> expend a kernel call when we are able to acquire the lock immediately.\n\n> Most implementations of mutex and semaphore do no system call if they \n> get the lock; if they fail to get the lock, they block in the kernel \n> without any need for complicated \"back-off\" loops. \n\nThere's been some talk of reimplementing S_LOCK() and friends to use\nPosix user-space semaphores, on platforms that provide such. But it'll\nbe a *long* time before we can expect such facilities to be available\neverywhere.\n\n> The code is based on some odd assumptions. A select() with 0 delay \n> returns immediately unless there is an interrupt during its (very short!) \n> time in kernel space.\n\nYeah, I've wondered whether the 0 entries in s_spincycle[] shouldn't be\n1. The code author evidently expected select() to at least yield the\nprocessor even with delay 0, but the select() man pages I have handy\nsay that it will \"return immediately\" when delay is 0.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 23:45:21 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten " }, { "msg_contents": "* Tom Lane <[email protected]> [001228 14:25] wrote:\n> [email protected] (Nathan Myers) writes:\n> > I wonder about the advisability of using spinlocks in user-level code \n> > which might be swapped out any time.\n> \n> The reason we use spinlocks is that we expect the lock to succeed (not\n> block) the majority of the time, and we want the code to fall through\n> as quickly as possible in that case. In particular we do *not* want to\n> expend a kernel call when we are able to acquire the lock immediately.\n> It's not a true \"spin\" lock because we don't sit in a tight loop when\n> we do have to wait for the lock --- we use select() to delay for a small\n> interval before trying again. See src/backend/storage/buffer/s_lock.c.\n> \n> The design is reasonable, even if a little bit offbeat.\n\nIt sounds pretty bad, if you have a contested lock you'll trap into\nthe kernel each time you miss, crossing the protection boundry and\nthen waiting. It's a tough call to make, because on UP systems\nyou loose bigtime by spinning for your quantum, however on SMP\nsystems there's a chance that the lock is owned by a process on\nanother CPU and spinning might be benificial.\n\nOne trick that may help is calling sched_yield(2) on a lock miss,\nit's a POSIX call and quite new so you'd need a 'configure' test\nfor it.\n\nhttp://www.freebsd.org/cgi/man.cgi?query=sched_yield&apropos=0&sektion=0&manpath=FreeBSD+4.2-RELEASE&format=html\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Thu, 28 Dec 2000 20:58:04 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "Alfred Perlstein <[email protected]> writes:\n> One trick that may help is calling sched_yield(2) on a lock miss,\n> it's a POSIX call and quite new so you'd need a 'configure' test\n> for it.\n\nThe author of the current s_lock code seems to have thought that\nselect() with a zero delay would do the equivalent of sched_yield().\nI'm not sure if that's true on very many kernels, if indeed any...\n\nI doubt we could buy much by depending on sched_yield(); if you want\nto assume POSIX facilities, ISTM you might as well go for user-space\nsemaphores and forget the whole TAS mechanism.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 00:32:23 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten " }, { "msg_contents": "> Alfred Perlstein <[email protected]> writes:\n> > One trick that may help is calling sched_yield(2) on a lock miss,\n> > it's a POSIX call and quite new so you'd need a 'configure' test\n> > for it.\n> \n> The author of the current s_lock code seems to have thought that\n> select() with a zero delay would do the equivalent of sched_yield().\n> I'm not sure if that's true on very many kernels, if indeed any...\n> \n> I doubt we could buy much by depending on sched_yield(); if you want\n> to assume POSIX facilities, ISTM you might as well go for user-space\n> semaphores and forget the whole TAS mechanism.\n\n\nAnother issue is that sched_yield brings in the pthreads library/hooks\non some OS's, which we certainly want to avoid.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 2 Jan 2001 02:59:20 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "* Bruce Momjian <[email protected]> [010101 23:59] wrote:\n> > Alfred Perlstein <[email protected]> writes:\n> > > One trick that may help is calling sched_yield(2) on a lock miss,\n> > > it's a POSIX call and quite new so you'd need a 'configure' test\n> > > for it.\n> > \n> > The author of the current s_lock code seems to have thought that\n> > select() with a zero delay would do the equivalent of sched_yield().\n> > I'm not sure if that's true on very many kernels, if indeed any...\n> > \n> > I doubt we could buy much by depending on sched_yield(); if you want\n> > to assume POSIX facilities, ISTM you might as well go for user-space\n> > semaphores and forget the whole TAS mechanism.\n> \n> \n> Another issue is that sched_yield brings in the pthreads library/hooks\n> on some OS's, which we certainly want to avoid.\n\nI know it's a major undertaking, but since the work is sort of done,\nhave you guys considered the port to solaris threads and seeing about\nmaking a pthreads port of that?\n\nI know it would probably get you considerable gains under Windows\nat the expense of dropping some really really legacy system.\n\nOr you could do what apache (is rumored) does and have it do either\nthreads or processes or both...\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Tue, 2 Jan 2001 00:02:31 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" } ]
[ { "msg_contents": "\nIf I want to connect to a Postgresql server on the internet, how do I do it?\n\nWhat protocol do I use? How do I send commands? etc.\n\n=======================================================================\nPatrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/\n\n Therefore, since we are receiving a kingdom that cannot be\nshaken, let us be thankful, and so worship God acceptably with\nreverence and awe, for our \"God is a consuming fire.\"\n -- Hebrews 12:28-29\nhttp://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20001228\n=======================================================================\nCreated by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/\n\n", "msg_date": "Fri, 29 Dec 2000 09:56:57 +1300", "msg_from": "\"Patrick Dunford\" <[email protected]>", "msg_from_op": true, "msg_subject": "Connecting across internet" } ]
[ { "msg_contents": "> The bottom line turns out to be that on the Alpha hardware, it is\n> possible for TAS() to fail even when the lock is initially zero,\n> because that hardware's locking protocol will fail to acquire the\n> lock if the ldq_l/stq_c sequence is interrupted. TAS() *must* be\n> called in a retry loop on Alphas. Thus, the coding presently in\n> xlog.c,\n> \n> while (TAS(&(XLogCtl->chkp_lck)))\n> {\n> struct timeval delay = {2, 0};\n> \n> if (shutdown)\n> elog(STOP, \"Checkpoint lock is busy while data \n> base is shutting down\");\n> (void) select(0, NULL, NULL, NULL, &delay);\n> }\n> \n> is no good because it does not allow for multiple retries.\n> \n> Offhand I see no good reason why the above-quoted code isn't just\n> \n> S_LOCK(&(XLogCtl->chkp_lck));\n> \n> and propose to fix this problem by reducing it to that. If the lock\n> is held when it shouldn't be, we'll fail with a stuck-spinlock error.\n\nIt was not test against stuck slock: postmaster can shutdown db only\nwhen there is no backends running and this was just additional test\nfor that. Assuming that postmaster does right things I don't object\nto get rid of this test, but I would just remove shutdown test itself\n- checkpoints run long time and 2 sec timeout is better than ones\nin s_lock_sleep();\n\n> It also bothers me that xlog.c contains several places where \n> there is a potentially infinite wait for a lock. It seems to me\n> that these should time out with stuck-spinlock messages. Do you object\n> to such a change?\n\nI always considered time-based decision is slock stuck or not as hack -\nin old times elog(ERROR/FATAL) didn't unlock slocks sometimes, isn't\nit fixed now?\n\nAnyway I don't object if it bothers you -:)\nBut please do not use S_LOCK - as you see WAL code try to do other\nthings if slock of \"primary interest\" is busy.\n\nVadim\n", "msg_date": "Thu, 28 Dec 2000 13:56:39 -0800", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n> Anyway I don't object if it bothers you -:)\n> But please do not use S_LOCK - as you see WAL code try to do other\n> things if slock of \"primary interest\" is busy.\n\nIn some places, yes. But I also saw a number of places where S_LOCK is\nsufficient, and I think it's clearer to code that way whenever there's\nnot useful work to do before acquiring the lock. For example, is\n\n if (updrqst)\n {\n unsigned i = 0;\n\n for (;;)\n {\n if (!TAS(&(XLogCtl->info_lck)))\n {\n if (XLByteLT(XLogCtl->LgwrRqst.Write, LgwrRqst.Write))\n XLogCtl->LgwrRqst.Write = LgwrRqst.Write;\n S_UNLOCK(&(XLogCtl->info_lck));\n break;\n }\n s_lock_sleep(i++);\n }\n }\n\nreally better than\n\n if (updrqst)\n {\n S_LOCK(&(XLogCtl->info_lck));\n if (XLByteLT(XLogCtl->LgwrRqst.Write, LgwrRqst.Write))\n XLogCtl->LgwrRqst.Write = LgwrRqst.Write;\n S_UNLOCK(&(XLogCtl->info_lck));\n }\n\n? I don't think so...\n\nWhat I'm thinking of doing for the places where there is useful work\nto do while waiting is\n\n\tspins = 0;\n\twhile (TAS(lock))\n\t{\n\t\t/* do useful work here */\n\t\tS_LOCK_SLEEP(spins++);\n\t}\n\nwhere S_LOCK_SLEEP() expands to do the same things as the body of the\nexisting loop in s_lock().\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 28 Dec 2000 17:06:55 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten " } ]
[ { "msg_contents": "Ok.\n\n> -----Original Message-----\n> From: Tom Lane [mailto:[email protected]]\n> Sent: Thursday, December 28, 2000 2:07 PM\n> To: Mikheev, Vadim\n> Cc: [email protected]\n> Subject: Re: Assuming that TAS() will succeed the first time \n> is verboten\n> \n> \n> \n> \"Mikheev, Vadim\" <[email protected]> writes:\n> > Anyway I don't object if it bothers you -:)\n> > But please do not use S_LOCK - as you see WAL code try to do other\n> > things if slock of \"primary interest\" is busy.\n> \n> In some places, yes. But I also saw a number of places where \n> S_LOCK is\n> sufficient, and I think it's clearer to code that way whenever there's\n> not useful work to do before acquiring the lock. For example, is\n> \n> if (updrqst)\n> {\n> unsigned i = 0;\n> \n> for (;;)\n> {\n> if (!TAS(&(XLogCtl->info_lck)))\n> {\n> if (XLByteLT(XLogCtl->LgwrRqst.Write, LgwrRqst.Write))\n> XLogCtl->LgwrRqst.Write = LgwrRqst.Write;\n> S_UNLOCK(&(XLogCtl->info_lck));\n> break;\n> }\n> s_lock_sleep(i++);\n> }\n> }\n> \n> really better than\n> \n> if (updrqst)\n> {\n> S_LOCK(&(XLogCtl->info_lck));\n> if (XLByteLT(XLogCtl->LgwrRqst.Write, LgwrRqst.Write))\n> XLogCtl->LgwrRqst.Write = LgwrRqst.Write;\n> S_UNLOCK(&(XLogCtl->info_lck));\n> }\n> \n> ? I don't think so...\n> \n> What I'm thinking of doing for the places where there is useful work\n> to do while waiting is\n> \n> \tspins = 0;\n> \twhile (TAS(lock))\n> \t{\n> \t\t/* do useful work here */\n> \t\tS_LOCK_SLEEP(spins++);\n> \t}\n> \n> where S_LOCK_SLEEP() expands to do the same things as the body of the\n> existing loop in s_lock().\n> \n> \t\t\tregards, tom lane\n> \n", "msg_date": "Thu, 28 Dec 2000 14:11:46 -0800", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Assuming that TAS() will succeed the first time is verboten " } ]
[ { "msg_contents": "> > The code is based on some odd assumptions. A select() with 0 delay \n> > returns immediately unless there is an interrupt during its \n> > (very short!) time in kernel space.\n> \n> Yeah, I've wondered whether the 0 entries in s_spincycle[] \n> shouldn't be 1. The code author evidently expected select()\n> to at least yield the processor even with delay 0, but the select()\n> man pages I have handy say that it will \"return immediately\" when delay\n> is 0.\n\nI've run some tests with 5 instead of 0 and afair performance was worse,\nso we should carefully test !0 values. Actually, one slocks are held\nlonger than anothers - probably we should use different delays...\n\nVadim\n", "msg_date": "Fri, 29 Dec 2000 10:54:00 -0800", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Assuming that TAS() will succeed the first time is\n\tverboten" }, { "msg_contents": "On Fri, Dec 29, 2000 at 10:54:00AM -0800, Mikheev, Vadim wrote:\n> > > The code is based on some odd assumptions. A select() with 0 delay \n> > > returns immediately unless there is an interrupt during its \n> > > (very short!) time in kernel space.\n> > \n> > Yeah, I've wondered whether the 0 entries in s_spincycle[] \n> > shouldn't be 1. The code author evidently expected select()\n> > to at least yield the processor even with delay 0, but the select()\n> > man pages I have handy say that it will \"return immediately\" when delay\n> > is 0.\n> \n> I've run some tests with 5 instead of 0 and afair performance was worse,\n> so we should carefully test !0 values. \n\nThis is not surprising. Five microseconds is a long time, and the\ncurrent s_spincycle does it repeatedly.\n\n> Actually, one slocks are held\n> longer than anothers - probably we should use different delays...\n\nI don't understand the last remark. Are you proposing to mix some \nrandom numbers into the delays?\n\nDid you try it with \n\n #define S_NSPINCYCLE 2\n int s_spincycle[S_NSPINCYCLE] = {1, 1000};\n\nor even\n\n #define S_NSPINCYCLE 1\n int s_spincycle[S_NSPINCYCLE] = {1};\n\n? \n\nNathan Myers\[email protected]\n", "msg_date": "Fri, 29 Dec 2000 12:02:19 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" } ]
[ { "msg_contents": "Hi!\n\nI compiled the 7.1 version of the snapshot dated on the December 18 (on i386 \nLinux Red Hat 6.1). \nUsing the notify in the rule actions I get some errors and I suppose they are \nbugs.\n\nThe first one when the rule is triggered: \n\n[postgres@ postgres]$ createdb test\nCREATE DATABASE\n\ntest=# create table test_notify(one int);\nCREATE\n\ntest=# create rule i_test_notify as on insert to test_notify do notify ONE;\nCREATE\n\ntest=# insert into test_notify values (1);\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally\n before or while processing the request.\nThe connection to the server was lost. Attempting reset: Failed.\n!# \n\n\nThe second one (exactly, this is not a bug) when I try to see the rule \ndefinition.\n\ntest=# select * from pg_rules;\nERROR: get_ruledef of i_test_notify: query command type 5 not implemented yet\n\n\nFinally, when a dump of the database is performed:\n\n[postgres@ postgres]$ pg_dump test > test.pgdump\ndumpRules(): SELECT failed for rules associated with table \"test_notify\".\n Explanation from backend: 'ERROR: get_ruledef of i_test_notify: query \ncommand type 5 not implemented yet\n'.\n\nThis error is produced in the same way as in the previous case but in this \ncase, there is an additional problem since the dump aborts.\n\nWithin the patch I attach, you can find the solution for these problems:\n\nTo solve the first error the function gatherRewriteMeta in RewriteHandler.c was \nmodified\n\nTo solve the second and third errors the function get_utility_query_def in \nruleutils.c was added. The function get_query_def in ruleutils.c was modified \nas well.\n\n\nWould someone like to review it?\n\nThnaks.\n\nSergio.", "msg_date": "Fri, 29 Dec 2000 16:58:02 -0300", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "Notify with Rules bugs?" }, { "msg_contents": "[email protected] writes:\n> I compiled the 7.1 version of the snapshot dated on the December 18\n> (on i386 Linux Red Hat 6.1). Using the notify in the rule actions I\n> get some errors and I suppose they are bugs.\n\nThanks for the report and patch!\n\nI don't like the unchecked assumption that get_utility_query_def() will\nnever see anything except a NotifyStmt, but I'll fix that and apply it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 17:09:22 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Notify with Rules bugs? " } ]
[ { "msg_contents": "> > Actually, one slocks are held\n> > longer than anothers - probably we should use different delays...\n> \n> I don't understand the last remark. Are you proposing to mix some \n> random numbers into the delays?\n\nNo, use different s_spincycle-s for different slocks.\n\nVadim\n", "msg_date": "Fri, 29 Dec 2000 12:20:27 -0800", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Assuming that TAS() will succeed the first time is\n\tverboten" }, { "msg_contents": "One last followup on that bizarreness about shutdown's checkpoint\nfailing on Alpha platforms ---\n\nAfter changing the checkpoint code to loop, rather than assuming TAS()\nmust succeed the first time, I noticed that it always looped exactly\nonce. This didn't make sense to me at the time, but after querying some\nAlpha experts at DEC^H^H^HCompaq, it does now. If a new process's first\nwrite to a shared memory page is a stq_c, that stq_c is guaranteed to\nfail (at least on Tru64 Unix), because it will page fault. The shared\nmemory page is inherited read-only and is converted to read-write on\nfirst fault. This doesn't seem really necessary, but I suppose it's\ndone to share code with the copy-on-write case for non-shared pages\nthat are inherited via fork().\n\nIt makes sense that the checkpoint process's first write to shared\nmemory would be stq_c, because after all it shouldn't be scribbling\non shared memory until it's got the spinlock, n'est ce pas?\n\nSo a failure the first time through the TAS loop is entirely expected\nfor Alpha. I wouldn't be surprised to see similar behavior on other\narchitectures, now that I see the first-write-from-a-process connection.\n\nBottom line is the same: always call TAS() in a retry loop.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 14:00:27 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten " }, { "msg_contents": "> One last followup on that bizarreness about shutdown's checkpoint\n> failing on Alpha platforms ---\n> \n> After changing the checkpoint code to loop, rather than assuming TAS()\n> must succeed the first time, I noticed that it always looped exactly\n> once. This didn't make sense to me at the time, but after querying some\n> Alpha experts at DEC^H^H^HCompaq, it does now. If a new process's first\n> write to a shared memory page is a stq_c, that stq_c is guaranteed to\n> fail (at least on Tru64 Unix), because it will page fault. The shared\n> memory page is inherited read-only and is converted to read-write on\n> first fault. This doesn't seem really necessary, but I suppose it's\n> done to share code with the copy-on-write case for non-shared pages\n> that are inherited via fork().\n\nThis seems quite bizarre. Why would the process fail on the write, and\nnot just pause and wait for the fault to bring in the page? Doesn't the\nCPU halt the instruction to fetch in the page and restart the\ninstruction?\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 8 Jan 2001 22:15:30 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "On Mon, Jan 08, 2001 at 10:15:30PM -0500, Bruce Momjian wrote:\n> > One last followup on that bizarreness about shutdown's checkpoint\n> > failing on Alpha platforms ---\n> > \n> > After changing the checkpoint code to loop, rather than assuming TAS()\n> > must succeed the first time, I noticed that it always looped exactly\n> > once. This didn't make sense to me at the time, but after querying some\n> > Alpha experts at DEC^H^H^HCompaq, it does now. If a new process's first\n> > write to a shared memory page is a stq_c, that stq_c is guaranteed to\n> > fail (at least on Tru64 Unix), because it will page fault. The shared\n> > memory page is inherited read-only and is converted to read-write on\n> > first fault. This doesn't seem really necessary, but I suppose it's\n> > done to share code with the copy-on-write case for non-shared pages\n> > that are inherited via fork().\n> \n> This seems quite bizarre. Why would the process fail on the write, and\n> not just pause and wait for the fault to bring in the page? Doesn't the\n> CPU halt the instruction to fetch in the page and restart the\n> instruction?\n\nThis is normal, although non-intuitive. (Good detective work, Tom.) \nThe definition of load-locked/store-conditional says that if there's \nbeen an interrupt or trap (e.g. page fault) since the load-locked \ninstruction executed, the store-conditional instruction fails. That \nway you don't overwrite something that might have been written by \nanother process that ran during the interval before you got the CPU\nagain.\n\nThus, the instruction does get restarted, but the lock has been \n(correctly) cleared, resulting in the need for failure/retry. It's \nnot a performance issue, because it only happens once per process.\nThink of it as part of the cost of forking.\n\nNathan Myers\[email protected]\n", "msg_date": "Mon, 8 Jan 2001 19:41:46 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n>> After changing the checkpoint code to loop, rather than assuming TAS()\n>> must succeed the first time, I noticed that it always looped exactly\n>> once. This didn't make sense to me at the time, but after querying some\n>> Alpha experts at DEC^H^H^HCompaq, it does now. If a new process's first\n>> write to a shared memory page is a stq_c, that stq_c is guaranteed to\n>> fail (at least on Tru64 Unix), because it will page fault. The shared\n>> memory page is inherited read-only and is converted to read-write on\n>> first fault. This doesn't seem really necessary, but I suppose it's\n>> done to share code with the copy-on-write case for non-shared pages\n>> that are inherited via fork().\n\n> This seems quite bizarre. Why would the process fail on the write, and\n> not just pause and wait for the fault to bring in the page?\n\nAn ordinary write would be re-executed and would succeed after the\npage fault. stq_c is different, because it's only supposed to succeed\nif the processor has managed to hold an access lock on the target\naddress continuously since the ldq_l. It would be very bad form to try\nto hold the lock during a page fault. (stq_c will also fail if the\nprocessor is interrupted between ldq_l and stq_c, so occasional failures\nare to be expected. What was surprising me was the consistency of the\nfailure pattern.)\n\nSee the Alpha Architecture Manual if you really want to discuss this.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 23:03:45 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten " }, { "msg_contents": "\nOh, thanks. That makes sense.\n\n> Bruce Momjian <[email protected]> writes:\n> >> After changing the checkpoint code to loop, rather than assuming TAS()\n> >> must succeed the first time, I noticed that it always looped exactly\n> >> once. This didn't make sense to me at the time, but after querying some\n> >> Alpha experts at DEC^H^H^HCompaq, it does now. If a new process's first\n> >> write to a shared memory page is a stq_c, that stq_c is guaranteed to\n> >> fail (at least on Tru64 Unix), because it will page fault. The shared\n> >> memory page is inherited read-only and is converted to read-write on\n> >> first fault. This doesn't seem really necessary, but I suppose it's\n> >> done to share code with the copy-on-write case for non-shared pages\n> >> that are inherited via fork().\n> \n> > This seems quite bizarre. Why would the process fail on the write, and\n> > not just pause and wait for the fault to bring in the page?\n> \n> An ordinary write would be re-executed and would succeed after the\n> page fault. stq_c is different, because it's only supposed to succeed\n> if the processor has managed to hold an access lock on the target\n> address continuously since the ldq_l. It would be very bad form to try\n> to hold the lock during a page fault. (stq_c will also fail if the\n> processor is interrupted between ldq_l and stq_c, so occasional failures\n> are to be expected. What was surprising me was the consistency of the\n> failure pattern.)\n> \n> See the Alpha Architecture Manual if you really want to discuss this.\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 8 Jan 2001 23:17:04 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Assuming that TAS() will succeed the first time is verboten" } ]
[ { "msg_contents": " Date: Friday, December 29, 2000 @ 15:39:06\nAuthor: tgl\n\nUpdate of /home/projects/pgsql/cvsroot/pgsql/src\n from hub.org:/home/projects/pgsql/tmp/cvs-serv55162/src\n\nModified Files:\n\tMakefile.global.in \n\n----------------------------- Log Message -----------------------------\n\nstamp-h needs to be made by config.status, not elsewhere, per recipe in\nAutoconf manual. In particular, touching it before creating config.status\nis guaranteed to lose.\n\n", "msg_date": "Fri, 29 Dec 2000 15:39:07 -0500 (EST)", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "pgsql/src (Makefile.global.in)" }, { "msg_contents": "[email protected] writes:\n\n> stamp-h needs to be made by config.status, not elsewhere, per recipe in\n> Autoconf manual.\n\nThe recipe in the Autoconf manual is broken.\n\nAssume that config.status has been updated to be newer than config.h.\nChances are that it is also newer than Makefile.global. (Possibly because\nyour last cvs update fetched a new configure.) Then the make run will\nfirst execute config.status to update Makefile.global, which will also run\nthe extra commands in the second argument of AC_OUTPUT. Thus, the stamp\nfile has been updated without any action taking place on config.h*.\n\n(This is a very real scenario. I spent quite a bit of time figuring out\nwhy initdb in the regression test would fail after the version upgrade to\n7.1beta1. (So I guess the version cross-checking in initdb does work. :-)\n) The makefiles already got the new version (and hence the shells\nscripts), but config.h didn't (and therefore not the C programs).)\n\n> In particular, touching it before creating config.status is guaranteed\n> to lose.\n\nExactly why?\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 01:54:17 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in)" }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> The recipe in the Autoconf manual is broken.\n\nPossibly, but the way you were doing it was definitely broken.\n\n> Assume that config.status has been updated to be newer than config.h.\n> Chances are that it is also newer than Makefile.global. (Possibly because\n> your last cvs update fetched a new configure.) Then the make run will\n> first execute config.status to update Makefile.global, which will also run\n> the extra commands in the second argument of AC_OUTPUT. Thus, the stamp\n> file has been updated without any action taking place on config.h*.\n\nHuh? There is only one config.status, and it'll update all its output\nfiles whenever it runs. I don't see the issue.\n\n>> In particular, touching it before creating config.status is guaranteed\n>> to lose.\n\n> Exactly why?\n\nExcess runs of config.status. stamp-h has to be touched after making\nconfig.status, not before. Also, although this may be a third-order\nconsideration, I direct your attention to configure's --no-create\noption...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 19:57:29 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Tom Lane writes:\n\n> Huh? There is only one config.status, and it'll update all its output\n> files whenever it runs. I don't see the issue.\n\nThe rules in the makefiles cause config.status to only update the file\nthat triggered the rule. E.g.,\n\nGNUmakefile: GNUmakefile.in $(top_builddir)/config.status\n\tCONFIG_FILES=$@ CONFIG_HEADERS= ./config.status\n\n(Yes, this interface is incredibly stupid.)\n\n> >> In particular, touching it before creating config.status is guaranteed\n> >> to lose.\n>\n> > Exactly why?\n>\n> Excess runs of config.status. stamp-h has to be touched after making\n> config.status, not before.\n\nOk, now I see it. I guess we'll have to go back to forcing a touch of\nconfig.h after config.status runs in order to get this to work properly.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 02:42:14 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n>> Huh? There is only one config.status, and it'll update all its output\n>> files whenever it runs. I don't see the issue.\n\n> The rules in the makefiles cause config.status to only update the file\n> that triggered the rule. E.g.,\n\n> GNUmakefile: GNUmakefile.in $(top_builddir)/config.status\n> \tCONFIG_FILES=$@ CONFIG_HEADERS= ./config.status\n\n> (Yes, this interface is incredibly stupid.)\n\nUh, why don't we just make it generate all its output files each time?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 21:02:46 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Tom Lane writes:\n\n> > The rules in the makefiles cause config.status to only update the file\n> > that triggered the rule. E.g.,\n>\n> > GNUmakefile: GNUmakefile.in $(top_builddir)/config.status\n> > \tCONFIG_FILES=$@ CONFIG_HEADERS= ./config.status\n>\n> > (Yes, this interface is incredibly stupid.)\n>\n> Uh, why don't we just make it generate all its output files each time?\n\nBecause the commands in a rule should generally only update the target\nfile.\n\nSay I change backend/port/Makefile.in, then run make, then config.status\nshould not update Makefile.global, because that will trigger a bunch of\nother rules (e.g., initdb) that I didn't ask for.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 30 Dec 2000 17:12:21 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n>> Uh, why don't we just make it generate all its output files each time?\n\n> Because the commands in a rule should generally only update the target\n> file.\n\nIf you insist ...\n\nPerhaps the answer is to treat stamp-h as a real output file (ie,\ngenerated from a stamp-h.in file) rather than hacking it into place\nas an AC_OUTPUT extra command. It looks to me like config.status\nonly does the keep-the-old-timestamp bit for CONFIG_HEADERS files,\nnot CONFIG_FILES files, so classifying stamp-h as the latter kind\nwould make things work.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 30 Dec 2000 13:15:07 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Tom Lane writes:\n\n> Perhaps the answer is to treat stamp-h as a real output file (ie,\n> generated from a stamp-h.in file) rather than hacking it into place\n> as an AC_OUTPUT extra command. It looks to me like config.status\n> only does the keep-the-old-timestamp bit for CONFIG_HEADERS files,\n> not CONFIG_FILES files, so classifying stamp-h as the latter kind\n> would make things work.\n\nThat would probably work, but I'm kind of hesitant to create an empty\ninput file in cvs just to serve this marginal feature. (It wouldn't take\n/dev/null because it tries to use .//dev/null.) Moreover, the likely\ncandidate name stamp-h.in is sort of reserved for doing the same trickery\non autoheader, in case we ever use that.\n\nI came up with this:\n\ndiff -c -r1.86 configure.in\n*** configure.in 2001/01/01 23:10:09 1.86\n--- configure.in 2001/01/02 19:20:16\n***************\n*** 1140,1144 ****\n ],\n [\n # Update timestamp for config.h (see Makefile.global)\n! echo >src/include/stamp-h\n ])\n--- 1140,1144 ----\n ],\n [\n # Update timestamp for config.h (see Makefile.global)\n! test x\"$CONFIG_HEADERS\" != x\"\" && echo >src/include/stamp-h\n ])\n\nThis only updates the stamp file if config.h is actually being considered\nby config.status.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Tue, 2 Jan 2001 20:36:49 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> [\n> # Update timestamp for config.h (see Makefile.global)\n> ! test x\"$CONFIG_HEADERS\" != x\"\" && echo >src/include/stamp-h\n> ])\n\n> This only updates the stamp file if config.h is actually being considered\n> by config.status.\n\nSomeday there will need to be a sed or grep test there to see if\nconfig.h is actually mentioned in $CONFIG_HEADERS. But as long as\nwe only have one output headerfile, it should work ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 02 Jan 2001 15:25:50 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pgsql/src (Makefile.global.in) " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n\n> That would probably work, but I'm kind of hesitant to create an empty\n> input file in cvs just to serve this marginal feature. (It wouldn't take\n> /dev/null because it tries to use .//dev/null.) Moreover, the likely\n> candidate name stamp-h.in is sort of reserved for doing the same trickery\n> on autoheader, in case we ever use that.\n> \n> I came up with this:\n> \n> diff -c -r1.86 configure.in\n> *** configure.in 2001/01/01 23:10:09 1.86\n> --- configure.in 2001/01/02 19:20:16\n> ***************\n> *** 1140,1144 ****\n> ],\n> [\n> # Update timestamp for config.h (see Makefile.global)\n> ! echo >src/include/stamp-h\n> ])\n> --- 1140,1144 ----\n> ],\n> [\n> # Update timestamp for config.h (see Makefile.global)\n> ! test x\"$CONFIG_HEADERS\" != x\"\" && echo >src/include/stamp-h\n> ])\n> \n> This only updates the stamp file if config.h is actually being considered\n> by config.status.\n\nThat's the usual approach. For example, when automake is used with a\nsingle configuration header in the same directory, it puts this in\nconfigure:\n\ntest -z \"$CONFIG_HEADERS\" || echo timestamp > stamp-h\n\nautomake handles these sorts of details automatically.\n\nIan\n", "msg_date": "02 Jan 2001 12:53:32 -0800", "msg_from": "Ian Lance Taylor <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: pgsql/src (Makefile.global.in)" } ]
[ { "msg_contents": "We backup our postgre 7.0.2 databases nightly via a cron script from a\nremote box that calls pg_dump -f filename dbname or something to that\neffect. About a week ago we started running out of disk space and we didn't\nknow it, and pg_dump doesn't report any errors so the cron script didn't\nreport that to us. The result being we have a weeks worth of corrupt\nbackups, this is clearly a problem.\n\nFYI : the database server is Redhat Linux 6.1, Postgre 7.0.2 from RPM,\nAthlon 900 w/ 256M\nand the backup server is RedHat 6.1, Postgre 7.0.2 client RPMS, P133 w/ 32M.\n\n> When the filesystem fills, pg_dump continues attempting to write data\n> which is then lost. As we are running pg_dump in a cron job, we would\n> like it to fail (return a non-zero error code) if there are any filesystem\n> errors. I realize that for stdout the return value should always be true,\n> but for the -f option I would like to see the checks done. \n> \n> Taking a look at the source for pg_dump I see that the return values from\n> the calls to fputs are not being checked. If I write a wrapper for fputs\n> that checks the error code and sets a error flag which will be the return\n> value of the program would that be an acceptable patch? Or should I check\n> the return value of each of the 17 separate calls individually? Would a\n> patch for this bug be accepted against 7.0.3 or should I write it against\n> 7.1 CVS?\n> \nThanks,\n\nMatt O'Connor\n\n\n", "msg_date": "Fri, 29 Dec 2000 15:22:36 -0600", "msg_from": "Matthew <[email protected]>", "msg_from_op": true, "msg_subject": "pg_dump problem" } ]
[ { "msg_contents": "With this afternoon's CVS sources, I got a failure in the 'polygon'\nregression test while running the parallel-mode tests:\n\n --\n CREATE TABLE POLYGON_TBL(f1 polygon);\n+ ERROR: heap_update: (am)invalid tid\n INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)');\n\n(plus many subsequent diffs arising from the lack of polygon_tbl).\n\nThis doesn't seem to be very repeatable --- I've only seen it once in\nabout a dozen tries. But there's a problem in there somewhere. I am\ncycling the tests now in hopes of duplicating the failure.\n\nThere are only four heap_update() calls performed during this command,\nall arising directly or indirectly from creation of the TOAST table:\n\n#1 0xbe110 in UpdateStats (relid=10, reltuples=1000) at index.c:1742\n\n#1 0xbe110 in UpdateStats (relid=1, reltuples=1000) at index.c:1742\n\n#1 0xbdb70 in setRelhasindex (relid=145156, hasindex=1 '\\001') at index.c:1487\n\n#1 0xddd78 in AlterTableCreateToastTable (relationName=0x23710 \"\",\n silent=-48 '�') at command.c:1696\n\nMy suspicions are focused on the last one in AlterTableCreateToastTable,\nbut I can't prove it yet ...\n\nHas anyone else seen something like this? Any ideas what's wrong?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 29 Dec 2000 17:41:25 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Regress-test failure in current sources" } ]
[ { "msg_contents": "Hi,\n\n It turns out the problem causing the oid failures is with our \nsnprintf. specifically we are formatting \"%u\" incorrectly:\n\nusing a enhanced-for-testing version of our snprintf I get.\n\nformatting '-1040' with '%lu'\n snprintf = 18446744073709550576\n sprintf = 18446744073709550576\n\nformatting '-1040' with '%u'\n snprintf = 18446744073709550576\n sprintf = 4294966256\n\n\noidout() is where the offending call originates, FWIW.\n snprintf(result, 12, \"%u\", o);\n\nI've massaged in the snprintf.c code from openssh into postgres, and \noid now passes the regression test, but have a couple of questions:\n 1) could the openssh code be a candidate to replace our version? It \n looks quite a bit more 'featureful', and I'd imagine it is about \n as safe as snprintf gets.\n 2) do we _need_ oidout() to \"%u\", or could we \"%lu\" and fully take\n advantage of the longer long on 64bit platforms?\n\ncheers.\n brent\n", "msg_date": "Sat, 30 Dec 2000 09:00:09 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "oid failures on Alpha solved" }, { "msg_contents": "Brent Verner <[email protected]> writes:\n> formatting '-1040' with '%u'\n> snprintf = 18446744073709550576\n> sprintf = 4294966256\n\n> oidout() is where the offending call originates, FWIW.\n> snprintf(result, 12, \"%u\", o);\n\nHm. This is clearly a bug in snprintf. Did I understand you correctly\nthat configure is choosing backend/port/snprintf.c rather than one from\nthe C library? If so, it should be straightforward to fix.\n\n> 1) could the openssh code be a candidate to replace our version? It \n> looks quite a bit more 'featureful', and I'd imagine it is about \n> as safe as snprintf gets.\n\n(a) what's the license? (b) is it a lot bigger than the one we have?\n\n> 2) do we _need_ oidout() to \"%u\", or could we \"%lu\" and fully take\n> advantage of the longer long on 64bit platforms?\n\nOID is 4 bytes and %u is the correct format for it. 8-byte OIDs are a\ncan of worms that we will *not* open just now.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 30 Dec 2000 12:57:06 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: oid failures on Alpha solved " }, { "msg_contents": "> Brent Verner <[email protected]> writes:\n>> formatting '-1040' with '%u'\n>> snprintf = 18446744073709550576\n>> sprintf = 4294966256\n\n>> oidout() is where the offending call originates, FWIW.\n>> snprintf(result, 12, \"%u\", o);\n\n> Hm. This is clearly a bug in snprintf.\n\nOK, I was able to duplicate this failure on Debian Alpha after forcing\nour snprintf emulation to be used instead of the system's. Problem is\nsloppy signed-vs-unsigned casting in snprintf.c. I've committed a fix.\nAnother day, another bug...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 30 Dec 2000 14:24:38 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: oid failures on Alpha solved " }, { "msg_contents": "On 30 Dec 2000 at 12:57 (-0500), Tom Lane wrote:\n| Brent Verner <[email protected]> writes:\n| > formatting '-1040' with '%u'\n| > snprintf = 18446744073709550576\n| > sprintf = 4294966256\n| \n| > oidout() is where the offending call originates, FWIW.\n| > snprintf(result, 12, \"%u\", o);\n| \n| Hm. This is clearly a bug in snprintf. Did I understand you correctly\n| that configure is choosing backend/port/snprintf.c rather than one from\n| the C library? If so, it should be straightforward to fix.\n\nyes, backend/port/snprintf.c is being used.\n\n| > 1) could the openssh code be a candidate to replace our version? It \n| > looks quite a bit more 'featureful', and I'd imagine it is about \n| > as safe as snprintf gets.\n| \n| (a) what's the license? (b) is it a lot bigger than the one we have?\n\na) no license in file. file is obviously 'related' to the current\n version used in postgresql. version I used came with openssh-2.?,\n so if any license is applicable, i'd imagine it's BSD-like.\nb) 10.7k postgresql snprintf.c\n 18.4k openssh snprintf.c\n (a sizable portion of this size difference is a test main() at the\n end of the file openssh file, which I found useful)\n\nyou can snag a slightly modified-to-work-in-postgres copy from \nhttp://pg.rcfile.org/alpha/snprintf.c if you'd like to check it out.\nit is a drop in replacement as it stands. my changes to the original\nwere s/long double/double/g and moving some #cpp directives around.\n\n| > 2) do we _need_ oidout() to \"%u\", or could we \"%lu\" and fully take\n| > advantage of the longer long on 64bit platforms?\n| \n| OID is 4 bytes and %u is the correct format for it. 8-byte OIDs are a\n| can of worms that we will *not* open just now.\n\nright on.\n\ncheers.\n brent\n", "msg_date": "Sat, 30 Dec 2000 15:04:16 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: oid failures on Alpha solved" }, { "msg_contents": "On 30 Dec 2000 at 14:24 (-0500), Tom Lane wrote:\n| > Brent Verner <[email protected]> writes:\n| >> formatting '-1040' with '%u'\n| >> snprintf = 18446744073709550576\n| >> sprintf = 4294966256\n| \n| >> oidout() is where the offending call originates, FWIW.\n| >> snprintf(result, 12, \"%u\", o);\n| \n| > Hm. This is clearly a bug in snprintf.\n| \n| OK, I was able to duplicate this failure on Debian Alpha after forcing\n| our snprintf emulation to be used instead of the system's. Problem is\n| sloppy signed-vs-unsigned casting in snprintf.c. I've committed a fix.\n| Another day, another bug...\n\nindeed. the most recent snprintf.c works as expected.\n\nthank you.\n brent\n", "msg_date": "Sat, 30 Dec 2000 21:25:35 -0500", "msg_from": "Brent Verner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: oid failures on Alpha solved" } ]
[ { "msg_contents": "a couple of bugs in new WAL code.\nThanks to Tom for pointing to one of them.\nInitdb is recommended but you can avoid it\nif shutdown old version properly (format of\none of heap log records was changed).\n\nVadim\n\n\n", "msg_date": "Sat, 30 Dec 2000 07:44:06 -0800", "msg_from": "\"Vadim Mikheev\" <[email protected]>", "msg_from_op": true, "msg_subject": "Just fixed" } ]
[ { "msg_contents": "Can anybodt give me a few examples on how to use heap_modifytuple() \nefficiently when I do NOT want to modify an attribute through a postgres \nfunction?\n\nAll the examples given in the source seem to use some return of a postgres \nfunction (like current user etc). I just want to insert strings into a tuple \ncought in a trigger function. I tried to find some useful information \nregarding the \"Datum\" type, but I failed to understand how to use it here for \nmy purposes. \n\nAny help appreciated - in exchange I volunteer to write proper documentation \nfor heap_modifytuple() once I understood how to work it properly.\n\nRegards\nHorst\n", "msg_date": "Sun, 31 Dec 2000 15:04:57 +1100", "msg_from": "Horst Herb <[email protected]>", "msg_from_op": true, "msg_subject": "heap_modifytuple() - help needed" } ]
[ { "msg_contents": "Hi,\n\nsome months ago I've asked for a suggestion for this bug:\n\ncreate table a (\n id serial primary key,\n something text\n);\n\ncreate table b (\n morething text\n) inherits (a);\n\ncreate table c (\n trouble int references b;\n);\nNOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)\nERROR: PRIMARY KEY for referenced table \"b\" not found\n\n\nHow is possible to resolve this bug?\nHow is possible to talk about a ORDBMS with this kind of error?\n\nI've looked for workaround, but:\n\ncreate table d (\n mytext text,\n primary key (id)\n) inherits (a);\nERROR: CREATE TABLE: column 'id' named in key does not exist\n\nHow can I help you to fix this?\n\n\nBest wishes, \\fer\n", "msg_date": "Sun, 31 Dec 2000 15:42:00 +0100 (CET)", "msg_from": "Ferruccio Zamuner <[email protected]>", "msg_from_op": true, "msg_subject": "PRIMARY KEY and INHERITANCE" }, { "msg_contents": "Ferruccio Zamuner wrote:\n >Hi,\n >\n >some months ago I've asked for a suggestion for this bug:\n >\n >create table a (\n > id serial primary key,\n > something text\n >);\n >\n >create table b (\n > morething text\n >) inherits (a);\n >\n >create table c (\n > trouble int references b;\n >);\n >NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(\n >s)\n >ERROR: PRIMARY KEY for referenced table \"b\" not found\n >\n >\n >How is possible to resolve this bug?\n >How is possible to talk about a ORDBMS with this kind of error?\n \nInheritance badly needs fixing (= I very much want it to work right!).\n\n >I've looked for workaround, but:\n >\n >create table d (\n > mytext text,\n > primary key (id)\n >) inherits (a);\n >ERROR: CREATE TABLE: column 'id' named in key does not exist\n \nThis does work at 7.1\n \n >How can I help you to fix this?\n >\n\nI had some suggestions for Inheritance semantics that no-one has yet\ncommented on (24th December \"Re: [HACKERS] RI problem with inherited\ntable (fwd)\").\n\nIf people agree with these, I would like to start research on how to\nimplement them.\n\n\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Ye have heard that it hath been said, Thou shalt love \n thy neighbour, and hate thine enemy. But I say unto \n you, Love your enemies, bless them that curse you, do \n good to them that hate you, and pray for them which \n despitefully use you, and persecute you;\" \n Matthew 5:43,44 \n\n\n", "msg_date": "Sun, 31 Dec 2000 19:13:35 +0000", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PRIMARY KEY and INHERITANCE " }, { "msg_contents": "On Monday 01 January 2001 01:42, Ferruccio Zamuner wrote:\n> Hi,\n>\n> some months ago I've asked for a suggestion for this bug:\n>\n> create table a (\n> id serial primary key,\n> something text\n> );\n>\n> create table b (\n> morething text\n> ) inherits (a);\n>\n> create table c (\n> trouble int references b;\n> );\n> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY\n> check(s) ERROR: PRIMARY KEY for referenced table \"b\" not found\n>\n>\n> How is possible to resolve this bug?\n> How is possible to talk about a ORDBMS with this kind of error?\n\nIt is not a bug, I would call it a missing feature. I had the same problem, \nand somebody from this list helped me with a private email. I think this \nshould be included in the FAQ and general documentation.\n\nWhat happens is that the attribute \"id\" is inherited, but the index on \"id\" \nis not. The workaround is:\n\ncreate unique index table_b_id on b(id);\n\nThen the index exists, and the foreign key can be referenced.\n\nYes, I share your believe that the automatic generation of this index should \nbe a minimum requirement for an _O_RDBMS, but who will have time to implement \nit properly?\n\nRegards,\nHorst\n", "msg_date": "Mon, 1 Jan 2001 10:09:52 +1100", "msg_from": "Horst Herb <[email protected]>", "msg_from_op": false, "msg_subject": "Re: PRIMARY KEY and INHERITANCE" }, { "msg_contents": " From: Horst Herb <[email protected]>\n Date: Mon, 1 Jan 2001 10:09:52 +1100\n\n>> create table a (\n>> id serial primary key,\n>> something text\n>> );\n>>\n>> create table b (\n>> morething text\n>> ) inherits (a);\n>>\n>> create table c (\n>> trouble int references b;\n>> );\n\n>> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY\n>> check(s) ERROR: PRIMARY KEY for referenced table \"b\" not found\n>\n>\n>> How is possible to resolve this bug?\n>> How is possible to talk about a ORDBMS with this kind of error?\n\n> It is not a bug, I would call it a missing feature. I had the same problem, \n> and somebody from this list helped me with a private email. I think this \n> should be included in the FAQ and general documentation.\n> What happens is that the attribute \"id\" is inherited, but the index on \"id\" \n> is not. The workaround is:\n\n> create unique index table_b_id on b(id);\n\n> Then the index exists, and the foreign key can be referenced.\n\nThank you Horst,\n\nI was very happy for this workaround: it could make me able to use classes\nduring the design and it could give me a power approach, but now:\n\n\\di\n List of relations\n Name | Type | Owner \n---------------------------+-------+-------\n a_pkey | index | fer\n table_b_id | index | fer\n\n# create table c (test int references b);\nNOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)\nERROR: PRIMARY KEY for referenced table \"b\" not found\n\nI've also tried to build b_pkey unique index:\n b_pkey | index | fer\n\nThe trouble still persists.\n\n\nMay someone give me another workaround for PostgreSQL 7.0.3?\n\n\nThank you in advance, \\fer\n", "msg_date": "Tue, 2 Jan 2001 01:34:55 +0100 (CET)", "msg_from": "Ferruccio Zamuner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: PRIMARY KEY and INHERITANCE" } ]
[ { "msg_contents": "I noticed today that pg_dumpall from current CVS does *NOT*\ndump a password assiged to the postgres user. \n\nI consider this BAD, since if one has to restore from\na pg_dumpall, one may forget to reset the password. \n\nLER\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Sun, 31 Dec 2000 17:59:17 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "pg_dumpall (7.1beta1, current CVS)" }, { "msg_contents": "* Larry Rosenman <[email protected]> [001231 17:59]:\n> I noticed today that pg_dumpall from current CVS does *NOT*\n> dump a password assiged to the postgres user. \n> \n> I consider this BAD, since if one has to restore from\n> a pg_dumpall, one may forget to reset the password. \n> \n> LER\nAnd, it was easier than I thought to fix it....\n\nHere is a patch:\n\nIndex: src/bin/pg_dump/pg_dumpall.sh\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.sh,v\nretrieving revision 1.9\ndiff -c -r1.9 pg_dumpall.sh\n*** src/bin/pg_dump/pg_dumpall.sh\t2000/12/19 22:12:47\t1.9\n--- src/bin/pg_dump/pg_dumpall.sh\t2001/01/01 01:33:58\n***************\n*** 164,169 ****\n--- 164,174 ----\n || CAST(valuntil AS TIMESTAMP) || '''' ELSE '' END || ';'\n FROM pg_shadow\n WHERE usesysid <> (SELECT datdba FROM pg_database WHERE datname = 'template0');\n+ SELECT 'ALTER USER \"' || usename || '\"' \n+ || CASE WHEN passwd IS NOT NULL THEN ' PASSWORD ''' || passwd || '''' ELSE ''\n+ END || ';' \n+ FROM pg_shadow \n+ WHERE usesysid = (SELECT datdba FROM pg_database WHERE datname = 'template0');\n __END__\n echo\n \n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Sun, 31 Dec 2000 19:36:13 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Re: pg_dumpall (7.1beta1, current CVS)" }, { "msg_contents": "Larry Rosenman <[email protected]> writes:\n> I noticed today that pg_dumpall from current CVS does *NOT*\n> dump a password assiged to the postgres user. \n\n> I consider this BAD, since if one has to restore from\n> a pg_dumpall, one may forget to reset the password. \n\nI'm unconvinced. The pg_dumpall script is clearly intended to allow\nrestoration into a new database installation with a different superuser;\nyou will note that the script is careful not to assume that the old and\nnew superuser names are the same (an assumption your proposed patch\ndoes make).\n\nIn any case the new installation certainly already *has* a superuser.\nI'm not sure it's the job of the restore script to change his password\nfor him.\n\nThis does point up that there is some state that is not saved/restored\nby pg_dumpall --- the pg_hba.conf file and other config files that\nlive in $PGDATA come to mind. Perhaps there should be a separate\nutility that saves/restores these. (pg_dump can't do it because there's\nno way to retrieve these files through a database connection.)\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 01 Jan 2001 14:16:05 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dumpall (7.1beta1, current CVS) " }, { "msg_contents": "* Tom Lane <[email protected]> [010101 13:16]:\n> Larry Rosenman <[email protected]> writes:\n> > I noticed today that pg_dumpall from current CVS does *NOT*\n> > dump a password assiged to the postgres user. \n> \n> > I consider this BAD, since if one has to restore from\n> > a pg_dumpall, one may forget to reset the password. \n> \n> I'm unconvinced. The pg_dumpall script is clearly intended to allow\n> restoration into a new database installation with a different superuser;\n> you will note that the script is careful not to assume that the old and\n> new superuser names are the same (an assumption your proposed patch\n> does make).\n> \n> In any case the new installation certainly already *has* a superuser.\n> I'm not sure it's the job of the restore script to change his password\n> for him.\n> \n> This does point up that there is some state that is not saved/restored\n> by pg_dumpall --- the pg_hba.conf file and other config files that\n> live in $PGDATA come to mind. Perhaps there should be a separate\n> utility that saves/restores these. (pg_dump can't do it because there's\n> no way to retrieve these files through a database connection.)\nHow would you suggest doing this? A shell script that makes a SHAR or\nsomesuch? Or what? Should it save the SuperUser password? \n\nI agree that this is a shortcoming. \n\nAs to the SuperUser password thing, how do we remind the user that\nthey had one set? Can we at least put out a comment in the pg_dumpall\noutput that mentions it? \n\n\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Mon, 1 Jan 2001 20:04:56 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Re: pg_dumpall (7.1beta1, current CVS)" } ]
[ { "msg_contents": "The planregress.sh tests generate errors. Attached is a tar of the \nplanregress directory...\n\n\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749", "msg_date": "Sun, 31 Dec 2000 22:49:42 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Current Sources/UW7.1.1" }, { "msg_contents": "Larry Rosenman <[email protected]> writes:\n> The planregress.sh tests generate errors. Attached is a tar of the \n> planregress directory...\n\nHave you examined the diffs to see whether any represent real problems,\nas opposed to trivial changes in output tuple order?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 01 Jan 2001 14:19:00 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Current Sources/UW7.1.1 " }, { "msg_contents": "No I hadn't. \n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972 414 9812 (voice) Internet: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n\n-----Original Message-----\nFrom: Tom Lane [mailto:[email protected]]\nSent: Monday, January 01, 2001 1:19 PM\nTo: Larry Rosenman\nCc: PostgreSQL Hackers List\nSubject: Re: [HACKERS] Current Sources/UW7.1.1 \n\n\nLarry Rosenman <[email protected]> writes:\n> The planregress.sh tests generate errors. Attached is a tar of the \n> planregress directory...\n\nHave you examined the diffs to see whether any represent real problems,\nas opposed to trivial changes in output tuple order?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 1 Jan 2001 13:51:56 -0600", "msg_from": "\"Lawrence E. Rosenman\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: Current Sources/UW7.1.1 " }, { "msg_contents": "* Tom Lane <[email protected]> [010101 13:19]:\n> Larry Rosenman <[email protected]> writes:\n> > The planregress.sh tests generate errors. Attached is a tar of the \n> > planregress directory...\n> \n> Have you examined the diffs to see whether any represent real problems,\n> as opposed to trivial changes in output tuple order?\nIs the tuple order differences ok? If so, I believe these were just\norder differences, but... \n\n\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Mon, 1 Jan 2001 20:05:27 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Current Sources/UW7.1.1" }, { "msg_contents": "Larry Rosenman <[email protected]> writes:\n>>>> The planregress.sh tests generate errors. Attached is a tar of the \n>>>> planregress directory...\n>> \n>> Have you examined the diffs to see whether any represent real problems,\n>> as opposed to trivial changes in output tuple order?\n>\n> Is the tuple order differences ok? If so, I believe these were just\n> order differences, but... \n\nYes, order differences are OK (except for queries that specify an ORDER\nBY, of course). Most of the regression test scripts are not so pedantic\nas to use an ORDER BY for every single SELECT, and so their result tuple\norderings are not truly well-defined according to the letter of the SQL\nspec. In practice, since the regress tests start from a virgin\ndatabase, the planner should choose the same plans on most or all\nplatforms, and so we usually don't have problems with cross-platform\ndifferences in result orderings. (There are some tests in which we've\nhad to insert explicit ORDER BY clauses just to prevent such problems,\nhowever.)\n\nplanregress creates an additional source of order variation by forcing\ndifferent plan types to be used, so you get some \"failures\" that have to\nbe validated by inspection. We could eliminate these \"failures\" by\nadding more explicit ORDER BYs, but IMHO that would actually make\nplanregress less useful, not more. The ORDER BY clauses would push the\nplanner to favor ordered plans over unordered ones, and thus to some\nextent defeat the purpose of exercising multiple plan types.\n\nSince planregress isn't intended for general-purpose use, only as a\ntest tool for planner hacking, I think it's most useful as-is. But\nyou do have to know how to interpret the output.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 02 Jan 2001 00:16:12 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Current Sources/UW7.1.1 " }, { "msg_contents": "* Tom Lane <[email protected]> [010101 23:16]:\n[snip]\nthere are a couple of them that I *THINK* have more tuples on one side\nor the other of the Diff. I'll try and narrow them... (or shouldn't I\nbother? )\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Mon, 1 Jan 2001 23:19:43 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Current Sources/UW7.1.1" }, { "msg_contents": "Larry Rosenman <[email protected]> writes:\n> * Tom Lane <[email protected]> [010101 23:16]:\n> [snip]\n> there are a couple of them that I *THINK* have more tuples on one side\n> or the other of the Diff. I'll try and narrow them... (or shouldn't I\n> bother? )\n\nThat would certainly be a bug, if so, so do look closer. An easy way\nto check for such a thing is to grep the regression.diffs file for\ndifferences in the \"(n rows)\" comments appended by psql.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 02 Jan 2001 00:25:58 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Current Sources/UW7.1.1 " }, { "msg_contents": "* Tom Lane <[email protected]> [010101 23:26]:\n> Larry Rosenman <[email protected]> writes:\n> > * Tom Lane <[email protected]> [010101 23:16]:\n> > [snip]\n> > there are a couple of them that I *THINK* have more tuples on one side\n> > or the other of the Diff. I'll try and narrow them... (or shouldn't I\n> > bother? )\n> \n> That would certainly be a bug, if so, so do look closer. An easy way\n> to check for such a thing is to grep the regression.diffs file for\n> differences in the \"(n rows)\" comments appended by psql.\nOk, I get to be wrong. The only row difference is our friend random. \n\nNever Mind. Maybe regressplan should check for that? \n\nLarry\n> \n> \t\t\tregards, tom lane\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Tue, 2 Jan 2001 06:36:53 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Current Sources/UW7.1.1" } ]
[ { "msg_contents": "I have a line in a PHP script that looks like this:\n\n\t$set=pg_exec($dbconn, \"SET DATESTYLE TO 'European'\"); //Set date format\n\nSince my ISP updated their server, this appears to be ignored as pgsql\nalways returns dates in ISO format.\n\n1. What is the default format of dates returned that I can ALWAYS rely on?\n\n2. Why is the command ignored?\n\n=======================================================================\nPatrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/\n\n There is no wisdom, no insight, no plan that can succeed against\nthe LORD.\n -- Proverbs 21:30\nhttp://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010101\n=======================================================================\nCreated by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/\n\n", "msg_date": "Tue, 2 Jan 2001 17:14:02 +1300", "msg_from": "\"Patrick Dunford\" <[email protected]>", "msg_from_op": true, "msg_subject": "Ignored PostgreSQL SET command" }, { "msg_contents": "> I have a line in a PHP script that looks like this:\n> $set=pg_exec($dbconn, \"SET DATESTYLE TO 'European'\"); //Set date format\n> Since my ISP updated their server, this appears to be ignored as pgsql\n> always returns dates in ISO format.\n> 1. What is the default format of dates returned that I can ALWAYS rely on?\n\nISO. Or you can start up the backend with a different default.\n\n> 2. Why is the command ignored?\n\nIt is not (or, is probably not). The variant \"European\" affects month\nand day ordering when specifying a date or when formatting a date with\nthe \"Postgres\" or \"SQL\" format.\n\nYou probably want\n\n SET DATESTYLE TO 'SQL,European'\n\nbut ymmv. Check out the docs for more complete info, specifically the\nchapter on data types.\n\n - Thomas\n", "msg_date": "Tue, 02 Jan 2001 07:47:06 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Ignored PostgreSQL SET command" }, { "msg_contents": "\"Patrick Dunford\" wrote:\n >I have a line in a PHP script that looks like this:\n >\n >\t$set=pg_exec($dbconn, \"SET DATESTYLE TO 'European'\"); //Set date format\n >\n >Since my ISP updated their server, this appears to be ignored as pgsql\n >always returns dates in ISO format.\n >\n >1. What is the default format of dates returned that I can ALWAYS rely on?\n \n>From release 7, the default format is ISO: yyyy-mm-dd\n\n >2. Why is the command ignored?\n\nEuropean has no meaning with the ISO datestyle.\n\nTo get normal European dates, do this SET command:\n\n SET DATESTYLE TO 'Postgres,European'\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Verily, verily, I say unto you, He that heareth my \n word, and believeth on him that sent me, hath \n everlasting life, and shall not come into \n condemnation; but is passed from death unto life.\" \n John 5:24 \n\n\n", "msg_date": "Tue, 02 Jan 2001 07:59:26 +0000", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Ignored PostgreSQL SET command " } ]
[ { "msg_contents": "\nKarel Zak wrote:\n\n > On Tue, 2 Jan 2001, Myron Scott wrote:\n >\n >\n >> spinlocks rewritten to mutex_\n >> locktable uses sema_\n >> some cond_ in bufmgr.c\n >\n >\n > Interesting, have you some comperation between IPC PostgresSQl anf\n > your thread based PostgreSQL.\n >\n > Karel\n\nYes, I did some comparisions but it is hard to\nmake accurate evaluations on the data. I basically\ndid 1000 inserts from 7.0.2 and the modified verison\nfrom 8 simultaneous clients. The original 7.0.2\nwas faster by an an order of magnitude. This needs to\nlooked into more though. It was just a rough test b/c clients\nand server all running on the same machine (Ultra 10\nw/512MB RAM).\n\nI don't really know what the impact of changing some of\nthe locking mechanisms is.\n\nOn the one hand, there is alot of overhead associated\nwith using TAO ORB as the fe<->be protocol. The 7.0.2\nfe<->be is pretty efficient, TAO with IIOP not as much so.\nAt the same time, using prepared statements when doing\nthe same insert with different variables over and over\ncuts out re-parsing and planning the statement on every\nexecute.\n\nLastly, I really didn't optimize my code at all. There\nare some places where GetEnv() in called over and over\nto get the thread local variable where it should only\nbe called once in the method and reused.\n\nSpeed wasn't the motivation, I just wanted to see if threads\nand PostgreSQL could be done.\n\nMyron\n\n\n", "msg_date": "Tue, 02 Jan 2001 07:43:55 -0800", "msg_from": "Myron Scott <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Using Threads?" }, { "msg_contents": "* Myron Scott <[email protected]> [010102 07:45] wrote:\n> \n> Karel Zak wrote:\n> \n> > On Tue, 2 Jan 2001, Myron Scott wrote:\n> >\n> >\n> >> spinlocks rewritten to mutex_\n> >> locktable uses sema_\n> >> some cond_ in bufmgr.c\n> >\n> >\n> > Interesting, have you some comperation between IPC PostgresSQl anf\n> > your thread based PostgreSQL.\n> >\n> > Karel\n> \n> Yes, I did some comparisions but it is hard to\n> make accurate evaluations on the data. I basically\n> did 1000 inserts from 7.0.2 and the modified verison\n> from 8 simultaneous clients. The original 7.0.2\n> was faster by an an order of magnitude. This needs to\n> looked into more though. It was just a rough test b/c clients\n> and server all running on the same machine (Ultra 10\n> w/512MB RAM).\n\nIt's possible what you're seeing is the entire process\nwait for a disk IO to complete.\n\nI'm wondering, how many lwps does your system use? Are all\nthe threads bound to a single lwp or do you let the threads\nmanager handle this all for you?\n\n> I don't really know what the impact of changing some of\n> the locking mechanisms is.\n\nheh. :)\n\n> On the one hand, there is alot of overhead associated\n> with using TAO ORB as the fe<->be protocol. The 7.0.2\n> fe<->be is pretty efficient, TAO with IIOP not as much so.\n> At the same time, using prepared statements when doing\n> the same insert with different variables over and over\n> cuts out re-parsing and planning the statement on every\n> execute.\n> \n> Lastly, I really didn't optimize my code at all. There\n> are some places where GetEnv() in called over and over\n> to get the thread local variable where it should only\n> be called once in the method and reused.\n> \n> Speed wasn't the motivation, I just wanted to see if threads\n> and PostgreSQL could be done.\n\nWell it'd be better to see if threads+postgresql could be\nmade faster than non-threaded postgresql.\n\nDo you see yourself with some extra free time in the upcommming\nweeks? :)\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Tue, 2 Jan 2001 07:52:34 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Using Threads?" }, { "msg_contents": "\n\nAlfred Perlstein wrote:\n\n\n> \n> It's possible what you're seeing is the entire process\n> wait for a disk IO to complete.\n> \n> I'm wondering, how many lwps does your system use? Are all\n> the threads bound to a single lwp or do you let the threads\n> manager handle this all for you?\n> \n\nYeah, I looked at this. I have one thread per process that\ndoes all flushing of buffer pages at transaction commit.\nThe client threads register buffer writes with this thread and\nwait for this thread to complete writes\nat transaction end. Unfortuately, selects also wait which really\nisn't nessessary. I hoped this would speed\nsimultaneous connections. I created this as both\na bound thread with its own lwp and a threads manager\nmanaged thread. I eventually settled on a threads manager\nmanaged thread, thinking that I wanted to set the priority\nof this thread low and commit as many transactions as\npossible simulateously. Maybe, I should rethink this.\n\nAs for client threads, that is managed by TAO and I\nhaven't really played with that configuration.\n\nMyron Scott\[email protected]\n\n", "msg_date": "Tue, 02 Jan 2001 08:46:02 -0800", "msg_from": "Myron Scott <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Using Threads?" }, { "msg_contents": "* Myron Scott <[email protected]> [010102 08:47] wrote:\n> \n> \n> Alfred Perlstein wrote:\n> \n> \n> > \n> > It's possible what you're seeing is the entire process\n> > wait for a disk IO to complete.\n> > \n> > I'm wondering, how many lwps does your system use? Are all\n> > the threads bound to a single lwp or do you let the threads\n> > manager handle this all for you?\n> > \n> \n> Yeah, I looked at this. I have one thread per process that\n> does all flushing of buffer pages at transaction commit.\n> The client threads register buffer writes with this thread and\n> wait for this thread to complete writes\n> at transaction end. Unfortuately, selects also wait which really\n> isn't nessessary. I hoped this would speed\n> simultaneous connections. I created this as both\n> a bound thread with its own lwp and a threads manager\n> managed thread. I eventually settled on a threads manager\n> managed thread, thinking that I wanted to set the priority\n> of this thread low and commit as many transactions as\n> possible simulateously. Maybe, I should rethink this.\n> \n> As for client threads, that is managed by TAO and I\n> haven't really played with that configuration.\n\nI think you're saying you have an lwp in what you used to\nbe per-process context? Meaning if you have 4 connections,\nyou should have 4 lwps doing disk IO?\n\nIf that's true, most likely your problems may be elsewhere,\nbut since you seem to be overcaching your writes you may\nbe pessimizing the writes. I wouldn't try to buffer it all,\ninstead I would hold off until a write is done that isn't\ncontiguous to the last write position and then being a flush\noperation.\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Tue, 2 Jan 2001 09:24:25 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Using Threads?" } ]
[ { "msg_contents": "I configured postgres 7.0.2 without tcl (or plperl for that matter).\n\nSo I went back and tried to make them. \n\nplperl made fine. No problems adding it to Postgres either.\n\nBut the tcl build fails and I think it is because configure creates an \nerroneous mkMakefile.tcldefs.sh unless USE_TCL is defined.\n\nThe Makefile for tcl executes the mkMakefile.tcldefs.sh to create the needed \ndefs to compile the pltcl.so\n\n# here's the target\nMakefile.tcldefs: mkMakefile.tcldefs.sh\n/bin/sh mkMakefile.tcldefs.sh\n\nBut if USE_TCL is not true then when configure creates the \nmkMakefile.tcldefs.sh from the .in file, @TCL_CONFIG_SH@ is not so nothing is \nsubstituted for it in the resulting mkMakefile.tcldefs.sh.\n\nI was able to overcome this by hand copying the tclConfig.sh to \nMakefile.tcldefs (and then removed all the ' (single quotes)) and \neverything is ok now.\n\nJust a note for something that may need to be repaired so tcl can be added \nafter an initial postgres build w/o having to re configure and reinstall ?\n\n\nthe \n\n__________________________________________________________________\nGet your own FREE, personal Netscape Webmail account today at \nhttp://webmail.netscape.com/\n", "msg_date": "Tue, 02 Jan 2001 17:55:30 -0500", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "problem with mkMakefile.tcldefs.sh if USE_TCL=false" }, { "msg_contents": "[email protected] writes:\n\n> But the tcl build fails and I think it is because configure creates an\n> erroneous mkMakefile.tcldefs.sh unless USE_TCL is defined.\n\n> Just a note for something that may need to be repaired so tcl can be added\n> after an initial postgres build w/o having to re configure and reinstall ?\n\nLying to configure is not supported. If you change your mind about the\noptions then you need to rerun it.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Thu, 4 Jan 2001 18:35:20 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: problem with mkMakefile.tcldefs.sh if USE_TCL=false" }, { "msg_contents": "How is that a lie? This isn't the case with --with-perl. Perl interface \nstill builds fine if you leave out --with-perl and decide to add it later.\n\nIt's simply that configure created the makefile either way, --with-tcl option \nor without. It was just a request to be consistent, or do nothing at all.\n\nThe documentation in the directory mentions nothiong about having to had \nspecify --with-tcl for the pltcl to build.\n\nPeter Eisentraut <[email protected]> wrote:\n>\n> [email protected] writes:\n> \n> > But the tcl build fails and I think it is because configure creates an\n> > erroneous mkMakefile.tcldefs.sh unless USE_TCL is defined.\n> \n> > Just a note for something that may need to be repaired so tcl can be added\n> > after an initial postgres build w/o having to re configure and reinstall ?\n> \n> Lying to configure is not supported. If you change your mind about the\n> options then you need to rerun it.\n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n> \n> \n__________________________________________________________________\nGet your own FREE, personal Netscape Webmail account today at \nhttp://webmail.netscape.com/\n", "msg_date": "Thu, 04 Jan 2001 13:01:48 -0500", "msg_from": "[email protected]", "msg_from_op": true, "msg_subject": "Re: problem with mkMakefile.tcldefs.sh if USE_TCL=false" }, { "msg_contents": "Question probably steps beyond the general list...\n\nHave a FreeBSD 4.2 box... have created two Virtual machines with the\njail process.\nApache and PHp configure and execute fine, but am having some\ncinfiguration and execution problems with pgsql... not sure if I am\nmissing something or if pgsql doesn't like being in the jail\n\nAttempting to manually start the postmaster produces the following:\n\n%postmaster -i\nIpcMemoryCreate: shmget failed (Function not implemented) key=5432010,\nsize=144, permission=700\nThis type of error is usually caused by an improper\nshared memory or System V IPC semaphore configuration.\nFor more information, see the FAQ and platform-specific\nFAQ's in the source directory pgsql/doc or on our\nweb site at http://www.postgresql.org.\nIpcMemoryIdGet: shmget failed (Function not implemented) key=5432010,\nsize=144, permission=0\nIpcMemoryAttach: shmat failed (Function not implemented) id=-2\nFATAL 1: AttachSLockMemory: could not attach segment\n%\n\nSearching for jail faq's and posts regarding this matter produces some\nclose, but not helpful posts regarding chroot'ed environments.\n\nAny insights, requests for details, and assistance are appreciated.\n\nDave\n\n", "msg_date": "Thu, 4 Jan 2001 13:02:21 -0500", "msg_from": "\"Dave VanAuken\" <[email protected]>", "msg_from_op": false, "msg_subject": "Installation and execution under Jail'ed virtual machine" }, { "msg_contents": "Have a FreeBSD 4.2 box... have created two Virtual machines with the\njail process.\nApache and PHp configure and execute fine, but am having some\nconfiguration and execution problems with pgsql... not sure if I am\nmissing something or if pgsql just cannot deal with being in the jail\nand sharing the sysv memory\n\nAttempting to manually start the postmaster produces the following:\n\n%postmaster -i\nIpcMemoryCreate: shmget failed (Function not implemented) key=5432010,\nsize=144, permission=700\nThis type of error is usually caused by an improper\nshared memory or System V IPC semaphore configuration.\nFor more information, see the FAQ and platform-specific\nFAQ's in the source directory pgsql/doc or on our\nweb site at http://www.postgresql.org.\nIpcMemoryIdGet: shmget failed (Function not implemented) key=5432010,\nsize=144, permission=0\nIpcMemoryAttach: shmat failed (Function not implemented) id=-2\nFATAL 1: AttachSLockMemory: could not attach segment\n%\n\nHave modified the sysctl.conf file to allow usage of sysv memory, but\nas it is already shared from the host machine, this may be causing\npgsql to barf on it.\n\nSearching for jail faq's and posts regarding this matter produces some\nclose, but not helpful posts regarding chroot'ed environments.\n\nAny insights, requests for details, and assistance are appreciated.\n\nDave\n\n", "msg_date": "Thu, 4 Jan 2001 17:04:50 -0500", "msg_from": "\"Dave VanAuken\" <[email protected]>", "msg_from_op": false, "msg_subject": "running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2" }, { "msg_contents": "On Thu, Jan 04, 2001 at 05:04:50PM -0500, Dave VanAuken wrote:\n> Have a FreeBSD 4.2 box... have created two Virtual machines with the\n> jail process.\n> Apache and PHp configure and execute fine, but am having some\n> configuration and execution problems with pgsql... not sure if I am\n> missing something or if pgsql just cannot deal with being in the jail\n> and sharing the sysv memory\n> \n> Attempting to manually start the postmaster produces the following:\n> \n> %postmaster -i\n> IpcMemoryCreate: shmget failed (Function not implemented)\n> key=5432010,\n\nPerhaps you could mail [email protected] and find out if\nthere are any issues with shared memory inside a jail. My first guess\nas to what the error message means is that it's not supported.\n\n\n-- \nMatt Beauregard\nInformation Technology Operations, DesignScape\n\nPh: +61 2 9361 4233 Fx: +61 2 9361 4633\n", "msg_date": "Fri, 5 Jan 2001 12:41:27 +1100", "msg_from": "Matt Beauregard <[email protected]>", "msg_from_op": false, "msg_subject": "Re: running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2" }, { "msg_contents": "Hi to all.\nIm in search for a tool or way to migrate data from a Cobol file to SQL \nand then To PostgreSQL or direct.\nIm trying to create a Datawarehouse with PostgreSQL and Zope to create \ninteractive reports from an Old Cobol System. (The Client dont want to \nmigrate to PSQL all of his system)\n\nAny suggestions??\n\nThanks!!!\n\n", "msg_date": "Thu, 04 Jan 2001 21:36:05 -0500", "msg_from": "\"Luis Fernando Fabara M.\" <[email protected]>", "msg_from_op": false, "msg_subject": "Cobol TO SQL To PostgreSQL" }, { "msg_contents": "As long as I know.. YES.\nIn fact the system will work like this.\nThere are 4 Cobol Servers in Sync With a Master Central Server.\nWhat they need is a system that will fetch the data from the Cobol \nMaster Server and fill the tables in aPostgreSQL Data Warehouse, then \nthis tables will be accessed by Zope, to generate WebBased reports on a \nWeb Aplication we are going to develop.\n\nThanks for any help you can give.\n\nMini-Me wrote:\n\n> Are they going to continue to use the legacy system for new\n> transactions?\n> \n> \n> At 09:36 PM 1/4/2001 -0500, you wrote:\n> \n>> Hi to all.\n>> Im in search for a tool or way to migrate data from a Cobol file to \n>> SQL and then To PostgreSQL or direct.\n>> Im trying to create a Datawarehouse with PostgreSQL and Zope to \n>> create interactive reports from an Old Cobol System. (The Client dont \n>> want to migrate to PSQL all of his system)\n>> \n>> Any suggestions??\n>> \n>> Thanks!!!\n> \n\n\n", "msg_date": "Thu, 04 Jan 2001 23:28:33 -0500", "msg_from": "\"Luis Fernando Fabara M.\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Cobol TO SQL To PostgreSQL" }, { "msg_contents": "\nread the jail man page:\n\n jail.sysvipc_allowed\n This MIB entry determines whether or not processes within a jail\n have access to System V IPC primitives. In the current jail imple-\n mentation, System V primitives share a single namespace across the\n host and jail environments, meaning that processes within a jail\n would be able to communicate with (and potentially interfere with)\n processes outside of the jail, and in other jails. As such, this\n functionality is disabled by default, but can be enabled by setting\n this MIB entry to 1.\n\n\n\nOn Thu, 4 Jan 2001, Dave VanAuken wrote:\n\n> Have a FreeBSD 4.2 box... have created two Virtual machines with the\n> jail process.\n> Apache and PHp configure and execute fine, but am having some\n> configuration and execution problems with pgsql... not sure if I am\n> missing something or if pgsql just cannot deal with being in the jail\n> and sharing the sysv memory\n>\n> Attempting to manually start the postmaster produces the following:\n>\n> %postmaster -i\n> IpcMemoryCreate: shmget failed (Function not implemented) key=5432010,\n> size=144, permission=700\n> This type of error is usually caused by an improper\n> shared memory or System V IPC semaphore configuration.\n> For more information, see the FAQ and platform-specific\n> FAQ's in the source directory pgsql/doc or on our\n> web site at http://www.postgresql.org.\n> IpcMemoryIdGet: shmget failed (Function not implemented) key=5432010,\n> size=144, permission=0\n> IpcMemoryAttach: shmat failed (Function not implemented) id=-2\n> FATAL 1: AttachSLockMemory: could not attach segment\n> %\n>\n> Have modified the sysctl.conf file to allow usage of sysv memory, but\n> as it is already shared from the host machine, this may be causing\n> pgsql to barf on it.\n>\n> Searching for jail faq's and posts regarding this matter produces some\n> close, but not helpful posts regarding chroot'ed environments.\n>\n> Any insights, requests for details, and assistance are appreciated.\n>\n> Dave\n>\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Fri, 5 Jan 2001 00:30:16 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: running pgsql 7 under Jail'ed virtual machine on\n FreeBSD 4.2" }, { "msg_contents": "As listed in the initial post immediately following the screen output,\nI have already set the sharing in the sysctl.conf file, the same error\nis being generated.\n\nDave\n\n-----Original Message-----\nFrom: [email protected]\n[mailto:[email protected]]On Behalf Of The Hermit\nHacker\nSent: Thursday, January 04, 2001 11:30 PM\nTo: Dave VanAuken\nCc: [email protected]\nSubject: Re: running pgsql 7 under Jail'ed virtual machine on FreeBSD\n4.2\n\n\n\nread the jail man page:\n\n jail.sysvipc_allowed\n This MIB entry determines whether or not processes within a\njail\n have access to System V IPC primitives. In the current jail\nimple-\n mentation, System V primitives share a single namespace\nacross the\n host and jail environments, meaning that processes within a\njail\n would be able to communicate with (and potentially interfere\nwith)\n processes outside of the jail, and in other jails. As such,\nthis\n functionality is disabled by default, but can be enabled by\nsetting\n this MIB entry to 1.\n\n\n\nOn Thu, 4 Jan 2001, Dave VanAuken wrote:\n\n> Have a FreeBSD 4.2 box... have created two Virtual machines with\nthe\n> jail process.\n> Apache and PHp configure and execute fine, but am having some\n> configuration and execution problems with pgsql... not sure if I am\n> missing something or if pgsql just cannot deal with being in the\njail\n> and sharing the sysv memory\n>\n> Attempting to manually start the postmaster produces the following:\n>\n> %postmaster -i\n> IpcMemoryCreate: shmget failed (Function not implemented)\nkey=5432010,\n> size=144, permission=700\n> This type of error is usually caused by an improper\n> shared memory or System V IPC semaphore configuration.\n> For more information, see the FAQ and platform-specific\n> FAQ's in the source directory pgsql/doc or on our\n> web site at http://www.postgresql.org.\n> IpcMemoryIdGet: shmget failed (Function not implemented)\nkey=5432010,\n> size=144, permission=0\n> IpcMemoryAttach: shmat failed (Function not implemented) id=-2\n> FATAL 1: AttachSLockMemory: could not attach segment\n> %\n>\n> Have modified the sysctl.conf file to allow usage of sysv memory,\nbut\n> as it is already shared from the host machine, this may be causing\n> pgsql to barf on it.\n>\n> Searching for jail faq's and posts regarding this matter produces\nsome\n> close, but not helpful posts regarding chroot'ed environments.\n>\n> Any insights, requests for details, and assistance are appreciated.\n>\n> Dave\n>\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick:\nScrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary:\nscrappy@{freebsd|postgresql}.org\n\n\n", "msg_date": "Fri, 5 Jan 2001 09:11:13 -0500", "msg_from": "\"Dave VanAuken\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2" }, { "msg_contents": "Here's the story about pgsql and jail:\n\n1. FreeBSD shared memory is _really_ shared across all jail VMs. I think\nits not going to change, as this seems like a great way for processes to\nexchange data...But I could be wrong. :)\n\n2. Postgres uses some funky math to determine which shmid to use for\ndifferent memory allocations it needs. The problem with that it has no\nidea about jails and will not generate a different shmid for different\nprocesses, so postgres processes end up stepping on each other's toes.\n\nSee include/storage/ipc.h, definition of SystemPortAddressGetIPCKey, and\nyou'll understand what I mean.\n\nTo properly fix this, I think this should be done:\n\nAnother (optional) backend parameter which should determine offset\n(hardcoded now to 17491) for allocation of different shmids...\n\ncomments? TODO?\n\n\nOn Thu, 4 Jan 2001, Dave VanAuken wrote:\n\n> Have a FreeBSD 4.2 box... have created two Virtual machines with the\n> jail process.\n> Apache and PHp configure and execute fine, but am having some\n> configuration and execution problems with pgsql... not sure if I am\n> missing something or if pgsql just cannot deal with being in the jail\n> and sharing the sysv memory\n> \n> Attempting to manually start the postmaster produces the following:\n> \n> %postmaster -i\n> IpcMemoryCreate: shmget failed (Function not implemented) key=5432010,\n> size=144, permission=700\n> This type of error is usually caused by an improper\n> shared memory or System V IPC semaphore configuration.\n> For more information, see the FAQ and platform-specific\n> FAQ's in the source directory pgsql/doc or on our\n> web site at http://www.postgresql.org.\n> IpcMemoryIdGet: shmget failed (Function not implemented) key=5432010,\n> size=144, permission=0\n> IpcMemoryAttach: shmat failed (Function not implemented) id=-2\n> FATAL 1: AttachSLockMemory: could not attach segment\n> %\n> \n> Have modified the sysctl.conf file to allow usage of sysv memory, but\n> as it is already shared from the host machine, this may be causing\n> pgsql to barf on it.\n> \n> Searching for jail faq's and posts regarding this matter produces some\n> close, but not helpful posts regarding chroot'ed environments.\n> \n> Any insights, requests for details, and assistance are appreciated.\n> \n> Dave\n> \n> \n\n", "msg_date": "Fri, 5 Jan 2001 13:50:18 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: running pgsql 7 under Jail'ed virtual machine on\n FreeBSD 4.2" }, { "msg_contents": "Knew about #1... and I'm not holding my breath for change gicing where\nthe development on that angle is heading.\n\nIn the installation directory for the jail i don't have the /storage\ndirectory, or for that matter the ipc.h file anywhere in the pgsql\ntree (both in the jail and host installations). The version installed\nwas 7.0.2\n\nWhat about hacking supplimentary installations and hardcoding new\noffsets for each subsequent installation of pgsql (can't even look\ninto that until i detemine where the ipc.h code now exists).\n\nAppreciate the input... the best description so far from the pgsql\npov regarding the situation... have been working almost entirely from\nthe fbsd pov up until not and running out of options. May be a wash\nfor using pgsql in this situation.\n\nDave\n\n-----Original Message-----\nFrom: [email protected]\n[mailto:[email protected]]On Behalf Of Alex Pilosov\nSent: Friday, January 05, 2001 1:50 PM\nTo: Dave VanAuken\nCc: [email protected]\nSubject: Re: running pgsql 7 under Jail'ed virtual machine on FreeBSD\n4.2\n\n\nHere's the story about pgsql and jail:\n\n1. FreeBSD shared memory is _really_ shared across all jail VMs. I\nthink\nits not going to change, as this seems like a great way for processes\nto\nexchange data...But I could be wrong. :)\n\n2. Postgres uses some funky math to determine which shmid to use for\ndifferent memory allocations it needs. The problem with that it has no\nidea about jails and will not generate a different shmid for different\nprocesses, so postgres processes end up stepping on each other's toes.\n\nSee include/storage/ipc.h, definition of SystemPortAddressGetIPCKey,\nand\nyou'll understand what I mean.\n\nTo properly fix this, I think this should be done:\n\nAnother (optional) backend parameter which should determine offset\n(hardcoded now to 17491) for allocation of different shmids...\n\ncomments? TODO?\n\n\nOn Thu, 4 Jan 2001, Dave VanAuken wrote:\n\n> Have a FreeBSD 4.2 box... have created two Virtual machines with\nthe\n> jail process.\n> Apache and PHp configure and execute fine, but am having some\n> configuration and execution problems with pgsql... not sure if I am\n> missing something or if pgsql just cannot deal with being in the\njail\n> and sharing the sysv memory\n>\n> Attempting to manually start the postmaster produces the following:\n>\n> %postmaster -i\n> IpcMemoryCreate: shmget failed (Function not implemented)\nkey=5432010,\n> size=144, permission=700\n> This type of error is usually caused by an improper\n> shared memory or System V IPC semaphore configuration.\n> For more information, see the FAQ and platform-specific\n> FAQ's in the source directory pgsql/doc or on our\n> web site at http://www.postgresql.org.\n> IpcMemoryIdGet: shmget failed (Function not implemented)\nkey=5432010,\n> size=144, permission=0\n> IpcMemoryAttach: shmat failed (Function not implemented) id=-2\n> FATAL 1: AttachSLockMemory: could not attach segment\n> %\n>\n> Have modified the sysctl.conf file to allow usage of sysv memory,\nbut\n> as it is already shared from the host machine, this may be causing\n> pgsql to barf on it.\n>\n> Searching for jail faq's and posts regarding this matter produces\nsome\n> close, but not helpful posts regarding chroot'ed environments.\n>\n> Any insights, requests for details, and assistance are appreciated.\n>\n> Dave\n>\n>\n\n\n", "msg_date": "Fri, 5 Jan 2001 15:08:57 -0500", "msg_from": "\"Dave VanAuken\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2" }, { "msg_contents": "Yes, obviously /storage/* isn't in the install dir, its the source file.\nIf you are using a port to compile postgres, it'd be in\n/usr/ports/databases/postgresql7/work/postgresql-7.0.2/src/include\n\nI'd suggest you do this: add a global backend_shmid_offset in ipc.c,\ninitialized to current default, and an option to postgres to put a value\nthere. \n\nI'm not sure whether this option should be in pg_options or\npostmaster.opts, and what's the name of it should be...Comments?\n\nAfter you are done, send us a patch :)\n\nOn Fri, 5 Jan 2001, Dave VanAuken wrote:\n\n> Knew about #1... and I'm not holding my breath for change gicing where\n> the development on that angle is heading.\n> \n> In the installation directory for the jail i don't have the /storage\n> directory, or for that matter the ipc.h file anywhere in the pgsql\n> tree (both in the jail and host installations). The version installed\n> was 7.0.2\n> \n> What about hacking supplimentary installations and hardcoding new\n> offsets for each subsequent installation of pgsql (can't even look\n> into that until i detemine where the ipc.h code now exists).\n> \n> Appreciate the input... the best description so far from the pgsql\n> pov regarding the situation... have been working almost entirely from\n> the fbsd pov up until not and running out of options. May be a wash\n> for using pgsql in this situation.\n> \n> Dave\n> \n> -----Original Message-----\n> From: [email protected]\n> [mailto:[email protected]]On Behalf Of Alex Pilosov\n> Sent: Friday, January 05, 2001 1:50 PM\n> To: Dave VanAuken\n> Cc: [email protected]\n> Subject: Re: running pgsql 7 under Jail'ed virtual machine on FreeBSD\n> 4.2\n> \n> \n> Here's the story about pgsql and jail:\n> \n> 1. FreeBSD shared memory is _really_ shared across all jail VMs. I\n> think\n> its not going to change, as this seems like a great way for processes\n> to\n> exchange data...But I could be wrong. :)\n> \n> 2. Postgres uses some funky math to determine which shmid to use for\n> different memory allocations it needs. The problem with that it has no\n> idea about jails and will not generate a different shmid for different\n> processes, so postgres processes end up stepping on each other's toes.\n> \n> See include/storage/ipc.h, definition of SystemPortAddressGetIPCKey,\n> and\n> you'll understand what I mean.\n> \n> To properly fix this, I think this should be done:\n> \n> Another (optional) backend parameter which should determine offset\n> (hardcoded now to 17491) for allocation of different shmids...\n> \n> comments? TODO?\n> \n> \n> On Thu, 4 Jan 2001, Dave VanAuken wrote:\n> \n> > Have a FreeBSD 4.2 box... have created two Virtual machines with\n> the\n> > jail process.\n> > Apache and PHp configure and execute fine, but am having some\n> > configuration and execution problems with pgsql... not sure if I am\n> > missing something or if pgsql just cannot deal with being in the\n> jail\n> > and sharing the sysv memory\n> >\n> > Attempting to manually start the postmaster produces the following:\n> >\n> > %postmaster -i\n> > IpcMemoryCreate: shmget failed (Function not implemented)\n> key=5432010,\n> > size=144, permission=700\n> > This type of error is usually caused by an improper\n> > shared memory or System V IPC semaphore configuration.\n> > For more information, see the FAQ and platform-specific\n> > FAQ's in the source directory pgsql/doc or on our\n> > web site at http://www.postgresql.org.\n> > IpcMemoryIdGet: shmget failed (Function not implemented)\n> key=5432010,\n> > size=144, permission=0\n> > IpcMemoryAttach: shmat failed (Function not implemented) id=-2\n> > FATAL 1: AttachSLockMemory: could not attach segment\n> > %\n> >\n> > Have modified the sysctl.conf file to allow usage of sysv memory,\n> but\n> > as it is already shared from the host machine, this may be causing\n> > pgsql to barf on it.\n> >\n> > Searching for jail faq's and posts regarding this matter produces\n> some\n> > close, but not helpful posts regarding chroot'ed environments.\n> >\n> > Any insights, requests for details, and assistance are appreciated.\n> >\n> > Dave\n> >\n> >\n> \n> \n> \n\n", "msg_date": "Fri, 5 Jan 2001 15:37:30 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "SHM ids (was running pgsql 7 under Jail'ed virtual machine on FreeBSD\n\t4.2)" }, { "msg_contents": "Alex Pilosov <[email protected]> writes:\n> I'd suggest you do this: add a global backend_shmid_offset in ipc.c,\n> initialized to current default, and an option to postgres to put a value\n> there. \n\nDon't waste your time. This issue is gone in current sources. See\nIpcMemoryCreate and IpcSemaphoreCreate in src/backend/storage/ipc/ipc.c.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 18:01:48 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: SHM ids (was running pgsql 7 under Jail'ed virtual machine on\n\tFreeBSD 4.2)" }, { "msg_contents": "On Fri, 5 Jan 2001, Tom Lane wrote:\n\n> Alex Pilosov <[email protected]> writes:\n> > I'd suggest you do this: add a global backend_shmid_offset in ipc.c,\n> > initialized to current default, and an option to postgres to put a value\n> > there. \n> \n> Don't waste your time. This issue is gone in current sources. See\n> IpcMemoryCreate and IpcSemaphoreCreate in src/backend/storage/ipc/ipc.c.\nDamn. One of these days I'm going to go and get myself up on postgresql\n7.1, so I won't bother you and others with silly things that are fixed in\n-current :)\n\nThanks Tom\n-alex\n\n", "msg_date": "Fri, 5 Jan 2001 18:06:55 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: SHM ids (was running pgsql 7 under Jail'ed virtual\n\tmachine on FreeBSD 4.2)" }, { "msg_contents": "I said:\n> Alex Pilosov <[email protected]> writes:\n>> I'd suggest you do this: add a global backend_shmid_offset in ipc.c,\n>> initialized to current default, and an option to postgres to put a value\n>> there. \n\n> Don't waste your time. This issue is gone in current sources. See\n> IpcMemoryCreate and IpcSemaphoreCreate in src/backend/storage/ipc/ipc.c.\n\nActually, now that I think about it, you might still have a problem if\na \"jail\" is what I think it is. The current code will step past an\nexisting shmem segment if it appears to be a non-Postgres memory segment\nor if it appears to belong to another running postmaster. However, the\ntest to see if the segment owner appears to be alive is\n\n /*\n * If the creator PID is my own PID or does not belong to any\n * extant process, it's safe to zap it.\n */\n if (hdr->creatorPID != getpid())\n {\n if (kill(hdr->creatorPID, 0) == 0 ||\n errno != ESRCH)\n {\n\t\t// segment belongs to a live postmaster, so continue\n\t }\n\t}\n\nSo the question for you is, what will happen if kill() is given a PID\nbelonging to a process that's in a different \"jail\"? Will it return\nsome kind of permission failure, or will it claim that there is no\nsuch PID (ie, return ESRCH)? If the latter, we still have a problem ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 18:44:41 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: SHM ids (was running pgsql 7 under Jail'ed virtual machine on\n\tFreeBSD 4.2)" }, { "msg_contents": "Anybody knows where I can find the windows - ODBC driver for the latest\nversion of PostgreSQL (7.0.3)?\n\nThanx\n\n", "msg_date": "Fri, 05 Jan 2001 18:18:48 -0600", "msg_from": "Alfonso Peniche <[email protected]>", "msg_from_op": false, "msg_subject": "ODBC 7.x for windows" }, { "msg_contents": "What'd happen is: Operation not permitted (EPERM, -1), so its not a\nproblem...\n\n-alex\n\nOn Fri, 5 Jan 2001, Tom Lane wrote:\n\n> I said:\n> > Alex Pilosov <[email protected]> writes:\n> >> I'd suggest you do this: add a global backend_shmid_offset in ipc.c,\n> >> initialized to current default, and an option to postgres to put a value\n> >> there. \n> \n> > Don't waste your time. This issue is gone in current sources. See\n> > IpcMemoryCreate and IpcSemaphoreCreate in src/backend/storage/ipc/ipc.c.\n> \n> Actually, now that I think about it, you might still have a problem if\n> a \"jail\" is what I think it is. The current code will step past an\n> existing shmem segment if it appears to be a non-Postgres memory segment\n> or if it appears to belong to another running postmaster. However, the\n> test to see if the segment owner appears to be alive is\n> \n> /*\n> * If the creator PID is my own PID or does not belong to any\n> * extant process, it's safe to zap it.\n> */\n> if (hdr->creatorPID != getpid())\n> {\n> if (kill(hdr->creatorPID, 0) == 0 ||\n> errno != ESRCH)\n> {\n> \t\t// segment belongs to a live postmaster, so continue\n> \t }\n> \t}\n> \n> So the question for you is, what will happen if kill() is given a PID\n> belonging to a process that's in a different \"jail\"? Will it return\n> some kind of permission failure, or will it claim that there is no\n> such PID (ie, return ESRCH)? If the latter, we still have a problem ...\n> \n> \t\t\tregards, tom lane\n> \n> \n\n", "msg_date": "Fri, 5 Jan 2001 20:38:30 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: SHM ids (was running pgsql 7 under Jail'ed virtual\n\tmachine on FreeBSD 4.2)" }, { "msg_contents": "the jail can only address the PID's that operate within itself... in\neffect allowing it to f'up its own enviroment only... thus the\nproblem with pg trying to allocate dedicated portions of the\nhost/system wide memory.\n\nwill up the 7.0.2 to 7.1 and give her another go around. Really would\nlike to work this within a jail'ed environment, but have much to much\ncode completed based on postgres to consider dumping it just because\nof the functionality of the jail.\n\nDave\n\n-----Original Message-----\nFrom: [email protected]\n[mailto:[email protected]]On Behalf Of Tom Lane\nSent: Friday, January 05, 2001 6:45 PM\nTo: Alex Pilosov\nCc: Dave VanAuken; [email protected]\nSubject: Re: SHM ids (was running pgsql 7 under Jail'ed virtual\nmachine\non FreeBSD 4.2)\n\n\nI said:\n> Alex Pilosov <[email protected]> writes:\n>> I'd suggest you do this: add a global backend_shmid_offset in\nipc.c,\n>> initialized to current default, and an option to postgres to put a\nvalue\n>> there.\n\n> Don't waste your time. This issue is gone in current sources. See\n> IpcMemoryCreate and IpcSemaphoreCreate in\nsrc/backend/storage/ipc/ipc.c.\n\nActually, now that I think about it, you might still have a problem if\na \"jail\" is what I think it is. The current code will step past an\nexisting shmem segment if it appears to be a non-Postgres memory\nsegment\nor if it appears to belong to another running postmaster. However,\nthe\ntest to see if the segment owner appears to be alive is\n\n /*\n * If the creator PID is my own PID or does not belong to any\n * extant process, it's safe to zap it.\n */\n if (hdr->creatorPID != getpid())\n {\n if (kill(hdr->creatorPID, 0) == 0 ||\n errno != ESRCH)\n {\n\t\t// segment belongs to a live postmaster, so continue\n\t }\n\t}\n\nSo the question for you is, what will happen if kill() is given a PID\nbelonging to a process that's in a different \"jail\"? Will it return\nsome kind of permission failure, or will it claim that there is no\nsuch PID (ie, return ESRCH)? If the latter, we still have a problem\n...\n\n\t\t\tregards, tom lane\n\n", "msg_date": "Fri, 5 Jan 2001 21:58:33 -0500", "msg_from": "\"Dave VanAuken\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: SHM ids (was running pgsql 7 under Jail'ed virtual machine on\n\tFreeBSD 4.2)" }, { "msg_contents": "\"Dave VanAuken\" <[email protected]> writes:\n> the jail can only address the PID's that operate within itself... in\n> effect allowing it to f'up its own enviroment only...\n\nCertainly a jailed process should not be allowed to actually kill()\na process outside the jail. The question is what error code does it\nget?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 22:49:40 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RE: SHM ids (was running pgsql 7 under Jail'ed virtual machine on\n\tFreeBSD 4.2)" }, { "msg_contents": "Hello,\n\nI'm converting a mysql db to postgres and ran into this line of code:\n\n $SQL = \"select username from users where user_id = ? AND session = ?\n AND ADDDATE(last_login, INTERVAL 30 MINUTE)>CURRENT_TIMESTAMP()\n\nHow do I implement adddate to get this kind of funcionality?\n\nThanks,\n\nSteve Leibel\n", "msg_date": "Thu, 25 Jan 2001 18:14:58 -0500", "msg_from": "Steve Leibel <[email protected]>", "msg_from_op": false, "msg_subject": "timestamp calculations" }, { "msg_contents": "\nAssuming adddate does what seems obvious, you should just be able to add\nintervals to timestamps\n\n... last_login + '30 minutes' > now()\n\nOn Thu, 25 Jan 2001, Steve Leibel wrote:\n\n> Hello,\n> \n> I'm converting a mysql db to postgres and ran into this line of code:\n> \n> $SQL = \"select username from users where user_id = ? AND session = ?\n> AND ADDDATE(last_login, INTERVAL 30 MINUTE)>CURRENT_TIMESTAMP()\n> \n> How do I implement adddate to get this kind of funcionality?\n\n", "msg_date": "Thu, 25 Jan 2001 16:05:56 -0800 (PST)", "msg_from": "Stephan Szabo <[email protected]>", "msg_from_op": false, "msg_subject": "Re: timestamp calculations" }, { "msg_contents": "Is there an option to log just queries that fail or output some warning in \n7.1? I'd like to use this to check for incompatibilities of various \nsoftware with pgsql 7.1. Currently I get these errors:\n\nERROR: parser: parse error at or near \".\"\nERROR: parser: parse error at or near \".\"\nERROR: parser: parse error at or near \".\"\n\netc\n\nWould like to catch the real queries.\n\nBtw: this is from phorum 3.2.11. It seems to work OK anyway, but still want \nto solve this.\n\nTomaz\n\n\n", "msg_date": "Thu, 25 Jan 2001 23:12:00 -0100", "msg_from": "Tomaz Borstnar <[email protected]>", "msg_from_op": false, "msg_subject": "option to log just queries with some error - pgsql 7.1" } ]
[ { "msg_contents": "Would people please check the TODO list in pgsql/doc/TODO or on our web\nsite, and let me know if there are any items that need a dash because\nthey are completed in 7.1? I think I may have missed a few.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Wed, 3 Jan 2001 02:14:15 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Please review TODO list" }, { "msg_contents": "Bruce Momjian writes:\n\n> Would people please check the TODO list in pgsql/doc/TODO or on our web\n> site, and let me know if there are any items that need a dash because\n> they are completed in 7.1? I think I may have missed a few.\n\nThe following are done:\n\n* Prevent initdb from running wrong version of postmaster/postgres\n(me)\n\n* Add support for & operator\n\n(Support for & operators has been there for a long time. Incidentally,\nthere are builtin & operators now.)\n\n* Add ALTER TABLE command to change table ownership (Mark H)\n\n* Add ALTER USER command to change user db attributes\n\n(We've had this one even before this TODO item was added.)\n\n* add pg_dump option to dump type names as standard ANSI types\n\n(There's no option, it's the default.)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Wed, 3 Jan 2001 17:00:36 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Please review TODO list" }, { "msg_contents": "\nDon't know whether this belongs on the TODO, but it probably needs to go\nsomewhere in a 'New Features' section (at least the first two items):\n\npg_dump:\n--------\n\n- Support BLOBs in pg_dump (pjw)\n- new utility, pg_restore, which will read dump files and restore \n all/some of the dump. Also supports reordering of output and \n direct database connections. (pjw)\n- Support for PRIMARY KEY constraints (Bruce?)\n- Allow pg_dump to create TAR archive rather than monolithic SQL file (pjw)\n- Dump views using a 'CREATE VIEW' statement (pjw)\n- Restore sequences properly, including 'is_called' flag (pjw).\n\nother:\n------\n\n- New 3 parameter setval.\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, 04 Jan 2001 14:01:03 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Please review TODO list" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> Would people please check the TODO list in pgsql/doc/TODO or on our web\n> site, and let me know if there are any items that need a dash because\n> they are completed in 7.1? I think I may have missed a few.\n\n\n* have INTERSECT/EXCEPT prevent duplicates unless ALL is specified\n\nDone (me).\n\n* SELECT col::DECIMAL(12,10); fails\n\nUh, what's the complaint here? I don't see a problem in a cursory\ncheck.\n\n* Creating view and inheriting the view causes view* to show\n duplicates (inherit) \n\nWe seem to prohibit this from being done now, so I'd call it fixed:\nregression=# create view zz1 as select * from int8_tbl;\nCREATE\nregression=# create table zz2 () inherits(zz1);\nERROR: CREATE TABLE: inherited relation \"zz1\" is not a table\n\n* Buffer reference counting bugfixes\n* Fix libpq bug that causes it to drop backend error message sent\n just before connection closure (ie, any FATAL error message)\n\nUh, both of those are done aren't they?\n\n* Modification of pg_class can happen while table in use by\n another backend. Might lead to MVCC inside of syscache\n\nThis might or might not be OK now. Comments anyone?\n\n* Fix memory leak for expressions[memory] (Tom?) \n\nI think this is largely done, though there may be some remaining leak\ncases.\n\n* Make n of CHAR(n)/VARCHAR(n) the number of letters, not bytes\n\nI think this might be done (Tatsuo, what's the status?)\n\n* Add btree index support for reltime, tinterval, regproc, bit, varbit\n\nbit and varbit seem to work now.\n\n* Create insert, update and delete rules for simple one table views\n* Automatically create rules on views so they are updateable, per SQL92\n\nI think these two items are the same thing, no?\n\n* Allow ORDER BY...LIMIT in INSERT INTO ... SELECT\n\nThis is done (me).\n\n* Emit a warning at foreign key creation time if no UNIQUE index\n exists on referenced primary key attributes\n\nI think we actually emit an error now.\n\n* Use IPC_EXCL when creating shared memory and semaphores\n\nDone (me).\n\n* Use flock() to prevent multiple postmasters on the same port [flock]\n\nThis is done, although we ended up using a lock file not flock().\n\n* Include heap CTID in btree index keys, remove equal-key cruft from btree\n\nThis is done, I think, though not exactly in the way the TODO item\nenvisions.\n\n* Fix LIKE indexing optimization for non-ASCII locales\n\nI've applied a brute-force solution, which is not to do any LIKE\noptimization in non-ASCII locales :-(. This is not an ideal answer,\nbut perhaps the TODO item should read more like \"Figure out how to\ndo LIKE indexing optimization in non-ASCII locales\".\n\n* Allow char() not to use variable-sized header to reduce disk size\n\nBetween MULTIBYTE and TOAST, I'd say this idea is dead as a doornail.\nMight as well remove the TODO item.\n\n* Make oid use oidin/oidout not int4in/int4out in pg_type.h\n\nDone.\n\n* improve dynamic memory allocation by introducing tuple-context memory\n allocation [memory]\n\nI believe all the issues mentioned in TODO.detail/memory are done.\nThere may still be some leaks to be fixed, but the worst problems\nare dealt with.\n\n* prevent labels from being output for stored rules (Tom)\n\nNow that we have TOAST for pg_rewrite, I think this is a dead issue.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 04 Jan 2001 00:19:33 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Please review TODO list " }, { "msg_contents": "> * Make n of CHAR(n)/VARCHAR(n) the number of letters, not bytes\n> \n> I think this might be done (Tatsuo, what's the status?)\n\nNot yet. Probably will be left for 7.2.\n--\nTatsuo Ishii\n", "msg_date": "Thu, 04 Jan 2001 14:39:12 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Please review TODO list " }, { "msg_contents": "Thanks. TODO updated.\n\n> Bruce Momjian writes:\n> \n> > Would people please check the TODO list in pgsql/doc/TODO or on our web\n> > site, and let me know if there are any items that need a dash because\n> > they are completed in 7.1? I think I may have missed a few.\n> \n> The following are done:\n> \n> * Prevent initdb from running wrong version of postmaster/postgres\n> (me)\n> \n> * Add support for & operator\n> \n> (Support for & operators has been there for a long time. Incidentally,\n> there are builtin & operators now.)\n> \n> * Add ALTER TABLE command to change table ownership (Mark H)\n> \n> * Add ALTER USER command to change user db attributes\n> \n> (We've had this one even before this TODO item was added.)\n> \n> * add pg_dump option to dump type names as standard ANSI types\n> \n> (There's no option, it's the default.)\n> \n> -- \n> Peter Eisentraut [email protected] http://yi.org/peter-e/\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Thu, 4 Jan 2001 03:10:14 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Please review TODO list" }, { "msg_contents": "Seems these are all properly listed in the HISTORY file for the 7.1\nrelease.\n\n> \n> Don't know whether this belongs on the TODO, but it probably needs to go\n> somewhere in a 'New Features' section (at least the first two items):\n> \n> pg_dump:\n> --------\n> \n> - Support BLOBs in pg_dump (pjw)\n> - new utility, pg_restore, which will read dump files and restore \n> all/some of the dump. Also supports reordering of output and \n> direct database connections. (pjw)\n> - Support for PRIMARY KEY constraints (Bruce?)\n> - Allow pg_dump to create TAR archive rather than monolithic SQL file (pjw)\n> - Dump views using a 'CREATE VIEW' statement (pjw)\n> - Restore sequences properly, including 'is_called' flag (pjw).\n> \n> other:\n> ------\n> \n> - New 3 parameter setval.\n> \n> \n> ----------------------------------------------------------------\n> Philip Warner | __---_____\n> Albatross Consulting Pty. Ltd. |----/ - \\\n> (A.B.N. 75 008 659 498) | /(@) ______---_\n> Tel: (+61) 0500 83 82 81 | _________ \\\n> Fax: (+61) 0500 83 82 82 | ___________ |\n> Http://www.rhyme.com.au | / \\|\n> | --________--\n> PGP key available upon request, | /\n> and from pgp5.ai.mit.edu:11371 |/\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Thu, 4 Jan 2001 03:14:35 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Please review TODO list" }, { "msg_contents": "I agree with all your conclusions. I thought many of the items on the\nTODO list looked like things you had addressed. TODO list updated. \nThanks.\n\n> Bruce Momjian <[email protected]> writes:\n> > Would people please check the TODO list in pgsql/doc/TODO or on our web\n> > site, and let me know if there are any items that need a dash because\n> > they are completed in 7.1? I think I may have missed a few.\n> \n> \n> * have INTERSECT/EXCEPT prevent duplicates unless ALL is specified\n> \n> Done (me).\n> \n> * SELECT col::DECIMAL(12,10); fails\n> \n> Uh, what's the complaint here? I don't see a problem in a cursory\n> check.\n> \n> * Creating view and inheriting the view causes view* to show\n> duplicates (inherit) \n> \n> We seem to prohibit this from being done now, so I'd call it fixed:\n> regression=# create view zz1 as select * from int8_tbl;\n> CREATE\n> regression=# create table zz2 () inherits(zz1);\n> ERROR: CREATE TABLE: inherited relation \"zz1\" is not a table\n> \n> * Buffer reference counting bugfixes\n> * Fix libpq bug that causes it to drop backend error message sent\n> just before connection closure (ie, any FATAL error message)\n> \n> Uh, both of those are done aren't they?\n> \n> * Modification of pg_class can happen while table in use by\n> another backend. Might lead to MVCC inside of syscache\n> \n> This might or might not be OK now. Comments anyone?\n> \n> * Fix memory leak for expressions[memory] (Tom?) \n> \n> I think this is largely done, though there may be some remaining leak\n> cases.\n> \n> * Make n of CHAR(n)/VARCHAR(n) the number of letters, not bytes\n> \n> I think this might be done (Tatsuo, what's the status?)\n> \n> * Add btree index support for reltime, tinterval, regproc, bit, varbit\n> \n> bit and varbit seem to work now.\n> \n> * Create insert, update and delete rules for simple one table views\n> * Automatically create rules on views so they are updateable, per SQL92\n> \n> I think these two items are the same thing, no?\n> \n> * Allow ORDER BY...LIMIT in INSERT INTO ... SELECT\n> \n> This is done (me).\n> \n> * Emit a warning at foreign key creation time if no UNIQUE index\n> exists on referenced primary key attributes\n> \n> I think we actually emit an error now.\n> \n> * Use IPC_EXCL when creating shared memory and semaphores\n> \n> Done (me).\n> \n> * Use flock() to prevent multiple postmasters on the same port [flock]\n> \n> This is done, although we ended up using a lock file not flock().\n> \n> * Include heap CTID in btree index keys, remove equal-key cruft from btree\n> \n> This is done, I think, though not exactly in the way the TODO item\n> envisions.\n> \n> * Fix LIKE indexing optimization for non-ASCII locales\n> \n> I've applied a brute-force solution, which is not to do any LIKE\n> optimization in non-ASCII locales :-(. This is not an ideal answer,\n> but perhaps the TODO item should read more like \"Figure out how to\n> do LIKE indexing optimization in non-ASCII locales\".\n> \n> * Allow char() not to use variable-sized header to reduce disk size\n> \n> Between MULTIBYTE and TOAST, I'd say this idea is dead as a doornail.\n> Might as well remove the TODO item.\n> \n> * Make oid use oidin/oidout not int4in/int4out in pg_type.h\n> \n> Done.\n> \n> * improve dynamic memory allocation by introducing tuple-context memory\n> allocation [memory]\n> \n> I believe all the issues mentioned in TODO.detail/memory are done.\n> There may still be some leaks to be fixed, but the worst problems\n> are dealt with.\n> \n> * prevent labels from being output for stored rules (Tom)\n> \n> Now that we have TOAST for pg_rewrite, I think this is a dead issue.\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Thu, 4 Jan 2001 03:25:34 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Please review TODO list" }, { "msg_contents": "Tom Lane wrote:\n> \n> * Fix LIKE indexing optimization for non-ASCII locales\n> \n> I've applied a brute-force solution, which is not to do any LIKE\n> optimization in non-ASCII locales :-(. \nWhat is a non-ASCII locale ? Anything that is not LC_ALL=ASCII ?\n\nBTW, it would really help if we had a way to query for locale at\nruntime,\nlike SELECT CURRENT_LOCALE(); \n\nHow should one find out which locale we are in ?\n>From your comment above I assume that you know it ;) \n\n> This is not an ideal answer,\n> but perhaps the TODO item should read more like \"Figure out how to\n> do LIKE indexing optimization in non-ASCII locales\".\n\nI think that the cleanest solution should be to define our own locales \nthat can be doctored to satisfy the LIKE optimisation requirements.\nWe will probably need something like that in the future anyway as AFAIK\nSQL 9x requires ability to have locales applicable on field-to-field\nbasis\nnot just one per host.\n\n-------------\nHannu\n", "msg_date": "Fri, 05 Jan 2001 13:01:12 +0200", "msg_from": "Hannu Krosing <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Please review TODO list" } ]
[ { "msg_contents": "psql: FATAL 1: cannot open /usr/local/pgsql/data/global/pg_database: No such file or directory\n\nand it's true..\n\n% ls /usr/local/pgsql/data/global\n1260 1261 1262 1264 1269 17127 17130 pg_control\n\nsource from Jan 3 15:59 GMT\n\nconfigure --enable-locale --enable-recode --enable-debug --enable-cassert --with-CXX\n\nall but geometry (rounding errors) pass gmake runcheck\n\nPGLIB=/usr/local/pgsql/lib\nPGDATA=/usr/local/pgsql/data\nPGDATESTYLE=European\nLC_ALL=en_GB.ISO8859-1\n\nthen did the initdb\n\nThis database system will be initialized with username \"postgres\".\nThis user will own all the data files and must also own the server process.\n\nCreating directory /usr/local/pgsql/data\nCreating directory /usr/local/pgsql/data/base\nCreating directory /usr/local/pgsql/data/global\nCreating directory /usr/local/pgsql/data/pg_xlog\nCreating template1 database in /usr/local/pgsql/data/base/1\nDEBUG: starting up\nDEBUG: database system was shut down at 2001-01-03 18:51:59\nDEBUG: CheckPoint record at (0, 8)\nDEBUG: Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE\nDEBUG: NextTransactionId: 514; NextOid: 16384\nDEBUG: database system is in production state\nCreating global relations in /usr/local/pgsql/data/global\nDEBUG: starting up\nDEBUG: database system was shut down at 2001-01-03 18:52:03\nDEBUG: CheckPoint record at (0, 108)\nDEBUG: Redo record at (0, 108); Undo record at (0, 0); Shutdown TRUE\nDEBUG: NextTransactionId: 514; NextOid: 17199\nDEBUG: database system is in production state\nInitializing pg_shadow.\nEnabling unlimited row width for system tables.\nCreating system views.\nLoading pg_description.\nSetting lastsysoid.\nVacuuming database.\nCopying template1 to template0.\n\nSuccess. You can now start the database server using:\n\n /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data\nor\n /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start\n\n\nAny ideas?\n\nCheers,\n\nPatrick\n", "msg_date": "Wed, 3 Jan 2001 19:04:12 +0000", "msg_from": "Patrick Welche <[email protected]>", "msg_from_op": true, "msg_subject": "initdb prob" } ]
[ { "msg_contents": "Posting again as even though I receive mail from hackers I am apparently\nnot a member (registered correctly as [email protected] - from will say\[email protected] - setting reply-to to [email protected] used to get\naround it..)\n\n====\n\npsql: FATAL 1: cannot open /usr/local/pgsql/data/global/pg_database: No such fi\nle or directory\n \nand it's true.. \n \n% ls /usr/local/pgsql/data/global\n1260 1261 1262 1264 1269 17127 17130\n pg_control\n\nsource from Jan 3 15:59 GMT\n\nconfigure --enable-locale --enable-recode --enable-debug --enable-cassert --wit\nh-CXX\n\nall but geometry (rounding errors) pass gmake runcheck\n\nPGLIB=/usr/local/pgsql/lib \nPGDATA=/usr/local/pgsql/data\nPGDATESTYLE=European \nLC_ALL=en_GB.ISO8859-1\n \nthen did the initdb \n\nThis database system will be initialized with username \"postgres\".\nThis user will own all the data files and must also own the server process.\n \nCreating directory /usr/local/pgsql/data\nCreating directory /usr/local/pgsql/data/base\nCreating directory /usr/local/pgsql/data/global\nCreating directory /usr/local/pgsql/data/pg_xlog\nCreating template1 database in /usr/local/pgsql/data/base/1\nDEBUG: starting up\nDEBUG: database system was shut down at 2001-01-03 18:51:59\nDEBUG: CheckPoint record at (0, 8)\nDEBUG: Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE\nDEBUG: NextTransactionId: 514; NextOid: 16384\nDEBUG: database system is in production state\nCreating global relations in /usr/local/pgsql/data/global\nDEBUG: starting up\nDEBUG: database system was shut down at 2001-01-03 18:52:03\nDEBUG: CheckPoint record at (0, 108)\nDEBUG: Redo record at (0, 108); Undo record at (0, 0); Shutdown TRUE\nDEBUG: NextTransactionId: 514; NextOid: 17199\nDEBUG: database system is in production state\nInitializing pg_shadow.\nEnabling unlimited row width for system tables.\nCreating system views.\nLoading pg_description.\nSetting lastsysoid.\nVacuuming database.\nCopying template1 to template0.\n \nSuccess. You can now start the database server using:\n \n /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data\nor\n /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start\n \n \nAny ideas?\n \nCheers,\n \nPatrick\n", "msg_date": "Wed, 3 Jan 2001 19:12:35 +0000", "msg_from": "Patrick Welche <[email protected]>", "msg_from_op": true, "msg_subject": "global/pg_database ?" }, { "msg_contents": "Patrick Welche <[email protected]> writes:\n> Posting again as even though I receive mail from hackers I am apparently\n> not a member (registered correctly as [email protected] - from will say\n> [email protected] - setting reply-to to [email protected] used to get\n> around it..)\n\nEasiest answer might be to subscribe again under that address and then\nset it to 'nomail', or whatever the option is to turn off actually\nreceiving mail from the list (yes, there is one...).\n\n> psql: FATAL 1: cannot open /usr/local/pgsql/data/global/pg_database: No such file or directory\n \n> and it's true.. \n \n> % ls /usr/local/pgsql/data/global\n> 1260 1261 1262 1264 1269 17127 17130\n> pg_control\n\n> source from Jan 3 15:59 GMT\n\nThat is the correct contents of $PGDATA/global in current sources ---\npg_database's file is now named by its OID, ie 1262, not by its relname.\n\nNot sure why you are getting such a message, but it strikes me that you\nmay have a corrupted set of sources, ie, some out-of-date files. Have\nyou tried doing a fresh cvs checkout and build from scratch?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 15:41:59 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: global/pg_database ? " }, { "msg_contents": ">> psql: FATAL 1: cannot open /usr/local/pgsql/data/global/pg_database: No such file or directory\n\n> Not sure why you are getting such a message, but it strikes me that you\n> may have a corrupted set of sources, ie, some out-of-date files. Have\n> you tried doing a fresh cvs checkout and build from scratch?\n\nTo be more specific, I suspect that would be coming out of\nGetRawDatabaseInfo if compiled with OLD_FILE_NAMING defined. Possibly\nyou have an old config.h (have you rerun configure lately?) or neglected\nto do a make clean before rebuilding.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 16:07:33 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: global/pg_database ? " } ]
[ { "msg_contents": "Anyone can help with that one?\n\nWarning: PostgresSQL query failed: ERROR: cannot find attribute 10 of\nrelation pg_am in [..]\nWarning: 0 is not a PostgresSQL result index in\n\nThanks in advice\n\nineck\n\n\n", "msg_date": "Wed, 3 Jan 2001 21:07:22 +0100", "msg_from": "\"ineck\" <[email protected]>", "msg_from_op": true, "msg_subject": "ERROR: cannot find attribute 10 of???" }, { "msg_contents": "On Wed, 3 Jan 2001 21:07:22 +0100, ineck <[email protected]> wrote:\n>Anyone can help with that one?\n>\n>Warning: PostgresSQL query failed: ERROR: cannot find attribute 10 of\n>relation pg_am in [..]\n>Warning: 0 is not a PostgresSQL result index in\n\nSounds like PHP to me.\n\nUsually when you get a \"0 is not a ...\" it means that you failed to\nset the variable used in your function call.\n\nie. you might have pg_fetch_array( $result, 10 ) but had\npg_exec( $database, $query ); instead of\n$result = pg_exec( $database, $query );\n\n\n>\n>Thanks in advice\n>\n>ineck\n>\n>\nLee Harr\[email protected]\n", "msg_date": "6 Jan 2001 21:20:50 GMT", "msg_from": "[email protected] (Lee Harr)", "msg_from_op": false, "msg_subject": "Re: ERROR: cannot find attribute 10 of???" } ]
[ { "msg_contents": "\n> Any ideas on why this error would occur after dropping an existing\n> database and than re-creating it (createdb)? The only work around so far\n> is to completely destroy the postgres instance and start over. \n> \n> It appears that the pg_database may be getting currupted.\n> \n> Sandy Barnes\n> Honeywell\n> Business & General Aviation Engineering\n> One Technology Center\n> 23500 West 105th Street\n> Olathe, KS. 66061\n> tel 913.712.2027\n> fax 913.712.1347\n> email [email protected]\n> \n", "msg_date": "Wed, 3 Jan 2001 13:23:57 -0700 ", "msg_from": "\"Barnes, Sandy (Sandra)\" <[email protected]>", "msg_from_op": true, "msg_subject": "V7.0 Error: OID ##### no longer exists in pg_databas\n\te" }, { "msg_contents": "\"Barnes, Sandy (Sandra)\" <[email protected]> writes:\n>> Any ideas on why this error would occur after dropping an existing\n>> database and than re-creating it (createdb)?\n\nI assume what you're really talking about is\n\tDatabase 'xxx', OID nnn, has disappeared from pg_database\n?\n\nIt's theoretically possible for that to happen if, say, a CREATE\nDATABASE or DROP DATABASE failed and was rolled back part way through.\nI've never heard of it happening in normal usage, though. If you\nhave a reproducible way of creating this situation I'd like to know\nwhat it is.\n\n>> The only work around so far\n>> is to completely destroy the postgres instance and start over.\n\nVacuuming pg_database should fix it. The problem is that backend\nstartup is seizing on a dead pg_database tuple to tell it the OID\nof the target database; vacuum out the dead tuples and you'll be OK.\n\n\t\t\tregards, tom lane\n\nPS: Memo to folks reporting problems: PLEASE quote any error message\nyou may be getting EXACTLY. It's a lot easier to look at the related\ncode if we can just grep for the message...\n", "msg_date": "Wed, 03 Jan 2001 15:56:23 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: V7.0 Error: OID ##### no longer exists in pg_databas e " }, { "msg_contents": "I think this was fixed today.\n\n> \n> > Any ideas on why this error would occur after dropping an existing\n> > database and than re-creating it (createdb)? The only work around so far\n> > is to completely destroy the postgres instance and start over. \n> > \n> > It appears that the pg_database may be getting currupted.\n> > \n> > Sandy Barnes\n> > Honeywell\n> > Business & General Aviation Engineering\n> > One Technology Center\n> > 23500 West 105th Street\n> > Olathe, KS. 66061\n> > tel 913.712.2027\n> > fax 913.712.1347\n> > email [email protected]\n> > \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 00:47:34 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: V7.0 Error: OID ##### no longer exists in pg_databas\n e" } ]
[ { "msg_contents": "I just ran across this recent example:\n\nIf you perform the following, you get a truncated input:\n\ntest=# create table example (type char(5) NOT NULL);\nCREATE\ntest=# insert into example VALUES ('VOLUME');\nINSERT 156884 1\ntest=# select * from example;\n type\n-------\n VOLUM\n(1 row)\n\nHowever, if you add CHECK in that checks for a string that is LONGER than\nthe CHAR(5), you get this:\n\ntest=# create table example(type char(5) NOT NULL CHECK (type IN\n('MASS','VOLUME')));\nCREATE\ntest=# insert into example VALUES ('VOLUME');\nERROR: ExecAppend: rejected due to CHECK constraint example_type\n\nIs this correct behaviour? Perhaps it is, as CHECK is checking the\ntruncated value - but I just want to make sure it's not a bug!\n\nChris\n\n", "msg_date": "Thu, 4 Jan 2001 13:06:36 +0800", "msg_from": "\"Christopher Kings-Lynne\" <[email protected]>", "msg_from_op": true, "msg_subject": "Weirdness in CHECK?" }, { "msg_contents": "\"Christopher Kings-Lynne\" <[email protected]> writes:\n> Is this correct behaviour? Perhaps it is, as CHECK is checking the\n> truncated value - but I just want to make sure it's not a bug!\n\nI think some people feel that we ought to raise an error rather than\nsilently truncating the input. However, given that we do intend to\ntruncate the input, it seems to me that applying CHECK constraints\npost-truncation is the Right Thing. In general a CHECK ought to be\napplied after any conversion ops needed to create a value of the\ndestination column type. For example, if I had \"CHECK (foo < 1)\"\non a column foo declared NUMERIC(3,2), I'd be unhappy if the input\n\"0.999\" got past the check because it was rounded to 1.00 only after\nthe CHECK was applied.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 04 Jan 2001 00:27:28 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Weirdness in CHECK? " } ]
[ { "msg_contents": "> I think some people feel that we ought to raise an error rather than\n> silently truncating the input. However, given that we do intend to\n> truncate the input, it seems to me that applying CHECK constraints\n> post-truncation is the Right Thing. In general a CHECK ought to be\n> applied after any conversion ops needed to create a value of the\n> destination column type. For example, if I had \"CHECK (foo < 1)\"\n> on a column foo declared NUMERIC(3,2), I'd be unhappy if the input\n> \"0.999\" got past the check because it was rounded to 1.00 only after\n> the CHECK was applied.\n\nAgreed. However, my complaint is with the error message. I spent half an\nhour dumping and recreating my tables, messing with the catalogs, etc.\nbecause I could not for the life of me figure out what was wrong with my\nCHECKs! Why wouldn't it accept 'VOLUME' when 'VOLUME' was clearly being\npassed by the CHECK! It drove me nuts until I noticed that I'd accidentally\nset the CHAR length too low.\n\nChris\n\n", "msg_date": "Thu, 4 Jan 2001 13:26:28 +0800", "msg_from": "\"Christopher Kings-Lynne\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Weirdness in CHECK?" } ]
[ { "msg_contents": "I dont know if I do something wrong or it is normal for PG :)\nSo\n\ntemplate1=# select version();\n version\n---------------------------------------------------------------------\n PostgreSQL 7.0.3 on i486-pc-linux-gnu, compiled by gcc egcs-2.91.66\n(1 row)\n\nAnd now:\ntemplate1=# drop database test;\nDROP DATABASE\ntemplate1=# create database test;\nCREATE DATABASE\ntemplate1=# \\c test\nYou are now connected to database test.\ntest=# \\d\n List of relations\n Name | Type | Owner\n---------------+----------+----------\n test1 | table | postgres\n test1_seq | sequence | postgres\n...\nand so on and so on\n...\n(21 rows)\ntest=#\n\nIt is normal that after drop and recreate I get old structure of database\n?\n\nregards \nRobert\n\n", "msg_date": "Thu, 4 Jan 2001 11:06:07 +0100 (CET)", "msg_from": "Partyka Robert <[email protected]>", "msg_from_op": true, "msg_subject": "Strange think with DROP DATABASE" }, { "msg_contents": "Ok... I found bug, it was me ;))) \nIn some strange moment I add this tables to template1 instead of\ntest. Maybe I must go sleep more ;)).\n\nregards\nRobert\n\n\n> I dont know if I do something wrong or it is normal for PG :)\n> So\n> \n> template1=# select version();\n> version\n> ---------------------------------------------------------------------\n> PostgreSQL 7.0.3 on i486-pc-linux-gnu, compiled by gcc egcs-2.91.66\n> (1 row)\n> \n> And now:\n> template1=# drop database test;\n> DROP DATABASE\n> template1=# create database test;\n> CREATE DATABASE\n> template1=# \\c test\n> You are now connected to database test.\n> test=# \\d\n> List of relations\n> Name | Type | Owner\n> ---------------+----------+----------\n> test1 | table | postgres\n> test1_seq | sequence | postgres\n> ...\n> and so on and so on\n> ...\n> (21 rows)\n> test=#\n> \n> It is normal that after drop and recreate I get old structure of database\n> ?\n> \n> regards \n> Robert\n> \n\n", "msg_date": "Thu, 4 Jan 2001 11:56:03 +0100 (CET)", "msg_from": "Partyka Robert <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Strange think with DROP DATABASE" } ]
[ { "msg_contents": "Please ignore last 2 messages re\n\npsql: FATAL 1: cannot open /usr/local/pgsql/data/global/pg_database: No such file or directory\n\n- I had another old postmaster running...\n\nCheers,\n\nPatrick\n", "msg_date": "Thu, 4 Jan 2001 11:23:14 +0000", "msg_from": "Patrick Welche <[email protected]>", "msg_from_op": true, "msg_subject": "initdb prob" } ]
[ { "msg_contents": "I have noticed that AND and TRAILING could be made ColLabel's without\nfurther changes. Currently they are completely reserved. (This is\nespecially odd given that OR is a ColLabel.) Would that be okay to\nchange?\n\n(For the interested, the only other completely reserved tokens are TYPE\nand AS.)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Thu, 4 Jan 2001 21:31:11 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": true, "msg_subject": "Missing ColLabel tokens" }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> I have noticed that AND and TRAILING could be made ColLabel's without\n> further changes. Currently they are completely reserved. (This is\n> especially odd given that OR is a ColLabel.) Would that be okay to\n> change?\n\nIf you don't get shift/reduce conflicts, go for it.\n\n> (For the interested, the only other completely reserved tokens are TYPE\n> and AS.)\n\nI suspect we're stuck on that for AS. However, TYPE is actually allowed\nas a ColId, via the 'generic' production, so in reality it's not\nreserved.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 04 Jan 2001 16:44:32 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Missing ColLabel tokens " }, { "msg_contents": "Tom Lane writes:\n\n> > (For the interested, the only other completely reserved tokens are TYPE\n> > and AS.)\n>\n> I suspect we're stuck on that for AS. However, TYPE is actually allowed\n> as a ColId, via the 'generic' production, so in reality it's not\n> reserved.\n\nI think this generic production might be a mistake. The productions go\nlike this:\n\n generic ::= <ident> | TYPE\n\n ColId ::= <generic> | ...\n\n Generic ::= <generic>\n\n ConstTypename ::= <Generic> | (SQL type names)\n\n AexprConst ::= <ConstTypename> <Sconst> | ...\n\n SimpleTypename ::= <ConstTypename> | ...\n\nand then SimpleTypename is sort of a Typename.\n\nThis allows TYPE to be used as a type name! All three of the statements\n\n select cast(42 as type);\n select type 'xxx';\n create table foo (a type);\n\nfail with \"ERROR: Unable to locate type name 'type' in catalog\". Besides\nthis there are no other productions making use of <generic>.\n\nI see this was introduced in gram.y 2.180, 2000-07-28, with a message of\n\n Fix acceptance of PATH as a type and column name.\n Note that this has changed some of the edge cases for what is accepted\n as a type name and/or column id. Regression test passes, but more\n tweaks may be coming...\n\nwhich makes this look unintentional. TYPE could simply be under ColId and\n<generic> would simply be IDENT.\n\nWhere's the harm? you might ask. I'm going to have to insert a special\ncase into my extract-keyword-categories-from-gram.y (and make a DocBook\ntable from it) tool. ;-)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Thu, 4 Jan 2001 23:33:13 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Missing ColLabel tokens " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Tom Lane writes:\n>> I suspect we're stuck on that for AS. However, TYPE is actually allowed\n>> as a ColId, via the 'generic' production, so in reality it's not\n>> reserved.\n\n> I think this generic production might be a mistake.\n\nIt looks fairly weird to me too. Seems to me that we should get rid of\ntoken \"generic\", have ColId's first alternative be IDENT, add TYPE to\nColId (or possibly TokenId), and have the Generic type production accept\nIDENT directly.\n\nThomas, why'd you do it this way?\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 04 Jan 2001 18:25:01 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Missing ColLabel tokens " }, { "msg_contents": "> >> I suspect we're stuck on that for AS. However, TYPE is actually allowed\n> >> as a ColId, via the 'generic' production, so in reality it's not\n> >> reserved.\n> > I think this generic production might be a mistake.\n> It looks fairly weird to me too. Seems to me that we should get rid of\n> token \"generic\", have ColId's first alternative be IDENT, add TYPE to\n> ColId (or possibly TokenId), and have the Generic type production accept\n> IDENT directly.\n> Thomas, why'd you do it this way?\n\nHmm. I'm certain that I could not completely explain \"why it is this\nway\" since this has all been accumulated in incremental changes over the\nlast 7 years ;) And I rarely feel that the current state is sufficiently\nmessed up to warrant larger cleanup changes -- though that has happened\nat times -- so there may be some incremental additions which could be\nreplaced by some consolidations.\n\nI'm not certain what specifically you are asking about wrt \"why'd you do\nit this way\"...\n\nIt may be that \"generic:\" was originally there for symmetry with the\nother \"lowercase/uppercase\" production pairs such as \"character:\" and\n\"Character:\".\n\nThe CVS logs indicate that I allowed TYPE as a column name back in 1997.\nThe implication from the log (and my recollection) is that it would be\n*nice* to have \"type\" allowed as a column name. And at the time, with\nthe existing productions, however it was done made sense for an\nincremental change.\n\nIf we can clean up the grammar, great! But I'm a little worried that our\nregression tests don't give sufficient coverage for some edge cases. For\nexample, I had found a few months ago that our CREATE TYPE productions\ndid not allow all SQL9x type names as arguments (if I remember the\nexample correctly)!\n\nAnyway, cleanups are good, as long as they don't end up unnecessarily\nrestricting the set of allowed names in various contexts.\n\n - Thomas\n", "msg_date": "Fri, 05 Jan 2001 07:24:45 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Missing ColLabel tokens" }, { "msg_contents": "Tom Lane wrote:\n> \n> Peter Eisentraut <[email protected]> writes:\n> > I have noticed that AND and TRAILING could be made ColLabel's without\n> > further changes. Currently they are completely reserved. (This is\n> > especially odd given that OR is a ColLabel.) Would that be okay to\n> > change?\n\nWould BETWEEN a AND b still work ?\n\n-----------\nHannu\n", "msg_date": "Fri, 05 Jan 2001 12:49:41 +0200", "msg_from": "Hannu Krosing <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Missing ColLabel tokens" }, { "msg_contents": "Hey hackers - \nI'm having a bit of trouble with creating a new bootstrap system\ntable. That is, one that is created during initdb via 'create bootstrap'\nin the PKI file. \n\nI realize that for this sort of system table, I need to add tuples via\nbootstrap DATA statements to pg_class.h, pg_attribute.h, and pg_type.h.\n\nEverything seems to work: I get the right output from initdb -d, based\non analogy with all the other bootstrap tables, but the file never gets\ncreated, as if initial data for my new table never gets commited. If I\nadd a bootstrap index on it (by hand editting the template1.bki file),\nI get the file, but it's empty. Everything seems to be set up right,\nthough: I can insert data into the table once it's there.\n\nI've tried defining the structures and hand building a reldesc, in\nrelcache.c, like the other bootstrap system tables, but that had no\neffect. One difference between my new table and the other system tables,\nperhaps, is that there is no code using the table: perhaps something\nwith how mdopen will substitute for mdcreate, and create files while\nunder bootstrapmode?\n\nSo, is there extra trick I'm missing to getting the final commit done\nfor an initdb bootstrap relation? If this somewhat abstract description\nof my problem doesn't ring a bell for anyone, I'll go ahead and generate\na patch and ask for comment on it later. (I wanted to leave out details\nbecause I don't really want to discuss implementation of the specific\nfeature until I've tried a reference implementation, myself)\n\nRoss\n", "msg_date": "Fri, 5 Jan 2001 16:28:07 -0600", "msg_from": "\"Ross J. Reedstrom\" <[email protected]>", "msg_from_op": false, "msg_subject": "bootstrap tables" }, { "msg_contents": "\"Ross J. Reedstrom\" <[email protected]> writes:\n> One difference between my new table and the other system tables,\n> perhaps, is that there is no code using the table: perhaps something\n> with how mdopen will substitute for mdcreate, and create files while\n> under bootstrapmode?\n\nI suspect that's got something to do with it. The initialization\nsequence is pretty haphazard in this area; some of the core tables are\nphysically created by mdopen's that occur before the associated 'create'\ncommand from the BKI script, because the table is actually referenced by\ncode that executes before it's \"created\". Others are not, and come into\nbeing during the 'create' the way you'd expect.\n\nStill, it sure looks like 'create bootstrap' should cause mdcreate()\nto be called, so I'm not sure why you'd see the file not get created\nat all. Have you tried tracing through it with a debugger?\n\nDo you really need the thing to be a bootstrap table, and not a plain\nsystem table?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 18:25:38 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: bootstrap tables " }, { "msg_contents": "On Fri, Jan 05, 2001 at 06:25:38PM -0500, Tom Lane wrote:\n> \n> Still, it sure looks like 'create bootstrap' should cause mdcreate()\n> to be called, so I'm not sure why you'd see the file not get created\n> at all. Have you tried tracing through it with a debugger?\n> \n> Do you really need the thing to be a bootstrap table, and not a plain\n> system table?\n\nYup, 'cause it's going to store the schema info, including the system\nschema. I forsee it needing to be accessed immediately during bootstrap.\n\nI was fighting with the debugger last night, and decided \"I should ask,\njust to be sure I'm not missing something obvious...\" I'll keep on\nthat way, then.\n\nRoss\n\n", "msg_date": "Fri, 5 Jan 2001 18:48:10 -0600", "msg_from": "\"Ross J. Reedstrom\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: bootstrap tables" }, { "msg_contents": "Ross J. Reedstrom writes:\n\n> > Do you really need the thing to be a bootstrap table, and not a plain\n> > system table?\n>\n> Yup, 'cause it's going to store the schema info, including the system\n> schema. I forsee it needing to be accessed immediately during bootstrap.\n\nDoes \"schema info\" mean SQL schemas or merely additional schema\ninformation along the lines of pg_class, etc.?\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 6 Jan 2001 03:50:03 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": true, "msg_subject": "Re: bootstrap tables" }, { "msg_contents": "On Sat, Jan 06, 2001 at 03:50:03AM +0100, Peter Eisentraut wrote:\n> Ross J. Reedstrom writes:\n> \n> > > Do you really need the thing to be a bootstrap table, and not a plain\n> > > system table?\n> >\n> > Yup, 'cause it's going to store the schema info, including the system\n> > schema. I forsee it needing to be accessed immediately during bootstrap.\n> \n> Does \"schema info\" mean SQL schemas or merely additional schema\n> information along the lines of pg_class, etc.?\n> \n\nI thought that might prick your ears up. Yes, I'm looking at just how\nhorrible it might be to implement SQL schemas. As it turns out, I think\nTom is right, and I can just use a regular system table. I've got that\nworking, and some of the gammar modified to accept the schema.table\nnotation: now I'm working from both ends on all the places in between\nthat need to know about the schema. Vadim's work replacing relnames with\nrelfilenode helps to some extent.\n\nI'm taking the simplistic approach of adding the schema name wherever\nthe relname is currently used, in parallel, and introducing a new global,\nthe current default schema.\n\nAs I said in my first note, I'm trying this out, regardless if it's the\nbest way to implement the feature (why is it that I only seem to find\ntime to work on new stuff in pgsql when we're in beta?) We can debate a\nbetter implementation after I have roughly working code, or have given\nup on it as a bad idea.\n\nAs it happens, my pgsql time this week is taken up by another task, so I\nwon't be working on this until the weekend, at the earliest.\n\nRoss\n", "msg_date": "Mon, 8 Jan 2001 10:56:58 -0600", "msg_from": "\"Ross J. Reedstrom\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: bootstrap tables" } ]
[ { "msg_contents": "I've attached a bit of c code to do md5 checksums on text. There's\nnothing too original here, this was mostly just ripped from rfc1321,\nwith some driver code added for PostgreSQL. Also a Makefile and a test\nschema.\n\nSorry if this isn't the right place to post such a thing. I had just\nnoticed a question on the pgsql-sql list about this, so I thought, what\nthe heck, I'll try to contribute something.\n\nPlease note that this code is copyright RSA Data Security, Inc. What\nkind of complications that causes for distribution, I have no idea. It\nsays unlimited distribution, so seems o.k. to me, but what do I know. \nThe copyright notice is preserved in the code and included in the\nREADME.\n\nThis function accepts text as input. I.E. - pg_md5(text). Since\npostgres.h defines both text and bytea to be the same thing (typedef\nstruct varlena), does that mean this function should also accept binary\ninput?\n\n-Ron-\[email protected]", "msg_date": "Thu, 04 Jan 2001 16:24:18 -0500", "msg_from": "Ron Peterson <[email protected]>", "msg_from_op": true, "msg_subject": "md5 c code" }, { "msg_contents": "On Thu, Jan 04, 2001 at 04:24:18PM -0500, Ron Peterson wrote:\n> I've attached a bit of c code to do md5 checksums on text. There's\n\nCheck contrib/pgcrypto in 7.1/CVS\n\n-- \nmarko\n\n", "msg_date": "Sun, 7 Jan 2001 13:32:27 +0200", "msg_from": "Marko Kreen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: md5 c code" } ]
[ { "msg_contents": "I am writing an article of PostgreSQL 7.1 and have some questions.\n\nI can get the millisecond part of a timestamp data using date_part.\n\ntest=# SELECT date_part('millisecond','2001/1/15 12:04:05.1234'::TIMESTAMP);\n date_part \n-----------\n 123.4\n(1 row)\n\nHowever if I apply the function to a time data, I get a strange result.\n\ntest=# SELECT date_part('millisecond','12:04:05.1234'::time);\n date_part \n------------------\n 5123.39999999676\n(1 row)\n\nAny thought?\n\n(This is current)\n--\nTatsuo Ishii\n", "msg_date": "Fri, 05 Jan 2001 10:00:42 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "time + date_part oddness?" }, { "msg_contents": "> Any thought?\n\nHmm. It is not consistantly implemented :(\n\ntimestamp_part() uses just the fractional part of the seconds to\ncalculate milliseconds. But interval_part() uses both fractional and\ninteger parts to figure the result, and that is the routine which ends\nup being used for the time value.\n\nI'd assume that it should be using fractional seconds only, just like\ntimestamp_part() does. Any reason not to change it for 7.1?\n\nbtw, what should 'microseconds' return? It suffers from the problems\nmentioned already, plus leaves the \"milliseconds\" part in the result.\nThat should probably only return the pieces which are less than a\nmillisecond...\n\n - Thomas\n", "msg_date": "Fri, 05 Jan 2001 06:49:36 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: time + date_part oddness?" }, { "msg_contents": "Thomas Lockhart <[email protected]> writes:\n> I'd assume that it should be using fractional seconds only, just like\n> timestamp_part() does. Any reason not to change it for 7.1?\n\nAgreed.\n\n> btw, what should 'microseconds' return? It suffers from the problems\n> mentioned already, plus leaves the \"milliseconds\" part in the result.\n> That should probably only return the pieces which are less than a\n> millisecond...\n\nHm. I'd venture to disagree. People are used to breaking down time\ninto hours-minutes-seconds, but I never heard of anyone expressing\na measurement as so many milliseconds plus so many microseconds.\n\nI'd vote for making 'milliseconds' produce 'fractional second times 10^3'\nand 'microseconds' produce 'fractional second times 10^6'. You wouldn't\nuse both together, just whichever seemed appropriate for the precision\nof your data.\n\n\t\t\tregards, tom lane\n\nPS: \"fourpalms.org\" ?\n", "msg_date": "Fri, 05 Jan 2001 02:16:09 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: time + date_part oddness? " }, { "msg_contents": "> PS: \"fourpalms.org\" ?\n\nYup. I finally got DSL at home, and in the 4 months between ordering and\ninstallation thelockharts.org plus some other candidates (including the\nnames of every animal in the household, and we have lots!) had vanished.\n\nI'll explain the significance of the name over beers the next time we\nget together ;) In the meantime, I haven't quite figured out how to\nstart decoupling my various projects from my long-standing\[email protected] address, so that one may reappear as a\npreferred address for some things...\n\n - Thomas\n", "msg_date": "Fri, 05 Jan 2001 07:31:23 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: time + date_part oddness?" }, { "msg_contents": "Thomas Lockhart <[email protected]> writes:\n> In the meantime, I haven't quite figured out how to\n> start decoupling my various projects from my long-standing\n> [email protected] address,\n\nI'm not even trying ... I don't work for SSS anymore, but I'll be\[email protected] for the foreseeable future.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 02:39:12 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: time + date_part oddness? " } ]
[ { "msg_contents": "I posted a note to the hackers list about this very issue last week. It was\nnever responded to. I am prepared to do the work and submit a patch, but I\nwanted some input on how best to do it. We had a problem with a backup\nscript silently failing when the disk was full. I guess I will get started\non it and will get feedback on the patch when it's submitted.\n\nMatt\n\n> -----Original Message-----\n> From:\tAnand Raman [SMTP:[email protected]]\n> Sent:\tThursday, January 04, 2001 4:12 AM\n> To:\tpostgresql\n> Subject:\t[GENERAL] pg_dump return status..\n> \n> hi guys\n> \n> I am trying to create a shell script which dumps my db to a flat file ..\n> \n> To dump the database i use the pg_dump command..\n> \n> I find that irrespective of the fact whether pg_dump managed to connect\n> to the db or not the return status ($?) is always zero.. This throws the\n> shell script in a spin which continues even when pg_dump is not able to\n> connect ..\n> \n> Is there anyway around this. I thought of one way was to check stderr\n> for the occurence of the word \"failed\" and then exit..\n> \n> Ur suggestions are most welcome\n> \n> version postgresql 702 \n> \n> Regards\n> Anand Raman\n> \n", "msg_date": "Thu, 4 Jan 2001 19:14:59 -0600 ", "msg_from": "Matthew <[email protected]>", "msg_from_op": true, "msg_subject": "RE: pg_dump return status.." }, { "msg_contents": "At 19:14 4/01/01 -0600, Matthew wrote:\n>I posted a note to the hackers list about this very issue last week. It was\n>never responded to. I am prepared to do the work and submit a patch, but I\n>wanted some input on how best to do it. We had a problem with a backup\n>script silently failing when the disk was full. I guess I will get started\n>on it and will get feedback on the patch when it's submitted.\n\n7.0.2 and CVS seem to set $? for me...at least when I try to dump a\nnonexistant DB, dump to a nonexistant location or dump to an area I have no\nprivs for. Also, the code looks like it does an exit(1) whenever there is\nan error. Is there a Unix/C/shell interaction that's not working for you?\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, 05 Jan 2001 12:40:13 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] RE: pg_dump return status.." }, { "msg_contents": "Matthew <[email protected]> writes:\n> I posted a note to the hackers list about this very issue last week. It was\n> never responded to. I am prepared to do the work and submit a patch, but I\n> wanted some input on how best to do it. We had a problem with a backup\n> script silently failing when the disk was full.\n\nTalk to Philip Warner about detecting output write failures. I think\nthis might be a lot easier in current sources than it would have been in\n7.0.* or before; the actual I/O is more centralized, and I think you\ncould reasonably hope to check for write errors at just a couple of\nplaces. But I'm not sure where the best places are.\n\n>> I find that irrespective of the fact whether pg_dump managed to connect\n>> to the db or not the return status ($?) is always zero.\n\nI think this is probably some sort of mistake in your script. pg_dump\ncertainly returns a nonzero exit status for any failure that it detects,\nat least in all the versions I've used. Matthew's correct that it\ndoesn't detect write failure on its output file, but that's not the\ncase you're claiming...\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 04 Jan 2001 20:50:09 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.. " }, { "msg_contents": "At 20:50 4/01/01 -0500, Tom Lane wrote:\n>\n>Talk to Philip Warner about detecting output write failures. I think\n>this might be a lot easier in current sources than it would have been in\n>7.0.* or before; the actual I/O is more centralized, and I think you\n>could reasonably hope to check for write errors at just a couple of\n>places.\n\nThere are a few places to check, but a lot less than before. Assuming I\nshould just die on any failed write (which seems reasonable), how do I\ncheck for a failed write in a way that works on all Unixes? Is the\nfollowing OK:\n\n- fwrite: ok if return value equals item count\n- fprintf: ok if return value > 0.\n- fputc: ok if != EOF\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": "Sat, 06 Jan 2001 00:25:13 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: pg_dump return status.. " }, { "msg_contents": "Philip Warner <[email protected]> writes:\n> There are a few places to check, but a lot less than before. Assuming I\n> should just die on any failed write (which seems reasonable),\n\nYes, I see no point in continuing after a write failure. Just print\nthe strerror() message and exit.\n\n> how do I\n> check for a failed write in a way that works on all Unixes? Is the\n> following OK:\n\n> - fwrite: ok if return value equals item count\n> - fprintf: ok if return value > 0.\n> - fputc: ok if != EOF\n\nProbably fprintf() >= 0 --- according to my specs, it returns the number\nof chars emitted, or a negative value on error. The other two are\ncorrect.\n\nDon't forget to check for a successful fclose() too, since otherwise\nyou won't notice a failure in dumping the last bufferload of data.\n\nI do not recall the success/failure return codes for the zlib calls,\nbut I assume they check for write failure and reflect it back ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 11:20:43 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: pg_dump return status.. " }, { "msg_contents": "On Fri, Jan 05, 2001 at 11:20:43AM -0500, Tom Lane wrote:\n> Philip Warner <[email protected]> writes:\n> > how do I\n> > check for a failed write in a way that works on all Unixes? Is the\n> > following OK:\n> \n> > - fwrite: ok if return value equals item count\n> > - fprintf: ok if return value > 0.\n> > - fputc: ok if != EOF\n> \n> Probably fprintf() >= 0 --- according to my specs, it returns the number\n> of chars emitted, or a negative value on error. The other two are\n> correct.\n\nAn fprintf returning 0 is a suspicious event; it's easy to imagine \ncases where it makes sense, but I don't think I have ever coded one.\nProbably >N (where N is the smallest reasonable output, defaulting \nto 1) may be a better test in real code.\n\nAs I recall, on SunOS 4 the printf()s don't return the number of \ncharacters written. I don't recall what they do instead, and have\nno access to such machines any more.\n\nOther old BSD-derived systems are likely to have have wonky return \nvalues/types on the printf()s. Looking at the list of supported \nplatforms, none jump out as likely candidates, but in the \"unsupported\" \nlist, Ultrix and NextStep do. (Do we care?)\n\nIf SunOS 4 is to remain a supported platform, the printf checks may \nneed to be special-cased for it.\n\nNathan Myers\[email protected]\n", "msg_date": "Fri, 5 Jan 2001 14:17:09 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.." }, { "msg_contents": "[email protected] (Nathan Myers) writes:\n\n> An fprintf returning 0 is a suspicious event; it's easy to imagine \n> cases where it makes sense, but I don't think I have ever coded one.\n> Probably >N (where N is the smallest reasonable output, defaulting \n> to 1) may be a better test in real code.\n\nOn older systems fprintf returns 0 on success and EOF on failure.\n\n> As I recall, on SunOS 4 the printf()s don't return the number of \n> characters written. I don't recall what they do instead, and have\n> no access to such machines any more.\n\nProbably 0/EOF. sprintf on SunOS returns its first argument.\n\nIan\n", "msg_date": "05 Jan 2001 14:26:13 -0800", "msg_from": "Ian Lance Taylor <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.." }, { "msg_contents": ">> An fprintf returning 0 is a suspicious event; it's easy to imagine \n>> cases where it makes sense, but I don't think I have ever coded one.\n>> Probably > N (where N is the smallest reasonable output, defaulting \n>> to 1) may be a better test in real code.\n\n> On older systems fprintf returns 0 on success and EOF on failure.\n\nThe books I have all recommend testing for \"a negative return value\"\nto detect printf errors. The C standard also specifies \"a negative\nvalue\" for errors --- it is not guaranteed that that value is EOF.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 18:14:15 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.. " }, { "msg_contents": "Nathan Myers writes:\n > On Fri, Jan 05, 2001 at 11:20:43AM -0500, Tom Lane wrote:\n > > Philip Warner <[email protected]> writes:\n > > > how do I\n > > > check for a failed write in a way that works on all Unixes? Is the\n > > > following OK:\n > > \n > > > - fwrite: ok if return value equals item count\n > > > - fprintf: ok if return value > 0.\n > > > - fputc: ok if != EOF\n > > \n > > Probably fprintf() >= 0 --- according to my specs, it returns the number\n > > of chars emitted, or a negative value on error. The other two are\n > > correct.\n > \n > An fprintf returning 0 is a suspicious event; it's easy to imagine \n > cases where it makes sense, but I don't think I have ever coded one.\n > Probably >N (where N is the smallest reasonable output, defaulting \n > to 1) may be a better test in real code.\n > \n > As I recall, on SunOS 4 the printf()s don't return the number of \n > characters written. I don't recall what they do instead, and have\n > no access to such machines any more.\n > \n > Other old BSD-derived systems are likely to have have wonky return \n > values/types on the printf()s. Looking at the list of supported \n > platforms, none jump out as likely candidates, but in the \"unsupported\" \n > list, Ultrix and NextStep do. (Do we care?)\n > \n > If SunOS 4 is to remain a supported platform, the printf checks may \n > need to be special-cased for it.\n\nCurrent Solaris is liable to problems still, though these are not\nrelevant to this thread. printf() and fprintf() have always returned\nthe number of characters transmitted, or EOF for failure. It is\nsprintf() that has problems.\n\nThere are two versions of sprintf() available in SunOS 4 - 8. The\nstandard one (ANSI C) in libc returns an int, the number of characters\nwritten (excluding '\\0'). The BSD version returns a char* which\npoints to the target. If you have a -lbsd on your link line then you\nget the BSD version. There are no compiler errors, just run time\nerrors if you rely on the return from sprintf() being the number of\ncharacters. The workaround is to put an extra -lc on the link line\nbefore the -lbsd if your code needs both standard sprintf() and some\nother BSD function.\n\nUltrix is documented as having the same behaviour as Solaris. I don't\nknow about NeXTSTEP/OPENSTEP/GNUStep.\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.\n", "msg_date": "Mon, 8 Jan 2001 09:36:21 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.." }, { "msg_contents": "At 09:36 8/01/01 +0000, Pete Forman wrote:\n>There are no compiler errors, just run time\n>errors if you rely on the return from sprintf() being the number of\n>characters.\n\nAll I need to know is how to detect an error. Does it return EOF on error?\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": "Mon, 08 Jan 2001 21:30:53 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.." }, { "msg_contents": "Philip Warner writes:\n > At 09:36 8/01/01 +0000, Pete Forman wrote:\n > >There are no compiler errors, just run time errors if you rely on\n > >the return from sprintf() being the number of characters.\n > \n > All I need to know is how to detect an error. Does it return EOF on\n > error?\n\nThe standard sprintf() returns a negative int on error. That value\nmay or may not be EOF. EOF technically indicates the end of an input\nstream. It has no direct connection with errors writing to streams.\n\nThe \"BSD\" version in Solaris always returns the char* pointer that is\nthe first argument. There is no way to check for an error.\n\nOther BSD OSs such as FreeBSD, NetBSD and OpenBSD all conform to C89,\ni.e. sprintf() returns an int which is the number of characters\nwritten (excluding '\\0') or a negative number for failure.\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.\n", "msg_date": "Mon, 8 Jan 2001 11:16:00 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.." }, { "msg_contents": "Pete Forman <[email protected]> writes:\n> Philip Warner writes:\n>> All I need to know is how to detect an error. Does it return EOF on\n>> error?\n\n> The standard sprintf() returns a negative int on error.\n\nI thought we were talking about fprintf. sprintf can't really detect\nany errors anyway, except maybe a bad format string.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 10:32:16 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.. " }, { "msg_contents": "> There are two versions of sprintf() available in SunOS 4 - 8. The\n> standard one (ANSI C) in libc returns an int, the number of characters\n> written (excluding '\\0'). The BSD version returns a char* which\n> points to the target. If you have a -lbsd on your link line then you\n> get the BSD version. There are no compiler errors, just run time\n> errors if you rely on the return from sprintf() being the number of\n> characters. The workaround is to put an extra -lc on the link line\n> before the -lbsd if your code needs both standard sprintf() and some\n> other BSD function.\n> \n> Ultrix is documented as having the same behaviour as Solaris. I don't\n> know about NeXTSTEP/OPENSTEP/GNUStep.\n\nOf course, if sprintf() returns an error, you have pretty big problems. \n:-)\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 09:26:15 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: pg_dump return status.." } ]
[ { "msg_contents": "It seems we do not have the standard SQL function \"bit_length()\"?\n--\nTatsuo Ishii\n", "msg_date": "Fri, 05 Jan 2001 13:20:01 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "bit_length()" }, { "msg_contents": "Added to TODO:\n\n\t* Add SQL standard function bit_length()\n\n> It seems we do not have the standard SQL function \"bit_length()\"?\n> --\n> Tatsuo Ishii\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 08:48:05 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: bit_length()" } ]
[ { "msg_contents": "I just finished running the parallel regress tests with inval.c rigged\nto flush the relcache and syscache at every available opportunity,\nthat is anytime we could recognize a shared-cache-inval message from\nanother backend (see diff below). This setup gives a whole new universe\nof meaning to the word \"slow\" --- it took *three full days* to run the\nstandard \"make check\" procedure, including eighteen hours just to do the\n\"vacuum template1\" part of initdb. I kid you not. But it worked.\nLooks like the unexpected-cache-entry-drop class of problems are indeed\ngone.\n\nBTW, the reason the diff is rigged not to allow recursive cache flush\nis not that it wouldn't work, it's that I didn't expect to live long\nenough to finish such a test. I didn't originally have that restriction\nin there (and indeed found a bug that way: relcache flush could go into\nan infinite loop if hit with another SI inval before it'd finished the\ninitial flush). After fixing that bug, initdb was making steady\nprogress, but not at a rate that I wanted to wait out...\n\n\t\t\tregards, tom lane\n\n*** src/backend/utils/cache/inval.c.orig\tWed Nov 15 23:57:44 2000\n--- src/backend/utils/cache/inval.c\tMon Jan 1 17:27:53 2001\n***************\n*** 643,649 ****\n--- 643,661 ----\n \telog(DEBUG, \"DiscardInvalid called\");\n #endif\t /* defined(INVALIDDEBUG) */\n \n+ #if 1\n+ \t/* DEBUG CHECK ONLY ... force cache reset at any opportunity */\n+ \tstatic bool inReset = false;\n+ \n+ \tif (! IsBootstrapProcessingMode() && !inReset)\n+ \t{\n+ \t\tinReset = true;\n+ \t\tResetSystemCaches();\n+ \t\tinReset = false;\n+ \t}\n+ #else\n \tInvalidateSharedInvalid(CacheIdInvalidate, ResetSystemCaches);\n+ #endif\n }\n \n /*\n", "msg_date": "Fri, 05 Jan 2001 01:18:47 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Well, we seem to be proof against cache-inval problems now" }, { "msg_contents": "Tom Lane wrote:\n> \n> I just finished running the parallel regress tests with inval.c rigged\n> to flush the relcache and syscache at every available opportunity,\n> that is anytime we could recognize a shared-cache-inval message from\n> another backend (see diff below). This setup gives a whole new universe\n> of meaning to the word \"slow\" --- it took *three full days* to run the\n> standard \"make check\" procedure, including eighteen hours just to do the\n> \"vacuum template1\" part of initdb. I kid you not. But it worked.\n> Looks like the unexpected-cache-entry-drop class of problems are indeed\n> gone.\n> \n\nGreat.\nThanks.\n\nHiroshi Inoue\n", "msg_date": "Fri, 05 Jan 2001 16:55:23 +0900", "msg_from": "Hiroshi Inoue <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems now" }, { "msg_contents": "On Fri, 5 Jan 2001, Tom Lane wrote:\n\n> I just finished running the parallel regress tests with inval.c rigged\n> to flush the relcache and syscache at every available opportunity,\n> that is anytime we could recognize a shared-cache-inval message from\n> another backend (see diff below). This setup gives a whole new universe\n> of meaning to the word \"slow\" --- it took *three full days* to run the\n> standard \"make check\" procedure, including eighteen hours just to do the\n> \"vacuum template1\" part of initdb. I kid you not. But it worked.\n> Looks like the unexpected-cache-entry-drop class of problems are indeed\n> gone.\nTom, I'm not sure how (or whether) this relates to \"alter table\" happening\nwhen someone else is doing a SELECT from table. Are you saying that it\nshould work without any locking or I'm completely off base?\n\n-alex\n\n\n\n", "msg_date": "Fri, 5 Jan 2001 14:13:26 -0500 (EST)", "msg_from": "Alex Pilosov <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems\n now" }, { "msg_contents": "Alex Pilosov <[email protected]> writes:\n> Tom, I'm not sure how (or whether) this relates to \"alter table\" happening\n> when someone else is doing a SELECT from table.\n\nThe ALTER will wait for the SELECT to finish. That's not related to the\ninternal cache problem that I was worried about.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 14:14:29 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems now " }, { "msg_contents": "Can this now be marked as done?\n\n* Modification of pg_class can happen while table in use by another\nbackend. Might lead to MVCC inside of syscache\n\n> I just finished running the parallel regress tests with inval.c rigged\n> to flush the relcache and syscache at every available opportunity,\n> that is anytime we could recognize a shared-cache-inval message from\n> another backend (see diff below). This setup gives a whole new universe\n> of meaning to the word \"slow\" --- it took *three full days* to run the\n> standard \"make check\" procedure, including eighteen hours just to do the\n> \"vacuum template1\" part of initdb. I kid you not. But it worked.\n> Looks like the unexpected-cache-entry-drop class of problems are indeed\n> gone.\n> \n> BTW, the reason the diff is rigged not to allow recursive cache flush\n> is not that it wouldn't work, it's that I didn't expect to live long\n> enough to finish such a test. I didn't originally have that restriction\n> in there (and indeed found a bug that way: relcache flush could go into\n> an infinite loop if hit with another SI inval before it'd finished the\n> initial flush). After fixing that bug, initdb was making steady\n> progress, but not at a rate that I wanted to wait out...\n> \n> \t\t\tregards, tom lane\n> \n> *** src/backend/utils/cache/inval.c.orig\tWed Nov 15 23:57:44 2000\n> --- src/backend/utils/cache/inval.c\tMon Jan 1 17:27:53 2001\n> ***************\n> *** 643,649 ****\n> --- 643,661 ----\n> \telog(DEBUG, \"DiscardInvalid called\");\n> #endif\t /* defined(INVALIDDEBUG) */\n> \n> + #if 1\n> + \t/* DEBUG CHECK ONLY ... force cache reset at any opportunity */\n> + \tstatic bool inReset = false;\n> + \n> + \tif (! IsBootstrapProcessingMode() && !inReset)\n> + \t{\n> + \t\tinReset = true;\n> + \t\tResetSystemCaches();\n> + \t\tinReset = false;\n> + \t}\n> + #else\n> \tInvalidateSharedInvalid(CacheIdInvalidate, ResetSystemCaches);\n> + #endif\n> }\n> \n> /*\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 08:50:08 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems\n now" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n> Can this now be marked as done?\n> * Modification of pg_class can happen while table in use by another\n> backend. Might lead to MVCC inside of syscache\n\nI'm not sure. Do you have any record of what the concern was, in\ndetail? I don't understand what the TODO item is trying to say.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 13:00:55 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems now " }, { "msg_contents": "> Bruce Momjian <[email protected]> writes:\n> > Can this now be marked as done?\n> > * Modification of pg_class can happen while table in use by another\n> > backend. Might lead to MVCC inside of syscache\n> \n> I'm not sure. Do you have any record of what the concern was, in\n> detail? I don't understand what the TODO item is trying to say.\n\nI assumed it was the problem of table lookups with no locking. No idea\nwhat the MVCC mention is about.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 13:02:02 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems\n now" }, { "msg_contents": "Bruce Momjian <[email protected]> writes:\n>> Bruce Momjian <[email protected]> writes:\n>>>> Can this now be marked as done?\n>>>> * Modification of pg_class can happen while table in use by another\n>>>> backend. Might lead to MVCC inside of syscache\n>> \n>> I'm not sure. Do you have any record of what the concern was, in\n>> detail? I don't understand what the TODO item is trying to say.\n\n> I assumed it was the problem of table lookups with no locking. No idea\n> what the MVCC mention is about.\n\nI checked the CVS archives and found that you added that TODO item on\n4-Feb-2000. I could not, however, find any relevant discussion in the\npghackers archives in the first few days of February. Do you have\nanything archived that might help narrow it down?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 19:37:46 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems now " }, { "msg_contents": "No? :-)\n\n> Bruce Momjian <[email protected]> writes:\n> >> Bruce Momjian <[email protected]> writes:\n> >>>> Can this now be marked as done?\n> >>>> * Modification of pg_class can happen while table in use by another\n> >>>> backend. Might lead to MVCC inside of syscache\n> >> \n> >> I'm not sure. Do you have any record of what the concern was, in\n> >> detail? I don't understand what the TODO item is trying to say.\n> \n> > I assumed it was the problem of table lookups with no locking. No idea\n> > what the MVCC mention is about.\n> \n> I checked the CVS archives and found that you added that TODO item on\n> 4-Feb-2000. I could not, however, find any relevant discussion in the\n> pghackers archives in the first few days of February. Do you have\n> anything archived that might help narrow it down?\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 21:32:00 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems\n now" }, { "msg_contents": "I barely understand the items sometimes.\n\n> Bruce Momjian <[email protected]> writes:\n> >> Bruce Momjian <[email protected]> writes:\n> >>>> Can this now be marked as done?\n> >>>> * Modification of pg_class can happen while table in use by another\n> >>>> backend. Might lead to MVCC inside of syscache\n> >> \n> >> I'm not sure. Do you have any record of what the concern was, in\n> >> detail? I don't understand what the TODO item is trying to say.\n> \n> > I assumed it was the problem of table lookups with no locking. No idea\n> > what the MVCC mention is about.\n> \n> I checked the CVS archives and found that you added that TODO item on\n> 4-Feb-2000. I could not, however, find any relevant discussion in the\n> pghackers archives in the first few days of February. Do you have\n> anything archived that might help narrow it down?\n> \n> \t\t\tregards, tom lane\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 21:32:18 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Well, we seem to be proof against cache-inval problems\n now" } ]
[ { "msg_contents": "Does the SPI interface support recursion? That is, can a function\nuse SPI to make a query which involves calling another function which\nuses SPI?\n\nThe documentation suggests not, saying that if a function which uses\nSPI calls another function which uses SPI, it won't work, and calling\nthat ``bad practice.''\n\nHowever, in spi.c I note that there is a stack, and a variable\n_SPI_curid, and the undocumented functions SPI_push and SPI_pop. If\nthat works to support recursion, then why does the documentation\nrecommend against it?\n\n\nAre there any restrictions on when SPI_connect may be called? The\nexecutor can presumably call a function at any time during the\nexecution of a plan if the function is used in a WHERE clause. If\nthat function turns around and calls the executor via SPI, are there\nany possibilities for deadlock?\n\nIan\n", "msg_date": "5 Jan 2001 11:39:16 -0800", "msg_from": "Ian Lance Taylor <[email protected]>", "msg_from_op": true, "msg_subject": "Recursion and SPI" }, { "msg_contents": "Ian Lance Taylor <[email protected]> writes:\n> Does the SPI interface support recursion? That is, can a function\n> use SPI to make a query which involves calling another function which\n> uses SPI?\n\nLooks to me like it should work.\n\n> The documentation suggests not, saying that if a function which uses\n> SPI calls another function which uses SPI, it won't work, and calling\n> that ``bad practice.''\n\nThe documentation could be out of date. Why don't you test it out and\nlet us know?\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 18:03:54 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Recursion and SPI " } ]
[ { "msg_contents": "> Does the SPI interface support recursion? That is, can a function\n> use SPI to make a query which involves calling another function which\n> uses SPI?\n\n From http://www.postgresql.org/docs/programmer/spi.htm :\n\n\"SPI procedures are always called by some (upper) Executor and the SPI\nmanager\nuses the Executor to run your queries. Other procedures may be called by the\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nExecutor running queries from your procedure.\"\n\n> The documentation suggests not, saying that if a function which uses\n> SPI calls another function which uses SPI, it won't work, and calling\n> that ``bad practice.''\n\n From http://www.postgresql.org/docs/programmer/spi-spiconnect.htm :\n\n\"You may get SPI_ERROR_CONNECT error if SPI_connect is called from an\nalready\nconnected procedure - e.g. if you *directly call* one procedure from another\n ^^^^^^^^^^^^^^^\nconnected one. Actually, while the child procedure will be able to use SPI,\nyour parent procedure will not be able to continue to use SPI after the\nchild\nreturns (if SPI_finish is called by the child). It's bad practice.\"\n\nBut you are able to run queries which call SPI functions.\n\n> However, in spi.c I note that there is a stack, and a variable\n> _SPI_curid, and the undocumented functions SPI_push and SPI_pop.\n> If that works to support recursion, then why does the documentation\n> recommend against it?\n\nAfair, there were no SPI_push & SPI_pop originally. Someone added them\nbut forgot to document.\n\nVadim\n", "msg_date": "Fri, 5 Jan 2001 12:44:17 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Recursion and SPI" }, { "msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n\n> > Does the SPI interface support recursion? That is, can a function\n> > use SPI to make a query which involves calling another function which\n> > uses SPI?\n> \n> >From http://www.postgresql.org/docs/programmer/spi.htm :\n> \n> \"SPI procedures are always called by some (upper) Executor and the SPI\n> manager\n> uses the Executor to run your queries. Other procedures may be called by the\n> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> Executor running queries from your procedure.\"\n> \n> > The documentation suggests not, saying that if a function which uses\n> > SPI calls another function which uses SPI, it won't work, and calling\n> > that ``bad practice.''\n> \n> >From http://www.postgresql.org/docs/programmer/spi-spiconnect.htm :\n> \n> \"You may get SPI_ERROR_CONNECT error if SPI_connect is called from an\n> already\n> connected procedure - e.g. if you *directly call* one procedure from another\n> ^^^^^^^^^^^^^^^\n> connected one. Actually, while the child procedure will be able to use SPI,\n> your parent procedure will not be able to continue to use SPI after the\n> child\n> returns (if SPI_finish is called by the child). It's bad practice.\"\n> \n> But you are able to run queries which call SPI functions.\n\nThanks for the clarification.\n\nApproaching the current documentation from a position of ignorance, I\nfind it ambiguous. I propose something along the lines of the\nfollowing patch to clarify it. Thanks.\n\n(Alternatively, perhaps the code could maintain a count of nested\ncalls to SPI_connect/SPI_finish. But I didn't try to write that\npatch.)\n\nIan\n\nIndex: spi.sgml\n===================================================================\nRCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/spi.sgml,v\nretrieving revision 1.8\ndiff -u -r1.8 spi.sgml\n--- spi.sgml\t2000/12/22 18:57:50\t1.8\n+++ spi.sgml\t2001/01/05 22:10:13\n@@ -34,10 +34,11 @@\n </Para>\n \n <Para>\n-<Acronym>SPI</Acronym> procedures are always called by some (upper) \n-Executor and the <Acronym>SPI</Acronym>\n-manager uses the Executor to run your queries. Other procedures may be\n-called by the Executor running queries from your procedure.\n+Procedures which use <Acronym>SPI</Acronym> are called by the\n+Executor. The <Acronym>SPI</Acronym> calls recursively invoke the\n+Executor in turn to run queries. When the Executor is invoked\n+recursively, it may itself call procedures which may make\n+<Acronym>SPI</Acronym> calls.\n </Para>\n \n <Para>\n@@ -146,12 +147,17 @@\n utility SPI functions may be called from un-connected procedures.\n </PARA>\n <PARA>\n- You may get <ReturnValue>SPI_ERROR_CONNECT</ReturnValue> error if <Function>SPI_connect</Function> is\n- called from an already connected procedure - e.g. if you directly call one\n- procedure from another connected one. Actually, while the child procedure\n- will be able to use SPI, your parent procedure will not be able to continue\n- to use SPI after the child returns (if <Function>SPI_finish</Function> is called by the child).\n- It's bad practice.\n+ If your procedure is already connected,\n+ <Function>SPI_connect</Function> will return an\n+ <ReturnValue>SPI_ERROR_CONNECT</ReturnValue> error. Note that this\n+ may happen if a procedure which has called\n+ <Function>SPI_connect</Function> directly calls another procedure\n+ which itself calls <Function>SPI_connect</Function>. While\n+ recursive calls to the <Acronym>SPI</Acronym> manager are permitted\n+ when an <Acronym>SPI</Acronym> query invokes another function which\n+ uses <Acronym>SPI</Acronym>, directly nested calls to\n+ <Function>SPI_connect</Function> and\n+ <Function>SPI_finish</Function> are forbidden.\n </PARA>\n </REFSECT1>\n <REFSECT1 ID=\"R1-SPI-SPICONNECT-2\">\n", "msg_date": "05 Jan 2001 14:13:27 -0800", "msg_from": "Ian Lance Taylor <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Recursion and SPI" }, { "msg_contents": "Applied. Thanks.\n\n> \"Mikheev, Vadim\" <[email protected]> writes:\n> \n> > > Does the SPI interface support recursion? That is, can a function\n> > > use SPI to make a query which involves calling another function which\n> > > uses SPI?\n> > \n> > >From http://www.postgresql.org/docs/programmer/spi.htm :\n> > \n> > \"SPI procedures are always called by some (upper) Executor and the SPI\n> > manager\n> > uses the Executor to run your queries. Other procedures may be called by the\n> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> > Executor running queries from your procedure.\"\n> > \n> > > The documentation suggests not, saying that if a function which uses\n> > > SPI calls another function which uses SPI, it won't work, and calling\n> > > that ``bad practice.''\n> > \n> > >From http://www.postgresql.org/docs/programmer/spi-spiconnect.htm :\n> > \n> > \"You may get SPI_ERROR_CONNECT error if SPI_connect is called from an\n> > already\n> > connected procedure - e.g. if you *directly call* one procedure from another\n> > ^^^^^^^^^^^^^^^\n> > connected one. Actually, while the child procedure will be able to use SPI,\n> > your parent procedure will not be able to continue to use SPI after the\n> > child\n> > returns (if SPI_finish is called by the child). It's bad practice.\"\n> > \n> > But you are able to run queries which call SPI functions.\n> \n> Thanks for the clarification.\n> \n> Approaching the current documentation from a position of ignorance, I\n> find it ambiguous. I propose something along the lines of the\n> following patch to clarify it. Thanks.\n> \n> (Alternatively, perhaps the code could maintain a count of nested\n> calls to SPI_connect/SPI_finish. But I didn't try to write that\n> patch.)\n> \n> Ian\n> \n> Index: spi.sgml\n> ===================================================================\n> RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/spi.sgml,v\n> retrieving revision 1.8\n> diff -u -r1.8 spi.sgml\n> --- spi.sgml\t2000/12/22 18:57:50\t1.8\n> +++ spi.sgml\t2001/01/05 22:10:13\n> @@ -34,10 +34,11 @@\n> </Para>\n> \n> <Para>\n> -<Acronym>SPI</Acronym> procedures are always called by some (upper) \n> -Executor and the <Acronym>SPI</Acronym>\n> -manager uses the Executor to run your queries. Other procedures may be\n> -called by the Executor running queries from your procedure.\n> +Procedures which use <Acronym>SPI</Acronym> are called by the\n> +Executor. The <Acronym>SPI</Acronym> calls recursively invoke the\n> +Executor in turn to run queries. When the Executor is invoked\n> +recursively, it may itself call procedures which may make\n> +<Acronym>SPI</Acronym> calls.\n> </Para>\n> \n> <Para>\n> @@ -146,12 +147,17 @@\n> utility SPI functions may be called from un-connected procedures.\n> </PARA>\n> <PARA>\n> - You may get <ReturnValue>SPI_ERROR_CONNECT</ReturnValue> error if <Function>SPI_connect</Function> is\n> - called from an already connected procedure - e.g. if you directly call one\n> - procedure from another connected one. Actually, while the child procedure\n> - will be able to use SPI, your parent procedure will not be able to continue\n> - to use SPI after the child returns (if <Function>SPI_finish</Function> is called by the child).\n> - It's bad practice.\n> + If your procedure is already connected,\n> + <Function>SPI_connect</Function> will return an\n> + <ReturnValue>SPI_ERROR_CONNECT</ReturnValue> error. Note that this\n> + may happen if a procedure which has called\n> + <Function>SPI_connect</Function> directly calls another procedure\n> + which itself calls <Function>SPI_connect</Function>. While\n> + recursive calls to the <Acronym>SPI</Acronym> manager are permitted\n> + when an <Acronym>SPI</Acronym> query invokes another function which\n> + uses <Acronym>SPI</Acronym>, directly nested calls to\n> + <Function>SPI_connect</Function> and\n> + <Function>SPI_finish</Function> are forbidden.\n> </PARA>\n> </REFSECT1>\n> <REFSECT1 ID=\"R1-SPI-SPICONNECT-2\">\n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 09:23:50 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [PATCHES] Re: Recursion and SPI" }, { "msg_contents": "Hi,\n\nHas anyone any input to offer on adding an arbitrary locking feature?\n\nWhere\nGETLOCK \"string\" will lock on \"string\", the lock being only released at the\nend of a transaction.\n\nWhile the lock is held, other processes trying to do GETLOCK \"string\" will\nblock until the lock is released.\n\nThis feature can allow applications to better serialize things. For\nexample: inserting unique records. Cooperating applications could just do\nsomething like:\n\nGETLOCK \"mytable.key2=1234\";\nSELECT count(*) from mytable where key2=1234 for update;\nif count==0, insert the stuff.\n elsif count==1 update the stuff instead\n else something is wrong!\n\nThe lock will thus only affect applications interested in mytable where\nkey2=1234\n\nIn contrast the current alternatives appear to be either LOCK the entire\ntable (preventing ALL inserts and selects), or to create a UNIQUE\nconstraint (forcing complete rollbacks and restarts in event of a collision\n:( ).\n\nAny comments, suggestions or tips would be welcome. It looks like quite a\ncomplex thing to do - I've only just started looking at the postgresql\ninternals and the lock manager.\n\nCheerio,\nLink.\n\n\n\n\n\n", "msg_date": "Thu, 11 Jan 2001 15:43:39 +0800", "msg_from": "Lincoln Yeoh <[email protected]>", "msg_from_op": false, "msg_subject": "Lock on arbitrary string feature" }, { "msg_contents": "On Thu, Jan 11, 2001 at 03:43:39PM +0800, Lincoln Yeoh wrote:\n> Hi,\n> \n> Has anyone any input to offer on adding an arbitrary locking feature?\n> \n> Where\n> GETLOCK \"string\" will lock on \"string\", the lock being only released at the\n> end of a transaction.\n> \n> While the lock is held, other processes trying to do GETLOCK \"string\" will\n> block until the lock is released.\n> \n> This feature can allow applications to better serialize things. For\n> example: inserting unique records. Cooperating applications could just do\n> something like:\n> \n> GETLOCK \"mytable.key2=1234\";\n> SELECT count(*) from mytable where key2=1234 for update;\n> if count==0, insert the stuff.\n> elsif count==1 update the stuff instead\n> else something is wrong!\n> \n> The lock will thus only affect applications interested in mytable where\n> key2=1234\n\n\tWe do something like this with listen/notify pairs. To syncronize\ntwo clients, we have them each listen for the other's token string,\nsend a notify, and then block on select(), checking for incoming\nnotifications. When they get the notification, they send a notify back\nto the other side to un-block it.\n\n\tIf anything, it would be nice if there were a way to make a LISTEN\nblock the connection on a specific event tag, which is essentially what\nwe are doing in our interface library.\n\n-- \nAdam Haberlach |A cat spends her life conflicted between a\[email protected] |deep, passionate, and profound desire for\nhttp://www.newsnipple.com |fish and an equally deep, passionate, and\n'88 EX500 |profound desire to avoid getting wet.\n", "msg_date": "Thu, 11 Jan 2001 09:38:41 -0800", "msg_from": "Adam Haberlach <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Lock on arbitrary string feature" }, { "msg_contents": "Lincoln Yeoh <[email protected]> writes:\n> Has anyone any input to offer on adding an arbitrary locking feature?\n\n> Where\n> GETLOCK \"string\" will lock on \"string\", the lock being only released at the\n> end of a transaction.\n\n> Any comments, suggestions or tips would be welcome. It looks like quite a\n> complex thing to do - I've only just started looking at the postgresql\n> internals and the lock manager.\n\nA lock is basically an entry in a shared hash table, so you could\nimplement this just by having a different kind of key (ie, the given\nstring) for these sorts of locks.\n\nHowever, the whole thing strikes me as more of an ugly kluge than a\nclean solution to the real problem. If you're not using a UNIQUE\nconstraint then you're relying on application logic to guarantee\nconsistency, which is bad. If you do have a UNIQUE constraint and\nwant to layer this sort of application lock on top of it, then you\nstill have the problem of unexpected failures if some instance/portion\nof your application does inserts without remembering to get the\napplication-level lock. So, as Vadim remarked, doing the insert and\nrolling back to a savepoint on failure would be a much better answer.\n\nBTW, you should consider whether you couldn't use the existing USERLOCK\nfeature as a short-term alternative. If you can squeeze the key value\nyou need to insert into a user lock tag, that will do as well as your\nproposed general-string-tag locks.\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 11 Jan 2001 13:26:19 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Lock on arbitrary string feature " }, { "msg_contents": "Tom Lane wrote:\n> Lincoln Yeoh <[email protected]> writes:\n> > Has anyone any input to offer on adding an arbitrary locking feature?\n>\n> > Where\n> > GETLOCK \"string\" will lock on \"string\", the lock being only released at the\n> > end of a transaction.\n>\n> > Any comments, suggestions or tips would be welcome. It looks like quite a\n> > complex thing to do - I've only just started looking at the postgresql\n> > internals and the lock manager.\n>\n> A lock is basically an entry in a shared hash table, so you could\n> implement this just by having a different kind of key (ie, the given\n> string) for these sorts of locks.\n>\n> However, the whole thing strikes me as more of an ugly kluge than a\n> clean solution to the real problem. If you're not using a UNIQUE\n> constraint then you're relying on application logic to guarantee\n> consistency, which is bad. If you do have a UNIQUE constraint and\n> want to layer this sort of application lock on top of it, then you\n> still have the problem of unexpected failures if some instance/portion\n> of your application does inserts without remembering to get the\n> application-level lock. So, as Vadim remarked, doing the insert and\n> rolling back to a savepoint on failure would be a much better answer.\n\n You're right that it's ugly, but at least it'd be a temporary\n \"solution\" for the fact that we cannot catch exceptions in\n triggers yet. So the if/else logic will currently not work\n reliable in a trigger without beeing able to lock before the\n SELECT.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== [email protected] #\n\n\n", "msg_date": "Thu, 11 Jan 2001 14:57:04 -0500 (EST)", "msg_from": "Jan Wieck <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Lock on arbitrary string feature" }, { "msg_contents": "At 01:26 PM 11-01-2001 -0500, Tom Lane wrote:\n>Lincoln Yeoh <[email protected]> writes:\n>> GETLOCK \"string\" will lock on \"string\", the lock being only released at the\n>> end of a transaction.\n>However, the whole thing strikes me as more of an ugly kluge than a\n>clean solution to the real problem. If you're not using a UNIQUE\n\nBut doesn't that go well with SQL :). The joys of INSERT vs UPDATE.\n\nAnd \"select .. for update\" too! So far I haven't left out any \"for\nupdates\", at least I think so ;). \n\nI did consider using select for update to simulate it but it doesn't work\nwhen the values are very variable.\n\n>application-level lock. So, as Vadim remarked, doing the insert and\n>rolling back to a savepoint on failure would be a much better answer.\n\nYep, savepoints will allow better consistency. But a getlock feature can be\nvery handy in lots of other scenarios.\n\n>BTW, you should consider whether you couldn't use the existing USERLOCK\n>feature as a short-term alternative. If you can squeeze the key value\n>you need to insert into a user lock tag, that will do as well as your\n>proposed general-string-tag locks.\n\nLooks interesting. Probably what it does is similar enough to what I'm\ntrying to do. Copy from the best :).\n\nBut meantime, back to lock table...\n\nCheerio,\nLink.\n\n\n\n", "msg_date": "Fri, 12 Jan 2001 10:37:39 +0800", "msg_from": "Lincoln Yeoh <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Lock on arbitrary string feature " }, { "msg_contents": "At 09:38 AM 11-01-2001 -0800, Adam Haberlach wrote:\n>\tWe do something like this with listen/notify pairs. To syncronize\n>two clients, we have them each listen for the other's token string,\n>send a notify, and then block on select(), checking for incoming\n>notifications. When they get the notification, they send a notify back\n>to the other side to un-block it.\n>\n>\tIf anything, it would be nice if there were a way to make a LISTEN\n>block the connection on a specific event tag, which is essentially what\n>we are doing in our interface library.\n\nActually what you are talking about is almost an inverse of this locking\nthing. One is stop until it's ok to go. The other is stop if it's not ok to\ngo.\n\nYou're looking for a WAIT for \"notification\" feature :). \n\nI actually was looking for this too, and I thought I was the only one\ninterested in this. Wow a 100% increase in interest ;). \n\nI'm also trying to see how this can be done. It looks a lot easier to do\nthan the getlock feature. But I can't figure out what to select/wait/snooze\non, when the routine is in the inside looking about (async.c:\nAsync_Wait(char *relname) yeah oxymoronic I know). Rather than outside\nlooking in (in which case it's select PQsocket or something like that).\nWould like to use as little CPU as possible when waiting - think of\npostgresql on battery powered wearable \"servers\" + wireless LAN.\n\nCheerio,\nLink.\n\n", "msg_date": "Fri, 12 Jan 2001 11:08:40 +0800", "msg_from": "Lincoln Yeoh <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Lock on arbitrary string feature" } ]
[ { "msg_contents": "\nAnyone have anything outstanding that prevents me rolling a Beta2 and\nannouncing it this weekend? Tom? Vadim? Peter?\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Fri, 5 Jan 2001 18:33:02 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "Beta2 ... ?" }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> Anyone have anything outstanding that prevents me rolling a Beta2 and\n> announcing it this weekend? Tom? Vadim? Peter?\n\nWrap it up, I'd say. I don't have anything pending that seems worth\nholding up beta2 for.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 17:55:12 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Beta2 ... ? " }, { "msg_contents": "mike wrote:\n>Tom Lane Wrote:\n> > Wrap it up, I'd say. I don't have anything pending that seems worth\n> > holding up beta2 for.\n \n> Will RPM's be made availiable for this beta release?\n\nI intend to do so, but it will be a few days to a week after the tarball\nrelease.\n\nI am inclined to wait until a Release Candidate, if we have one this go\naround, is available before releasing RPM's, but my mind can be\nchanged.... :-)\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Fri, 05 Jan 2001 18:35:43 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Lamar Owen <[email protected]> writes:\n> I am inclined to wait until a Release Candidate, if we have one this go\n> around, is available before releasing RPM's, but my mind can be\n> changed.... :-)\n\nPlease do make beta RPMs available. Seems to me that there's a\nfair-size population of potential beta testers that we're shutting\nout of the process if we don't put out RPMs. Losing available beta\ntesting work is not a good project management practice ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 18:49:04 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "Tom Lane wrote:\n> Lamar Owen <[email protected]> writes:\n> > I am inclined to wait until a Release Candidate, if we have one this go\n> > around, is available before releasing RPM's, but my mind can be\n> > changed.... :-)\n \n> Please do make beta RPMs available. Seems to me that there's a\n> fair-size population of potential beta testers that we're shutting\n> out of the process if we don't put out RPMs. Losing available beta\n> testing work is not a good project management practice ...\n\nOk, consider my mind changed. :-). My only concerns were, due to some\nfeedback I have gotten, is that people would treat the RPM release as\n_productions_ rather than beta -- but maybe I'm just being paranoid. \nMore than likely I'm being paranoid.....\n\nLook for RPM's in a few days, then.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Fri, 05 Jan 2001 19:02:52 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Lamar Owen <[email protected]> writes:\n> Ok, consider my mind changed. :-). My only concerns were, due to some\n> feedback I have gotten, is that people would treat the RPM release as\n> _productions_ rather than beta -- but maybe I'm just being paranoid. \n\nAs long as the RPMs are clearly marked beta, I don't have a lot of\nsympathy for anyone who thinks beta == production.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 19:17:24 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "> The Hermit Hacker <[email protected]> writes:\n> > Anyone have anything outstanding that prevents me rolling a Beta2 and\n> > announcing it this weekend? Tom? Vadim? Peter?\n> \n> Wrap it up, I'd say. I don't have anything pending that seems worth\n> holding up beta2 for.\n\nWill RPM's be made availiable for this beta release?\n\nMike\n\n", "msg_date": "Fri, 5 Jan 2001 18:10:31 -0800", "msg_from": "\"mike\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Beta2 ... ? " }, { "msg_contents": "The Hermit Hacker writes:\n\n> Anyone have anything outstanding that prevents me rolling a Beta2 and\n> announcing it this weekend? Tom? Vadim? Peter?\n\nI'll commit the grammar changes we discussed yesterday, plus some new\ndocumentation that goes with it, tomorrow. I'm also going to send you a\npatch for mk-release so that the right documentation files are shipped\nthis time.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 6 Jan 2001 03:54:19 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Beta2 ... ?" }, { "msg_contents": "Tom Lane wrote:\n> \n> Lamar Owen <[email protected]> writes:\n> > I am inclined to wait until a Release Candidate, if we have one this go\n> > around, is available before releasing RPM's, but my mind can be\n> > changed.... :-)\n> \n> Please do make beta RPMs available. Seems to me that there's a\n> fair-size population of potential beta testers that we're shutting\n> out of the process if we don't put out RPMs. Losing available beta\n> testing work is not a good project management practice ...\n\nI'd like to argue for .deb Debian packages as well, for similar reasons.\nBut I'm aware that those are harder to produce, and that Oliver Elphick\nis almost alone on this task.\n\n--\nEmmanuel Charpentier\n", "msg_date": "Sat, 06 Jan 2001 09:40:21 +0100", "msg_from": "Emmanuel Charpentier <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "On Fri, 5 Jan 2001, Lamar Owen wrote:\n\n> Ok, consider my mind changed. :-). My only concerns were, due to some\n> feedback I have gotten, is that people would treat the RPM release as\n> _productions_ rather than beta -- but maybe I'm just being paranoid. \n\nJust because you're paranoid doesn't mean someone isn't out to get you!\n\nBut like Tom says - a beta in the name - should do it (and will for me).\n\nLamar,\n\nIs it possible to put some variables in the spec file so I can turn off\ncompiling the python and tcl portions. Of course I seem to remember a\nthread to a similar effect floating through but can't remember what the\noutcome was.\n\n\nTIA,\nRod\n-- \n\n", "msg_date": "Sat, 6 Jan 2001 07:56:29 -0800 (PST)", "msg_from": "\"Roderick A. Anderson\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Emmanuel Charpentier wrote:\n >Tom Lane wrote:\n >> \n >> Lamar Owen <[email protected]> writes:\n >> > I am inclined to wait until a Release Candidate, if we have one this go\n >> > around, is available before releasing RPM's, but my mind can be\n >> > changed.... :-)\n >> \n >> Please do make beta RPMs available. Seems to me that there's a\n >> fair-size population of potential beta testers that we're shutting\n >> out of the process if we don't put out RPMs. Losing available beta\n >> testing work is not a good project management practice ...\n >\n >I'd like to argue for .deb Debian packages as well, for similar reasons.\n >But I'm aware that those are harder to produce, and that Oliver Elphick\n >is almost alone on this task.\n\nI'll be doing it soon; but I don't want to release debs until there is\nno more chance of an initdb's being needed between betas; that bit me on \n7.0.\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Blessed are the pure in heart, for they shall see \n God.\" Matthew 5:8 \n\n\n", "msg_date": "Sun, 07 Jan 2001 13:35:55 +0000", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "\"Oliver Elphick\" <[email protected]> writes:\n> I'll be doing it soon; but I don't want to release debs until there is\n> no more chance of an initdb's being needed between betas; that bit me on \n> 7.0.\n\nIn that case you may as well say that there will be no beta debs, and\nDebian users can forget about being part of the beta test process.\n\nWe do not make a guarantee of \"no more initdbs\" until final release.\nThe severity of bug needed to make us do one goes up considerably with\neach beta, but there will not be a guarantee on *any* beta. If there\nwere such a guarantee, it'd be final not beta.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 13:18:02 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "Oliver Elphick wrote:\n> Emmanuel Charpentier wrote:\n> >Tom Lane wrote:\n> >> Lamar Owen <[email protected]> writes:\n> >> > I am inclined to wait until a Release Candidate, if we have one this go\n> >> > around, is available before releasing RPM's, but my mind can be\n> >> > changed.... :-)\n\n> >> Please do make beta RPMs available. Seems to me that there's a\n> >> fair-size population of potential beta testers that we're shutting\n> >> out of the process if we don't put out RPMs. Losing available beta\n> >> testing work is not a good project management practice ...\n\n> >I'd like to argue for .deb Debian packages as well, for similar reasons.\n> >But I'm aware that those are harder to produce, and that Oliver Elphick\n> >is almost alone on this task.\n \n> I'll be doing it soon; but I don't want to release debs until there is\n> no more chance of an initdb's being needed between betas; that bit me on\n> 7.0.\n\nWell, it bit me too -- which is one of the lesser reasons why I have\nbeen reluctant to release RPM's before a release candidate. However, if\nsomeone wants to beta test the packaging (which, incidentally, is made\nsubstantially easier with 7.1) of the new release, then they should\nexpect the results -- for instance, Red Hat doesn't guarantee that you\nwill be able to upgrade from their public beta test OS releases to any\nfuture release (more than likely you _will_ be able to, but not\nnecessarily). Only official releases are 'upgradeable'. I would\nsuggest, as I am doing myself, to release beta-grade packages for\ntesting _only_, with the proper disclaimers.\n\nBut, I don't see how debs are harder to produce than RPMs -- and while I\ndo have some help from RedHat, SuSE, and others, that help seems to be\nmore towards their distribution rather than towards PostgreSQL -- ie,\nthey go their own way for the most part. Each distribution using RPM's\nhas its own arcane rules -- and some of those rules make little sense\nfrom the PostgreSQL point of view. And, I don't blame them one whit for\nthat -- they are, after all, employed for the purpose of making a\ndistribution, not a PostgreSQL package. \n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Sun, 07 Jan 2001 16:14:09 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "\n\nOn Fri, 5 Jan 2001, Tom Lane wrote:\n\n> Lamar Owen <[email protected]> writes:\n> > I am inclined to wait until a Release Candidate, if we have one this go\n> > around, is available before releasing RPM's, but my mind can be\n> > changed.... :-)\n> \n> Please do make beta RPMs available. Seems to me that there's a\n> fair-size population of potential beta testers that we're shutting\n> out of the process if we don't put out RPMs. Losing available beta\n> testing work is not a good project management practice ...\n\nFWIW:\n\nWe would definately beta test 7.1 beta releases on our test machines if RPMS\nwere made available. However, if rpms are not made available, its unlikely\nthat anyone around here will get time to build the sources from scratch. So\nyou can count me as one beta tester that you would have if you made RPMS of the\nbetas.\n\n\nRegards,\nMike\n\n", "msg_date": "Tue, 9 Jan 2001 16:25:02 -0600 (CST)", "msg_from": "Michael J Schout <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "Michael J Schout wrote:\n> We would definately beta test 7.1 beta releases on our test machines if RPMS\n> were made available. However, if rpms are not made available, its unlikely\n> that anyone around here will get time to build the sources from scratch. So\n> you can count me as one beta tester that you would have if you made RPMS of the\n> betas.\n\nYour offer is appreciated, and will most definitely be taken :-).\n\nI'm experiencing some degree of difficulty with the build -- mostly due\nto some reorg in the Perl and Python clients, but also some main Make\nframework as well, thanks to the RPM build-root environment. The\ncompiles I have done outside the RPM environment have worked and\ninstalled (as source installs) very cleanly -- but the RPM build-root\nenvironment is rather different -- installing files to a location where\nthey won't actually be installed to :-).\n\nLet me explain: so that RPM builders don't accidentally trash their\nsystems during building, RPM includes a 'build-root' mechanism that\nallows a fake root for the build install to be used instead of the real\nroot. Think 'chroot-lite'. This build-root is not enforced anywhere\nexcept by the spec file build and install sections. This also allows\nRPMs to be built for root installation by a non-root user, which\nprovides an extra layer of filesystem protection.\n\nSo, files get installed to this build-root, for eventual real\ninstallation on the real root when the RPM is actually installed.\n\nHowever, there are some hard-coded paths left in the build, and the perl\nclient is being difficult, and odbcinst is going to the REAL /usr/etc\ninstead of $RPM_BUILD_ROOT/etc.... I have lots of combing to do. In\nmany ways 7.1 is an easier build -- but not in this regard. But I\nconsider this an RPM issue and not a PostgreSQL tarball issue, meaning,\nwhile I will be developing patches for the RPM build, I won't expect\nthose to be integrated into the main tarball.\n\nSo, I'm plugging at it....\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Tue, 09 Jan 2001 18:11:11 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Michael J Schout writes:\n\n> We would definately beta test 7.1 beta releases on our test machines if RPMS\n> were made available. However, if rpms are not made available, its unlikely\n> that anyone around here will get time to build the sources from scratch.\n\nBuilding from source takes five minutes. Reading the installation\ninstructions takes maybe ten minutes. Don't tell me you don't have that\namount of time but you still want to beta test. *shrug*\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Wed, 10 Jan 2001 17:43:03 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "Lamar Owen writes:\n\n> However, there are some hard-coded paths left in the build, and the perl\n> client is being difficult,\n\nThe Perl and Python clients use their own build system. Not sure how to\nhandle it.\n\n> and odbcinst is going to the REAL /usr/etc instead of\n> $RPM_BUILD_ROOT/etc....\n\nWorks here. Hmm, are you using 'make install DESTDIR=/random/place'?\nGiven that it's not documented it's unlikely that you are. But do start\nusing it.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Wed, 10 Jan 2001 17:53:32 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Peter Eisentraut wrote:\n> Lamar Owen writes:\n> > However, there are some hard-coded paths left in the build, and the perl\n> > client is being difficult,\n \n> The Perl and Python clients use their own build system. Not sure how to\n> handle it.\n\nI'm looking, in between day job stuff.\n \n> > and odbcinst is going to the REAL /usr/etc instead of\n> > $RPM_BUILD_ROOT/etc....\n \n> Works here.\n\nWhich doesn't surprise me. The RPM building environment is not the same\nas building from source inside a regular user shell. Similar, but not\nthe same.\n\n> Hmm, are you using 'make install DESTDIR=/random/place'?\n> Given that it's not documented it's unlikely that you are. But do start\n> using it.\n\nEnlighten me. DESTDIR does? \n\nCurrently, my install lines look like:\nmake POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C src\ninstall\nmake POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C\nsrc/interface\ns/perl5 install\n\nSo, I would put something like:\nmake POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr\nDESTDIR=/usr -C src install\n???\n\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Wed, 10 Jan 2001 12:03:03 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Lamar Owen writes:\n\n> > Hmm, are you using 'make install DESTDIR=/random/place'?\n> > Given that it's not documented it's unlikely that you are. But do start\n> > using it.\n>\n> Enlighten me. DESTDIR does?\n\nIt installs files at a different place than where they will eventually\nreside. E.g., if your --prefix is /usr/local and DESTDIR=/var/tmp/foo\nthen the files will end up in /var/tmp/foo/usr/local. This is exactly for\npackage management type applications.\n\n> Currently, my install lines look like:\n> make POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C src\n> install\n> make POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr -C\n> src/interface\n> s/perl5 install\n\nThen it's not surprising that things don't work since neither POSTGRESDIR\nnor PREFIX are used anywhere in PostgreSQL makefiles.\n\n> So, I would put something like:\n> make POSTGRESDIR=$RPM_BUILD_ROOT/usr PREFIX=$RPM_BUILD_ROOT/usr\n> DESTDIR=/usr -C src install\n> ???\n\n./configure --prefix=/usr --sysconfdir=/etc \\\n --docdir=/usr/share/doc/postgresql-'$(VERSION)' \\\n --mandir=/usr/share/man \\\n ...other options...\nmake all\nmake install DESTDIR=$RPM_BUILD_ROOT\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Wed, 10 Jan 2001 18:55:21 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Peter Eisentraut wrote:\n> Lamar Owen writes:\n> > Enlighten me. DESTDIR does?\n \n> It installs files at a different place than where they will eventually\n> reside. E.g., if your --prefix is /usr/local and DESTDIR=/var/tmp/foo\n> then the files will end up in /var/tmp/foo/usr/local. This is exactly for\n> package management type applications.\n\nGood.\n \n> Then it's not surprising that things don't work since neither POSTGRESDIR\n> nor PREFIX are used anywhere in PostgreSQL makefiles.\n\nHad they been prior to 7.1?\n\n> ./configure --prefix=/usr --sysconfdir=/etc \\\n> --docdir=/usr/share/doc/postgresql-'$(VERSION)' \\\n> --mandir=/usr/share/man \\\n> ...other options...\n\nAlready doing all of that, except --sysconfdir and friends. It's more\ncomplicated than the above:\n./configure --prefic=/usr --sysconfdir=/etc \\\n --docdir=%{_docdir}/%{name}/%{version} \\\n --mandir=%{_mandir} \\\n ....\nto take into account the differing distributions' differing ideas of\nwhere things ought to be put.\n\n> make all\n> make install DESTDIR=$RPM_BUILD_ROOT\n\nMuch simpler. Will get back as soon as I get time to run a build (staff\nmeeting here in ten minutes.....).\n\nDoes the python build stuff use DESTDIR these days? The perl stuff\nneeds some other things, unfortunately. I need to look in the CPAN RPM\nspec's to get examples of how to do this portably without major\nconnarptions.\n\nI knew you had changed something along those lines; I even remember a\nmessage listing the switches necessary; but I could not find it in my\nmessage archive.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Wed, 10 Jan 2001 13:03:56 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "\n\nOn Wed, 10 Jan 2001, Peter Eisentraut wrote:\n\n> Michael J Schout writes:\n> \n> > We would definately beta test 7.1 beta releases on our test machines if RPMS\n> > were made available. However, if rpms are not made available, its unlikely\n> > that anyone around here will get time to build the sources from scratch.\n> \n> Building from source takes five minutes. Reading the installation\n> instructions takes maybe ten minutes. Don't tell me you don't have that\n> amount of time but you still want to beta test. *shrug*\n\nYes, building the sources isn't that difficult, but it definately takes longer\nthan:\n\nrpm -ivh ftp://ftp.postgresql/pub/whatever/postgresql-\\*.rpm\n\nMy feeling is that if we can make it as easy as possible for beta testers to\nget the beta releases up and running, the more likely they are to use the beta\nreleases.\n\nMike\n\n", "msg_date": "Fri, 12 Jan 2001 10:14:43 -0600 (CST)", "msg_from": "Michael J Schout <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "Lamar Owen writes:\n\n> Does the python build stuff use DESTDIR these days?\n\nIt does not. You'd have to delve into the internals of the\nPython-provided makefiles. I might just have to do that, but if you want\nto look then let me know because this should get fixed.\n\n> The perl stuff needs some other things, unfortunately. I need to look\n> in the CPAN RPM spec's to get examples of how to do this portably\n> without major connarptions.\n\nThe Perl build hasn't changed since 7.0 in dramatic ways.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Fri, 12 Jan 2001 17:30:09 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "RPMs (was Re: Re: Beta2 ... ?)" }, { "msg_contents": "Speaking of which..\n>\n> rpm -ivh ftp://ftp.postgresql/pub/whatever/postgresql-\\*.rpm\n>\nIs there a clearing house for packages? I have made some for OpenBSD\n(www.crimelabs.net/postgresql.shtml), but I wouldn't even know where to\nget the rpm or deb files. Should there be a folder on the ftp server for\npackages for the betas?\n\n- Brandon\n\nb. palmer, [email protected]\npgp: www.crimelabs.net/bpalmer.pgp5\n\n", "msg_date": "Fri, 12 Jan 2001 11:50:25 -0500 (EST)", "msg_from": "bpalmer <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "bpalmer writes:\n\n> Is there a clearing house for packages? I have made some for OpenBSD\n> (www.crimelabs.net/postgresql.shtml), but I wouldn't even know where to\n> get the rpm or deb files. Should there be a folder on the ftp server for\n> packages for the betas?\n\nThe RPMs are on the FTP server.\n\nIn general I feel that packaging is left up to the operating system\ndistributor. So your OpenBSD packages should be sent to the respective\nport maintainer. The RPMs are treated somewhat differently because they\nare platform independent and a lot of people are interested in getting\nbetas in RPM form -- and not least importantly also because someone has\ntaken the time to do it on a regular basis. The RPMs that are on the\nvarious Linux distribution CDs are still customized by the respective\nvendor.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Fri, 12 Jan 2001 18:39:44 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "> > Is there a clearing house for packages? I have made some for OpenBSD\n> > (www.crimelabs.net/postgresql.shtml), but I wouldn't even know where to\n> > get the rpm or deb files. Should there be a folder on the ftp server for\n> > packages for the betas?\n> The RPMs are on the FTP server.\n> In general I feel that packaging is left up to the operating system\n> distributor. So your OpenBSD packages should be sent to the respective\n> port maintainer. The RPMs are treated somewhat differently because they\n> are platform independent and a lot of people are interested in getting\n> betas in RPM form -- and not least importantly also because someone has\n> taken the time to do it on a regular basis. The RPMs that are on the\n> various Linux distribution CDs are still customized by the respective\n> vendor.\n\nAlthough packages should of course be sent to the port maintainer, I'm\nsure that in general that they would be welcome on ftp.postgresql.org\nalso. The RPMs have greater visibility because we have taken the time to\nevolve the packaging (and because the packaging needed a good bit of\nwork on the system I had at the time, so what the heck ;) and certainly\nthey have benefited from Lamar's attention over the last months.\n\nOther packages would potentially be in the same circumstances: if they\nare packaged by someone familiar with the package itself, they will\nbecome better than if they are packaged by someone only familiar with\npackaging. Certainly every package done by someone active on these lists\n(e.g. Oliver with Debian) is of high quality and has benefited from\ntheir knowledge of PostgreSQL.\n\nI'm not sure what the case is for OpenBSD specifically, but you may want\nto talk more with the \"official maintainer\" if that isn't yourself...\n\n - Thomas\n", "msg_date": "Fri, 12 Jan 2001 17:50:13 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Beta2 ... ?" }, { "msg_contents": "bpalmer wrote:\n >Is there a clearing house for packages? I have made some for OpenBSD\n >(www.crimelabs.net/postgresql.shtml), but I wouldn't even know where to\n >get the rpm or deb files. Should there be a folder on the ftp server for\n >packages for the betas?\n\nTypically, deb files are obtained from ftp.debian.org or one of its\nmirrors. That's how you know you're getting an official Debian package.\n\nI'm in the process of making debs for the current beta, and will host them\nsomewhere for people to grab for experimenting. I won't put anything\ninto the Debian site until 7.1 is finally released. I'll announce where to\nget beta debs when the first set is done. However, that may be a day or two\nyet, because I have to redo a lot of packaging.\n\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"For the LORD is good; his mercy is everlasting; and \n his truth endureth to all generations.\" \n Psalms 100:5 \n\n\n", "msg_date": "Fri, 12 Jan 2001 18:35:07 +0000", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ? " }, { "msg_contents": "Peter Eisentraut wrote:\n> Lamar Owen writes:\n> > Does the python build stuff use DESTDIR these days?\n \n> It does not. You'd have to delve into the internals of the\n> Python-provided makefiles. I might just have to do that, but if you want\n> to look then let me know because this should get fixed.\n\nHmmm. Then I may just keep the python build I have now, as it should\nstill work, and it is a 'full-manual' build.\n \n> > The perl stuff needs some other things, unfortunately. I need to look\n> > in the CPAN RPM spec's to get examples of how to do this portably\n> > without major connarptions.\n \n> The Perl build hasn't changed since 7.0 in dramatic ways.\n\nWell, it's pretty dramatic to get the starred box saying that I don't\nhave permissions to install to where I want to install it when I'm\nrunning as root. Or, to put it more tersely, the 7.0 build worked in\nthe RPM build context -- the 7.1 build does not with the same build\ntechnique.\n\nThe root cause is an if [ -w check for the intalldir, which is set to an\nentirely inappropriate place.\n\nSo, there are differences (I think the new way is going to be smoother,\npersonally, once I get it working again).\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Fri, 12 Jan 2001 15:08:07 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RPMs (was Re: Re: Beta2 ... ?)" }, { "msg_contents": "Oliver Elphick wrote:\n> because I have to redo a lot of packaging.\n\nI know how you feel.....:-)\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Fri, 12 Jan 2001 15:13:13 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: Beta2 ... ?" }, { "msg_contents": "Lamar Owen wrote:\n> Well, it's pretty dramatic to get the starred box saying that I don't\n> have permissions to install to where I want to install it when I'm\n> running as root. \n\nYou'd think that, as a native English speaker, I could structure a\nsentence more effectively than that....\n\nLet me rephrase:\n\nIt's pretty dramatic to get the 'You don't have permissions to install'\nmessage from the perl 'make install' when I am performing the build (and\nthe make install) as root. Particularly when 7.0's perl 'make install'\nworked semi-properly. I say semi-properly because the packing list had\nto be rewritten -- but at least the install did its job to the proper\nbuild-root'ed location.\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Fri, 12 Jan 2001 15:27:09 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RPMs (was Re: Re: Beta2 ... ?)" }, { "msg_contents": "Lamar Owen writes:\n\n> It's pretty dramatic to get the 'You don't have permissions to install'\n> message from the perl 'make install' when I am performing the build (and\n> the make install) as root. Particularly when 7.0's perl 'make install'\n> worked semi-properly. I say semi-properly because the packing list had\n> to be rewritten -- but at least the install did its job to the proper\n> build-root'ed location.\n\nThen we apparently have a problem here. I can only say \"works here\", and\nI verified against the MakeMaker internals that things work as designed.\nWhat does 'gmake -f Makefile echo-installdir' show? Is it the location\nyou'd expect, and do you really have write access to that location?\nMaybe a shell problem in GNUmakefile? I'm sitting at a RH 7.0 system and\nwhen I wrote this code I was using 5.2, so I must suspect that you are\ndoing something that voids the warranty. ;-)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 13 Jan 2001 04:13:50 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RPMs (was Re: Re: Beta2 ... ?)" }, { "msg_contents": "> It's pretty dramatic to get the 'You don't have permissions to install'\n> message from the perl 'make install' when I am performing the build (and\n> the make install) as root. Particularly when 7.0's perl 'make install'\n> worked semi-properly. I say semi-properly because the packing list had\n> to be rewritten -- but at least the install did its job to the proper\n> build-root'ed location.\n\nJust an fyi...\n\nI have been having trouble with one of the package files disappearing\nfrom the temporary instllation area during the rpm build of pg-7.0.3 for\nMandrake on Mandrake-7.2 using a recent source RPM. I haven't tracked\ndown the problem yet :(\n\n - Thomas\n", "msg_date": "Sat, 13 Jan 2001 16:06:05 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RPMs (was Re: Re: Beta2 ... ?)" }, { "msg_contents": "On Sat, 13 Jan 2001, Thomas Lockhart wrote:\n> > It's pretty dramatic to get the 'You don't have permissions to install'\n> > message from the perl 'make install' when I am performing the build (and\n\n> I have been having trouble with one of the package files disappearing\n> from the temporary instllation area during the rpm build of pg-7.0.3 for\n> Mandrake on Mandrake-7.2 using a recent source RPM. I haven't tracked\n> down the problem yet :(\n\nTo say that I am interested in the outcome would be an understatement.\n\nI fixed my perl problems by invoking the Makefile (not the GNUmakefile) for the\nsecond install and setting PREFIX properly then. Yes, the second install\nphase. I'll see if I can't fix this a little better -- but my goal was to get\na build so that I can start fixing some things.\n\nMost of the stuff I am having to 'fix' is kludgery that Peter's config and\nmakefile changes are eliminating :-).\n\nBut having to regen patches and rebuild from scratch each time I change the\nspec makes it time-consuming..... But the single DESTDIR addition makes it a\nmuch easier and cleaner build\n--\nLamar Owen\nWGCR Internet Radio\n1 Peter 4:11\n", "msg_date": "Sat, 13 Jan 2001 21:58:52 -0500", "msg_from": "Lamar Owen <[email protected]>", "msg_from_op": false, "msg_subject": "Re: RPMs (was Re: Re: Beta2 ... ?)" } ]
[ { "msg_contents": "> Anyone have anything outstanding that prevents me rolling a Beta2 and\n> announcing it this weekend? Tom? Vadim? Peter?\n\nI'll commit small changes to xlog.c today.\n\nVadim\n", "msg_date": "Fri, 5 Jan 2001 14:49:50 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Beta2 ... ?" } ]
[ { "msg_contents": "Excuse my ignorance.\nIs there a way to replace the shmem and sem (ipc.c) to use files. In this \nway we can have a sort of a parallel server using GFS.\n1.Starting a postmaster on ONE machine creates the shared structures, 2.then \nstart on other cluster-machines, the variuos machines share the same \ndatafiles and shared memory (on-file) structures\n3.cliets connects (for example) round-robin to the clustered-postgres-nodes.\n4.a problem is proper destroy and create of the shared structures\n\nthanks,\nvalter\n\n\n>From http://sistina.com/gfs/:\n\nhe Global File System (GFS [now in beta4]) is a shared disk cluster file \nsystem for Linux. GFS supports journaling and recovery from client failures. \nGFS cluster\n nodes physically share the same \nstorage by means of Fibre Channel or shared SCSI devices. The file system \nappears to be local on each node and GFS\n synchronizes file access across the \ncluster. GFS is fully symmetric, that is, all nodes are equal and there is \nno server which may be a bottleneck or\n single point of failure. GFS uses read \nand write caching while maintaining full UNIX file system semantics.\n\n_________________________________________________________________________\nGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.\n\n", "msg_date": "Sat, 06 Jan 2001 04:01:58 +0100", "msg_from": "\"Valter Mazzola\" <[email protected]>", "msg_from_op": true, "msg_subject": "replacing shmem" }, { "msg_contents": "\"Valter Mazzola\" <[email protected]> writes:\n> Is there a way to replace the shmem and sem (ipc.c) to use files. In this \n> way we can have a sort of a parallel server using GFS.\n\nUnless GFS offers access bandwidth approaching main memory speeds, this\nidea is sheer folly :-(\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 05 Jan 2001 22:52:56 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: replacing shmem " }, { "msg_contents": "\nI suppose it won't help here to suggest using memory mapped I/O, because\nsomeone will complain their platform doesn't support it. I wonder though if\nthere could be an optional patch to use mmap for all disk I/O, not just\nshared memory!\n\n- Andrew\n\n\n", "msg_date": "Sat, 6 Jan 2001 15:02:55 +1100", "msg_from": "\"Andrew Snow\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: replacing shmem " }, { "msg_contents": "\nOn Sat, 6 Jan 2001, Valter Mazzola wrote:\n\n> Excuse my ignorance.\n> Is there a way to replace the shmem and sem (ipc.c) to use files. In this \n> way we can have a sort of a parallel server using GFS.\n...\n\n Besides the slowness of file IO, it also doesn't make sense to have a\nshared memory area for all nodes. Not all pages in the shared memory area\nare dirty pages, and it make no sense for all nodes to share the same read\ncache, when they could have individual read caches. Besides, it is more\nscalable.\n\n Either way, an application level cluster employing two-phase commit is\nlikely going to be a lot more useful. FrontBase\n(http://www.frontbase.com) supports this now, and on more platforms than\nGFS supports. Besides, GFS is rather alpha right now.\n\nTom\n\n", "msg_date": "Fri, 5 Jan 2001 20:09:29 -0800 (PST)", "msg_from": "Tom Samplonius <[email protected]>", "msg_from_op": false, "msg_subject": "Re: replacing shmem" } ]
[ { "msg_contents": "Hi all!\n\nHow I can to split tables over many disks without using RAID (by using\nsymlinks? ) ?\n\nCan I use raw devices for store PostgreSQL data ?\n\nThanks.\n\nSergey.\n", "msg_date": "Sat, 06 Jan 2001 15:41:28 +0300", "msg_from": "\"Sergey E. Volkov\" <[email protected]>", "msg_from_op": true, "msg_subject": "Distribute tables over disks" } ]
[ { "msg_contents": "(approximately in the order in the HISTORY file)\n\nWAL -- update documentation of fsync option (runtime.sgml)\n\nTOAST -- The introductory paragraph in lobj.sgml needs some updating\nregarding the remaining merits of the large object system.\n\nOverhaul pg_dump (Philip Warner) -- backup.sgml could use some fresh\nblood after this development.\n\nNew PL/pgSQL GET DIAGNOSTICS statement for SPI value access (Jan)\n\nNew quote_ident() and quote_literal() functions (Jan) -- Is documented in\nPL/pgSQL chapter, but should be in the functions chapter as well?\n\nNew SQL function setval(seq,val,bool) for use in pg_dump (Philip) --\nSequence related functions seem poorly documented in general.\n\nNew CHECKPOINT command for WAL which creates new WAL log file (Vadim)\n\nNew BIT and BIT VARYING types (Adriaan Joubert, Tom, me)\n\n\nThat's about all I can see. Nice...\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sat, 6 Jan 2001 20:21:19 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": true, "msg_subject": "Open documentation items" } ]
[ { "msg_contents": "backend/commands/command.c has a routine is_view() that tests for\nview-ness by scanning pg_rewrite (all of it) to see if the given\nrelation has any ON SELECT rules.\n\nThis is only used to disallow AlterTableAddConstraint and\nLockTableCommand on views. While I don't care much about the\nperformance of AlterTableAddConstraint, it does bug me that this\nmight slow down LOCK TABLE a good deal.\n\nAny objection to replacing this routine by a test for relkind = VIEW?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 15:24:51 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "is_view seems unnecessarily slow" }, { "msg_contents": "Tom Lane wrote:\n> backend/commands/command.c has a routine is_view() that tests for\n> view-ness by scanning pg_rewrite (all of it) to see if the given\n> relation has any ON SELECT rules.\n>\n> This is only used to disallow AlterTableAddConstraint and\n> LockTableCommand on views. While I don't care much about the\n> performance of AlterTableAddConstraint, it does bug me that this\n> might slow down LOCK TABLE a good deal.\n>\n> Any objection to replacing this routine by a test for relkind = VIEW?\n\n No objections.\n\n These checks came from the days where views still had relkind\n 'r' and looking up pg_rewrite was the only way to know.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== [email protected] #\n\n\n", "msg_date": "Mon, 8 Jan 2001 13:05:41 -0500 (EST)", "msg_from": "Jan Wieck <[email protected]>", "msg_from_op": false, "msg_subject": "Re: is_view seems unnecessarily slow" } ]
[ { "msg_contents": "When I run 'make check' on the CVS version (today and for the last\nserveral days), I have been getting interesting failures. Some of the\ntests fail, but the interesting part is that not the same tests always\nfail. Example:\n\nbpalmer@mizer:~/APPS/pgsql>diff 1 2\n1c1\n< boolean ... FAILED\n---\n> boolean ... ok\n3c3\n< name ... ok\n---\n> name ... FAILED\n5c5\n< text ... FAILED\n---\n> text ... ok\n9,10c9,10\n< oid ... FAILED\n< float4 ... ok\n---\n> oid ... ok\n> float4 ... FAILED\n\nIn the regression.diff file, I keep seeing this:\n\n*** ./expected/name.out Tue Jan 4 11:19:34 2000\n--- ./results/name.out Sat Jan 6 16:36:34 2001\n***************\n*** 1,124 ****\n! --\n! -- NAME\n! -- all inputs are silently truncated at NAMEDATALEN (32) characters\n! --\n! -- fixed-length by reference\n! SELECT name 'name string' = name 'name string' AS \"True\";\n! True\n! ------\n...\n...\n...\n! (2 rows)\n!\n! DROP TABLE NAME_TBL;\n--- 1 ----\n! psql: Backend startup failed\n\n======================================================================\n\nAny ideas where to look for this one?\n\nWhen I run the regression test WITH ANOTHER INSTANCE OF PGSQL running, I\ngot an error telling me that I needed more SEMMNI or SEMMNS. I recompiled\nmy kernel with the values of 1024 and 2048 respectivly, and that seems to\nhave solved the problem, but they may still be related.\n\nAny ideas?\n\n- Brandon\n\nb. palmer, [email protected]\npgp: www.crimelabs.net/bpalmer.pgp5\n\n", "msg_date": "Sat, 6 Jan 2001 16:47:28 -0500 (EST)", "msg_from": "bpalmer <[email protected]>", "msg_from_op": true, "msg_subject": "CVS regression test failure on OBSD" }, { "msg_contents": "bpalmer <[email protected]> writes:\n> ! psql: Backend startup failed\n\n> Any ideas where to look for this one?\n\nIn the postmaster: the fork() to launch a backend is failing. There\nshould be a more detailed message in the postmaster's stderr log,\nbut almost certainly it's a resource-exhaustion issue. Does your\nkernel enforce a per-userid limit on the number of processes, for\nexample?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 17:15:01 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "> In the postmaster: the fork() to launch a backend is failing. There\n> should be a more detailed message in the postmaster's stderr log,\n> but almost certainly it's a resource-exhaustion issue. Does your\n> kernel enforce a per-userid limit on the number of processes, for\n> example?\n\nLooks like that was part of the problem. Process ulimit and openfile\nlimit were both problems. I have rolled up the process ulimit (soft /\nhard) to 256 and the Open Files to 256.\n\nThere are still, however, 4 tests that fail.\n\nAttached.\n\n- Brandon\n\nuname -a\nOpenBSD mizer 2.8 a#0 i386 (2.8 snapshot NOV 6 install)\n\nb. palmer, [email protected]\npgp: www.crimelabs.net/bpalmer.pgp5", "msg_date": "Sat, 6 Jan 2001 18:09:28 -0500 (EST)", "msg_from": "bpalmer <[email protected]>", "msg_from_op": true, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "bpalmer <[email protected]> writes:\n> There are still, however, 4 tests that fail.\n\nThose all look like trivial platform dependencies. Please read\nhttp://www.postgresql.org/devel-corner/docs/postgres/regress.htm\nhttp://www.postgresql.org/devel-corner/docs/postgres/regress-platform.htm\nand submit resultmap patches as required for your platform.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 18:45:44 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "> Those all look like trivial platform dependencies. Please read\n> http://www.postgresql.org/devel-corner/docs/postgres/regress.htm\n> http://www.postgresql.org/devel-corner/docs/postgres/regress-platform.htm\n> and submit resultmap patches as required for your platform.\n\nSweet. Thanks, looks like the problem is solved. Should me make note of\nthe changes what were needed for OBSD somewhere?\n\nb. palmer, [email protected]\npgp: www.crimelabs.net/bpalmer.pgp5", "msg_date": "Sat, 6 Jan 2001 19:42:36 -0500 (EST)", "msg_from": "bpalmer <[email protected]>", "msg_from_op": true, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "bpalmer <[email protected]> writes:\n> [ resultmap patches for OpenBSD ]\n\nApplied, thanks!\n\n> Sweet. Thanks, looks like the problem is solved. Should me make note of\n> the changes what were needed for OBSD somewhere?\n\nIf there's anything that users need to know beyond the standard build\ninstructions, perhaps we should add a doc/FAQ_OBSD ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 20:17:58 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "Peter Eisentraut <[email protected]> writes:\n> Apparently these resultmap entries were needed at some point.\n\nI think you read the message backwards --- we were adding the entries,\nnot removing them. (The patch was reversed as given, which is a common\nmistake.) As patched, the entries for OpenBSD look pretty much like\nthose for the other flavors of BSD, which gives me a nice warm fuzzy\nfeeling about it...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 21:15:10 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "bpalmer writes:\n\n> > Those all look like trivial platform dependencies. Please read\n> > http://www.postgresql.org/devel-corner/docs/postgres/regress.htm\n> > http://www.postgresql.org/devel-corner/docs/postgres/regress-platform.htm\n> > and submit resultmap patches as required for your platform.\n>\n> Sweet. Thanks, looks like the problem is solved. Should me make note of\n> the changes what were needed for OBSD somewhere?\n\nApparently these resultmap entries were needed at some point. It wouldn't\nsurprise me if the error messages changed between releases of the OS --\nit's happened to FreeBSD as well. Perhaps they should be qualified by\nversion.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sun, 7 Jan 2001 03:20:18 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "A few problems came up with 7.1CVS for i86 OpenBSD. Here is a writeup on\nwhat I learned and how I solved the problems.\n\n- Brandon\n\nb. palmer, [email protected]\npgp: www.crimelabs.net/bpalmer.pgp5", "msg_date": "Sun, 7 Jan 2001 14:05:44 -0500 (EST)", "msg_from": "bpalmer <[email protected]>", "msg_from_op": true, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "bpalmer writes:\n\n> A few problems came up with 7.1CVS for i86 OpenBSD. Here is a writeup on\n> what I learned and how I solved the problems.\n\nCan you check\nhttp://www.postgresql.org/devel-corner/docs/postgres/kernel-resources.htm#SYSVIPC\nto see if the description for FreeBSD is also applicable (at least in\nsimilar form) to OpenBSD?\n\nI'm currently writing up a section about the process and file limit issue,\nwhich will end up nearby the section linked to above.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n\n", "msg_date": "Sun, 7 Jan 2001 23:23:00 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: CVS regression test failure on OBSD " }, { "msg_contents": "> Can you check\n> http://www.postgresql.org/devel-corner/docs/postgres/kernel-resources.htm#SYSVIPC\n> to see if the description for FreeBSD is also applicable (at least in\n> similar form) to OpenBSD?\n\nClose enough.\n\n> I'm currently writing up a section about the process and file limit issue,\n> which will end up nearby the section linked to above.\n\nI still don't know how to know what the max allowed (by the system) are.\nAnyone?\n\n- b\n\nb. palmer, [email protected]\npgp: www.crimelabs.net/bpalmer.pgp5\n\n", "msg_date": "Sun, 7 Jan 2001 17:34:14 -0500 (EST)", "msg_from": "bpalmer <[email protected]>", "msg_from_op": true, "msg_subject": "Re: CVS regression test failure on OBSD " } ]
[ { "msg_contents": "The stringToNode routines (backend/nodes/read.c and readfuncs.c) depend\non a static variable that is the next-input pointer for lsptok().\n\nGuess what happens if stringToNode is invoked recursively. (Hint:\nit's not good.)\n\nIt's apparently not easy for this to happen, but I have a reproducible\ntest case involving relcache flush while reading the rule action\nparsetree for a view. readDatum() needs to be able to look up the\npg_type entry for the value it's reading, and that lookup could result\nin relcache flush, which would lead to an attempt to read the rule\nactions for any locked relcache entries --- like, say, the one we\nare currently trying to load.\n\nI propose fixing this by making stringToNode save and restore the\nentry-time value of the static pointer. (Alternatively, we could\nexplicitly pass a pointer-to-pointer-to-char to lsptok() and every\nsingle one of the readfuncs, but that seems like way too much\nnotational clutter.)\n\nI am not sure that is enough to fix the problem completely. It might\nbe best to avoid calling get_typbyval() from readDatum, which could\nbe done if we re-ordered the fields of a CONST dump so that the byval\nfield appears before we need to read the const value itself. That\nmeans an initdb, but we've already forced an initdb for beta2 ...\n\nMarc, can you hold off wrapping beta2 for a few hours? I think this\nis a 'must fix'.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 18:59:21 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "I'm amazed we never caught this before ..." }, { "msg_contents": "On Sat, 6 Jan 2001, Tom Lane wrote:\n\n> The stringToNode routines (backend/nodes/read.c and readfuncs.c) depend\n> on a static variable that is the next-input pointer for lsptok().\n>\n> Guess what happens if stringToNode is invoked recursively. (Hint:\n> it's not good.)\n>\n> It's apparently not easy for this to happen, but I have a reproducible\n> test case involving relcache flush while reading the rule action\n> parsetree for a view. readDatum() needs to be able to look up the\n> pg_type entry for the value it's reading, and that lookup could result\n> in relcache flush, which would lead to an attempt to read the rule\n> actions for any locked relcache entries --- like, say, the one we\n> are currently trying to load.\n>\n> I propose fixing this by making stringToNode save and restore the\n> entry-time value of the static pointer. (Alternatively, we could\n> explicitly pass a pointer-to-pointer-to-char to lsptok() and every\n> single one of the readfuncs, but that seems like way too much\n> notational clutter.)\n>\n> I am not sure that is enough to fix the problem completely. It might\n> be best to avoid calling get_typbyval() from readDatum, which could\n> be done if we re-ordered the fields of a CONST dump so that the byval\n> field appears before we need to read the const value itself. That\n> means an initdb, but we've already forced an initdb for beta2 ...\n>\n> Marc, can you hold off wrapping beta2 for a few hours? I think this\n> is a 'must fix'.\n\nNo probs ... I got the update to mk-release from Peter, so let me know\nwhen you are ready and we'll go with beta2 ...\n\n\n", "msg_date": "Sat, 6 Jan 2001 20:02:36 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: I'm amazed we never caught this before ..." }, { "msg_contents": "OK, stringToNode changes committed. I think we're ready to go for\nbeta2...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 20:09:51 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Re: I'm amazed we never caught this before ... " } ]
[ { "msg_contents": "regression=# begin;\nBEGIN\nregression=# insert into rtest_t1 values(1,2);\nINSERT 287918 1\nregression=# select * from tenk1, tenk1 t2;\n-- press ^C here\nCancel request sent\nERROR: Query was cancelled.\nERROR: Query was cancelled.\nFATAL 2: elog: error during error recovery, giving up!\npqReadData() -- backend closed the channel unexpectedly.\n This probably means the backend terminated abnormally\n before or while processing the request.\nThe connection to the server was lost. Attempting reset: Succeeded.\n\nThe problem is that END_CRIT_SECTION does (in effect)\n\t if (QueryCancel)\n\t\tCancelQuery();\nwhich is OK in the main line of a transaction, but definitely NOT ok\nwhen we are already recovering from an error. Like, say, the error\ntriggered by CancelQuery. And there are END_CRIT_SECTION calls needing\nto be executed in that path --- the one in RecordTransactionAbort\nbeing the hardest to avoid.\n\nI think we should do two things here:\n\n1. Alter END_CRIT_SECTION to only check for ProcDiePending. It should\nnot attempt to sprinkle the whole system with hidden QueryCancel checks,\nwhich is what it's in effect doing now.\n\n2. Modify CancelQuery to clear QueryCancel before elog'ing. Similarly,\nEND_CRIT_SECTION should clear ProcDiePending before elog'ing that case.\n\nAlthough either one of these would be sufficient to suppress the\nparticular case I'm seeing, I think both are good practice. For\nexample, it is NOT a good idea to be checking for QueryCancel in the\nEND_CRIT_SECTION at the end of RecordTransactionCommit. At that point\nwe've already committed and raising an error is silly. So point #1\nseems like a good idea. Point #2 seems like a good idea to avoid\nrecursive errors from explicitly written QueryCancel checks in the\npost-elog path of control. I cannot find any such at the moment\nother than the one in END_CRIT_SECTION, but one might get added someday.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 21:55:50 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Oops, looks like query cancel is busted" } ]
[ { "msg_contents": "\ncan a couple ppl check it over and make sure that nothing was overlooked\nbefore I announce it?\n\nPeter, I got your mk-release changes in for the docs ... the build itself\nlooked great, but I figure a couple of confirmations before announcing it\nwill at least prevent any obvious bug reports ...\n\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Sat, 6 Jan 2001 23:50:36 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "beta2 bundled ... will officially announce sunday evening ..." }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> can a couple ppl check it over and make sure that nothing was overlooked\n> before I announce it?\n\nLooks great, other than that it's missing the fixes I checked in since\nthen ;-)\n\n\t\t\tregards, tom lane\n", "msg_date": "Sat, 06 Jan 2001 23:48:30 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: beta2 bundled ... will officially announce sunday evening ... " }, { "msg_contents": "On Sat, 6 Jan 2001, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > can a couple ppl check it over and make sure that nothing was overlooked\n> > before I announce it?\n>\n> Looks great, other than that it's missing the fixes I checked in since\n> then ;-)\n\nCritical enough to ditch beta2 and wrap up a quick beta3? Or I could go\nwith the theory that I haven't announced it yet, so can bundle a new beta2\nwith no guilty conscious :)\n\n\n", "msg_date": "Sun, 7 Jan 2001 00:57:01 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "Re: beta2 bundled ... will officially announce sunday\n evening ..." }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> On Sat, 6 Jan 2001, Tom Lane wrote:\n>> The Hermit Hacker <[email protected]> writes:\n>>>> can a couple ppl check it over and make sure that nothing was overlooked\n>>>> before I announce it?\n>> \n>> Looks great, other than that it's missing the fixes I checked in since\n>> then ;-)\n\n> Critical enough to ditch beta2 and wrap up a quick beta3?\n\nDepends whether you think query-cancel is critical.\n\n> Or I could go with the theory that I haven't announced it yet, so can\n> bundle a new beta2 with no guilty conscious :)\n\nI'd do that or nothing at all. There'll always be another bug...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 00:01:23 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: beta2 bundled ... will officially announce sunday evening ... " }, { "msg_contents": "On Sun, 7 Jan 2001, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > On Sat, 6 Jan 2001, Tom Lane wrote:\n> >> The Hermit Hacker <[email protected]> writes:\n> >>>> can a couple ppl check it over and make sure that nothing was overlooked\n> >>>> before I announce it?\n> >>\n> >> Looks great, other than that it's missing the fixes I checked in since\n> >> then ;-)\n>\n> > Critical enough to ditch beta2 and wrap up a quick beta3?\n>\n> Depends whether you think query-cancel is critical.\n>\n> > Or I could go with the theory that I haven't announced it yet, so can\n> > bundle a new beta2 with no guilty conscious :)\n>\n> I'd do that or nothing at all. There'll always be another bug...\n\nlets leave it for the next beta ... as you say, there will be other bugs,\nand there will be a beta3 ...\n\n\n", "msg_date": "Sun, 7 Jan 2001 01:20:07 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": true, "msg_subject": "Re: beta2 bundled ... will officially announce sunday\n evening ..." } ]
[ { "msg_contents": "\nThe problem with pg_dump and renamed primary key attrs can be fixed by\nusing the indkey attribute of pg_index to lookup attrs in pg_class - this\nis what pg_dump does when it dumps indexes. If I am going to make this\nchange, I would also like to split the PK definition out from the table\ndefinition, so we would have:\n\n Create Table fred(f1 int);\n Alter Table fred add constraint primary key(f1);\n\ninstead of:\n\n Create Table fred(f1 int, primary key(f1));\n\nThe reason for this is that it will improve load performance, and begin to\nallow pg_restore to separate constraints from tables.\n\nIs this OK? Or inappropriate for beta?\n\nNeedless to say, I don't really want to revisit this piece of code in 3\nmonths time, so I'd like to do it now.\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Sun, 07 Jan 2001 19:36:23 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": true, "msg_subject": "Suggested fix for pg_dump" }, { "msg_contents": "On Sun, 7 Jan 2001, Philip Warner wrote:\n\n>\n> The problem with pg_dump and renamed primary key attrs can be fixed by\n> using the indkey attribute of pg_index to lookup attrs in pg_class - this\n> is what pg_dump does when it dumps indexes. If I am going to make this\n> change, I would also like to split the PK definition out from the table\n> definition, so we would have:\n>\n> Create Table fred(f1 int);\n> Alter Table fred add constraint primary key(f1);\n>\n> instead of:\n>\n> Create Table fred(f1 int, primary key(f1));\n>\n> The reason for this is that it will improve load performance, and begin to\n> allow pg_restore to separate constraints from tables.\n>\n> Is this OK? Or inappropriate for beta?\n>\n> Needless to say, I don't really want to revisit this piece of code in 3\n> months time, so I'd like to do it now.\n\n From Tatsuo's example, it looks critical enough that it should be fixed\nbefore release, and since its a 'support program' issue, not a 'core\nserver' issue, ramifications of fixing it aren't as big as if it was a\n'core server' issue ... go for it\n\n\n", "msg_date": "Sun, 7 Jan 2001 07:23:16 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Suggested fix for pg_dump" }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> On Sun, 7 Jan 2001, Philip Warner wrote:\n>> Is this OK? Or inappropriate for beta?\n\n> From Tatsuo's example, it looks critical enough that it should be fixed\n> before release, and since its a 'support program' issue, not a 'core\n> server' issue, ramifications of fixing it aren't as big as if it was a\n> 'core server' issue ... go for it\n\nI concur. This is not a new feature, but a bug fix, and therefore it's\nappropriate to do it during beta. We don't require beta-period bug\nfixes to be the smallest possible change that cures the problem. They\nshould be good fixes if practical.\n\nOne issue however is how confident are we of the alter table add\nconstraint code? I'm not sure it's been exercised enough to justify\nmaking pg_dump rely on it ... is anyone willing to spend some time\ntesting that statement?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 13:04:40 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Suggested fix for pg_dump " }, { "msg_contents": "On Sun, 7 Jan 2001, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > On Sun, 7 Jan 2001, Philip Warner wrote:\n> >> Is this OK? Or inappropriate for beta?\n>\n> > From Tatsuo's example, it looks critical enough that it should be fixed\n> > before release, and since its a 'support program' issue, not a 'core\n> > server' issue, ramifications of fixing it aren't as big as if it was a\n> > 'core server' issue ... go for it\n>\n> I concur. This is not a new feature, but a bug fix, and therefore it's\n> appropriate to do it during beta. We don't require beta-period bug\n> fixes to be the smallest possible change that cures the problem. They\n> should be good fixes if practical.\n>\n> One issue however is how confident are we of the alter table add\n> constraint code? I'm not sure it's been exercised enough to justify\n> making pg_dump rely on it ... is anyone willing to spend some time\n> testing that statement?\n\nSince its obvious that pg_dump isn't working now, we wouldn't be breaking\nit any further if the constraint code has a problem with it ... and we\nshould be able to find out relatively quickly *if* the contraint code has\na problem if its used for something like this ...\n\nEssentially, worst case scenario, we are going from 'broken->broken' ...\n\n\n", "msg_date": "Sun, 7 Jan 2001 14:18:46 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Suggested fix for pg_dump " }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> Essentially, worst case scenario, we are going from 'broken->broken' ...\n\nNo, I don't think so. The current pg_dump code is only broken if\nyou've renamed a column involved in a foreign-key dependency (if I\nunderstood the thread correctly). But Philip is proposing to change\npg_dump to rely on alter table add constraint for *all* PRIMARY KEY\nconstructs. So if alter table add constraint fails, it could break\ncases that had nothing to do with either foreign keys or renamed\ncolumns.\n\nI'm not really arguing not to make the change. I am saying there's\nan area here that we'd better take care to test during beta cycle...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 13:29:31 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Suggested fix for pg_dump " }, { "msg_contents": "On Sun, 7 Jan 2001, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > Essentially, worst case scenario, we are going from 'broken->broken' ...\n>\n> No, I don't think so. The current pg_dump code is only broken if\n> you've renamed a column involved in a foreign-key dependency (if I\n> understood the thread correctly). But Philip is proposing to change\n> pg_dump to rely on alter table add constraint for *all* PRIMARY KEY\n> constructs. So if alter table add constraint fails, it could break\n> cases that had nothing to do with either foreign keys or renamed\n> columns.\n>\n> I'm not really arguing not to make the change. I am saying there's\n> an area here that we'd better take care to test during beta cycle...\n\nAgreed ... we almost need a regression test for pg_dump itself :)\n\n\n", "msg_date": "Sun, 7 Jan 2001 14:32:39 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Suggested fix for pg_dump " }, { "msg_contents": "> Create Table fred(f1 int);\n> Alter Table fred add constraint primary key(f1);\n\nHas support for the above statement (add constraint PK) been added in 7.1?\n\nIf so, then what other alter table add constraints have been added? CHECK?\nNOT NULL?\n\nThanks,\n\nChris\n\n", "msg_date": "Mon, 8 Jan 2001 09:02:55 +0800", "msg_from": "\"Christopher Kings-Lynne\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: Suggested fix for pg_dump" }, { "msg_contents": "At 13:29 7/01/01 -0500, Tom Lane wrote:\n>The Hermit Hacker <[email protected]> writes:\n>> Essentially, worst case scenario, we are going from 'broken->broken' ...\n>\n>No, I don't think so. The current pg_dump code is only broken if\n>you've renamed a column involved in a foreign-key dependency (if I\n>understood the thread correctly). But Philip is proposing to change\n>pg_dump to rely on alter table add constraint for *all* PRIMARY KEY\n>constructs. \n\nI've got a version of this working now, but it raises a further question:\nshould I also put the CHECK constraints into ALTER TABLE statements?\nEventually they should go there, but maybe not for 7.1 given the concerns\nover ALTER TABLE ADD CONSTRAINT. \n\nReasons for:\n\n- It's nicer\n- It's more consistent with PK\n- Can use pg_restore to restore tables without constraints\n\nReasons against:\n\n- ALTER TABLE ADD CONSTRAINT is untested\n- We're in beta, and the code ain't broke\n\nI suspect the last point says it all...\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": "Sat, 13 Jan 2001 00:03:28 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Suggested fix for pg_dump " }, { "msg_contents": "At 00:03 13/01/01 +1100, Philip Warner wrote:\n>At 13:29 7/01/01 -0500, Tom Lane wrote:\n>>The Hermit Hacker <[email protected]> writes:\n>>> Essentially, worst case scenario, we are going from 'broken->broken' ...\n>>\n>>No, I don't think so. The current pg_dump code is only broken if\n>>you've renamed a column involved in a foreign-key dependency (if I\n>>understood the thread correctly). But Philip is proposing to change\n>>pg_dump to rely on alter table add constraint for *all* PRIMARY KEY\n>>constructs. \n>\n>I've got a version of this working now, but it raises a further question:\n\nApart from the fact that \n\n ALTER TABLE ADD CONSTRAINT name PRIMARY KEY(fields);\n\nis not supported in 7.1. Oh well.\n\n\n\n\n----------------------------------------------------------------\nPhilip Warner | __---_____\nAlbatross Consulting Pty. Ltd. |----/ - \\\n(A.B.N. 75 008 659 498) | /(@) ______---_\nTel: (+61) 0500 83 82 81 | _________ \\\nFax: (+61) 0500 83 82 82 | ___________ |\nHttp://www.rhyme.com.au | / \\|\n | --________--\nPGP key available upon request, | /\nand from pgp5.ai.mit.edu:11371 |/\n", "msg_date": "Sat, 13 Jan 2001 00:14:08 +1100", "msg_from": "Philip Warner <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Suggested fix for pg_dump " } ]
[ { "msg_contents": "Hi,\n\nDoes anyone seen this on PostgreSQL 7.0.3?????\n\nFATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n \nFATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\nServer process (pid 1008) exited with status 6 at Sun Jan 7 04:29:07 2001\nTerminating any active server processes...\nServer processes were terminated at Sun Jan 7 04:29:07 2001\nReinitializing shared memory and semaphores\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Sun, 7 Jan 2001 15:39:04 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n> Does anyone seen this on PostgreSQL 7.0.3?????\n> FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n\nWere there any errors before that?\n\nI've been suspicious for awhile that the system might neglect to release\nbuffer cntx_lock spinlocks if an elog() occurs while one is held. This\nlooks like it might be such a case, but you're only showing us the end\nsymptom not what led up to it ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 13:08:56 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "On Monday 08 January 2001 00:08, Tom Lane wrote:\n> Denis Perchine <[email protected]> writes:\n> > Does anyone seen this on PostgreSQL 7.0.3?????\n> > FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n>\n> Were there any errors before that?\n\nNo... Just clean log (I redirect log from stderr/out t file, and all other to \nsyslog).\n\nHere it is just from the begin:\n\n----\nDEBUG: Data Base System is starting up at Sun Jan 7 04:22:00 2001\nDEBUG: Data Base System was interrupted being in production at Thu Jan 4 \n23:30:22 2001\nDEBUG: Data Base System is in production state at Sun Jan 7 04:22:00 2001\n \nFATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n \nFATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\nServer process (pid 1008) exited with status 6 at Sun Jan 7 04:29:07 2001\nTerminating any active server processes...\nServer processes were terminated at Sun Jan 7 04:29:07 2001\nReinitializing shared memory and semaphores\n-----\n\nAs far as you can see it happends almost just after start.\n\nI can give you full list of queries which was made by process 1008. But \nbasically there was only queries like this:\nselect message_id from pop3 where server_id = 6214\n\ninsert into pop3 (server_id, mailfrom, mailto, subject, message_id, \nsent_date, sent_date_text, recieved_date, state) values (25641, \n'virtualo.com', '[email protected]', 'Joao roque Dias I have\ntried them all....this one is for real........!', \n'[email protected]', \n'2001-01-07 04:06:23 -00', 'Sat, 06 Jan 2001 23:06:23 -0500', 'now', 1)\n\nAnd the last query was:\nJan 7 04:27:53 mx postgres[1008]: query: select message_id from pop3 where \nserver_id = 22615\n\n> I've been suspicious for awhile that the system might neglect to release\n> buffer cntx_lock spinlocks if an elog() occurs while one is held. This\n> looks like it might be such a case, but you're only showing us the end\n> symptom not what led up to it ...\n\nJust say me what can I do. Unfortunatly I can not reproduce the situation...\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Mon, 8 Jan 2001 12:40:46 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n> On Monday 08 January 2001 00:08, Tom Lane wrote:\n>>>> FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n>> \n>> Were there any errors before that?\n\n> No... Just clean log (I redirect log from stderr/out t file, and all\n> other to syslog).\n\nThe error messages would be in the syslog then, not in stderr.\n\n> And the last query was:\n> Jan 7 04:27:53 mx postgres[1008]: query: select message_id from pop3 where \n> server_id = 22615\n\nHow about the prior queries of other processes? Keep in mind that the\nspinlock could have been left locked by any backend, not only the one\nthat complained about it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 10:53:20 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "> >>>> FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n> >>\n> >> Were there any errors before that?\n> >\n> > No... Just clean log (I redirect log from stderr/out t file, and all\n> > other to syslog).\n>\n> The error messages would be in the syslog then, not in stderr.\n\nHmmm... The only strange errors I see are:\n\nJan 7 04:22:14 mx postgres[679]: query: insert into statistic (date, \nvisit_count, variant_id) values (now(), 1, 2)\nJan 7 04:22:14 mx postgres[631]: query: insert into statistic (date, \nvisit_count, variant_id) values (now(), 1, 2)\nJan 7 04:22:14 mx postgres[700]: query: insert into statistic (date, \nvisit_count, variant_id) values (now(), 1, 2)\nJan 7 04:22:14 mx postgres[665]: query: insert into statistic (date, \nvisit_count, variant_id) values (now(), 1, 2)\nJan 7 04:22:14 mx postgres[633]: query: insert into statistic (date, \nvisit_count, variant_id) values (now(), 1, 2)\nJan 7 04:22:14 mx postgres[629]: query: insert into statistic (date, \nvisit_count, variant_id) values (now(), 1, 2)\nJan 7 04:22:14 mx postgres[736]: query: commit\nJan 7 04:22:14 mx postgres[736]: ProcessUtility: commit\nJan 7 04:22:14 mx postgres[700]: ERROR: Cannot insert a duplicate key into \nunique index statistic_date_vid_key\nJan 7 04:22:14 mx postgres[700]: query: update users set \nrcpt_ip='213.75.35.129',rcptdate=now() where id=1428067\nJan 7 04:22:14 mx postgres[700]: NOTICE: current transaction is aborted, \nqueries ignored until end of transaction block\nJan 7 04:22:14 mx postgres[679]: query: commit\nJan 7 04:22:14 mx postgres[679]: ProcessUtility: commit\nJan 7 04:22:14 mx postgres[679]: query: update users set \nrcpt_ip='213.75.55.185',rcptdate=now() where id=1430836\nJan 7 04:22:14 mx postgres[665]: ERROR: Cannot insert a duplicate key into \nunique index statistic_date_vid_key\nJan 7 04:22:14 mx postgres[665]: query: update users set \nrcpt_ip='202.156.121.139',rcptdate=now() where id=1271397\nJan 7 04:22:14 mx postgres[665]: NOTICE: current transaction is aborted, \nqueries ignored until end of transaction block\nJan 7 04:22:14 mx postgres[631]: ERROR: Cannot insert a duplicate key into \nunique index statistic_date_vid_key\nJan 7 04:22:14 mx postgres[631]: query: update users set \nrcpt_ip='24.20.53.63',rcptdate=now() where id=1451254\nJan 7 04:22:14 mx postgres[631]: NOTICE: current transaction is aborted, \nqueries ignored until end of transaction block\nJan 7 04:22:14 mx postgres[633]: ERROR: Cannot insert a duplicate key into \nunique index statistic_date_vid_key\nJan 7 04:22:14 mx postgres[633]: query: update users set \nrcpt_ip='213.116.168.173',rcptdate=now() where id=1378049\nJan 7 04:22:14 mx postgres[633]: NOTICE: current transaction is aborted, \nqueries ignored until end of transaction block\nJan 7 04:22:14 mx postgres[630]: query: select id,msg,next from alert\nJan 7 04:22:14 mx postgres[630]: query: select email,type from email where \nvariant_id=2\nJan 7 04:22:14 mx postgres[630]: query:\n select * from users where senderdate > now()-'10days'::interval AND\n variant_id=2 AND crypt='21AN6KRffJdFRFc511'\n \nJan 7 04:22:14 mx postgres[629]: ERROR: Cannot insert a duplicate key into \nunique index statistic_date_vid_key\nJan 7 04:22:14 mx postgres[629]: query: update users set \nrcpt_ip='213.42.45.81',rcptdate=now() where id=1441046\nJan 7 04:22:14 mx postgres[629]: NOTICE: current transaction is aborted, \nqueries ignored until end of transaction block\nJan 7 04:22:15 mx postgres[711]: query: select message_id from pop3 where \nserver_id = 17746\nJan 7 04:22:15 mx postgres[711]: ERROR: Relation 'pop3' does not exist\n\nThey popped up 4 minutes before. And the most interesting is that relation \npop3 does exist!\n\n> > And the last query was:\n> > Jan 7 04:27:53 mx postgres[1008]: query: select message_id from pop3\n> > where server_id = 22615\n>\n> How about the prior queries of other processes?\n\nI do not want to flood maillist (it will be too much of info). I can send you \ncomplete log file from Jan 7. It is 128Mb uncompressed. With gz it is 8Mb. \nMaybe it will be smaller with bz2.\n\n> Keep in mind that the\n> spinlock could have been left locked by any backend, not only the one\n> that complained about it.\n\nActually you can have a look on the logs yourself. Remember I gave you a \npassword from postgres user. This is the same postgres. Logs are in \n/var/log/postgres. You will need postgres.log.1.gz.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Mon, 8 Jan 2001 22:13:04 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n>>>>>>> FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n>>>>> \n>>>>> Were there any errors before that?\n\n> Actually you can have a look on the logs yourself.\n\nWell, I found a smoking gun:\n\nJan 7 04:27:51 mx postgres[2501]: FATAL 1: The system is shutting down\n\nPID 2501 had been running:\n\nJan 7 04:25:44 mx postgres[2501]: query: vacuum verbose lazy;\n\nWhat seems to have happened is that 2501 curled up and died, leaving\none or more buffer spinlocks locked. Roughly one spinlock timeout\nlater, at 04:29:07, we have 1008 complaining of a stuck spinlock.\nSo that fits.\n\nThe real question is what happened to 2501? None of the other backends\nreported a SIGTERM signal, so the signal did not come from the\npostmaster.\n\nAnother interesting datapoint: there is a second place in this logfile\nwhere one single backend reports SIGTERM while its brethren keep running:\n\nJan 7 04:30:47 mx postgres[4269]: query: vacuum verbose;\n...\nJan 7 04:38:16 mx postgres[4269]: FATAL 1: The system is shutting down\n\nThere is something pretty fishy about this. You aren't by any chance\nrunning the postmaster under a ulimit setting that might cut off\nindividual backends after a certain amount of CPU time, are you?\nWhat signal does a ulimit violation deliver on your machine, anyway?\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 12:21:38 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "On Mon, Jan 08, 2001 at 12:21:38PM -0500, Tom Lane wrote:\n> Denis Perchine <[email protected]> writes:\n> >>>>>>> FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n> >>>>> \n> >>>>> Were there any errors before that?\n> \n> > Actually you can have a look on the logs yourself.\n> \n> Well, I found a smoking gun: ...\n> What seems to have happened is that 2501 curled up and died, leaving\n> one or more buffer spinlocks locked. ...\n> There is something pretty fishy about this. You aren't by any chance\n> running the postmaster under a ulimit setting that might cut off\n> individual backends after a certain amount of CPU time, are you?\n> What signal does a ulimit violation deliver on your machine, anyway?\n\nIt's worth noting here that modern Unixes run around killing user-level\nprocesses more or less at random when free swap space (and sometimes\njust RAM) runs low. AIX was the first such, but would send SIGDANGER\nto processes first to try to reclaim some RAM; critical daemons were\nexpected to explicitly ignore SIGDANGER. Other Unixes picked up the \nidea without picking up the SIGDANGER behavior.\n\nThe reason for this common pathological behavior is usually traced\nto sloppy resource accounting. It manifests as the bad policy of \nhaving malloc() (and sbrk() or mmap() underneath) return a valid \npointer rather than NULL, on the assumption that most of the memory \nasked for won't be used just yet. Anyhow, the system doesn't know \nhow much memory is really available at that moment.\n\nUsually the problem is explained with the example of a very large\nprocess that forks, suddenly demanding twice as much memory. (Apache\nis particularly egregious this way, allocating lots of memory and\nthen forking several times.) Instead of failing the fork, the kernel\nwaits for a process to touch memory it was granted and then see if \nany RAM/swap has turned up to satisfy it, and then kill the process \n(or some random other process!) if not.\n\nNow that programs have come to depend on this behavior, it has become\nvery hard to fix it. The implication for the rest of us is that we \nshould expect our processes to be killed at random, just for touching \nmemory granted, or for no reason at all. (Kernel people say, \"They're \njust user-level programs, restart them;\" or, \"Maybe we can designate \nsome critical processes that don't get killed\".) In Linux they try \nto invent heuristics to avoid killing the X server, because so many \nprograms depend on it. It's a disgraceful mess, really.\n\nThe relevance to the issue at hand is that processes dying during \nheavy memory load is a documented feature of our supported platforms.\n\nNathan Myers \[email protected]\n", "msg_date": "Mon, 8 Jan 2001 16:10:30 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "> > Well, I found a smoking gun: ...\n> > What seems to have happened is that 2501 curled up and died, leaving\n> > one or more buffer spinlocks locked. ...\n> > There is something pretty fishy about this. You aren't by any chance\n> > running the postmaster under a ulimit setting that might cut off\n> > individual backends after a certain amount of CPU time, are you?\n> > What signal does a ulimit violation deliver on your machine, anyway?\n>\n> It's worth noting here that modern Unixes run around killing user-level\n> processes more or less at random when free swap space (and sometimes\n> just RAM) runs low. AIX was the first such, but would send SIGDANGER\n> to processes first to try to reclaim some RAM; critical daemons were\n> expected to explicitly ignore SIGDANGER. Other Unixes picked up the\n> idea without picking up the SIGDANGER behavior.\n\nThat's not the case for sure. There are 512Mb on the machine, and when I had \nthis problem it was compltely unloaded (>300Mb in caches).\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Tue, 9 Jan 2001 11:55:09 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n>> It's worth noting here that modern Unixes run around killing user-level\n>> processes more or less at random when free swap space (and sometimes\n>> just RAM) runs low.\n\n> That's not the case for sure. There are 512Mb on the machine, and when I had \n> this problem it was compltely unloaded (>300Mb in caches).\n\nThe fact that VACUUM processes seemed to be preferential victims\nsuggests a resource limit of some sort. I had suggested a CPU-time\nlimit, but perhaps it could also be disk-pages-written.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 01:03:54 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "On Monday 08 January 2001 23:21, Tom Lane wrote:\n> Denis Perchine <[email protected]> writes:\n> >>>>>>> FATAL: s_lock(401f7435) at bufmgr.c:2350, stuck spinlock. Aborting.\n> >>>>>\n> >>>>> Were there any errors before that?\n> >\n> > Actually you can have a look on the logs yourself.\n>\n> Well, I found a smoking gun:\n>\n> Jan 7 04:27:51 mx postgres[2501]: FATAL 1: The system is shutting down\n>\n> PID 2501 had been running:\n>\n> Jan 7 04:25:44 mx postgres[2501]: query: vacuum verbose lazy;\n\nHmmm... actually this is real problem with vacuum lazy. Sometimes it just do \nsomething for enormous amount of time (I have mailed a sample database to \nVadim, but did not get any response yet). It is possible, that it was me, who \nkilled the backend.\n\n> What seems to have happened is that 2501 curled up and died, leaving\n> one or more buffer spinlocks locked. Roughly one spinlock timeout\n> later, at 04:29:07, we have 1008 complaining of a stuck spinlock.\n> So that fits.\n>\n> The real question is what happened to 2501? None of the other backends\n> reported a SIGTERM signal, so the signal did not come from the\n> postmaster.\n>\n> Another interesting datapoint: there is a second place in this logfile\n> where one single backend reports SIGTERM while its brethren keep running:\n>\n> Jan 7 04:30:47 mx postgres[4269]: query: vacuum verbose;\n> ...\n> Jan 7 04:38:16 mx postgres[4269]: FATAL 1: The system is shutting down\n\nHmmm... Maybe this also was me... But I am not sure here.\n\n> There is something pretty fishy about this. You aren't by any chance\n> running the postmaster under a ulimit setting that might cut off\n> individual backends after a certain amount of CPU time, are you?\n\n[postgres@mx postgres]$ ulimit -a\ncore file size (blocks) 1000000\ndata seg size (kbytes) unlimited\nfile size (blocks) unlimited\nmax memory size (kbytes) unlimited\nstack size (kbytes) 8192\ncpu time (seconds) unlimited\nmax user processes 2048\npipe size (512 bytes) 8\nopen files 1024\nvirtual memory (kbytes) 2105343\n\nNo, there are no any ulimits.\n\n> What signal does a ulimit violation deliver on your machine, anyway?\n\n if (psecs / HZ > p->rlim[RLIMIT_CPU].rlim_cur) {\n /* Send SIGXCPU every second.. */\n if (!(psecs % HZ))\n send_sig(SIGXCPU, p, 1);\n /* and SIGKILL when we go over max.. */\n if (psecs / HZ > p->rlim[RLIMIT_CPU].rlim_max)\n send_sig(SIGKILL, p, 1);\n }\n\nThis part of the kernel show the logic. This mean that process wil get \nSIGXCPU each second if it above soft limit, and SIGKILL when it will be above \nhardlimit.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Tue, 9 Jan 2001 12:13:29 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n> Hmmm... actually this is real problem with vacuum lazy. Sometimes it\n> just do something for enormous amount of time (I have mailed a sample\n> database to Vadim, but did not get any response yet). It is possible,\n> that it was me, who killed the backend.\n\nKilling an individual backend with SIGTERM is bad luck. The backend\nwill assume that it's being killed by the postmaster, and will exit\nwithout a whole lot of concern for cleaning up shared memory --- the\nexpectation is that as soon as all the backends are dead, the postmaster\nwill reinitialize shared memory.\n\nYou can get away with sending SIGINT (QueryCancel) to an individual\nbackend. Anything else voids the warranty ;=)\n\nBut, having said that --- this VACUUM process had only been running\nfor two minutes of real time. Seems unlikely that you'd have chosen\nto kill it so quickly.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 01:23:26 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "[email protected] (Nathan Myers) writes:\n> The relevance to the issue at hand is that processes dying during \n> heavy memory load is a documented feature of our supported platforms.\n\nUgh. Do you know anything about *how* they get killed --- ie, with\nwhat signal?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 12:41:24 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "> > The relevance to the issue at hand is that processes dying during\n> > heavy memory load is a documented feature of our supported platforms.\n>\n> Ugh. Do you know anything about *how* they get killed --- ie, with\n> what signal?\n\nDidn't you get my mail with a piece of Linux kernel code? I think all is \nclear there.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Wed, 10 Jan 2001 00:27:08 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n> Didn't you get my mail with a piece of Linux kernel code? I think all is \n> clear there.\n\nThat was implementing CPU-time-exceeded kill, which is a different\nissue.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 13:29:10 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "> > Didn't you get my mail with a piece of Linux kernel code? I think all is\n> > clear there.\n>\n> That was implementing CPU-time-exceeded kill, which is a different\n> issue.\n\nOpps.. You are talking about OOM killer.\n\n/* This process has hardware access, be more careful. */\nif (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) {\n force_sig(SIGTERM, p);\n} else {\n force_sig(SIGKILL, p);\n}\n\nYou will get SIGKILL in most cases.\n\n-- \nSincerely Yours,\nDenis Perchine\n\n----------------------------------\nE-Mail: [email protected]\nHomePage: http://www.perchine.com/dyp/\nFidoNet: 2:5000/120.5\n----------------------------------\n", "msg_date": "Wed, 10 Jan 2001 00:46:50 +0600", "msg_from": "Denis Perchine <[email protected]>", "msg_from_op": true, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "Denis Perchine <[email protected]> writes:\n> You will get SIGKILL in most cases.\n\nWell, a SIGKILL will cause the postmaster to shut down and restart the\nother backends, so we should be safe if that happens. (Annoyed as heck,\nmaybe, but safe.)\n\nAnyway, this is looking more and more like the SIGTERM that caused your\nvacuum to die must have been done manually.\n\nThe CRIT_SECTION code that I'm about to go off and add to spinlocking\nshould prevent similar problems from happening in 7.1, but I don't think\nit's reasonable to try to retrofit that into 7.0.*.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 14:25:42 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "On Wed, Jan 10, 2001 at 12:46:50AM +0600, Denis Perchine wrote:\n> > > Didn't you get my mail with a piece of Linux kernel code? I think all is\n> > > clear there.\n> >\n> > That was implementing CPU-time-exceeded kill, which is a different\n> > issue.\n> \n> Opps.. You are talking about OOM killer.\n> \n> /* This process has hardware access, be more careful. */\n> if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) {\n> force_sig(SIGTERM, p);\n> } else {\n> force_sig(SIGKILL, p);\n> }\n> \n> You will get SIGKILL in most cases.\n\n... on Linux, anyhow. There's no standard for this behavior.\nProbably others try a SIGTERM first (on several processes) and \nthen a SIGKILL if none die.\n\nIf a backend dies while holding a lock, doesn't that imply that\nthe shared memory may be in an inconsistent state? Surely a death\nwhile holding a lock should shut down the whole database, without\nwriting anything to disk.\n\nNathan Myers\[email protected]\n", "msg_date": "Tue, 9 Jan 2001 12:01:52 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "[email protected] (Nathan Myers) writes:\n> If a backend dies while holding a lock, doesn't that imply that\n> the shared memory may be in an inconsistent state?\n\nYup. I had just come to the realization that we'd be best off to treat\nthe *entire* period from SpinAcquire to SpinRelease as a critical\nsection for the purposes of die(). That is, response to SIGTERM will be\nheld off until we have released the spinlock. Most of the places where\nwe grab spinlocks would have to make such a critical section anyway, at\nleast for large parts of the time that they are holding the spinlock,\nbecause they are manipulating shared data structures and the\ninstantaneous intermediate states aren't always self-consistent. So we\nmight as well follow the KISS principle and just do START_CRIT_SECTION\nin SpinAcquire and END_CRIT_SECTION in SpinRelease.\n\nVadim, any objection?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 16:28:30 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " } ]
[ { "msg_contents": "Dear list,\n\nAccording to this list's content, the upcoming 7.1 release appears to be\nin good progress. This version will bring a *lot* on necessary features\nfor some database work : unions and subselects in views, and the\nlong-awaited outer joins. In other words, while 7.0 was a large step in\n*performance* terms, 7.1 will be a huge advance in *competence*.\n\nThese advances will allow me to use PostgreSQL for some work I had to do\nuntil now with (gasp !) MS-Access (which has poor performance but good\ncompetence). And get rid of the damn MS-Windows envoronment for good !\n\nThis leads me to express two whishes for future PotgreSQL developments.\nThese ideas are inpired by my daily work and might or might not be of\ngreat usefulness for other uses.\n\nMy daily work (biostatistics) involves managing a lot of small but\ncomplex databases : those are mainly medical records, created for a\nstudy's purposes, wich have a low volume (a dozen or two of tables\nhaving some dozens to some thousands rows) but might have a deeply\nnested and irregular structure (not all patients recorded need to have\nrecords of all histories and procedures involved). As a consequence, I\nam much more interested in competence than in performance, and so is my\nwishlist. Keep that in mind when reading what follows.\n\n1) Updatable views.\n==================\n\nAccording to the current documentation, views are read.only. This\nimplies some grunt work when creating update forms for the kind of\nlow-use applications I have to manage.\n\nI know that computing the \"updatability\" of a view is not a trivial\nproblem. Furthermore, even when a view is indeed updatable, the\nupdate/append algorithm is not easy to compute. These problems are even\nharder in multi-user mode. And I do not have any idea of the feasibility\nof such updates in an OO database, where inheritance concerns will\ninterfere.\n\nHowever, such updatable views would greatly simplify the end-user work\nfor creating and maintaining these records (at least when no inheritance\nis involved.\n\nI am not able to state the usefulness of such \"updatable views\" in more\nmainstream applications. I note, however, that most \"brand-name\" RDBMSes\nofer that.\n\nYour thoughs ?\n\n2) External database or table access.\n====================================\n\nQuite often, two or more distinct applications have to use common data.\nMy favourite example is again medical : two othewise unrelated\napplications might have to use a common medical thesaurus.\n\nThe obvious solution (including the medical thesaurus tables in each and\nevery application) leads to awful consistency problems. Working this way\ncan be properly done only with replication, which is not yet available\nin PostgreSQL. Furthermore, most applications will use only one or two\nviews of the thesaurus, while the thesaurus might be both large and\ncomplex.\n\nAnother \"obvious solution\" (delegating the use of the thesaurus to the\nclient application) is also a non-solution : how do you join your data\nand the thesaurus data ?\n\nThe ability to \"attach\" (MS-Access parlance) a table or a view from\nanother database is quite helpful. And I think that it has a lot of\napplications outside my (quite limited) realm.\n\nFor example, two different departments of the same company might have\nneeds for two different management applications, while having to\nuse/update the same company-wide accounting records. I don't se the\n\"replication\" solution as a good one (data duplication should be\nconsidered harmful in any circumstances).\n\nThis could be implemented in different ways. From the easiest to the\nhardest :\n\n- Attachment of Postgres databases running on the same server :\nrelatively easy. The data structures (internal representation) are\nknown, there is a guarantee of consistency in user identification,\nsecurity information is also consistent.\n\n- Attachment of Postgres databases running on another server. There,\nwhile the data structures are known, the user and security informations\ncan be inconsistent and have to be managed \"by hand\".\n\n- Attachment of other databases. Ouch : this one is hard. One have to\nrely on the information made available by the other database server. And\nthere lies a problem : there is no universal standard for this.\n\n... or there is ? Two bridges come to mind. Using ODBC or JDBC, provided\nthe \"other\" RDBMS has that, allows to use some standard information : at\nthe very minimum, table names, attribute names and type, and\nupdatability. In most cases, you will also be able to know whether\nindices are available for such and such columns.\n\nThis minimal set of information allows you to use these external tables\nin your own joins. And, provided that you have update rights, the\nability to use them as \"native\" tables.\n\nOf course, the use of these bridges involve some (maybe quite serious)\nperformance loss. But then again, I'm less interested in performance\nthan in competence ...\n\nWhat do you think ?\n\n\t\t\t\t\tEmmanuel Charpentier\n--\nEmmanuel Charpentier\n", "msg_date": "Sun, 07 Jan 2001 11:31:09 +0100", "msg_from": "Emmanuel Charpentier <[email protected]>", "msg_from_op": true, "msg_subject": "A post-7.1 wish-list." }, { "msg_contents": "On Sunday 07 January 2001 21:31, Emmanuel Charpentier wrote:\n\n> These advances will allow me to use PostgreSQL for some work I had to do\n> until now with (gasp !) MS-Access (which has poor performance but good\n> competence). And get rid of the damn MS-Windows envoronment for good !\n\nExcuse me, but where has MS Access competence? It is a pretty useless data \nlottery with an admittedly very capable & easy user interface. The odds of \ndata corruption can't possibly be higher with any other system (I used to \ndevelop hospital information systems prototyping with Access).\n\n> My daily work (biostatistics) involves managing a lot of small but\n> complex databases : those are mainly medical records, created for a\n> study's purposes, wich have a low volume (a dozen or two of tables\n> having some dozens to some thousands rows) but might have a deeply\n> nested and irregular structure (not all patients recorded need to have\n\n:-) We are developing gnumed, a secure \"electronic health record\" system, and \nbelieve now that Postgres is the ideal candidate (working on it for 10 months \nnow). The only thing we would like to see is more & better documentation for \nprogrammers (the documentation for end users is quite good).\n\n> According to the current documentation, views are read.only. This\n> implies some grunt work when creating update forms for the kind of\n> low-use applications I have to manage.\n\nYou can implement it yourself through trigger functions, no big deal. But, \ntypical applications nowadays interact with the user through dialogues with \ntext entry fields. Your client has to process this information anyway. \nDoesn't make much of a difference then to split the information to the tables \nit belongs to instead of just putting it into your view.\n\n> Quite often, two or more distinct applications have to use common data.\n> My favourite example is again medical : two othewise unrelated\n> applications might have to use a common medical thesaurus.\n>\n> The obvious solution (including the medical thesaurus tables in each and\n> every application) leads to awful consistency problems. Working this way\n> can be properly done only with replication, which is not yet available\n\n??? why? You are working with a client-server system, and you can have any \nnumber of databases on a postgres server. No need for replication for this \npurpose. \n\n> in PostgreSQL. Furthermore, most applications will use only one or two\n> views of the thesaurus, while the thesaurus might be both large and\n> complex.\n\nThat does not matter for the application (client). It will be blissfully \nunaware of the size or complexity of your thesaurus.\n\n> Another \"obvious solution\" (delegating the use of the thesaurus to the\n> client application) is also a non-solution : how do you join your data\n> and the thesaurus data ?\n\nThe usual way as in any relational data base: by referencing the information.\n\n> The ability to \"attach\" (MS-Access parlance) a table or a view from\n> another database is quite helpful. And I think that it has a lot of\n> applications outside my (quite limited) realm.\n\nIt is quite disastrous for referential integrity.\n\n\n-- \n==============================================\n Dr. Horst Herb, coordinator gnumed project, Australia\n==============================================\n", "msg_date": "Sun, 7 Jan 2001 23:45:48 +1100", "msg_from": "Horst Herb <[email protected]>", "msg_from_op": false, "msg_subject": "Re: A post-7.1 wish-list." }, { "msg_contents": "Emmanuel Charpentier writes:\n\n> 1) Updatable views.\n\nYou can make rules updateable by attaching appropriate rules to them.\nThe transparent implementation of updateable views would essentially do\nthat. It's a planned feature but I don't know of anyone who has made it\nhis priority.\n\n> 2) External database or table access.\n\nAccessing more than one database from a connection will not happen, at\nleast as long has the current mindset of the developers persists. SQL\nschema support is planned for 7.2, which will address the same area,\nhowever.\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Sun, 7 Jan 2001 17:50:42 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: A post-7.1 wish-list." }, { "msg_contents": "Horst Herb wrote:\n> \n> On Sunday 07 January 2001 21:31, Emmanuel Charpentier wrote:\n\n[ ... ]\n\n> Excuse me, but where has MS Access competence? It is a pretty useless data\n> lottery with an admittedly very capable & easy user interface. The odds of\n> data corruption can't possibly be higher with any other system (I used to\n> develop hospital information systems prototyping with Access).\n\nCompetence : in this context, the ability to define a correct data\nstructure and the views used tu access and update it. The \"easy to use\"\ninterface is a big incentive to end users to define things properly,\ninstead of relying to the horrible \"Excel sheet with forms\" I used to\nhave to cope with.\n\nIn a heavy multi-user environment, MS Access might be a \"data lottery\".\nI have no direct experience of this. In my low-use environment, I had no\nreal reason to complain about data corruption : my problems were more\nbound to the lack of protection of the MS Windows environment, and were\nsolved my migrating data files on a proper server. Performance, however,\ncan be poor. I have in mind some examples involving Cartesian products\nor remerging that were hell to compute :=(( ...\n\n[ ... ]\n\n> > According to the current documentation, views are read.only. This\n> > implies some grunt work when creating update forms for the kind of\n> > low-use applications I have to manage.\n> \n> You can implement it yourself through trigger functions, no big deal. \n\nGrunt work, as I said. And we are awfully short on time for doing this.\n\n> But,\n> typical applications nowadays interact with the user through dialogues with\n> text entry fields. Your client has to process this information anyway.\n\nJust a minimum, none if possible ... Our processing is made mostly\n*post* entry.\n\n> Doesn't make much of a difference then to split the information to the tables\n> it belongs to instead of just putting it into your view.\n\n\"Just putting it into my view\" is a hell of a lot faster and a hell of a\nlot less work. And I (and my assistants) are paid to work on our data,\nnot to write programs to access them ... Data entry and maintainance are\nan ancilliary task.\n\n> > Quite often, two or more distinct applications have to use common data.\n> > My favourite example is again medical : two othewise unrelated\n> > applications might have to use a common medical thesaurus.\n> >\n> > The obvious solution (including the medical thesaurus tables in each and\n> > every application) leads to awful consistency problems. Working this way\n> > can be properly done only with replication, which is not yet available\n> \n> ??? why? You are working with a client-server system, and you can have any\n> number of databases on a postgres server.\n\nNope : the thesaurus data might not be ours, and live on a server we can\n*read*, not *write to*, and certainly not program to our heart's\ncontent, and definitively *not* with PostgreSQL.\n\nDo you really think I can request our financial department to throw off\ntheir beloved Oracle databases, end result of tens of years of work, and\nswitch to our preffered PostgreSQL server ? And do you think I could put\nsensitive medical information on a server accessible to people not\ncleared to view any medical data ? If so, you'd better think again\nbefore proposing gnumed ...\n\nFor reasons that should be obvious, our data live in a server accessible\nto a small number of microcomputers in our department. And there is a\n*lot* of good and bad reasons for which they will stay here. For\nexample, our database authority (the french CNIL) would have a seizure\nif those data were to be migrated on a non-restricted server.\n\nFurthermore, we might have to use *several* unrelated database not\nbelonging to us ... \n\nThe \"one server serves all client\" is totally unapplicable to our\nproblems ..\n\nI'm looking for a practical solution, not for an excuse to an\nadministrative war, that I'd loose, btw ...\n\n> No need for replication for this\n> purpose.\n\n\n> > in PostgreSQL. Furthermore, most applications will use only one or two\n> > views of the thesaurus, while the thesaurus might be both large and\n> > complex.\n> \n> That does not matter for the application (client). It will be blissfully\n> unaware of the size or complexity of your thesaurus.\n\nA microcomputer client having to manage the huge size of the original\ndatabase would be painfully aware of this ... and the users too ... That\nnon-solution, therefore, would imply migrating our medical data to\nexactly one central server, which is, again, unacceptable.\n\n> > Another \"obvious solution\" (delegating the use of the thesaurus to the\n> > client application) is also a non-solution : how do you join your data\n> > and the thesaurus data ?\n> \n> The usual way as in any relational data base: by referencing the information.\n\nThat makes the client application a relational RDBMS with capability to\naccess more than one database at a time. This was MS Access for us, up\nuntil now. And I would *love* to get rid of it ...\n\n> > The ability to \"attach\" (MS-Access parlance) a table or a view from\n> > another database is quite helpful. And I think that it has a lot of\n> > applications outside my (quite limited) realm.\n> \n> It is quite disastrous for referential integrity.\n\nWould you please amplify ? You might have a point, but I do not (yet)\nsee it.\n\n--\nEmmanuel Charpentier\n", "msg_date": "Sun, 07 Jan 2001 23:10:30 +0100", "msg_from": "Emmanuel Charpentier <[email protected]>", "msg_from_op": true, "msg_subject": "Re: A post-7.1 wish-list." }, { "msg_contents": "Peter Eisentraut wrote:\n> \n> Emmanuel Charpentier writes:\n> \n> > 1) Updatable views.\n> \n> You can make rules updateable by attaching appropriate rules to them.\n> The transparent implementation of updateable views would essentially do\n> that. It's a planned feature but I don't know of anyone who has made it\n> his priority.\n\nI'd try my hand at it, given enough time ... which I'm awfully short on.\nWhich is one of my reasons to have that feature : not having to do grunt\nwork.\n\n> > 2) External database or table access.\n> \n> Accessing more than one database from a connection will not happen, at\n> least as long has the current mindset of the developers persists. SQL\n> schema support is planned for 7.2, which will address the same area,\n> however.\n\nI fail to see how schema support would help me accessing data residing\non different servers (that cannot be moved, for a lot of good and bad\nreasons). Could you please amplify ?\n\n--\nEmmanuel Charpentier\n", "msg_date": "Sun, 07 Jan 2001 23:18:39 +0100", "msg_from": "Emmanuel Charpentier <[email protected]>", "msg_from_op": true, "msg_subject": "Re: A post-7.1 wish-list." }, { "msg_contents": "\nI would like to inquire if in the next release of postgresql the database\nwill have to be compacted into a single file like what Interbase\ndatabase supports? I find this feature convenient because it will simplify\nthe updating of your database considering that you will be dealing only\nwith one single file.\n\nThanks and MORE POWER TO EVERYONE! \n\n-- \n Manny C. Cabido\n ====================================\n e-mail:[email protected]\n [email protected]\n =====================================\n\n", "msg_date": "Mon, 8 Jan 2001 09:32:46 +0800 (PHT)", "msg_from": "Manuel Cabido <[email protected]>", "msg_from_op": false, "msg_subject": "Re: A post-7.1 wish-list." }, { "msg_contents": "\n> I'd try my hand at it, given enough time ... which I'm awfully short on.\n> Which is one of my reasons to have that feature : not having to do grunt\n> work.\n\nIt should only take a few seconds to write such rules for simple views --\nsee the examples in the Programmer documentation.\n/programmer/rules1139.htm#AEN1227\n\n\n- Andrew\n\n", "msg_date": "Thu, 11 Jan 2001 15:52:46 +1100", "msg_from": "\"Andrew Snow\" <[email protected]>", "msg_from_op": false, "msg_subject": "RE: A post-7.1 wish-list." }, { "msg_contents": "\nOn Mon, 8 Jan 2001, Manuel Cabido wrote:\n\n> I would like to inquire if in the next release of postgresql the database\n> will have to be compacted into a single file like what Interbase\n> database supports? I find this feature convenient because it will simplify\n> the updating of your database considering that you will be dealing only\n> with one single file.\n\n I don't understand how a single file is easier to update. What kind of\nupdates are you talking about?\n\n A single file archicture requires that the database system have a\nstorage manager and a pseudo filesystem. It also becomes another thing to\nconfigure and monitor. Ask anyone who has delt with Oracle's tablespace\nand extent management on how complicated this can be.\n\nTom\n\n", "msg_date": "Wed, 10 Jan 2001 22:17:35 -0800 (PST)", "msg_from": "Tom Samplonius <[email protected]>", "msg_from_op": false, "msg_subject": "Re: A post-7.1 wish-list." }, { "msg_contents": "> > > Another \"obvious solution\" (delegating the use of the thesaurus to the\n> > > client application) is also a non-solution : how do you join your data\n> > > and the thesaurus data ?\n> > \n> > The usual way as in any relational data base: by referencing the information.\n> \n> That makes the client application a relational RDBMS with capability to\n> access more than one database at a time. This was MS Access for us, up\n> until now. And I would *love* to get rid of it ...\n> \n> > > The ability to \"attach\" (MS-Access parlance) a table or a view from\n> > > another database is quite helpful. And I think that it has a lot of\n> > > applications outside my (quite limited) realm.\n> > \n> > It is quite disastrous for referential integrity.\n> \n> Would you please amplify ? You might have a point, but I do not (yet)\n> see it.\n> \n> --\n> Emmanuel Charpentier\n\n\ndefinitely isolating different databases is a non-practical idea, how can you image things will be changed \nin future? do you believe that you'll never reference data in other databases? it sound likes that you are \nstill in 80's, in that time, PC are mostly not connected together via Network, when we need migrate data to \nanother PC, we should use floppy :(, this time I should use the barbarism method again --- dump table to a \nfile then load the file to another database even they are on same server! maybe I should write a stupid program to\ndo task periodically.\n\nRegards,\nXuYifeng\n\n", "msg_date": "Fri, 12 Jan 2001 09:34:34 +0800", "msg_from": "\"XuYifeng\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: A post-7.1 wish-list." } ]
[ { "msg_contents": "heap_update() currently ends with\n\n if (newbuf != buffer)\n {\n LockBuffer(newbuf, BUFFER_LOCK_UNLOCK);\n WriteBuffer(newbuf);\n }\n LockBuffer(buffer, BUFFER_LOCK_UNLOCK);\n WriteBuffer(buffer);\n\n /* invalidate caches */\n RelationInvalidateHeapTuple(relation, &oldtup);\n RelationMark4RollbackHeapTuple(relation, newtup);\n\n return HeapTupleMayBeUpdated;\n\nThis is broken because WriteBuffer releases our refcounts on the buffer\npages that are holding the old and new tuples. By the time\nRelationInvalidateHeapTuple gets to do its thing, some other backend may\nhave swapped a new disk page into the shared buffer that oldtup points\nat. catcache.c will then be using the wrong data to compute the hash\nindex of the old tuple. This will at minimum result in failure to\ninvalidate the old tuple out of our catcache (because we'll be searching\nthe wrong hashchains), and can lead to a flat-out crash or Assert\nfailure due to invalid data being fed to the hashing code.\n\nI have seen several nonrepeatable failures in the parallel regress tests\nin recent weeks, which I now believe are all traceable to this error.\n\nI will commit a fix for this error shortly, and have recommended to Marc\nthat he re-roll the beta2 tarball before announcing it...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 16:38:25 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "heap_update is broken in current sources" }, { "msg_contents": "\nHow are we on this?\n\nOn Sun, 7 Jan 2001, Tom Lane wrote:\n\n> heap_update() currently ends with\n>\n> if (newbuf != buffer)\n> {\n> LockBuffer(newbuf, BUFFER_LOCK_UNLOCK);\n> WriteBuffer(newbuf);\n> }\n> LockBuffer(buffer, BUFFER_LOCK_UNLOCK);\n> WriteBuffer(buffer);\n>\n> /* invalidate caches */\n> RelationInvalidateHeapTuple(relation, &oldtup);\n> RelationMark4RollbackHeapTuple(relation, newtup);\n>\n> return HeapTupleMayBeUpdated;\n>\n> This is broken because WriteBuffer releases our refcounts on the buffer\n> pages that are holding the old and new tuples. By the time\n> RelationInvalidateHeapTuple gets to do its thing, some other backend may\n> have swapped a new disk page into the shared buffer that oldtup points\n> at. catcache.c will then be using the wrong data to compute the hash\n> index of the old tuple. This will at minimum result in failure to\n> invalidate the old tuple out of our catcache (because we'll be searching\n> the wrong hashchains), and can lead to a flat-out crash or Assert\n> failure due to invalid data being fed to the hashing code.\n>\n> I have seen several nonrepeatable failures in the parallel regress tests\n> in recent weeks, which I now believe are all traceable to this error.\n>\n> I will commit a fix for this error shortly, and have recommended to Marc\n> that he re-roll the beta2 tarball before announcing it...\n>\n> \t\t\tregards, tom lane\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Mon, 8 Jan 2001 10:28:18 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: heap_update is broken in current sources" }, { "msg_contents": "The Hermit Hacker <[email protected]> writes:\n> How are we on this?\n\nIt's fixed.\n\nI've also run the regress tests with bufmgr.c hacked up to discard\npages (with forcible overwriting) as soon as their refcount goes to\nzero. That didn't disclose any similar bugs, although the coverage\nof the tests leaves much to be desired :-(\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 10:26:36 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Re: heap_update is broken in current sources " }, { "msg_contents": "\nokay, will bundle up beta2 and announce it tonight when I get home ...\ngives about 6 hrs or so to \"halt the presses\" *grin*\n\nOn Mon, 8 Jan 2001, Tom Lane wrote:\n\n> The Hermit Hacker <[email protected]> writes:\n> > How are we on this?\n>\n> It's fixed.\n>\n> I've also run the regress tests with bufmgr.c hacked up to discard\n> pages (with forcible overwriting) as soon as their refcount goes to\n> zero. That didn't disclose any similar bugs, although the coverage\n> of the tests leaves much to be desired :-(\n>\n> \t\t\tregards, tom lane\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Mon, 8 Jan 2001 11:55:10 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: heap_update is broken in current sources " } ]
[ { "msg_contents": "The way that heap_update() and heap_delete() are currently coded, they\nhold the buffer context lock on the buffer containing the old tuple\nwhile they invoke heap_tuple_toast_attrs(). This strikes me as at least\ninefficient and at worst a source of deadlock. Is it possible to avoid\nholding the buffer lock while doing the TOAST manipulations?\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 17:10:33 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": true, "msg_subject": "Should heap_update/heap_delete hold buffer locks while toasting?" }, { "msg_contents": "Tom Lane wrote:\n> The way that heap_update() and heap_delete() are currently coded, they\n> hold the buffer context lock on the buffer containing the old tuple\n> while they invoke heap_tuple_toast_attrs(). This strikes me as at least\n> inefficient and at worst a source of deadlock. Is it possible to avoid\n> holding the buffer lock while doing the TOAST manipulations?\n\n Since the TOAST table access is doing it's own locking on the\n TOAST tables, I think it'd be possible to move it outside of\n the buffer lock.\n\n\nJan\n\n--\n\n#======================================================================#\n# It's easier to get forgiveness for being wrong than for being right. #\n# Let's break this rule - forgive me. #\n#================================================== [email protected] #\n\n\n", "msg_date": "Mon, 8 Jan 2001 13:37:04 -0500 (EST)", "msg_from": "Jan Wieck <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Should heap_update/heap_delete hold buffer locks while toasting?" } ]
[ { "msg_contents": "The KAME files md5.* and sha1.* have the following changelog\nentry:\n\n----------------------------\nrevision 1.2\ndate: 2000/12/04 01:20:38; author: tgl; state: Exp; lines:\n+18 -18\nEliminate some of the more blatant platform-dependencies ... it\nbuilds here now, anyway ...\n----------------------------\n\nWhich basically changes u_int*_t -> uint*_t, so now it does not\ncompile neither under Debian 2.2 nor under NetBSD 1.5 which\nis platform independent� all right. Also it replaces $KAME$\nwith $Id$ which is Bad Thing. PostgreSQL Id should be added as a\nseparate line so the file history could be seen.\n\nSo here is patch:\n\n* changes uint*_t -> uint*. I guess that was the original\n intention\n* adds uint64 type to include/c.h because its needed\n [somebody should check if I did it right]\n* adds back KAME Id, because KAME is the master repository\n* removes stupid c++ comments in pgcrypto.c\n* removes <sys/types.h> from the code, its not needed\n\n-- \nmarko", "msg_date": "Mon, 8 Jan 2001 02:37:51 +0200", "msg_from": "Marko Kreen <[email protected]>", "msg_from_op": true, "msg_subject": "patch: contrib/pgcrypto sanity" }, { "msg_contents": "Marko Kreen <[email protected]> writes:\n> date: 2000/12/04 01:20:38; author: tgl; state: Exp; lines: +18 -18\n> Eliminate some of the more blatant platform-dependencies ... it\n> builds here now, anyway ...\n\n> Which basically changes u_int*_t -> uint*_t, so now it does not\n> compile neither under Debian 2.2 nor under NetBSD 1.5 which\n> is platform independent� all right.\n\nWell, that's annoying. I guess those platforms are out of step with the\nC99 standard, which specifies uint*_t not u_int*_t (cf. C99 7.4.1.1).\nI agree with your solution of switching to Postgres-supplied typenames.\n\n> Also it replaces $KAME$ with $Id$ which is Bad Thing. PostgreSQL Id\n> should be added as a separate line so the file history could be seen.\n\nI didn't know what $KAME$ was, and took it for some national-language\nvariant of $Id$ that our CVS server didn't know about. Who/what is\nKAME anyway?\n\n> * adds back KAME Id, because KAME is the master repository\n\nIs that a good idea? If we are deliberately deviating from whatever\n\"master repository\" this is, I'm not sure that we should continue to\nlabel the code with their revision ID.\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 20:09:07 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: patch: contrib/pgcrypto sanity " }, { "msg_contents": "On Sun, Jan 07, 2001 at 08:09:07PM -0500, Tom Lane wrote:\n> Marko Kreen <[email protected]> writes:\n> > date: 2000/12/04 01:20:38; author: tgl; state: Exp; lines: +18 -18\n> > Eliminate some of the more blatant platform-dependencies ... it\n> > builds here now, anyway ...\n> \n> > Which basically changes u_int*_t -> uint*_t, so now it does not\n> > compile neither under Debian 2.2 nor under NetBSD 1.5 which\n> > is platform independent� all right.\n> \n> Well, that's annoying. I guess those platforms are out of step with the\n> C99 standard, which specifies uint*_t not u_int*_t (cf. C99 7.4.1.1).\n> I agree with your solution of switching to Postgres-supplied typenames.\n\nWell, actually they do. glibc in <stdint.h> and NetBSD in\n<sys/inttypes.h> which is a mess, all rigth. Problem is that\npostgres.h does not know about this. I guess that C99 forgot\nto specify _where_ they should be defined.\n\nBut the point is, what are the standard types in PostgreSQL? C99\nones are not, because there would be lots of noise raised\nalready. If you think that the C99 should be standard someday,\nthen postgres.h should also provide them, because older\nplatforms definitely do not provide them.\n\n> > Also it replaces $KAME$ with $Id$ which is Bad Thing. PostgreSQL Id\n> > should be added as a separate line so the file history could be seen.\n> \n> I didn't know what $KAME$ was, and took it for some national-language\n> variant of $Id$ that our CVS server didn't know about. Who/what is\n> KAME anyway?\n\nKAME is the project that provides IPv6 to all the free BSD's.\n(www.kame.net)\n\n> > * adds back KAME Id, because KAME is the master repository\n> \n> Is that a good idea? If we are deliberately deviating from whatever\n> \"master repository\" this is, I'm not sure that we should continue to\n> label the code with their revision ID.\n\nI think it is. I think they are more competent on maintaining\ncrypto than PostgreSQL team (at least they devote more time on\nit). This makes tracking changes easier. This (special Id's)\nare widely used practice in BSD's, this makes clear whether a\nfile is 'original' or 'imported'; and from where.\n\n\n-- \nmarko\n\n", "msg_date": "Mon, 8 Jan 2001 04:06:09 +0200", "msg_from": "Marko Kreen <[email protected]>", "msg_from_op": true, "msg_subject": "Re: patch: contrib/pgcrypto sanity" }, { "msg_contents": "On Mon, Jan 08, 2001 at 04:06:09AM +0200, Marko Kreen wrote:\n> On Sun, Jan 07, 2001 at 08:09:07PM -0500, Tom Lane wrote:\n> > Marko Kreen <[email protected]> writes:\n> > > Which basically changes u_int*_t -> uint*_t, so now it does not\n> > > compile neither under Debian 2.2 nor under NetBSD 1.5 which\n> > > is platform independent� all right.\n> > \n> > Well, that's annoying. I guess those platforms are out of step with the\n> > C99 standard, which specifies uint*_t not u_int*_t (cf. C99 7.4.1.1).\n> > I agree with your solution of switching to Postgres-supplied typenames.\n> \n> Well, actually they do. glibc in <stdint.h> and NetBSD in\n> <sys/inttypes.h> which is a mess, all rigth. Problem is that\n> postgres.h does not know about this. I guess that C99 forgot\n> to specify _where_ they should be defined.\n\nCorrection, they both have <inttypes.h> which probably is the\nright location for this.\n\n> > > * adds back KAME Id, because KAME is the master repository\n> > \n> > Is that a good idea? If we are deliberately deviating from whatever\n> > \"master repository\" this is, I'm not sure that we should continue to\n> > label the code with their revision ID.\n> \n> I think it is. I think they are more competent on maintaining\n> crypto than PostgreSQL team (at least they devote more time on\n> it). This makes tracking changes easier. This (special Id's)\n> are widely used practice in BSD's, this makes clear whether a\n> file is 'original' or 'imported'; and from where.\n\nThe \"master\" only means that occasionally somebody (e.g. I) can\ncheck if their revision is increased and then can merge changes\ninto our sources, if needed. Also _I_ know where I got these\nsources but this makes it easier for others too.\n\n-- \nmarko\n\n", "msg_date": "Mon, 8 Jan 2001 09:23:07 +0200", "msg_from": "Marko Kreen <[email protected]>", "msg_from_op": true, "msg_subject": "Re: patch: contrib/pgcrypto sanity" }, { "msg_contents": "Marko Kreen writes:\n > On Mon, Jan 08, 2001 at 04:06:09AM +0200, Marko Kreen wrote:\n > > On Sun, Jan 07, 2001 at 08:09:07PM -0500, Tom Lane wrote:\n > > > Marko Kreen <[email protected]> writes:\n > > > > Which basically changes u_int*_t -> uint*_t, so now it does\n > > > > not compile neither under Debian 2.2 nor under NetBSD 1.5\n > > > > which is platform independent� all right.\n > > > \n > > > Well, that's annoying. I guess those platforms are out of step\n > > > with the C99 standard, which specifies uint*_t not u_int*_t\n > > > (cf. C99 7.4.1.1). I agree with your solution of switching to\n > > > Postgres-supplied typenames.\n > > \n > > Well, actually they do. glibc in <stdint.h> and NetBSD in\n > > <sys/inttypes.h> which is a mess, all rigth. Problem is that\n > > postgres.h does not know about this. I guess that C99 forgot to\n > > specify _where_ they should be defined.\n > \n > Correction, they both have <inttypes.h> which probably is the right\n > location for this.\n\n<stdint.h> is adequate to pick up uint*_t. <inttypes.h> is defined to\ninclude <stdint.h>. Of course all this C99 stuff is new and existing\nimplementations may have the typedefs in different files or not have\nthem at all.\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.\n", "msg_date": "Mon, 8 Jan 2001 10:03:25 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: patch: contrib/pgcrypto sanity" }, { "msg_contents": "On Mon, Jan 08, 2001 at 10:03:25AM +0000, Pete Forman wrote:\n> Marko Kreen writes:\n> > On Mon, Jan 08, 2001 at 04:06:09AM +0200, Marko Kreen wrote:\n> > > Well, actually they do. glibc in <stdint.h> and NetBSD in\n> > > <sys/inttypes.h> which is a mess, all rigth. Problem is that\n> > > postgres.h does not know about this. I guess that C99 forgot to\n> > > specify _where_ they should be defined.\n> > \n> > Correction, they both have <inttypes.h> which probably is the right\n> > location for this.\n> \n> <stdint.h> is adequate to pick up uint*_t. <inttypes.h> is defined to\n> include <stdint.h>. Of course all this C99 stuff is new and existing\n> implementations may have the typedefs in different files or not have\n> them at all.\n\nBut as I said, NetBSD does not have it. So what is the\ncorrect/portable/standard location for it? Can anyone with C99\nstandard in hand find that out?\n\nE.g. Tom Lane has some OS where these types are in\nstd{io|lib|def|arg} but on NetBSD and glibc/Linux you must include\nseparate header file for them.\n\n-- \nmarko\n\n", "msg_date": "Mon, 8 Jan 2001 13:32:53 +0200", "msg_from": "Marko Kreen <[email protected]>", "msg_from_op": true, "msg_subject": "Re: patch: contrib/pgcrypto sanity" }, { "msg_contents": "Applied. Thanks.\n\n[ Charset ISO-8859-1 unsupported, converting... ]\n> \n> The KAME files md5.* and sha1.* have the following changelog\n> entry:\n> \n> ----------------------------\n> revision 1.2\n> date: 2000/12/04 01:20:38; author: tgl; state: Exp; lines:\n> +18 -18\n> Eliminate some of the more blatant platform-dependencies ... it\n> builds here now, anyway ...\n> ----------------------------\n> \n> Which basically changes u_int*_t -> uint*_t, so now it does not\n> compile neither under Debian 2.2 nor under NetBSD 1.5 which\n> is platform independent? all right. Also it replaces $KAME$\n> with $Id$ which is Bad Thing. PostgreSQL Id should be added as a\n> separate line so the file history could be seen.\n> \n> So here is patch:\n> \n> * changes uint*_t -> uint*. I guess that was the original\n> intention\n> * adds uint64 type to include/c.h because its needed\n> [somebody should check if I did it right]\n> * adds back KAME Id, because KAME is the master repository\n> * removes stupid c++ comments in pgcrypto.c\n> * removes <sys/types.h> from the code, its not needed\n> \n> -- \n> marko\n> \n\n[ Attachment, skipping... ]\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 11:07:15 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: patch: contrib/pgcrypto sanity" } ]
[ { "msg_contents": "It seems ALL and ANY (SOME) have problems with the parser.\n\ntest=# select * from t1 where i <> all(0,1);\nERROR: parser: parse error at or near \"0\"\ntest=# select * from t1 where i = any (0,1);\nERROR: parser: parse error at or near \"0\"\ntest=# select version();\n version \n------------------------------------------------------------------------\n PostgreSQL 7.1beta2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66\n(1 row)\n\nNote that if (0,1) is a subselect, it works fine.\n--\nTatsuo Ishii\n", "msg_date": "Mon, 08 Jan 2001 10:32:09 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "ALL, ANY bug?" }, { "msg_contents": "Tatsuo Ishii <[email protected]> writes:\n> It seems ALL and ANY (SOME) have problems with the parser.\n\nI see no problem here. Those are only defined for sub-selects.\nSQL92 8.7 says:\n\n <quantified comparison predicate> ::=\n <row value constructor> <comp op> <quantifier> <table subquery>\n\n <quantifier> ::= <all> | <some>\n\n <all> ::= ALL\n\n <some> ::= SOME | ANY\n\nand that is the only appearance of ANY in the grammar ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Sun, 07 Jan 2001 22:06:26 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: ALL, ANY bug? " }, { "msg_contents": "You are right. However, SQL92 spec allows:\n\nselect * from t1 where i <> all values(0,1);\n\nwhich is not allowed in PostgreSQL...\n--\nTatsuo Ishii\n\n> Tatsuo Ishii <[email protected]> writes:\n> > It seems ALL and ANY (SOME) have problems with the parser.\n> \n> I see no problem here. Those are only defined for sub-selects.\n> SQL92 8.7 says:\n> \n> <quantified comparison predicate> ::=\n> <row value constructor> <comp op> <quantifier> <table subquery>\n> \n> <quantifier> ::= <all> | <some>\n> \n> <all> ::= ALL\n> \n> <some> ::= SOME | ANY\n> \n> and that is the only appearance of ANY in the grammar ...\n> \n> \t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 16:04:03 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "Re: ALL, ANY bug? " }, { "msg_contents": "Tatsuo Ishii <[email protected]> writes:\n> You are right. However, SQL92 spec allows:\n> select * from t1 where i <> all values(0,1);\n\nNo, I still disagree. The ANY/ALL constructs compare a single row on\nthe left side with all the rows produced by the query on the right.\n\"values(0,1)\" is effectively the same as \"SELECT 0,1\", ie, it is a\nquery that happens to produce just one row. The above is illegal in\nSQL92 because the lefthand side is not a two-item row.\n\nThe semantics you seem to be looking for is \"scalar IN/NOT IN list\",\nwhich we do have. ANY/ALL is a different animal.\n\nIt's true that we don't accept values(...) as a subquery, but that's\nonly one aspect of this example.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 03:26:47 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: ALL, ANY bug? " }, { "msg_contents": "> No, I still disagree. The ANY/ALL constructs compare a single row on\n> the left side with all the rows produced by the query on the right.\n> \"values(0,1)\" is effectively the same as \"SELECT 0,1\", ie, it is a\n> query that happens to produce just one row. The above is illegal in\n> SQL92 because the lefthand side is not a two-item row.\n\nOh, I see your point. values(0,1) = SELECT 0,1\", which is one row\nconstructor. Sorry for the confusion.\n--\nTatsuo Ishii\n", "msg_date": "Mon, 08 Jan 2001 18:12:56 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "Re: ALL, ANY bug? " } ]
[ { "msg_contents": "Hi,\n\ntry the following command (Queries/New) in pgaccess from 7.0.3:\n\nSELECT * from cols LIMIT 1;\n\nIt will return the same set of records as:\n\nSELECT * from cols;\n\npsql works correctly.\n-- \nPavel Janďż˝k ml.\[email protected]\nhttp://www.janik.cz\n", "msg_date": "08 Jan 2001 16:27:36 +0100", "msg_from": "[email protected] (Pavel =?iso-8859-2?q?Jan=edk?= ml.)", "msg_from_op": true, "msg_subject": "pgaccess and LIMIT?" } ]
[ { "msg_contents": "After configuring with\n./configure\n --enable-multibyte\n --enable-unicode-conversion\n --enable-odbc\n --prefix=/usr\n --sysconfdir=/etc\n --localstatedir=/var\n\nmake\n\nmake install\n\nWhen trying to run initdb I get the following error:\n\nThe program '/usr/bin/postgres' needed by initdb does not belong to\nPostgreSQL version 7.1beta2. Check your installation.\n\nI'll see if I can track down what happened a little later on...\n\n-- \n- Thomas Swan\n- Graduate Student - Computer Science\n- The University of Mississippi\n-\n- \"People can be categorized into two fundamental\n- groups, those that divide people into two groups\n- and those that don't.\"\nAfter configuring with\n./configure \n        --enable-multibyte\n\n        --enable-unicode-conversion\n\n        --enable-odbc\n        --prefix=/usr\n        --sysconfdir=/etc\n        --localstatedir=/var\n\nmake\n\nmake install\n\nWhen trying to run initdb I get the following error:\n        \nThe program '/usr/bin/postgres' needed by initdb does not belong\nto\nPostgreSQL version 7.1beta2.  Check your installation.\n\nI'll see if I can track down what happened a little later\non...\n\n\n-- \n- Thomas Swan\n                                  \n- Graduate Student  - Computer Science\n- The University of Mississippi\n- \n- \"People can be categorized into two fundamental \n- groups, those that divide people into two groups \n- and those that don't.\"", "msg_date": "Mon, 08 Jan 2001 16:37:59 -0600", "msg_from": "Thomas Swan <[email protected]>", "msg_from_op": true, "msg_subject": "Install Failure [7.1beta2 tarballs]" }, { "msg_contents": "Thomas Swan <[email protected]> writes:\n> When trying to run initdb I get the following error:\n> The program '/usr/bin/postgres' needed by initdb does not belong to\n> PostgreSQL version 7.1beta2. Check your installation.\n\nHm. Either install failed to overwrite the existing /usr/bin/postgres,\nor your compiled copy of the executable still has the beta1 version\nstring (did you do \"make clean\" before rebuilding?)\n\n\t\t\tregards, tom lane\n", "msg_date": "Thu, 11 Jan 2001 15:36:35 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Install Failure [7.1beta2 tarballs] " }, { "msg_contents": "Thomas Swan writes:\n\n> When trying to run initdb I get the following error:\n>\n> The program '/usr/bin/postgres' needed by initdb does not belong to\n> PostgreSQL version 7.1beta2. Check your installation.\n\nIf you are updating your sources via 'cvs update' you should do 'make\nclean' before recompilation, or configure with '--enable-depend' next\ntime. Most likely the postgres program still thinks it's beta1. (Try\n--version.)\n\n-- \nPeter Eisentraut [email protected] http://yi.org/peter-e/\n\n", "msg_date": "Thu, 11 Jan 2001 23:59:38 +0100 (CET)", "msg_from": "Peter Eisentraut <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Install Failure [7.1beta2 tarballs]" } ]
[ { "msg_contents": "Compaq has released an open-source database benchmark at:\n\n\thttp://opensource.compaq.com/sourceforge/project/?group_id=19\n\nI must say, Compaq has been more involved with PostgreSQL than any of\nthe other computer vendors. They have contributed equipment, and now\nbenchmark source code.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Mon, 8 Jan 2001 20:07:37 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": true, "msg_subject": "Compaq open source database benchmark" } ]
[ { "msg_contents": "Has anyone tried 7.1Beta on Tru64? \n\nI've got an app that will be moving to this platform, and would like\nto not have any surprises (It's the first production app with PG in\nthe dallas office, and would like to not make trouble).\n\nThanks!\n\nLER\n\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Mon, 8 Jan 2001 19:25:25 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": true, "msg_subject": "Dec TRU64/PG 7.1" }, { "msg_contents": "Larry Rosenman <[email protected]> writes:\n> Has anyone tried 7.1Beta on Tru64? \n\nbeta1 will not work, but recent snapshots are reported to pass\nregression tests. Feel free to pound away on it ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 23:25:03 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Dec TRU64/PG 7.1 " } ]
[ { "msg_contents": "I think doc/REAME.mb is now deprecated and I would like to remove it.\nAlso I would like to place the Chinese (Big5) version of README.mb\nrecently posted by Chih-Chang Hsieh <[email protected]> as\ndoc/README.mb.big5.\n\nComments? Objections?\n--\nTatsuo Ishii\n", "msg_date": "Tue, 09 Jan 2001 11:26:30 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": true, "msg_subject": "README.mb" }, { "msg_contents": "Tatsuo Ishii <[email protected]> writes:\n> I think doc/REAME.mb is now deprecated and I would like to remove it.\n> Also I would like to place the Chinese (Big5) version of README.mb\n> recently posted by Chih-Chang Hsieh <[email protected]> as\n> doc/README.mb.big5.\n\nGo for it. I was surprised you hadn't done so already.\n\n\t\t\tregards, tom lane\n", "msg_date": "Mon, 08 Jan 2001 23:22:00 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: README.mb " }, { "msg_contents": "> Tatsuo Ishii <[email protected]> writes:\n> > I think doc/REAME.mb is now deprecated and I would like to remove it.\n> > Also I would like to place the Chinese (Big5) version of README.mb\n> > recently posted by Chih-Chang Hsieh <[email protected]> as\n> > doc/README.mb.big5.\n> \n> Go for it. I was surprised you hadn't done so already.\n\nI kind of got stuck on how to deal with the Big5 file. Glad Tatsuo is\nhandling it.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 11:21:33 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: README.mb" } ]
[ { "msg_contents": "> Killing an individual backend with SIGTERM is bad luck. The backend\n> will assume that it's being killed by the postmaster, and will exit\n> without a whole lot of concern for cleaning up shared memory --- the\n\nWhat code will be returned to postmaster in this case?\n\nVadim\n", "msg_date": "Mon, 8 Jan 2001 22:26:43 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Quite strange crash " }, { "msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n>> Killing an individual backend with SIGTERM is bad luck. The backend\n>> will assume that it's being killed by the postmaster, and will exit\n>> without a whole lot of concern for cleaning up shared memory --- the\n\n> What code will be returned to postmaster in this case?\n\nRight at the moment, the backend will exit with status 0. I think you\nare thinking the same thing I am: maybe a backend that receives SIGTERM\nought to exit with nonzero status.\n\nThat would mean that killing an individual backend would instantly\ntranslate into an installation-wide restart. I am not sure whether\nthat's a good idea. Perhaps this cure is worse than the disease.\nComments anyone?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 01:40:49 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " } ]
[ { "msg_contents": "> >> Killing an individual backend with SIGTERM is bad luck. \n> >> The backend will assume that it's being killed by the postmaster,\n> >> and will exit without a whole lot of concern for cleaning up shared \n> >> memory --- the\n\nSIGTERM --> die() --> elog(FATAL)\n\nIs it true that elog(FATAL) doesn't clean up shmem etc?\nThis would be very bad...\n\n> > What code will be returned to postmaster in this case?\n> \n> Right at the moment, the backend will exit with status 0. I think you\n> are thinking the same thing I am: maybe a backend that \n> receives SIGTERM ought to exit with nonzero status.\n> \n> That would mean that killing an individual backend would instantly\n> translate into an installation-wide restart. I am not sure whether\n> that's a good idea. Perhaps this cure is worse than the disease.\n\nWell, it's not good idea because of SIGTERM is used for ABORT + EXIT\n(pg_ctl -m fast stop), but shouldn't ABORT clean up everything?\n\nVadim\n", "msg_date": "Mon, 8 Jan 2001 22:58:11 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Quite strange crash " }, { "msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n>>>>> Killing an individual backend with SIGTERM is bad luck. \n\n> SIGTERM --> die() --> elog(FATAL)\n\n> Is it true that elog(FATAL) doesn't clean up shmem etc?\n> This would be very bad...\n\nIt tries, but I don't think it's possible to make a complete guarantee\nwithout an unreasonable amount of overhead. The case at hand was a\nstuck spinlock because die() --> elog(FATAL) had neglected to release\nthat particular spinlock before exiting. To guarantee that all\nspinlocks will be released by die(), we'd need something like\n\n\tSTART_CRIT_SECTION;\n\tS_LOCK(spinlock);\n\trecord that we own spinlock;\n\tEND_CRIT_SECTION;\n\naround every existing S_LOCK() call, and the reverse around every\nS_UNLOCK. Are you willing to pay that kind of overhead? I'm not\nsure this'd be enough anyway. Guaranteeing that you have consistent\nstate at every instant that an ISR could interrupt you is not easy.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 02:12:57 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " }, { "msg_contents": "* Mikheev, Vadim <[email protected]> [010108 23:08] wrote:\n> > >> Killing an individual backend with SIGTERM is bad luck. \n> > >> The backend will assume that it's being killed by the postmaster,\n> > >> and will exit without a whole lot of concern for cleaning up shared \n> > >> memory --- the\n> \n> SIGTERM --> die() --> elog(FATAL)\n> \n> Is it true that elog(FATAL) doesn't clean up shmem etc?\n> This would be very bad...\n> \n> > > What code will be returned to postmaster in this case?\n> > \n> > Right at the moment, the backend will exit with status 0. I think you\n> > are thinking the same thing I am: maybe a backend that \n> > receives SIGTERM ought to exit with nonzero status.\n> > \n> > That would mean that killing an individual backend would instantly\n> > translate into an installation-wide restart. I am not sure whether\n> > that's a good idea. Perhaps this cure is worse than the disease.\n> \n> Well, it's not good idea because of SIGTERM is used for ABORT + EXIT\n> (pg_ctl -m fast stop), but shouldn't ABORT clean up everything?\n\nEr, shouldn't ABORT leave the system in the exact state that it's\nin so that one can get a crashdump/traceback on a wedged process\nwithout it trying to clean up after itself?\n\n-- \n-Alfred Perlstein - [[email protected]|[email protected]]\n\"I have the heart of a child; I keep it in a jar on my desk.\"\n", "msg_date": "Mon, 8 Jan 2001 23:23:43 -0800", "msg_from": "Alfred Perlstein <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash" }, { "msg_contents": "> > Well, it's not good idea because of SIGTERM is used for ABORT + EXIT\n> > (pg_ctl -m fast stop), but shouldn't ABORT clean up everything?\n> \n> Er, shouldn't ABORT leave the system in the exact state that it's\n> in so that one can get a crashdump/traceback on a wedged process\n> without it trying to clean up after itself?\n\nSorry, I've meant \"transaction abort\"...\n\nVadim\n\n\n", "msg_date": "Tue, 9 Jan 2001 00:34:52 -0800", "msg_from": "\"Vadim Mikheev\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash" } ]
[ { "msg_contents": "On AIX timestamp and horology regression fails in current, because \ntimestamp - interval for result timestamps that are before 1970 (epoch ?) \nare off by one hour. I think this is not an issue for an adapted expected file, \nbut a new (in 7.1beta) bug. But I am at no means an expert at what the result \nshould be when substracting 34 years from epoch or 'Mon Dec 30 17:32:01 1996 PST'.\n\nAndreas", "msg_date": "Tue, 9 Jan 2001 10:44:21 +0100 ", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "tinterval - operator problems on AIX" }, { "msg_contents": "> On AIX timestamp and horology regression fails in current, because\n> timestamp - interval for result timestamps that are before 1970 (epoch ?)\n> are off by one hour. I think this is not an issue for an adapted expected file,\n> but a new (in 7.1beta) bug. But I am at no means an expert at what the result\n> should be when substracting 34 years from epoch or 'Mon Dec 30 17:32:01 1996 PST'.\n\nHi Andreas. It is certainly true that the behavior has changed for the\nnew release, but afaik it can not be put into the \"bug\" category.\n\nThe difference is that, before, I rotated date/time into the correct\ntime zone for arithmetic by adding/subtracting the current time zone.\nFor (date/time)-(interval), this resulted in evaluating the result in\nthe same time zone as the starting date/time, which was not correct.\n\nThe time zone is now evaluated in the time zone of the result, rather\nthan the input, using system support routines from libc. But that will\nexpose troubles on some platforms with time zone support before 1970.\nSome platforms are worse than others; my experience has been that\nzinc-based systems such as Linux, FreeBSD, and Tru64 are pretty good,\nSuns are the best, and, well, apparently AIX is not ;)\n\n - Thomas\n", "msg_date": "Tue, 09 Jan 2001 15:06:03 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: tinterval - operator problems on AIX" } ]
[ { "msg_contents": "I wonder why http://www.postgresql.org is not updated with news. The\nlatest \"Latest News\" is from Nov 16. I have to go to\nhttp://www.pgsql.com to find some interesting news later than that:\n2000-12-22 PostgreSQL, Inc. Releases Open Source Replication & Database\nand 2000-12-12 2000 Linux Journal Editor's\nChoice Award for Best Database\n\nIn fact I was looking for the Replication server. No mention seems to be\navailable on postgresql.org.\n\nAlso the mailing list archive for pgsql-sql is not listed here:\nhttp://www.postgresql.org/devel-corner/index.html - but you can see it\nif you write the correct URL yourself.\n\n--\nKaare Rasmussen --Linux, spil,-- Tlf: 3816 2582\nKaki Data tshirts, merchandize Fax: 3816 2501\nHowitzvej 75 �ben 14.00-18.00 Email: [email protected]\n2000 Frederiksberg L�rdag 11.00-17.00 Web: www.suse.dk\n\n\n", "msg_date": "Tue, 09 Jan 2001 10:49:45 +0100", "msg_from": "Kaare Rasmussen <[email protected]>", "msg_from_op": true, "msg_subject": "PostgreSQL web page" }, { "msg_contents": "On Tue, 9 Jan 2001, Kaare Rasmussen wrote:\n\n> I wonder why http://www.postgresql.org is not updated with news. The\n> latest \"Latest News\" is from Nov 16. I have to go to\n> http://www.pgsql.com to find some interesting news later than that:\n> 2000-12-22 PostgreSQL, Inc. Releases Open Source Replication & Database\n> and 2000-12-12 2000 Linux Journal Editor's\n> Choice Award for Best Database\n>\n> In fact I was looking for the Replication server. No mention seems to be\n> available on postgresql.org.\n>\n> Also the mailing list archive for pgsql-sql is not listed here:\n> http://www.postgresql.org/devel-corner/index.html - but you can see it\n> if you write the correct URL yourself.\n\nI have no graphical browser right now, and lynx isn't installed, so I'm a\nbit at a disadvantage here ... but, pgsql-sql *should* be listed under\nusers-gallery, not devel ... devel is -hackers, -bugs, -ports, etc ...\n\nBeyond that, the web site is maintained by Vince ... but I thought the\nAward was definitely up there already ...\n\n\n", "msg_date": "Tue, 9 Jan 2001 09:00:16 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [SQL] PostgreSQL web page" }, { "msg_contents": "> I have no graphical browser right now, and lynx isn't installed, so I'm a\n> bit at a disadvantage here ... but, pgsql-sql *should* be listed under\n> users-gallery, not devel ... devel is -hackers, -bugs, -ports, etc ...\n> \n> Beyond that, the web site is maintained by Vince ... but I thought the\n> Award was definitely up there already ...\n\nLooks OK here. Maybe a bad mirror. Do:\n\n\thttp://www.postgresql.org/index.html\n\nto avoid any mirrors.\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 08:11:05 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: [SQL] PostgreSQL web page" }, { "msg_contents": "\n> Looks OK here. Maybe a bad mirror. Do:\n\nNope. But I must admit that the item about the award is there - it's just\ndated November 16, where the date on pgsql.com is Dec. 12.\n\nBut the thing I really wondered about was the missing announcement of the\nReplication Server. I thought it was an important news item for PostgreSQL,\nbut I may of course be wrong!\n\n-- \nKaare Rasmussen --Linux, spil,-- Tlf: 3816 2582\nKaki Data tshirts, merchandize Fax: 3816 2501\nHowitzvej 75 ���ben 14.00-18.00 Email: [email protected]\n2000 Frederiksberg L���rdag 11.00-17.00 Web: www.suse.dk\n", "msg_date": "Tue, 09 Jan 2001 13:16:43 GMT", "msg_from": "\"Kaare Rasmussen\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: PostgreSQL web page" }, { "msg_contents": "\nErk, ookay, didn't think of that ... Kaare, what URL/mirror are you\nhitting? Can you email Vince and let him know, so taht he can get that\nremoved?\n\nThanks ...\n\nOn Tue, 9 Jan 2001, Bruce Momjian wrote:\n\n> > I have no graphical browser right now, and lynx isn't installed, so I'm a\n> > bit at a disadvantage here ... but, pgsql-sql *should* be listed under\n> > users-gallery, not devel ... devel is -hackers, -bugs, -ports, etc ...\n> >\n> > Beyond that, the web site is maintained by Vince ... but I thought the\n> > Award was definitely up there already ...\n>\n> Looks OK here. Maybe a bad mirror. Do:\n>\n> \thttp://www.postgresql.org/index.html\n>\n> to avoid any mirrors.\n>\n> --\n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Tue, 9 Jan 2001 09:17:19 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: [SQL] PostgreSQL web page" }, { "msg_contents": "\nError on pgsql.com ... I was nowhere near Las Vegas on Dec 12th ...\n\nOn Tue, 9 Jan 2001, Kaare Rasmussen wrote:\n\n>\n> > Looks OK here. Maybe a bad mirror. Do:\n>\n> Nope. But I must admit that the item about the award is there - it's just\n> dated November 16, where the date on pgsql.com is Dec. 12.\n>\n> But the thing I really wondered about was the missing announcement of the\n> Replication Server. I thought it was an important news item for PostgreSQL,\n> but I may of course be wrong!\n>\n> --\n> Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582\n> Kaki Data tshirts, merchandize Fax: 3816 2501\n> Howitzvej 75 �ben 14.00-18.00 Email: [email protected]\n> 2000 Frederiksberg L�rdag 11.00-17.00 Web: www.suse.dk\n>\n\nMarc G. Fournier ICQ#7615664 IRC Nick: Scrappy\nSystems Administrator @ hub.org\nprimary: [email protected] secondary: scrappy@{freebsd|postgresql}.org\n\n", "msg_date": "Tue, 9 Jan 2001 09:33:27 -0400 (AST)", "msg_from": "The Hermit Hacker <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] Re: PostgreSQL web page" }, { "msg_contents": "On Tue, 9 Jan 2001, The Hermit Hacker wrote:\n\n> On Tue, 9 Jan 2001, Kaare Rasmussen wrote:\n>\n> > I wonder why http://www.postgresql.org is not updated with news. The\n> > latest \"Latest News\" is from Nov 16. I have to go to\n> > http://www.pgsql.com to find some interesting news later than that:\n> > 2000-12-22 PostgreSQL, Inc. Releases Open Source Replication & Database\n> > and 2000-12-12 2000 Linux Journal Editor's\n> > Choice Award for Best Database\n> >\n> > In fact I was looking for the Replication server. No mention seems to be\n> > available on postgresql.org.\n> >\n> > Also the mailing list archive for pgsql-sql is not listed here:\n> > http://www.postgresql.org/devel-corner/index.html - but you can see it\n> > if you write the correct URL yourself.\n>\n> I have no graphical browser right now, and lynx isn't installed, so I'm a\n> bit at a disadvantage here ... but, pgsql-sql *should* be listed under\n> users-gallery, not devel ... devel is -hackers, -bugs, -ports, etc ...\n\nUnless the clock on hub was wrong, I have the award happening on\n11/16/Y2K. The replication server info was a press release by\nPostgreSQL, Inc. Not the PostgreSQL Global Development Group. Between\nGB and PG,Inc with the constant barrage of press releases I made the\ndecision months ago that NO press releases from ANY group would be posted\non the PostgreSQL website - these groups have their own websites for that\nand PostgreSQL.org doesn't need to be caught up in the middle.\n\npgsql-sql is in the users section - both info and archives.\n\n> Beyond that, the web site is maintained by Vince ... but I thought the\n> Award was definitely up there already ...\n\nBoth on the main page and in latest news.\n\nVince.\n-- \n==========================================================================\nVince Vielhaber -- KA8CSH email: [email protected] http://www.pop4.net\n 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking\n Online Campground Directory http://www.camping-usa.com\n Online Giftshop Superstore http://www.cloudninegifts.com\n==========================================================================\n\n\n\n", "msg_date": "Tue, 9 Jan 2001 10:21:10 -0500 (EST)", "msg_from": "Vince Vielhaber <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: [SQL] PostgreSQL web page" } ]
[ { "msg_contents": "\n> > On AIX timestamp and horology regression fails in current, because\n> > timestamp - interval for result timestamps that are before \n> 1970 (epoch ?)\n> > are off by one hour. I think this is not an issue for an \n> adapted expected file,\n> > but a new (in 7.1beta) bug. But I am at no means an expert \n> at what the result\n> > should be when substracting 34 years from epoch or 'Mon Dec \n> 30 17:32:01 1996 PST'.\n> \n> Hi Andreas. It is certainly true that the behavior has changed for the\n> new release, but afaik it can not be put into the \"bug\" category.\n> \n> The difference is that, before, I rotated date/time into the correct\n> time zone for arithmetic by adding/subtracting the current time zone.\n> For (date/time)-(interval), this resulted in evaluating the result in\n> the same time zone as the starting date/time, which was not correct.\n> \n> The time zone is now evaluated in the time zone of the result, rather\n> than the input, using system support routines from libc. But that will\n> expose troubles on some platforms with time zone support before 1970.\n> Some platforms are worse than others; my experience has been that\n> zinc-based systems such as Linux, FreeBSD, and Tru64 are pretty good,\n> Suns are the best, and, well, apparently AIX is not ;)\n\nWhat I do not understand is, that I thought a time in december cannot be\naffected by such math because it is clearly not in the daylight savings\nmonths of the year ? Also I thought that you recognize daylight savings time\nby the PDT instead of PST, and PostgreSQL shows a result with PST as I\nwould have expected, but one hour off.\n\ne.g.: Mon Dec 30 17:32:01 1996 PST - @ 34 years --> Sun Dec 30 16:32:01 1962 PST\n\nHow do we go about resolving this ? I hesitate to mark a bogus result \n\"ok\".\n\nAndreas\n", "msg_date": "Tue, 9 Jan 2001 17:44:04 +0100 ", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "> What I do not understand is, that I thought a time in december cannot be\n> affected by such math because it is clearly not in the daylight savings\n> months of the year ? Also I thought that you recognize daylight savings time\n> by the PDT instead of PST, and PostgreSQL shows a result with PST as I\n> would have expected, but one hour off.\n\nBy the time the math is actually done, the date is in GMT. So the issue\nis: how does one assign the time zone for the result? Or more properly,\nhow does one account for time zone shifts (e.g. Daylight time vs\nStandard time) when doing date/time arithmetic? The previous scheme\nrotated the date/time by the same amount as the original date input. The\ncurrent scheme uses your system's date/time support functions to deduce\nthe correct time zone and DST setting once the math is complete. In\nprinciple, this gives your system the opportunity to come up with the\ncorrect answer, where previously the answer was not what might be\nexpected for any platform.\n\n> e.g.: Mon Dec 30 17:32:01 1996 PST - @ 34 years --> Sun Dec 30 16:32:01 1962 PST\n> How do we go about resolving this ? I hesitate to mark a bogus result\n> \"ok\".\n\nThe result must be what the AIX developers want ;)\n\nI've made some assumptions in this conversation:\n\n1) Some platforms, Linux included, give \"correct results\". I think I\nchecked this thoroughly, but, well, you know how that goes sometimes...\n\n2) You are diff'ing the current \"expected\" against current \"results\",\nand not a previous version of \"expected\".\n\n3) Some platforms do not do the right thing wrt time zones for dates\nbefore 1970. For example, the USA had some weird time zones during WWII,\nand this is reflected in Sun's time zone database but not quite as\naccurately in the open source zinc package that Linux and others use.\nAnd other platforms (such as AIX?) prefer to do it themselves and get it\nwrong altogether.\n\n - Thomas\n", "msg_date": "Tue, 09 Jan 2001 17:05:34 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "On Tue, Jan 09, 2001 at 05:05:34PM +0000, Thomas Lockhart wrote:\n> > What I do not understand is, that I thought a time in december cannot be\n> > affected by such math because it is clearly not in the daylight savings\n> > months of the year ? Also I thought that you recognize daylight savings\n> > time by the PDT instead of PST, and PostgreSQL shows a result with PST \n> > as I would have expected, but one hour off.\n> \n> By the time the math is actually done, the date is in GMT. So the issue\n> is: how does one assign the time zone for the result? \n> ...\n> 3) Some platforms do not do the right thing wrt time zones for dates\n> before 1970. For example, the USA had some weird time zones during WWII,\n> and this is reflected in Sun's time zone database but not quite as\n> accurately in the open source zinc package that Linux and others use.\n> And other platforms (such as AIX?) prefer to do it themselves and get it\n> wrong altogether.\n\nIndeed, Unix time_t is not required to represent any time before 1970,\nso it may be that on AIX the time zone computation is treating it as \na very large unsigned (therefore positive) value, coming up with a time \nin the summer of (perhaps) 2098, and adjusting the time accordingly;\nthen feeding the time to a different conversion that treats negative \ntime_t values as really negative. \n\nOf course, it is a grievous error to use Unix time_t to represent\nreal-world dates (e.g. birthdates). Didn't Y2K teach us anything?\nISTM the correct response is to remove test cases from the regression\nsuite that refer to times before 1970 and after 2038, if they involve\na time_t representation. \n\nNathan Myers\[email protected]\n", "msg_date": "Tue, 9 Jan 2001 16:30:58 -0800", "msg_from": "[email protected] (Nathan Myers)", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" } ]
[ { "msg_contents": "> > Is it true that elog(FATAL) doesn't clean up shmem etc?\n> > This would be very bad...\n> \n> It tries, but I don't think it's possible to make a complete guarantee\n> without an unreasonable amount of overhead. The case at hand was a\n> stuck spinlock because die() --> elog(FATAL) had neglected to release\n> that particular spinlock before exiting. To guarantee that all\n> spinlocks will be released by die(), we'd need something like\n> \n> \tSTART_CRIT_SECTION;\n> \tS_LOCK(spinlock);\n> \trecord that we own spinlock;\n> \tEND_CRIT_SECTION;\n> \n> around every existing S_LOCK() call, and the reverse around every\n> S_UNLOCK. Are you willing to pay that kind of overhead? I'm not\n\nSTART_/END_CRIT_SECTION is mostly CritSectionCount++/--.\nRecording could be made as LockedSpinLocks[LockedSpinCounter++] = &spinlock\nin pre-allocated array.\n\nAnother way of implementing Transaction Abort + Exit could be some flag\nin shmem setted by postmaster + QueryCancel..?\n\n> sure this'd be enough anyway. Guaranteeing that you have consistent\n> state at every instant that an ISR could interrupt you is not easy.\n\nAgreed, but we have to forget old happy days when it was so easy to\nshutdown DB. If we aren't able to release spins (eg excl buffer lock)\non Abort+Exit then instead of fast shutdown by pg_ctl -m fast stop\nppl can get checkpointer stuck attempting shlock that buffer.\n(BTW, it's bad that pg_ctl doesn't wait on shutdown by default).\n\nVadim\n", "msg_date": "Tue, 9 Jan 2001 10:11:31 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Quite strange crash " }, { "msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n> START_/END_CRIT_SECTION is mostly CritSectionCount++/--.\n> Recording could be made as LockedSpinLocks[LockedSpinCounter++] = &spinlock\n> in pre-allocated array.\n\nYeah, I suppose. We already do record locking of all the fixed\nspinlocks (BufMgrLock etc), it's just the per-buffer spinlocks that\nare missing from that (and CRIT_SECTION calls). Would it be reasonable\nto assume that only one buffer spinlock could be held at a time?\n\n> (BTW, it's bad that pg_ctl doesn't wait on shutdown by default).\n\nI agree. Anyone object to changing pg_ctl to do -w by default?\nWhat should we call the switch to tell it to not wait? -n?\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 13:28:14 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " } ]
[ { "msg_contents": "> > START_/END_CRIT_SECTION is mostly CritSectionCount++/--.\n> > Recording could be made as \n> > LockedSpinLocks[LockedSpinCounter++] = &spinlock\n> > in pre-allocated array.\n> \n> Yeah, I suppose. We already do record locking of all the fixed\n> spinlocks (BufMgrLock etc), it's just the per-buffer spinlocks that\n> are missing from that (and CRIT_SECTION calls). Would it be \n> reasonable to assume that only one buffer spinlock could be held\n> at a time?\n\nNo. UPDATE holds two spins, btree split even more.\nBut stop - afair bufmgr remembers locked buffers, probably\nwe could just add XXX_CRIT_SECTION to LockBuffer..?\n\nVadim\n", "msg_date": "Tue, 9 Jan 2001 10:50:40 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Quite strange crash " }, { "msg_contents": "\"Mikheev, Vadim\" <[email protected]> writes:\n>> Yeah, I suppose. We already do record locking of all the fixed\n>> spinlocks (BufMgrLock etc), it's just the per-buffer spinlocks that\n>> are missing from that (and CRIT_SECTION calls). Would it be \n>> reasonable to assume that only one buffer spinlock could be held\n>> at a time?\n\n> No. UPDATE holds two spins, btree split even more.\n> But stop - afair bufmgr remembers locked buffers, probably\n> we could just add XXX_CRIT_SECTION to LockBuffer..?\n\nRight. A buffer lock isn't a spinlock, ie, we don't hold the spinlock\nexcept within LockBuffer. So a quick CRIT_SECTION should deal with\nthat. Actually, with careful placement of CRIT_SECTION calls in\nLockBuffer, there's no need to record holding the buffer's cntxt\nspinlock at all, I think. Will work on it.\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 14:22:32 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Quite strange crash " } ]
[ { "msg_contents": "I'm working with PHP and Postgres, and if I try to do an EXPLAIN query, with \nPHP, to the postgres backend the output goes to the error_log file of apache \nand I don't know how to redirect that output to the browser.\nDoes anyone know how I can do this?\n\nSaludos... ;-)\n\n-- \nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n", "msg_date": "Tue, 9 Jan 2001 16:05:33 -0300", "msg_from": "\"Martin A. Marques\" <[email protected]>", "msg_from_op": true, "msg_subject": "How to print explain using PHP" }, { "msg_contents": "\nOn Tue, 9 Jan 2001, Martin A. Marques wrote:\n\n> I'm working with PHP and Postgres, and if I try to do an EXPLAIN query, with \n> PHP, to the postgres backend the output goes to the error_log file of apache \n> and I don't know how to redirect that output to the browser.\n\n\n Good point, before some time somebody (Bruce?) ask if anything is\nneedful add to PostgreSQL extension in PHP. You found that...\n\nPHP not support libpq's routine: \n\nPQnoticeProcessor\nPQsetNoticeProcessor(\tPGconn *conn, \n\t\t\tPQnoticeProcessor proc, \n\t\t\tvoid *arg);\n\n\n\n\tKarel\n\n", "msg_date": "Tue, 9 Jan 2001 20:30:43 +0100 (CET)", "msg_from": "Karel Zak <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] How to print explain using PHP" }, { "msg_contents": "El Mar 09 Ene 2001 16:30, Karel Zak escribi�:\n> On Tue, 9 Jan 2001, Martin A. Marques wrote:\n> > I'm working with PHP and Postgres, and if I try to do an EXPLAIN query,\n> > with PHP, to the postgres backend the output goes to the error_log file\n> > of apache and I don't know how to redirect that output to the browser.\n>\n> Good point, before some time somebody (Bruce?) ask if anything is\n> needful add to PostgreSQL extension in PHP. You found that...\n>\n> PHP not support libpq's routine:\n>\n> PQnoticeProcessor\n> PQsetNoticeProcessor(\tPGconn *conn,\n> \t\t\tPQnoticeProcessor proc,\n> \t\t\tvoid *arg);\n\nI think it would be of great help for web programers that use postgres. Any \nway, I'm doing some messy things to get what I want, but it is a very \nneedfull extension.\n\nSaludos... :-)\n\n-- \nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n", "msg_date": "Tue, 9 Jan 2001 16:38:12 -0300", "msg_from": "\"Martin A. Marques\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: How to print explain using PHP" }, { "msg_contents": "I think the issue here was that these functions don't make any sense for\nPHP because you can't register C functions.\n\n\n> \n> On Tue, 9 Jan 2001, Martin A. Marques wrote:\n> \n> > I'm working with PHP and Postgres, and if I try to do an EXPLAIN query, with \n> > PHP, to the postgres backend the output goes to the error_log file of apache \n> > and I don't know how to redirect that output to the browser.\n> \n> \n> Good point, before some time somebody (Bruce?) ask if anything is\n> needful add to PostgreSQL extension in PHP. You found that...\n> \n> PHP not support libpq's routine: \n> \n> PQnoticeProcessor\n> PQsetNoticeProcessor(\tPGconn *conn, \n> \t\t\tPQnoticeProcessor proc, \n> \t\t\tvoid *arg);\n> \n> \n> \n> \tKarel\n> \n> \n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 14:43:17 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] How to print explain using PHP" }, { "msg_contents": "\nOn Tue, 9 Jan 2001, Bruce Momjian wrote:\n\n> I think the issue here was that these functions don't make any sense for\n> PHP because you can't register C functions.\n\nI mean (I know) that you can register some common (internal) PHP \nfunction and this function can call your PHP function. It is some used in \nXML Expat parser that use element handlers (functions). \n\nIt's very good resolvable in PHP... see php-4.0b3/ext/xml/xml.c as example\n\n\t\t\tKarel\n\n> \n> \n> > \n> > On Tue, 9 Jan 2001, Martin A. Marques wrote:\n> > \n> > > I'm working with PHP and Postgres, and if I try to do an EXPLAIN query, with \n> > > PHP, to the postgres backend the output goes to the error_log file of apache \n> > > and I don't know how to redirect that output to the browser.\n> > \n> > \n> > Good point, before some time somebody (Bruce?) ask if anything is\n> > needful add to PostgreSQL extension in PHP. You found that...\n> > \n> > PHP not support libpq's routine: \n> > \n> > PQnoticeProcessor\n> > PQsetNoticeProcessor(\tPGconn *conn, \n> > \t\t\tPQnoticeProcessor proc, \n> > \t\t\tvoid *arg);\n> > \n> > \n> > \n> > \tKarel\n> > \n> > \n> \n> \n> -- \n> Bruce Momjian | http://candle.pha.pa.us\n> [email protected] | (610) 853-3000\n> + If your life is a hard drive, | 830 Blythe Avenue\n> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n> \n\n", "msg_date": "Tue, 9 Jan 2001 20:52:16 +0100 (CET)", "msg_from": "Karel Zak <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] How to print explain using PHP" }, { "msg_contents": "> \n> On Tue, 9 Jan 2001, Bruce Momjian wrote:\n> \n> > I think the issue here was that these functions don't make any sense for\n> > PHP because you can't register C functions.\n> \n> I mean (I know) that you can register some common (internal) PHP \n> function and this function can call your PHP function. It is some used in \n> XML Expat parser that use element handlers (functions). \n> \n> It's very good resolvable in PHP... see php-4.0b3/ext/xml/xml.c as example\n\nOK, this is why I never added it to the TODO list. Should we add this\nto our TODO list?\n\n\n\n-- \n Bruce Momjian | http://candle.pha.pa.us\n [email protected] | (610) 853-3000\n + If your life is a hard drive, | 830 Blythe Avenue\n + Christ can be your backup. | Drexel Hill, Pennsylvania 19026\n", "msg_date": "Tue, 9 Jan 2001 14:53:21 -0500 (EST)", "msg_from": "Bruce Momjian <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] How to print explain using PHP" }, { "msg_contents": "\nOn Tue, 9 Jan 2001, Bruce Momjian wrote:\n\n> > \n> > On Tue, 9 Jan 2001, Bruce Momjian wrote:\n> > \n> > > I think the issue here was that these functions don't make any sense for\n> > > PHP because you can't register C functions.\n> > \n> > I mean (I know) that you can register some common (internal) PHP \n> > function and this function can call your PHP function. It is some used in \n> > XML Expat parser that use element handlers (functions). \n> > \n> > It's very good resolvable in PHP... see php-4.0b3/ext/xml/xml.c as example\n> \n> OK, this is why I never added it to the TODO list. Should we add this\n> to our TODO list?\n> \n\n Quick look to PHP:-)\n\nlibphp/zend_execute_API.c: call_user_function() \n\n\n\t\t\tKarel\n\n", "msg_date": "Tue, 9 Jan 2001 21:00:41 +0100 (CET)", "msg_from": "Karel Zak <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] How to print explain using PHP" }, { "msg_contents": "> > On Tue, 9 Jan 2001, Bruce Momjian wrote:\n> > \n> > > I think the issue here was that these functions don't make any sense for\n> > > PHP because you can't register C functions.\n> > \n> > I mean (I know) that you can register some common (internal) PHP \n> > function and this function can call your PHP function. It is some used in \n> > XML Expat parser that use element handlers (functions). \n> > \n> > It's very good resolvable in PHP... see php-4.0b3/ext/xml/xml.c as example\n\nIMHO it would be confusing for PHP users. What about changing the PHP\nfunction php_pgsql_do_connect so that it calls PQsetNoticeProcessor to\npreserve the last NOTIFY string somewhere. And we would invent new PHP\nfunction pg_notifymessage (or whatever) to extract the string later on.\n\n> OK, this is why I never added it to the TODO list. Should we add this\n> to our TODO list?\n\nI don't think so, if the TODO should only include things to do with\nthe PostgreSQL source code.\n--\nTatsuo Ishii\n", "msg_date": "Wed, 10 Jan 2001 10:58:59 +0900", "msg_from": "Tatsuo Ishii <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: [HACKERS] How to print explain using PHP" } ]
[ { "msg_contents": "> Yup. I had just come to the realization that we'd be best \n> off to treat the *entire* period from SpinAcquire to SpinRelease\n> as a critical section for the purposes of die(). That is, response\n> to SIGTERM will be held off until we have released the spinlock.\n> Most of the places where we grab spinlocks would have to make such\n> a critical section anyway, at least for large parts of the time that\n> they are holding the spinlock, because they are manipulating shared\n> data structures and the instantaneous intermediate states aren't always\n> self-consistent. So we might as well follow the KISS principle and\n> just do START_CRIT_SECTION in SpinAcquire and END_CRIT_SECTION in\n> SpinRelease.\n> \n> Vadim, any objection?\n\nNo one for the moment. If we'll just add XXX_CRIT_SECTION\nto SpinXXX funcs without changing anything else then it will be easy\nto remove them later (in the event we'll find any problems with this),\nso - do it.\n\nVadim\n", "msg_date": "Tue, 9 Jan 2001 13:39:40 -0800 ", "msg_from": "\"Mikheev, Vadim\" <[email protected]>", "msg_from_op": true, "msg_subject": "RE: Quite strange crash " } ]
[ { "msg_contents": "Here is current cvs:\n\nSELECT 2 BETWEEN 1 AND 3;\n ?column?\n----------\n t\n(1 row)\n \nsubselects=# SELECT 2 BETWEEN 3 AND 1;\n ?column?\n----------\n f\n(1 row) \n\n\nAny chance of BETWEEN [SYMMETRIC | ASYMMETRIC] being implemented?\n\nSELECT 2 BETWEEN SYMMETRIC 3 AND 1;\n ?column?\n----------\n t\n(1 row) \n\nASYMMETRIC is the default and what is currently the case. This would \nprobably be easy TODO.\n \n-- \n-------- Robert B. Easter [email protected] ---------\n-- CompTechNews Message Board http://www.comptechnews.com/ --\n-- CompTechServ Tech Services http://www.comptechserv.com/ --\n---------- http://www.comptechnews.com/~reaster/ ------------\n", "msg_date": "Tue, 9 Jan 2001 18:06:38 -0500", "msg_from": "\"Robert B. Easter\" <[email protected]>", "msg_from_op": true, "msg_subject": "BETWEEN [SYMMETRIC | ASYMMETRIC]" }, { "msg_contents": "\"Robert B. Easter\" <[email protected]> writes:\n> subselects=# SELECT 2 BETWEEN 3 AND 1;\n> ?column?\n> ----------\n> f\n> (1 row) \n\nSQL92 quoth:\n\n 6) \"X BETWEEN Y AND Z\" is equivalent to \"X>=Y AND X<=Z\".\n\nso this is correct behavior, even if it might seem surprising.\n\n> Any chance of BETWEEN [SYMMETRIC | ASYMMETRIC] being implemented?\n\n> SELECT 2 BETWEEN SYMMETRIC 3 AND 1;\n> ?column?\n> ----------\n> t\n> (1 row) \n\nBuild a function based on this idea:\n\nregression-# select case\nregression-# when 3 < 1 then 2 between 3 and 1\nregression-# else 2 between 1 and 3\nregression-# end;\n case\n------\n t\n(1 row)\n\nI don't really see this as important enough to justify introducing a\nnonstandard syntax for it...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 18:58:15 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: BETWEEN [SYMMETRIC | ASYMMETRIC] " }, { "msg_contents": ">\n> I don't really see this as important enough to justify introducing a\n> nonstandard syntax for it...\n>\n> \t\t\tregards, tom lane\n\nSorry to quote like this, it makes me feel like a real nerd. :)\n\nThis quote from the SQL standard (1999) has it:\n\n\n 8.3 <between predicate>\n \n Function\n \n Specify a range comparison.\n \n Format\n \n <between predicate> ::=\n <row value expression> [ NOT ] BETWEEN\n [ ASYMMETRIC | SYMMETRIC ]\n <row value expression> AND <row value expression>\n \n \n Syntax Rules\n \n 1) If neither SYMMETRIC nor ASYMMETRIC is specified, then\n ASYMMETRIC is implicit.\n \n 2) Let X, Y, and Z be the first, second, and third <row value\n expression>s, respectively.\n \n 3) \"X NOT BETWEEN SYMMETRIC Y AND Z\" is equivalent to \"NOT ( X\n BETWEEN SYMMETRIC Y AND Z )\".\n \n 4) \"X BETWEEN SYMMETRIC Y AND Z\" is equivalent to \"((X BETWEEN\n ASYMMETRIC Y AND Z) OR (X BETWEEN ASYMMETRIC Z AND Y))\".\n \n 5) \"X NOT BETWEEN ASYMMETRIC Y AND Z\" is equivalent to \"NOT ( X\n BETWEEN ASYMMETRIC Y AND Z )\".\n \n 6) \"X BETWEEN ASYMMETRIC Y AND Z\" is equivalent to \"X>=Y AND X<=Z\".\n \n Access Rules\n \n None.\n \n General Rules\n \n None.\n \n Conformance Rules\n \n 1) Without Feature T461, \"Symmetric <between predicate>\",\n conforming SQL language shall not specify SYMMETRIC or\n ASYMMETRIC.\n \n 2) Without Feature S024, \"Enhanced structured types\", no subfield\n of the declared type of a <row value expression> that is simply\n contained in a <between predicate> shall be of a structured\n type. \n\n-- \n-------- Robert B. Easter [email protected] ---------\n-- CompTechNews Message Board http://www.comptechnews.com/ --\n-- CompTechServ Tech Services http://www.comptechserv.com/ --\n---------- http://www.comptechnews.com/~reaster/ ------------\n", "msg_date": "Tue, 9 Jan 2001 19:35:09 -0500", "msg_from": "\"Robert B. Easter\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: BETWEEN [SYMMETRIC | ASYMMETRIC]" }, { "msg_contents": "\"Robert B. Easter\" <[email protected]> writes:\n> This quote from the SQL standard (1999) has it:\n\nOh, I didn't realize SQL99 had added it. Creeping featurism strikes\nagain ;-). Well, I suppose it'll get added to PG whenever someone\nfeels like implementing it, then ...\n\n\t\t\tregards, tom lane\n", "msg_date": "Tue, 09 Jan 2001 19:45:01 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: BETWEEN [SYMMETRIC | ASYMMETRIC] " }, { "msg_contents": "At 1/9/2001 10:29 PM, Tom Lane wrote:\n>Thomas Swan <[email protected]> writes:\n> > Shouldn't be much of problem... where would I start to look... :)\n>\n>Well, the Right Way To Do It would be to invent a new expression node\n>type that implements both kinds of BETWEEN. Right now, the parser\n>expands A BETWEEN B AND C into \"A >= B AND A <= C\", which is perfectly\n>correct according to the letter of the spec, but it implies evaluating\n>the subexpression A twice, which sucks. Besides which, this doesn't\n\nActually if it were possible to look at the values before expanding. You \ncould reorder the expression so that it was always the case that B < C, \nthen your cost would only be one comparison plus the sequential scan.\n\n\n>readily generalize to the SYMMETRIC case. I'd make a new expr node\n>type with three subexpressions and a SYMMETRIC bool flag. If you chase\n>down all the places where CaseExpr nodes are processed, and add a\n>BetweenExpr case in parallel, you'll have it made.\n>\n> regards, tom lane\n\n", "msg_date": "Wed, 10 Jan 2001 10:10:51 -0600", "msg_from": "Thomas Swan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: BETWEEN [SYMMETRIC | ASYMMETRIC] " }, { "msg_contents": "Thomas Swan <[email protected]> writes:\n> Actually if it were possible to look at the values before expanding. You \n> could reorder the expression so that it was always the case that B < C, \n> then your cost would only be one comparison plus the sequential scan.\n\nUh ... what if B and C are not constants?\n\n\t\t\tregards, tom lane\n", "msg_date": "Wed, 10 Jan 2001 22:10:58 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: BETWEEN [SYMMETRIC | ASYMMETRIC] " }, { "msg_contents": "At 1/10/2001 09:10 PM, you wrote:\n>Thomas Swan <[email protected]> writes:\n> > Actually if it were possible to look at the values before expanding. You\n> > could reorder the expression so that it was always the case that B < C,\n> > then your cost would only be one comparison plus the sequential scan.\n>\n>Uh ... what if B and C are not constants?\n\nHmmm... I see your point. I was looking back through the sources and was \nthinking.\n\nI'd hate doing the work twice.\n\nIs there something in place to reorder or sort or compare results?\nPossibly expanding to something like a <= max(b,c) and a >= min(b,c)\n\n\n\n", "msg_date": "Thu, 11 Jan 2001 09:06:44 -0600", "msg_from": "Thomas Swan <[email protected]>", "msg_from_op": false, "msg_subject": "Re: Re: BETWEEN [SYMMETRIC | ASYMMETRIC] " } ]
[ { "msg_contents": "Anyone read the [NOT] SIMILAR TO syntax for regular expressions? Looks like \nit might be close to an SQL standard synonym for [!]~. I don't know if it \ncan match the case insensitive ops though.\n\n-- \n-------- Robert B. Easter [email protected] ---------\n-- CompTechNews Message Board http://www.comptechnews.com/ --\n-- CompTechServ Tech Services http://www.comptechserv.com/ --\n---------- http://www.comptechnews.com/~reaster/ ------------\n", "msg_date": "Tue, 9 Jan 2001 18:58:22 -0500", "msg_from": "\"Robert B. Easter\" <[email protected]>", "msg_from_op": true, "msg_subject": "SIMILAR TO for regular expressions" } ]
[ { "msg_contents": "\n> The time zone is now evaluated in the time zone of the result, rather\n> than the input, using system support routines from libc. \n\nOk, I have the answer.\n\nOn AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone \ninfo for that particular year and returns -1.\n>From man page:\n\tThe mktime subroutine returns the specified time in seconds encoded as a value of\n\ttype time_t. If the time cannot be represented, the function returns the value\n\t(time_t)-1.\n\nThe following code then makes savings time out of the -1.\n tz = (tm->tm_isdst ? (timezone - 3600) : timezone);\n\nWhat now ?\n\nAndreas\n", "msg_date": "Wed, 10 Jan 2001 11:28:45 +0100", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "> On AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone\n> info for that particular year and returns -1.\n> The following code then makes savings time out of the -1.\n> tz = (tm->tm_isdst ? (timezone - 3600) : timezone);\n\nHmm. That description is consistant with what I see in the Linux man\npage. So I should check for (tm->tm_isdst > 0) rather than checking for\nnon-zero?\n\nWould you like to test that on your machine? I'll try it here, and if\nsuccessful will consider this a bug report and a necessary fix for 7.1.\n\nIt is interesting that this is the only place in all of our code which\ntickles this bug; afaik this line of code appears in other places too.\nCan you find a case where the current code fails when you are not doing\narithmetic? Perhaps there are some more tests we could include in the\nregression tests??\n\nIt is also interesting that afaik AIX is the only machine exhibiting\nthis problem. The before-1970 range of dates is known to occur in some\nuse cases, and having *something* in the timezone database isn't that\ndifficult :/\n\n - Thomas\n", "msg_date": "Wed, 10 Jan 2001 14:43:16 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "Thomas Lockhart writes:\n > > On AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone\n > > info for that particular year and returns -1.\n > > The following code then makes savings time out of the -1.\n > > tz = (tm->tm_isdst ? (timezone - 3600) : timezone);\n > \n > Hmm. That description is consistant with what I see in the Linux\n > man page. So I should check for (tm->tm_isdst > 0) rather than\n > checking for non-zero?\n > \n > Would you like to test that on your machine? I'll try it here, and\n > if successful will consider this a bug report and a necessary fix\n > for 7.1.\n\nI have machines running AIX 4.1.5, 4.2.1, and 4.3.3 if you would like\nto send me your test programs.\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.\n", "msg_date": "Wed, 10 Jan 2001 15:45:38 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "> I have machines running AIX 4.1.5, 4.2.1, and 4.3.3 if you would like\n> to send me your test programs.\n\nI haven't yet actually fixed the code, but will post patches when I've\ndone so (assuming that a fix is possible).\n\n - Thomas\n", "msg_date": "Thu, 11 Jan 2001 16:52:03 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "Thomas Lockhart writes:\n > I haven't yet actually fixed the code, but will post patches when\n > I've done so (assuming that a fix is possible).\n\nThe normalization in this example program which subtracts 34 years\nseems to work OK. I've run it on AIX, IRIX, Linux and Solaris. Some\nexamples follow.\n\nAIX:\n$ TZ=PST8PDT ago34 851995921\nLocal Mon Dec 30 17:32:01 1996 PST PST\n 1996-12-30T17:32:01, wday=1, yday=364, isdst = 0\n UTC Tue Dec 31 01:32:01 1996 PST PST\n 1996-12-31T01:32:01, wday=2, yday=365, isdst = 0\nLocal Sun Dec 30 17:32:01 1962 PST PST\n 1962-12-30T17:32:01, wday=0, yday=363, isdst = 0\n UTC Mon Dec 31 01:32:01 1962 PST PST\n 1962-12-31T01:32:01, wday=1, yday=364, isdst = 0\n\nLinux:\n$ TZ=America/Los_Angeles ago34 426475921\nLocal Thu Jul 07 18:32:01 1983 PDT -0700\n 1983-07-07T18:32:01, wday=4, yday=187, isdst = 1\n UTC Fri Jul 08 01:32:01 1983 GMT +0000\n 1983-07-08T01:32:01, wday=5, yday=188, isdst = 0\nLocal Thu Jul 07 18:32:01 1949 PST -0800\n 1949-07-07T18:32:01, wday=4, yday=187, isdst = 0\n UTC Fri Jul 08 02:32:01 1949 GMT +0000\n 1949-07-08T02:32:01, wday=5, yday=188, isdst = 0\n\nHere is the program. The call to localtime(&t_ago) is redundant and\nhence the adjustment of t_ago can be skipped. It is in this program\nas a sanity check.\n\nAs it stands, this program assumes that the input and resulting date\nare in the usual UNIX range of [1901, 2038]. I presume that there is\ncode in place that checks the range of dates.\n\n\n\n\n\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.", "msg_date": "Fri, 12 Jan 2001 09:03:40 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "> Here is the program. The call to localtime(&t_ago) is redundant and\n> hence the adjustment of t_ago can be skipped. It is in this program\n> as a sanity check.\n> As it stands, this program assumes that the input and resulting date\n> are in the usual UNIX range of [1901, 2038]. I presume that there is\n> code in place that checks the range of dates.\n\nInteresting idea. I'm not sure that assuming that timezones from 1943\nare the same as timezones from 2013 (they are not, at least in the US)\nis any more valid than just accepting the result from your system. I'd\nlike to explore more possibilities before we settle on a solution.\n\nPerhaps I should just add checks to assume an unspecified time zone wrt\noutput formatting if the tm_isdst flag comes back as \"-1\"?\n\nI'll have to look at the ramifications for input times and for\ndump/restore operations. Does you system respect the TZ or PGTZ\nenvironment variable?\n\n - Thomas\n", "msg_date": "Fri, 12 Jan 2001 14:54:57 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "Thomas Lockhart writes:\n > > Here is the program. The call to localtime(&t_ago) is redundant\n > > and hence the adjustment of t_ago can be skipped. It is in this\n > > program as a sanity check.\n > > As it stands, this program assumes that the input and resulting\n > > date are in the usual UNIX range of [1901, 2038]. I presume that\n > > there is code in place that checks the range of dates.\n > \n > Interesting idea. I'm not sure that assuming that timezones from\n > 1943 are the same as timezones from 2013 (they are not, at least in\n > the US) is any more valid than just accepting the result from your\n > system. I'd like to explore more possibilities before we settle on\n > a solution.\n\nAs far as AIX and IRIX are concerned the timezones _are_ the same. No\nvariation of rules from year to year is possible. You are not going\nto work out DST rules for earlier years without incorporating third\nparty libraries. As I understand it PostgreSQL undertakes to\ncalculate dates only as accurately as the underlying OS allows.\n\nThe result of mktime for year < 1970 is always -1 and the struct tm is\nnot normalized; tm_isdst, tm_wday and tm_yday are not calculated. I\ncan't see that being a useful result.\n\n > Perhaps I should just add checks to assume an unspecified time zone\n > wrt output formatting if the tm_isdst flag comes back as \"-1\"?\n\nI'm letting the system functions worry about applying time zone and\nDST offsets. At no point do I use tm_isdst, except to set it to and\ntest it for -1.\n\nThinking about that a bit more, I think that tm_isdst should not be\nwritten into. It would be better to set, say, tm_wday to -1 and\nchange the test for failure to (t_ago == -1 && local.tm_wday == -1).\ntm_isdst should be left as 0 or 1 to help out around the times of\ntransition to or from DST.\n\n > I'll have to look at the ramifications for input times and for\n > dump/restore operations. Does you system respect the TZ or PGTZ\n > environment variable?\n\nMy code uses localtime and mktime which depend on TZ. There is no\ndependency on PGTZ, unless somewhere else in postgres there is an\nequivalent of setenv(TZ=getenv(PGTZ)).\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.\n", "msg_date": "Fri, 12 Jan 2001 15:37:46 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "Pete Forman <[email protected]> writes:\n> Thinking about that a bit more, I think that tm_isdst should not be\n> written into.\n\nIIRC, setting isdst to -1 was necessary to get the right behavior across\nDST boundaries on more-mainstream systems. I do not think it's\nacceptable to do worse on systems with good time libraries in order to\nimprove behavior on fundamentally broken ones.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 12 Jan 2001 10:48:09 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX " }, { "msg_contents": "> As far as AIX and IRIX are concerned the timezones _are_ the same. No\n> variation of rules from year to year is possible. You are not going\n> to work out DST rules for earlier years without incorporating third\n> party libraries. As I understand it PostgreSQL undertakes to\n> calculate dates only as accurately as the underlying OS allows.\n\nYes. Hence my reluctance to have code which does time-shifting to get\ntime zones for all platforms. Perhaps it could/should be a configure\ntest? And then we can have a \"HAVE_SIMPLISTIC_TZ\" (or whatever) #define\nin the code to enable hacks around the problem? \n\nThe concern led to my suggestion that we should omit timezone fields\nfrom output -- basically do the equivalent of pre-1901 handling using\nGMT -- if DST is not resolved correctly (but I'm still not sure if this\nwill pan out).\n\n> > I'll have to look at the ramifications for input times and for\n> > dump/restore operations. Does you system respect the TZ or PGTZ\n> > environment variable?\n> My code uses localtime and mktime which depend on TZ. There is no\n> dependency on PGTZ, unless somewhere else in postgres there is an\n> equivalent of setenv(TZ=getenv(PGTZ)).\n\nYes there is.\n\n - Thomas\n", "msg_date": "Fri, 12 Jan 2001 15:54:43 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "Tom Lane writes:\n > Pete Forman <[email protected]> writes:\n > > Thinking about that a bit more, I think that tm_isdst should not\n > > be written into.\n > \n > IIRC, setting isdst to -1 was necessary to get the right behavior\n > across DST boundaries on more-mainstream systems. I do not think\n > it's acceptable to do worse on systems with good time libraries in\n > order to improve behavior on fundamentally broken ones.\n\nA footnote in the C89 (and C99) standard says:\n\n Thus, a positive or zero value for tm_isdst causes the\n mktime function to presume initially that Daylight Saving\n Time, respectively, is or is not in effect for the\n specified time. A negative value causes it to attempt to\n determine whether Daylight Saving Time is in effect for\n the specified time.\n\nSo tm_isdst being input as 0 or 1 is not forcing the choice of what it\nwill be on output. It can be important at the end of DST when local\ntimes repeat and the only way to distinguish them is the setting of\nthis flag.\n\nThat is borne out by my observations.\n\nSetting tm_isdst to -1 before calling mktime can make a difference to\nthe result when the input and result have different DST flags.\n\nIt is fairly arbitrary what the answer to this question is: if six\nmonths is subtracted from a to give b, should a.local.hour =\nb.local.hour or should a.utc.hour = b.utc.hour? If you want the\nformer then set tm_isdst = -1 before calling mktime. I'm out of time\nnow but I'll try and look for some guidance in the SQL standards.\n-- \nPete Forman -./\\.- Disclaimer: This post is originated\nWesternGeco -./\\.- by myself and does not represent\[email protected] -./\\.- opinion of Schlumberger, Baker\nhttp://www.crosswinds.net/~petef -./\\.- Hughes or their divisions.\n", "msg_date": "Fri, 12 Jan 2001 16:14:04 +0000", "msg_from": "Pete Forman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX " }, { "msg_contents": "Pete Forman <[email protected]> writes:\n> It is fairly arbitrary what the answer to this question is: if six\n> months is subtracted from a to give b, should a.local.hour =\n> b.local.hour or should a.utc.hour = b.utc.hour? If you want the\n> former then set tm_isdst = -1 before calling mktime.\n\nIt's not arbitrary: we want the former. Anything else generates\nbug reports from people who expect \"9/1/2000 - six months\" to\nproduce \"3/1/2000\", not sometime late in the evening of 2/29/2000.\n\n\t\t\tregards, tom lane\n", "msg_date": "Fri, 12 Jan 2001 12:34:51 -0500", "msg_from": "Tom Lane <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: Re: tinterval - operator problems on AIX " } ]
[ { "msg_contents": "\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: [email protected], http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83\n\n", "msg_date": "Wed, 10 Jan 2001 17:16:35 +0300 (GMT)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "None" } ]
[ { "msg_contents": "Hi,\n\nI attached archive with contrib-intarray. Please submit it into\n7.1 beta source tree.\n\nHere is README\n--------------------------------------------------------------\nThis is an implementation of RD-tree data structure using GiST interface\nof PostgreSQL. It has built-in lossy compression - must be declared\nin index creation - with (islossy). Current implementation has index support\nfor one-dimensional array of int4's.\nAll works was done by Teodor Sigaev ([email protected]) and Oleg Bartunov\n([email protected]).\n\nINSTALLATION:\n\n gmake\n gmake install\n -- load functions\n psql <database> < _int.sql\n\nEXAMPLE USAGE:\n\n create table message (mid int not null,sections int[]);\n create table message_section_map (mid int not null,sid int not null);\n\n -- create indices\nCREATE unique index message_key on message ( mid );\nCREATE unique index message_section_map_key2 on message_section_map (sid, mid );\nCREATE INDEX message_rdtree_idx on message using gist ( sections ) with ( islossy);\n\n -- select some messages with section in 1 OR 2 - OVERLAP operator\n select message.mid from message where message.sections && '{1,2}';\n\n -- select messages contains in sections 1 AND 2 - CONTAINS operator\n select message.mid from message where message.sections @ '{1,2}';\n -- the same, CONTAINED operator\n select message.mid from message where '{1,2}' ~ message.sections;\n\nTEST:\n\n subdirectory test contains test suite.\n cd ./test\n 1. createdb TEST\n 2. psql TEST < ../_int.sql\n 3. ./create_test.pl | psql TEST\n 4. ./bench.pl - perl script to benchmark queries, supports OR, AND queries\n with/without RD-Tree. Run script without arguments to\n see availbale options.\n\n a)test without RD-Tree (OR)\n ./bench.pl -d TEST -s 1,2 -v\n b)test with RD-Tree\n ./bench.pl -d TEST -s 1,2 -v -r\n\nBENCHMARKS:\n\nSize of table <message>: 200000\nSize of table <message_section_map>: 268538\n\nDistribution of messages by sections:\n\nsection 0: 73899 messages\nsection 1: 16298 messages\nsection 50: 1241 messages\nsection 99: 705 messages\n\nold - without RD-Tree support,\nnew - with RD-Tree\n\n+----------+---------------+----------------+\n|Search set|OR, time in sec|AND, time in sec|\n| +-------+-------+--------+-------+\n| | old | new | old | new |\n+----------+-------+-------+--------+-------+\n| 1| 1.427| 0.215| -| -|\n+----------+-------+-------+--------+-------+\n| 99| 1.029| 0.018| -| -|\n+----------+-------+-------+--------+-------+\n| 1,2| 1.829| 0.334| 5.654| 0.042|\n+----------+-------+-------+--------+-------+\n| 1,2,50,60| 2.057| 0.359| 5.044| 0.007|\n+----------+-------+-------+--------+-------+\n\n\n\tRegards,\n\t\tOleg\n_____________________________________________________________\nOleg Bartunov, sci.researcher, hostmaster of AstroNet,\nSternberg Astronomical Institute, Moscow University (Russia)\nInternet: [email protected], http://www.sai.msu.su/~megera/\nphone: +007(095)939-16-83, +007(095)939-23-83", "msg_date": "Wed, 10 Jan 2001 17:20:50 +0300 (GMT)", "msg_from": "Oleg Bartunov <[email protected]>", "msg_from_op": true, "msg_subject": "RD-Tree, index support for int array (contrib-intarray)" } ]
[ { "msg_contents": "\n> > On AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone\n> > info for that particular year and returns -1.\n> > The following code then makes savings time out of the -1.\n> > tz = (tm->tm_isdst ? (timezone - 3600) : timezone);\n> \n> Hmm. That description is consistant with what I see in the Linux man\n> page. So I should check for (tm->tm_isdst > 0) rather than \n> checking for non-zero?\n\nIt is obviously not possible to determine tm_isdst with mktime for a \nnegative time_t. Thus with above fix PST works, but PDT is then busted :-(\nlocaltime does convert a negative time_t correctly including dst.\nIs there another way to determine tm_isdst ?\n\nAndreas\n", "msg_date": "Wed, 10 Jan 2001 18:26:55 +0100", "msg_from": "Zeugswetter Andreas SB <[email protected]>", "msg_from_op": true, "msg_subject": "AW: AW: Re: tinterval - operator problems on AIX" }, { "msg_contents": "> > > On AIX mktime(3) leaves tm_isdst at -1 if it does not have timezone\n> > > info for that particular year and returns -1.\n> > > The following code then makes savings time out of the -1.\n> > > tz = (tm->tm_isdst ? (timezone - 3600) : timezone);\n> > Hmm. That description is consistant with what I see in the Linux man\n> > page. So I should check for (tm->tm_isdst > 0) rather than\n> > checking for non-zero?\n> It is obviously not possible to determine tm_isdst with mktime for a\n> negative time_t. Thus with above fix PST works, but PDT is then busted :-(\n\nObvious to AIX only? My conclusion is that the AIX timezone database is\ndamaged or missing for pre-1970 dates, but that other systems bothered\nto get it at least somewhat right. Is there another issue here that I'm\nmissing?\n\n> localtime does convert a negative time_t correctly including dst.\n> Is there another way to determine tm_isdst ?\n\nYes. Replace AIX with Linux or something else, then recompile Postgres\n;)\n\nSeriously, not that I know of. The problem is that there is no API for\naccessing time zone info other than the localtime()/mktime() kinds of\ncalls, so we are stuck using that (or stuck repackaging something like\nzinc into Postgres directly, which afaik is not anything we would be\ninterested in doing).\n\n - Thomas\n", "msg_date": "Thu, 11 Jan 2001 03:15:59 +0000", "msg_from": "Thomas Lockhart <[email protected]>", "msg_from_op": false, "msg_subject": "Re: AW: AW: Re: tinterval - operator problems on AIX" } ]
[ { "msg_contents": "Hi, \n\nI just recompiled 7.1 beta from current CVS today.\n\nI pg_dump'ed my 7.02 db's and reloaded it on 7.1 with no probs apart that\npsql -l shows 2 template0 and template1...\n\nTemplate0 and template1 belong to user postgres and to an other who has no\npriviledges and no db!!!\n\nWhat makes me think it's a psql bug is that select * from pg_databases\nshow 1 template0 and 1 template1.\n\nFor what it's worth, it on unixware 711.\n\nBTW, when is the release due for? I'm VERY impatient. This is the best\nI've seen.\n\nRegards,,\n\n-- \nOlivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\nQuartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n31190 AUTERIVE +33-6-07-63-80-64 (GSM)\nFRANCE Email: [email protected]\n------------------------------------------------------------------------------\nMake your life a dream, make your dream a reality. (St Exupery)\n\n", "msg_date": "Wed, 10 Jan 2001 19:43:05 +0100 (MET)", "msg_from": "Olivier PRENANT <[email protected]>", "msg_from_op": true, "msg_subject": "psql -l bug" }, { "msg_contents": "On Wed, 10 Jan 2001, Olivier PRENANT wrote:\n\n> Hi, \n> \n> I just recompiled 7.1 beta from current CVS today.\n> \n> I pg_dump'ed my 7.02 db's and reloaded it on 7.1 with no probs apart that\n> psql -l shows 2 template0 and template1...\n> \n> Template0 and template1 belong to user postgres and to an other who has no\n> priviledges and no db!!!\n> \n> What makes me think it's a psql bug is that select * from pg_databases\n> show 1 template0 and 1 template1.\n> \n> For what it's worth, it on unixware 711.\n\nFor more info (don't think it's a bug) I see two templates db too.\n\n> BTW, when is the release due for? I'm VERY impatient. This is the best\n> I've seen.\n\nI'm looking forword to seeing the release of 7.1.\n\n\n\nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n\n", "msg_date": "Wed, 10 Jan 2001 15:51:35 -0300 (ART)", "msg_from": "\"Martin A. Marques\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: psql -l bug" }, { "msg_contents": "* Olivier PRENANT <[email protected]> [010110 12:47]:\n> Hi, \n> \n> I just recompiled 7.1 beta from current CVS today.\n> \n> I pg_dump'ed my 7.02 db's and reloaded it on 7.1 with no probs apart that\n> psql -l shows 2 template0 and template1...\n> \n> Template0 and template1 belong to user postgres and to an other who has no\n> priviledges and no db!!!\n> \n> What makes me think it's a psql bug is that select * from pg_databases\n> show 1 template0 and 1 template1.\n> \n> For what it's worth, it on unixware 711.\n> \n> BTW, when is the release due for? I'm VERY impatient. This is the best\n> I've seen.\nI'm also on UW711, and do *NOT* see the bug:\n\nPassword: \n List of databases\n Database | Owner | Encoding \n-----------+----------+-----------\n ler | ler | SQL_ASCII\n postgres | postgres | SQL_ASCII\n template0 | postgres | SQL_ASCII\n template1 | postgres | SQL_ASCII\n(4 rows)\n\n> \n> Regards,,\n> \n> -- \n> Olivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\n> Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n> 31190 AUTERIVE +33-6-07-63-80-64 (GSM)\n> FRANCE Email: [email protected]\n> ------------------------------------------------------------------------------\n> Make your life a dream, make your dream a reality. (St Exupery)\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Wed, 10 Jan 2001 12:55:05 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: psql -l bug" }, { "msg_contents": "Sorry to folowup on my own post....\n\nProblem solved: real and test db don't run on the same machine.\n\nOn the test one, postgres had the same uid as pg_shadow.usesysid for the\nuser...\n\nSorry to have bothered you all.\n\nReagrds\nOn Wed, 10 Jan 2001, Olivier PRENANT wrote:\n\n> Hi, \n> \n> I just recompiled 7.1 beta from current CVS today.\n> \n> I pg_dump'ed my 7.02 db's and reloaded it on 7.1 with no probs apart that\n> psql -l shows 2 template0 and template1...\n> \n> Template0 and template1 belong to user postgres and to an other who has no\n> priviledges and no db!!!\n> \n> What makes me think it's a psql bug is that select * from pg_databases\n> show 1 template0 and 1 template1.\n> \n> For what it's worth, it on unixware 711.\n> \n> BTW, when is the release due for? I'm VERY impatient. This is the best\n> I've seen.\n> \n> Regards,,\n> \n> \n\n-- \nOlivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\nQuartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n31190 AUTERIVE +33-6-07-63-80-64 (GSM)\nFRANCE Email: [email protected]\n------------------------------------------------------------------------------\nMake your life a dream, make your dream a reality. (St Exupery)\n\n", "msg_date": "Wed, 10 Jan 2001 19:55:10 +0100 (MET)", "msg_from": "Olivier PRENANT <[email protected]>", "msg_from_op": true, "msg_subject": "Re: psql -l bug" }, { "msg_contents": "As I said previously.. I apologies, this was all my fault.\n\nPlease discard...\n\nOh my, When will we have an RC???\n\n\nOn Wed, 10 Jan 2001, Larry Rosenman wrote:\n\n> * Olivier PRENANT <[email protected]> [010110 12:47]:\n> > Hi, \n> > \n> > I just recompiled 7.1 beta from current CVS today.\n> > \n> > I pg_dump'ed my 7.02 db's and reloaded it on 7.1 with no probs apart that\n> > psql -l shows 2 template0 and template1...\n> > \n> > Template0 and template1 belong to user postgres and to an other who has no\n> > priviledges and no db!!!\n> > \n> > What makes me think it's a psql bug is that select * from pg_databases\n> > show 1 template0 and 1 template1.\n> > \n> > For what it's worth, it on unixware 711.\n> > \n> > BTW, when is the release due for? I'm VERY impatient. This is the best\n> > I've seen.\n> I'm also on UW711, and do *NOT* see the bug:\n> \n> Password: \n> List of databases\n> Database | Owner | Encoding \n> -----------+----------+-----------\n> ler | ler | SQL_ASCII\n> postgres | postgres | SQL_ASCII\n> template0 | postgres | SQL_ASCII\n> template1 | postgres | SQL_ASCII\n> (4 rows)\n> \n> > \n> > Regards,,\n> > \n> > -- \n> > Olivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\n> > Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n> > 31190 AUTERIVE +33-6-07-63-80-64 (GSM)\n> > FRANCE Email: [email protected]\n> > ------------------------------------------------------------------------------\n> > Make your life a dream, make your dream a reality. (St Exupery)\n> \n> \n\n-- \nOlivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\nQuartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n31190 AUTERIVE +33-6-07-63-80-64 (GSM)\nFRANCE Email: [email protected]\n------------------------------------------------------------------------------\nMake your life a dream, make your dream a reality. (St Exupery)\n\n", "msg_date": "Wed, 10 Jan 2001 22:03:25 +0100 (MET)", "msg_from": "Olivier PRENANT <[email protected]>", "msg_from_op": true, "msg_subject": "Re: psql -l bug" }, { "msg_contents": "* Olivier PRENANT <[email protected]> [010110 15:03]:\n> As I said previously.. I apologies, this was all my fault.\n> \n> Please discard...\n> \n> Oh my, When will we have an RC???\nSOON. I'm running the BETA,....\n\nLER\n\n> \n> \n> On Wed, 10 Jan 2001, Larry Rosenman wrote:\n> \n> > * Olivier PRENANT <[email protected]> [010110 12:47]:\n> > > Hi, \n> > > \n> > > I just recompiled 7.1 beta from current CVS today.\n> > > \n> > > I pg_dump'ed my 7.02 db's and reloaded it on 7.1 with no probs apart that\n> > > psql -l shows 2 template0 and template1...\n> > > \n> > > Template0 and template1 belong to user postgres and to an other who has no\n> > > priviledges and no db!!!\n> > > \n> > > What makes me think it's a psql bug is that select * from pg_databases\n> > > show 1 template0 and 1 template1.\n> > > \n> > > For what it's worth, it on unixware 711.\n> > > \n> > > BTW, when is the release due for? I'm VERY impatient. This is the best\n> > > I've seen.\n> > I'm also on UW711, and do *NOT* see the bug:\n> > \n> > Password: \n> > List of databases\n> > Database | Owner | Encoding \n> > -----------+----------+-----------\n> > ler | ler | SQL_ASCII\n> > postgres | postgres | SQL_ASCII\n> > template0 | postgres | SQL_ASCII\n> > template1 | postgres | SQL_ASCII\n> > (4 rows)\n> > \n> > > \n> > > Regards,,\n> > > \n> > > -- \n> > > Olivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\n> > > Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n> > > 31190 AUTERIVE +33-6-07-63-80-64 (GSM)\n> > > FRANCE Email: [email protected]\n> > > ------------------------------------------------------------------------------\n> > > Make your life a dream, make your dream a reality. (St Exupery)\n> > \n> > \n> \n> -- \n> Olivier PRENANT \tTel:\t+33-5-61-50-97-00 (Work)\n> Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)\n> 31190 AUTERIVE +33-6-07-63-80-64 (GSM)\n> FRANCE Email: [email protected]\n> ------------------------------------------------------------------------------\n> Make your life a dream, make your dream a reality. (St Exupery)\n\n-- \nLarry Rosenman http://www.lerctr.org/~ler\nPhone: +1 972-414-9812 E-Mail: [email protected]\nUS Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749\n", "msg_date": "Wed, 10 Jan 2001 15:05:02 -0600", "msg_from": "Larry Rosenman <[email protected]>", "msg_from_op": false, "msg_subject": "Re: psql -l bug" } ]
[ { "msg_contents": "Sorry for the insistence, but after looking and looking again, I can't find \nout why the postgres logs are empty. The postgres database is up and working \ngreat, but nothing is getting logged.\nI'm on a RedHat Linux (6.0 with lot of upgrades)\npostgres 7.0.3 from rpm (downoaded from the postgres ftp server)\n\nAny ideas?\n\n-- \nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n", "msg_date": "Wed, 10 Jan 2001 20:24:37 -0300", "msg_from": "\"Martin A. Marques\" <[email protected]>", "msg_from_op": true, "msg_subject": "still no log" }, { "msg_contents": "Existe un archivo llamado postmaster.init en el directorio de postgres, en ese\ndirectorio le especificas si quieres que use o no los logs. Ya revisaste ese\narchivo?\n\n\"Martin A. Marques\" wrote:\n\n> Sorry for the insistence, but after looking and looking again, I can't find\n> out why the postgres logs are empty. The postgres database is up and working\n> great, but nothing is getting logged.\n> I'm on a RedHat Linux (6.0 with lot of upgrades)\n> postgres 7.0.3 from rpm (downoaded from the postgres ftp server)\n>\n> Any ideas?\n>\n> --\n> System Administration: It's a dirty job,\n> but someone told I had to do it.\n> -----------------------------------------------------------------\n> Mart�n Marqu�s email: [email protected]\n> Santa Fe - Argentina http://math.unl.edu.ar/~martin/\n> Administrador de sistemas en math.unl.edu.ar\n> -----------------------------------------------------------------\n\n", "msg_date": "Wed, 10 Jan 2001 17:55:58 -0600", "msg_from": "Alfonso Peniche <[email protected]>", "msg_from_op": false, "msg_subject": "Re: still no log" }, { "msg_contents": "\"Martin A. Marques\" wrote:\n >Sorry for the insistence, but after looking and looking again, I can't find \n >out why the postgres logs are empty. The postgres database is up and working\n > \n >great, but nothing is getting logged.\n >I'm on a RedHat Linux (6.0 with lot of upgrades)\n >postgres 7.0.3 from rpm (downoaded from the postgres ftp server)\n >\n >Any ideas?\n \n\nIf postmaster is started with -S, nothing gets logged. Is that your problem?\n\n-- \nOliver Elphick [email protected]\nIsle of Wight http://www.lfix.co.uk/oliver\nPGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47\nGPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C\n ========================================\n \"Be patient therefore, brethren, unto the coming of the\n Lord...Be patient; strengthen your hearts, for \n the coming of the Lord draweth nigh.\" \n James 5:7,8 \n\n\n", "msg_date": "Thu, 11 Jan 2001 00:07:51 +0000", "msg_from": "\"Oliver Elphick\" <[email protected]>", "msg_from_op": false, "msg_subject": "Re: [HACKERS] still no log " }, { "msg_contents": "El Mi� 10 Ene 2001 21:07, escribiste:\n> \"Martin A. Marques\" wrote:\n> >Sorry for the insistence, but after looking and looking again, I can't\n> > find out why the postgres logs are empty. The postgres database is up\n> > and working\n> >\n> >great, but nothing is getting logged.\n> >I'm on a RedHat Linux (6.0 with lot of upgrades)\n> >postgres 7.0.3 from rpm (downoaded from the postgres ftp server)\n> >\n> >Any ideas?\n>\n> If postmaster is started with -S, nothing gets logged. Is that your\n> problem?\n\nWell, I'm not sure. I can't recall checking that in the startup script, but I \nthink it's not there. Any way, why would the instalation make the entries in \nthe logroutate config files and then have a startup script that won't do \nlogging? I'm using the normal startup script in /etc/rc.d/init.d/.\n\nSaludos... :-)\n\n-- \nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n", "msg_date": "Wed, 10 Jan 2001 21:19:27 -0300", "msg_from": "\"Martin A. Marques\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: still no log" }, { "msg_contents": "El Mi� 10 Ene 2001 20:55, Alfonso Peniche escribi�:\n> Existe un archivo llamado postmaster.init en el directorio de postgres, en\n> ese directorio le especificas si quieres que use o no los logs. Ya\n> revisaste ese archivo?\n\nNo existe tal archivo, pero ya lo sulocione.\nGracias de todas formas. ;-)\n\n-- \nSystem Administration: It's a dirty job, \nbut someone told I had to do it.\n-----------------------------------------------------------------\nMart�n Marqu�s\t\t\temail: \[email protected]\nSanta Fe - Argentina\t\thttp://math.unl.edu.ar/~martin/\nAdministrador de sistemas en math.unl.edu.ar\n-----------------------------------------------------------------\n", "msg_date": "Fri, 12 Jan 2001 17:34:07 -0300", "msg_from": "\"Martin A. Marques\" <[email protected]>", "msg_from_op": true, "msg_subject": "Re: still no log" } ]