[HACKERS] fetch_search_path() and elog.c

2005-07-11 Thread Ferruccio Zamuner
Hi, I need to have in the log_line_prefix the search_path where the query has run. So last week I've started to read elog.c and I was thinking about a small patch there using a new %S option. First I've introduced a small code: case 'S': { List *search_path =

Re: [HACKERS] Checkpoint cost, looks like it is WAL/CRC

2005-07-11 Thread Simon Riggs
On Fri, 2005-07-08 at 14:45 -0400, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: I don't think we should care too much about indexes. We can rebuild them...but losing heap sectors means *data loss*. If you're so concerned about *data loss* then none of this will be acceptable to

[HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=potorooodt=2005-07-10%2022:30:03 New sha2 code on Solaris 2.8 / SPARC. Seems like it has problems memcpy'ing to a non-8-byte-aligned uint64 *. Attached patch fixes it by simplifying the _Final code and getting rid of the pointer. (I redefined

Re: [HACKERS] Checkpoint cost, looks like it is WAL/CRC

2005-07-11 Thread Simon Riggs
On Fri, 2005-07-08 at 09:34 +0200, Zeugswetter Andreas DAZ SD wrote: The point here is that fsync-off is only realistic for development or playpen installations. You don't turn it off in a production machine, and I can't see that you'd turn off the full-page-write option either. So

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Andrew Dunstan
Marko Kreen said: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=canarydt=2005-07-11%2002:30:00 NetBSD 1.6 with older OpenSSL. OpenSSL 0.9.7 does not have AES, but most of PGP tests use it as it is the preferred cipher. And the AES tests fails anyway. I guess it can stay as expected

Re: [HACKERS] Hide source code

2005-07-11 Thread Merlin Moncure
On Sun, Jul 10, 2005 at 04:26:26AM -0300, M?rcio A. Sepp wrote: Hi, I'm looking for a way to hide the souce code of my system (functions). In Oracle, I can wrap it. Is there something that I can use to hide and/or wrap my source code? If you have code that you don't want people

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 05:50:32AM -0500, Andrew Dunstan wrote: Marko Kreen said: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=canarydt=2005-07-11%2002:30:00 NetBSD 1.6 with older OpenSSL. OpenSSL 0.9.7 does not have AES, but most of PGP tests use it as it is the preferred cipher.

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 02:59:54PM +0300, Marko Kreen wrote: On Mon, Jul 11, 2005 at 05:50:32AM -0500, Andrew Dunstan wrote: Marko Kreen said: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=canarydt=2005-07-11%2002:30:00 NetBSD 1.6 with older OpenSSL. OpenSSL 0.9.7 does not have

Re: [HACKERS] [BUGS] BUG #1744: Directory Missing

2005-07-11 Thread Sivaraman K.G
Hi, Since I didn't get any response, I am just posting in pgsql-hackers. Can any one help ?. Thanks Siva > "K.G.Sivaraman" wrote: The following bug has been logged online: Bug reference: 1744 Logged by: K.G.Sivaraman Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0 Operating system:

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-11 Thread Andrew Dunstan
Andrew Dunstan wrote: Looking further ... we already do this implicitly for prodesc in the call handler - we would just need to do the same thing for per-call structures and divorce them from prodesc, which can be repeated on the implicit stack. I'll work on that - changes should be

Re: [HACKERS] [BUGS] BUG #1745: Unable to delete data from the database

2005-07-11 Thread Sivaraman K.G
Hi, Since I didn't get any response, I am just posting in pgsql-hackers. Can any one help ?. Thanks Siva > "K.G.Sivaraman" wrote: The following bug has been logged online: Bug reference: 1745 Logged by: K.G.Sivaraman Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0 Operating system:

Re: [HACKERS] [BUGS] BUG #1745: Unable to delete data from the

2005-07-11 Thread Dennis Bjorklund
On Sun, 10 Jul 2005, Sivaraman K.G wrote: The error in the log file is as follows : ERROR : xlog flush request 0/D17B00 is not satisfied --- flushed only to 0/C31ED0 CONTEXT : writing block 0 of relation 17231/17232/17249 WARNING : could not write block

Re: [HACKERS] fetch_search_path() and elog.c

2005-07-11 Thread Tom Lane
Ferruccio Zamuner [EMAIL PROTECTED] writes: I need to have in the log_line_prefix the search_path where the query has run. So last week I've started to read elog.c and I was thinking about a small patch there using a new %S option. There's no chance of that code working when not inside a

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-11 Thread Andrew Dunstan
Andrew Dunstan wrote: Andrew Dunstan wrote: Looking further ... we already do this implicitly for prodesc in the call handler - we would just need to do the same thing for per-call structures and divorce them from prodesc, which can be repeated on the implicit stack. I'll work on

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Tom Lane
Marko Kreen marko@l-t.ee writes: Result is - it's not so bad. As I used rijndael.c to provide OpenSSL's own interface, I even got rid of all the ifdefs inside the code. Looks good, but I'm still getting these compile warnings: openssl.c: In function `ossl_des3_ecb_encrypt': openssl.c:484:

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Tom Lane
Marko Kreen marko@l-t.ee writes: (I redefined bzero and bcopy but now I think they should be replaced directly - patch later.) Please. We do not use those old functions in the Postgres code; memcpy, memmove, memset, etc are the project standard. regards, tom lane

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 10:10:12AM -0400, Tom Lane wrote: Marko Kreen marko@l-t.ee writes: Result is - it's not so bad. As I used rijndael.c to provide OpenSSL's own interface, I even got rid of all the ifdefs inside the code. Looks good, but I'm still getting these compile warnings:

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 10:13:22AM -0400, Tom Lane wrote: Marko Kreen marko@l-t.ee writes: (I redefined bzero and bcopy but now I think they should be replaced directly - patch later.) Please. We do not use those old functions in the Postgres code; memcpy, memmove, memset, etc are the

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Tom Lane
Marko Kreen marko@l-t.ee writes: On Mon, Jul 11, 2005 at 10:10:12AM -0400, Tom Lane wrote: The following addition to the patch shuts up gcc with openssl 0.9.7a, but I'm not sure if it will break anything with older openssl --- comments? They won't matter on older OpenSSL, as the macros will

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Tom Lane
Marko Kreen marko@l-t.ee writes: New sha2 code on Solaris 2.8 / SPARC. Seems like it has problems memcpy'ing to a non-8-byte-aligned uint64 *. ... Attached patch includes sys/param.h, where I found them on MINGW, and puts stricter checks into all files. Applied.

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Michael Fuhr
On Mon, Jul 11, 2005 at 10:39:26AM -0400, Tom Lane wrote: Marko Kreen marko@l-t.ee writes: They won't matter on older OpenSSL, as the macros will recast again. But on 0.9.7e the signature is: void DES_ecb3_encrypt(const unsigned char *input, unsigned char *output,

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 11:09:06AM -0400, Tom Lane wrote: Marko Kreen marko@l-t.ee writes: New sha2 code on Solaris 2.8 / SPARC. Seems like it has problems memcpy'ing to a non-8-byte-aligned uint64 *. ... Attached patch includes sys/param.h, where I found them on MINGW, and puts

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 09:19:37AM -0600, Michael Fuhr wrote: On Mon, Jul 11, 2005 at 10:39:26AM -0400, Tom Lane wrote: Marko Kreen marko@l-t.ee writes: They won't matter on older OpenSSL, as the macros will recast again. But on 0.9.7e the signature is: void DES_ecb3_encrypt(const

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Tom Lane
Marko Kreen marko@l-t.ee writes: Here is the bcopy, bzero removal patch. Applied. I'm seeing the following build failure on HPUX: /usr/ccs/bin/ld +h libpgcrypto.sl.0 -b +b /home/postgres/testversion/lib pgcrypto.o px.o px-hmac.o px-crypt.o misc.o crypt-gensalt.o crypt-blowfish.o crypt-des.o

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Michael Fuhr
On Mon, Jul 11, 2005 at 06:41:35PM +0300, Marko Kreen wrote: When I saw that only 0.9.7[efg] have new signature I even considered macrofying that. But now with 0.9.8 again different I really would like to not to touch it, as I have no idea which one will be the stable signature. Comments?

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
On Mon, Jul 11, 2005 at 11:46:29AM -0400, Tom Lane wrote: Marko Kreen marko@l-t.ee writes: Here is the bcopy, bzero removal patch. Applied. I'm seeing the following build failure on HPUX: /usr/ccs/bin/ld +h libpgcrypto.sl.0 -b +b /home/postgres/testversion/lib pgcrypto.o px.o

Re: [HACKERS] Hide source code

2005-07-11 Thread David Fetter
On Mon, Jul 11, 2005 at 07:59:44AM -0400, Merlin Moncure wrote: On Sun, Jul 10, 2005 at 04:26:26AM -0300, M?rcio A. Sepp wrote: Hi, I'm looking for a way to hide the souce code of my system (functions). In Oracle, I can wrap it. Is there something that I can use to hide

Re: [HACKERS] Checkpoint cost, looks like it is WAL/CRC

2005-07-11 Thread Josh Berkus
Simon, Tom, Will do. Results in a few days. Actually, between the bad patch on the 5th and ongoing STP issues, I don't think I will have results before I leave town.Will e-mail you offlist to give you info to retrieve results. Any chance you'd be able to do this with ext3 and a

Re: [HACKERS] fetch_search_path() and elog.c

2005-07-11 Thread Ferruccio Zamuner
Tom Lane wrote: Ferruccio Zamuner [EMAIL PROTECTED] writes: I need to have in the log_line_prefix the search_path where the query has run. So last week I've started to read elog.c and I was thinking about a small patch there using a new %S option. There's no chance of that code

Re: [HACKERS] Hide source code

2005-07-11 Thread Josh Berkus
David, That some larger organizations choose to use the known-unsafe method of security by obscurity is not a reason for anybody here to expend any effort helping them persist in this illusion: quite the opposite, in fact. Larger organizations are likely to have security needs which they

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Marko Kreen
Another build failure from buildfarm. Seems like I forgot to update win32 code when doing a renaming in random.c -- marko Index: contrib/pgcrypto/random.c === RCS file: /opt/arc/cvs2/pgsql/contrib/pgcrypto/random.c,v retrieving

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Tom Lane
Marko Kreen marko@l-t.ee writes: Another build failure from buildfarm. Seems like I forgot to update win32 code when doing a renaming in random.c Applied. regards, tom lane ---(end of broadcast)--- TIP 4: Have you

Re: [HACKERS] fetch_search_path() and elog.c

2005-07-11 Thread Alvaro Herrera
On Mon, Jul 11, 2005 at 06:22:26PM +0200, Ferruccio Zamuner wrote: Now I've found a simpler solution: case 'S': /* estrae il search_path */ if (namespace_search_path != NULL) appendStringInfo(buf, %s , namespace_search_path);

[HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Joshua D. Drake
Hello, Interesting problem with pg_ctl. We have ran into this consistently as I am sure a lot of other people have. If PostgreSQL does not get shutdown correctly, the postmaster.pid file is still in PGDATA. This of course causing problems starting up (and it should). However it seems that

Re: [HACKERS] Hide source code

2005-07-11 Thread David Fetter
On Mon, Jul 11, 2005 at 09:27:19AM -0700, Josh Berkus wrote: David, That some larger organizations choose to use the known-unsafe method of security by obscurity is not a reason for anybody here to expend any effort helping them persist in this illusion: quite the opposite, in fact.

Re: [HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: FATAL: pre-existing shared memory block (key 5432001, ID 19202077) is still in use HINT: If you're sure there are no old server processes still running, remove the shared memory block with the command ipcclean, ipcrm, or just delete the file

Re: [HACKERS] Hide source code

2005-07-11 Thread Merlin Moncure
On Mon, Jul 11, 2005 at 07:59:44AM -0400, Merlin Moncure wrote: Interesting. Again, this is pretty fragile with respect to, for example, pg_dump(all). No, it isn't. If you revoke permission on pg_proc, /df in psql will fail, as will pg_dump. Try it (you have to revoke all on pg_proc form

Re: [HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Joshua D. Drake
Tom Lane wrote: Joshua D. Drake [EMAIL PROTECTED] writes: FATAL: pre-existing shared memory block (key 5432001, ID 19202077) is still in use HINT: If you're sure there are no old server processes still running, remove the shared memory block with the command ipcclean, ipcrm, or just delete

Re: [HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: I was just wondering if we could make pg_ctl a little smarter as all. If pg_ctl can't start because the pid file exists, test for the existence of the pid, if the pid does not exist test for the existence of **any** postgres process (grep? egad...),

Re: [HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Joshua D. Drake
Power off on a dev machine ;) Does the dev machine run more than one postmaster? No. I've occasionally seen similar issues when restarting a clutch of dev postmasters --- the kernel may assign a shmem id to one of them that belonged to another one in the previous cycle, and if you

[HACKERS] Vacuum summary?

2005-07-11 Thread Joshua D. Drake
Hello, What do you guys think of having a vacuum summary command? E.g.; VACUUM [FULL] [ANALYZE] SUMMARY where summary would only print the last lines of a vacuum verbose? foo= VACUUM SUMMARY; INFO: free space map contains 17 pages in 12 relations DETAIL: A total of 192 page slots are in use

Re: [HACKERS] Vacuum summary?

2005-07-11 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: What do you guys think of having a vacuum summary command? E.g.; VACUUM [FULL] [ANALYZE] SUMMARY ... that will turn SUMMARY into a fully reserved word ... regards, tom lane ---(end of

Re: [HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Does the dev machine run more than one postmaster? No. Hmm, it should be pretty impossible to see this if the machine's just been rebooted and there are no other postmasters running. If you can replicate it, could you send along the output of ipcs -m

Re: [HACKERS] Possible better pg_ctl start/stop handling?

2005-07-11 Thread Joshua D. Drake
Tom Lane wrote: Joshua D. Drake [EMAIL PROTECTED] writes: Does the dev machine run more than one postmaster? No. Hmm, it should be pretty impossible to see this if the machine's just been rebooted It wasn't a reboot it was a total power loss and then startup. and there are no other

Re: [HACKERS] Vacuum summary?

2005-07-11 Thread Joshua D. Drake
Tom Lane wrote: Joshua D. Drake [EMAIL PROTECTED] writes: What do you guys think of having a vacuum summary command? E.g.; VACUUM [FULL] [ANALYZE] SUMMARY ... that will turn SUMMARY into a fully reserved word ... Hmmm... good point. Other options would be: brief short terse? nutshell

Re: [HACKERS] 4 pgcrypto regressions failures - 1 unsolved

2005-07-11 Thread Kris Jurka
Marko Kreen wrote: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=dragonflydt=2005-07-11%2003:30:04 Linking problem with zlib on Solaris 9/x86. I am clueless about this. I can anyone look into it? It appears to be finding the static /usr/local/lib/libz.a instead of the dynamic

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-11 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Attached is a patch that fixes (I hope) both a recently introduced problem with recursion and a problem with array returns that became evident as a result of not throwing away non-fatal warnings (thanks to David Fetter for noticing this). Regression