Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Tino Wildenhain
Josh Berkus schrieb: People: How about we draft some criteria for inclusion of a PL in the main distro? Suggestions: 1) The PL must be stable (that is, not capable of crashing the backend) 2) The PL must be buildable only using --with-{lang} and createlang (assuming that the user has the

Re: Missing CONCURRENT VACUUM (Was: [HACKERS] Release notes for

2005-08-17 Thread Hannu Krosing
On T, 2005-08-16 at 18:26 -0400, Tom Lane wrote: Hannu Krosing [EMAIL PROTECTED] writes: Once more: I would like to get at least some answer, why my patch for enabling concurrent VACUUM was left out from 8.1. You did not respond to this:

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Joe Conway
David Fetter wrote: On Tue, Aug 16, 2005 at 01:17:27PM -0400, Gregory Maxwell wrote: I promise that the aggregate work required for all coders who know Python to switch to ruby is far far greater than the work required to fix the issues with pl/python. :) Are you certain? See above in re:

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Thomas Hallgren
Josh Berkus wrote: People: How about we draft some criteria for inclusion of a PL in the main distro? Suggestions: 1) The PL must be stable (that is, not capable of crashing the backend) Check. (well, a more humble statement is perhaps to say that any bug that would cause a crash would be

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Marko Kreen
On Tue, Aug 16, 2005 at 01:46:26PM -0700, David Fetter wrote: On Tue, Aug 16, 2005 at 11:39:04PM +0300, Marko Kreen wrote: On Tue, Aug 16, 2005 at 10:38:37AM -0700, David Fetter wrote: If somebody has figured out a way to make a PL/Python (without the U), that's great, but nothing has

Re: [HACKERS] Upcoming back-branch releases

2005-08-17 Thread Marko Kreen
On Mon, Aug 15, 2005 at 01:06:15PM -0400, Tom Lane wrote: So, if you've got any pending patches for the back branches, now would be a good time to get 'em done up and sent in. http://archives.postgresql.org/pgsql-patches/2005-07/msg00291.php -- marko ---(end of

Re: [HACKERS] obtaining row locking information

2005-08-17 Thread Tatsuo Ishii
Tatsuo Ishii [EMAIL PROTECTED] writes: To accomplish this I need to add following function into storage/ipc/procarray.c. This is similar to BackendPidGetProc() except that it accepts xid as an argument. Any objection? if (xid == 0) /* never match dummy

Re: [HACKERS] Upcoming back-branch releases

2005-08-17 Thread Andrew Dunstan
Tom Lane wrote: The core committee has agreed that we need to do a set of releases in the back branches soon --- certainly 8.0 has accumulated a critical mass of changes since 8.0.3, and probably there's enough to justify updates of the 7.* branches too. We hope to get these out sometime

[HACKERS] transactions not working properly ?

2005-08-17 Thread Ali Baba
Hi, can any one describe how the transaction are being handled in postgres. i.e. function given below should actually insert the desire values in test table but it do not save them. START TRANSACTION; create or replace function testFunc() returns int as $$ declare x integer; begin x := 1;

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Dave Cramer
As there are two java procedural languages which are available for postgreSQL Josh asked for an explanation as to their differences. They are quite similar in that both of them run the function in a java vm, and are pre-compiled. Neither attempt to compile the code. The biggest difference

Re: [HACKERS] transactions not working properly ?

2005-08-17 Thread Douglas McNaught
Ali Baba [EMAIL PROTECTED] writes: exception when others then raise info 'error generated '; commit; RETURN 0; end; You can't COMMIT inside a function. -Doug ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [HACKERS] transactions not working properly ?

2005-08-17 Thread Michael Fuhr
[This question would probably be more appropriate in pgsql-general than in pgsql-hackers.] On Wed, Aug 17, 2005 at 05:53:14AM -0700, Ali Baba wrote: can any one describe how the transaction are being handled in postgres. I think you're talking about how PL/pgSQL exception handlers work with

Re: [HACKERS] transactions not working properly ?

2005-08-17 Thread jtv
Ali Baba wrote: can any one describe how the transaction are being handled in postgres. Pretty much the same as in any other SQL implementation, and you'd have the same problem in any database. Is this a homework assignment? Jeroen ---(end of

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Andrew Dunstan
Dave Cramer wrote: As there are two java procedural languages which are available for postgreSQL Josh asked for an explanation as to their differences. They are quite similar in that both of them run the function in a java vm, and are pre-compiled. Neither attempt to compile the code.

Re: Missing CONCURRENT VACUUM (Was: [HACKERS] Release notes for

2005-08-17 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes: On T, 2005-08-16 at 18:26 -0400, Tom Lane wrote: Some specific concerns: * Given that VACUUM ANALYZE does create new output tuples stamped with its xid, I'm unclear on what happens in pg_statistic with this code in place. Actually any VACUUM, not

Re: [HACKERS] pthread stack on FreeBSD WAS: HEAD doesn't cope with libraries in non-default

2005-08-17 Thread Jim C. Nasby
Unfortunately, it looks like the allow_non_pic_in_shlib setting broke platypus: http://lnk.nu/pgbuildfarm.org/3l3.pl If I back that part of the patch out, playtypus works fine. On Fri, Aug 12, 2005 at 04:57:58PM -0400, Bruce Momjian wrote: Patch applied. Thanks. If we made plpython worse,

Re: [HACKERS] pthread stack on FreeBSD WAS: HEAD doesn't cope with libraries in non-default

2005-08-17 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: Unfortunately, it looks like the allow_non_pic_in_shlib setting broke platypus: http://lnk.nu/pgbuildfarm.org/3l3.pl If I back that part of the patch out, playtypus works fine. So what's different between platypus and the machines where it works? We

Re: [HACKERS] ALTER INDEX OWNER TO

2005-08-17 Thread Bruce Momjian
Where are we on this? --- Christopher Kings-Lynne wrote: Yeah, I suppressed that alternative a few weeks ago, thinking that it was not sensible since we don't really support having indexes owned by anyone except the

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Thomas Hallgren
Andrew Dunstan wrote: Dave Cramer wrote: As there are two java procedural languages which are available for postgreSQL Josh asked for an explanation as to their differences. They are quite similar in that both of them run the function in a java vm, and are pre-compiled. Neither attempt

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Joshua D. Drake
I find the whole argument that, lack of an untrusted version of the PL means it should be deprecated, crazy. There are plenty of situations where you don't care that the PL is untrusted. Yes you are absolutely correct. However my argument was more than that. It contained: The fact that it

Re: [HACKERS] pthread stack on FreeBSD WAS: HEAD doesn't cope with libraries

2005-08-17 Thread Johnny Lam
Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: Unfortunately, it looks like the allow_non_pic_in_shlib setting broke platypus: http://lnk.nu/pgbuildfarm.org/3l3.pl If I back that part of the patch out, playtypus works fine. So what's different between platypus and the machines

[HACKERS] Crash while trying to log in with nonexistent role

2005-08-17 Thread Alvaro Herrera
I can reproduce this with a couple-of-days-old CVS tip: alvherre=# \c - test FATAL: role test does not exist And the server log says FATAL: role test does not exist TRAP: BadState(«!(((bool) ((OuterUserId) != ((Oid) 0», Archivo: «/pg/source/00orig/src/backend/utils/init/miscinit.c»,

Re: Missing CONCURRENT VACUUM (Was: [HACKERS] Release notes for

2005-08-17 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes: Please check the actual patch and advise if anything is still missing. While testing this I realized that it does not in fact work as advertised. It will only exclude long-running VACUUMs from other VACUUMs' OldestXmin if *all* the transactions in the

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Dave Cramer
On 17-Aug-05, at 12:40 PM, Thomas Hallgren wrote: Andrew Dunstan wrote: Dave Cramer wrote: As there are two java procedural languages which are available for postgreSQL Josh asked for an explanation as to their differences. They are quite similar in that both of them run the function

Re: [HACKERS] SPI: ERROR: no snapshot has been set

2005-08-17 Thread Martijn van Oosterhout
For future reference, I got around this error (no snapshot has been set) by removing the use of SPI and just using heap_open / heap_beginscan / heap_endscan / heap_close. It's only slightly more code but it works irrespective of the state of the backend. Have a nice day, On Sat, Aug 13, 2005 at

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Josh Berkus
Thomas, Dave, I did *NOT* want to start another discussion about what approach is superior. Keep in mind that for us non-Java geeks most of your argument is pure ancient Greek. What I wanted to establish is: potentially, we will have two Java PLs with Postgres. If we do, we need to have a

Re: [HACKERS] do we need inet_ntop check?

2005-08-17 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Currently the IPv6 check in configure.in says this: HAVE_IPV6=no AC_CHECK_TYPE([struct sockaddr_in6], [AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])

Re: [HACKERS] do we need inet_ntop check?

2005-08-17 Thread Andrew Dunstan
Tom Lane wrote: AFAICT, all we actually depend on to compile the #ifdef HAVE_IPV6 code is (a) struct sockaddr_in6 and (b) the macro AF_INET6. Arguably we should have an explicit test for the latter, but unless someone exhibits a header file that has the struct but not the macro, the struct

Re: Missing CONCURRENT VACUUM (Was: [HACKERS] Release notes for

2005-08-17 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes: On K, 2005-08-17 at 14:48 -0400, Tom Lane wrote: While testing this I realized that it does not in fact work as advertised. It will only exclude long-running VACUUMs from other VACUUMs' OldestXmin if *all* the transactions in the system are lazy

[HACKERS] bitmap scan issues 8.1 devel

2005-08-17 Thread Merlin Moncure
Hello, Doing some testing on upcoming 8.1 devel and am having serious issues with new bitmap index scan feature. It is easy to work around (just disable it) but IMO the planner is using it when a regular index scan should be strongly favored. The performance of the bitmapscan in my usage is

Re: Missing CONCURRENT VACUUM (Was: [HACKERS] Release notes for

2005-08-17 Thread Hannu Krosing
On K, 2005-08-17 at 14:48 -0400, Tom Lane wrote: Hannu Krosing [EMAIL PROTECTED] writes: Please check the actual patch and advise if anything is still missing. While testing this I realized that it does not in fact work as advertised. It will only exclude long-running VACUUMs from other

Re: Missing CONCURRENT VACUUM (Was: [HACKERS] Release notes for

2005-08-17 Thread Hannu Krosing
On K, 2005-08-17 at 16:45 -0400, Tom Lane wrote: Hannu Krosing [EMAIL PROTECTED] writes: On K, 2005-08-17 at 14:48 -0400, Tom Lane wrote: While testing this I realized that it does not in fact work as advertised. It will only exclude long-running VACUUMs from other VACUUMs' OldestXmin if

[HACKERS] SHM_LOCK under Linux ... do we use this?

2005-08-17 Thread Marc G. Fournier
Under FreeBSD, we have an option (kern.ipc.shm_use_phys=1) that doesn't allow shared memory to be swap'd ... under Linux, there is apparently an application level option that can be used for this purpose: A privileged user can prevent or allow swapping of a shared memory segment with

Re: [HACKERS] pthread stack on FreeBSD WAS: HEAD doesn't cope with libraries

2005-08-17 Thread Jim C. Nasby
On Wed, Aug 17, 2005 at 01:22:16PM -0400, Johnny Lam wrote: Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: Unfortunately, it looks like the allow_non_pic_in_shlib setting broke platypus: http://lnk.nu/pgbuildfarm.org/3l3.pl If I back that part of the patch out, playtypus works

Re: [HACKERS] gettime() - a timeofday() alternative

2005-08-17 Thread Bruce Momjian
Jim C. Nasby wrote: On Sat, Aug 13, 2005 at 06:24:01PM -0400, Tom Lane wrote: Brendan Jurd [EMAIL PROTECTED] writes: Regarding the statement_timestamp() ... if the entire query path is parser - rewriter - planner/optimiser - executor, what point in that path would be considered the

Re: [HACKERS] gettime() - a timeofday() alternative

2005-08-17 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: Jim C. Nasby wrote: On Sat, Aug 13, 2005 at 06:24:01PM -0400, Tom Lane wrote: IIRC, what we actually intended that to mean is the time of receipt of the current interactive command --- that is, it gets set in the postgres.c outer loop, not anywhere

Re: [HACKERS] gettime() - a timeofday() alternative

2005-08-17 Thread Jim C. Nasby
On Sat, Aug 13, 2005 at 06:24:01PM -0400, Tom Lane wrote: Brendan Jurd [EMAIL PROTECTED] writes: Regarding the statement_timestamp() ... if the entire query path is parser - rewriter - planner/optimiser - executor, what point in that path would be considered the true start of the statement?

Re: [HACKERS] SHM_LOCK under Linux ... do we use this?

2005-08-17 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes: A privileged user can prevent or allow swapping of a shared memory segment with the following cmds: SHM_LOCKprevents swapping of a shared memory segment. The user must fault in any pages that are required to

Re: [HACKERS] gettime() - a timeofday() alternative

2005-08-17 Thread Jim Nasby
From: Tom Lane [mailto:[EMAIL PROTECTED] Bruce Momjian pgman@candle.pha.pa.us writes: Jim C. Nasby wrote: On Sat, Aug 13, 2005 at 06:24:01PM -0400, Tom Lane wrote: IIRC, what we actually intended that to mean is the time of receipt of the current interactive command --- that is, it

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Thomas Hallgren
Dave, Some responses inline. As a reaction to what Josh just wrote - Keep in mind that for us non-Java geeks most of your argument is pure ancient Greek - I'll try to talk in generic terms from now on and not mention Java since the difference between our solutions have nothing whatsoever to

Re: [HACKERS] bitmap scan issues 8.1 devel

2005-08-17 Thread Tom Lane
Merlin Moncure [EMAIL PROTECTED] writes: Doing some testing on upcoming 8.1 devel and am having serious issues with new bitmap index scan feature. It is easy to work around (just disable it) but IMO the planner is using it when a regular index scan should be strongly favored. I think blaming

Re: [HACKERS] [GENERAL] Cascades Failing

2005-08-17 Thread Stephan Szabo
On Tue, 16 Aug 2005, Stephan Szabo wrote: On Tue, 16 Aug 2005, Tom Lane wrote: I think this would take some generalization of afterTriggerInvokeEvents, which now might or might not find the target rel in the EState it's passed, but otherwise it doesn't seem too invasive. Thoughts?

Re: [HACKERS] pthread stack on FreeBSD WAS: HEAD doesn't cope with libraries

2005-08-17 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: Unfortunately, it looks like the allow_non_pic_in_shlib setting broke platypus: http://lnk.nu/pgbuildfarm.org/3l3.pl Damn, I'm sorry, I totally mis-interpreted this. Turns out the failures are due to a perl problem. Yeah, but the nonpic change caused

Re: [HACKERS] pthread stack on FreeBSD WAS: HEAD doesn't cope with

2005-08-17 Thread Johnny C. Lam
Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: Damn, I'm sorry, I totally mis-interpreted this. Turns out the failures are due to a perl problem. Yeah, but the nonpic change caused that. Can anyone tell me which machine types (host_cpu values) FreeBSD does support non-PIC code in

Re: [HACKERS] pl/Ruby, deprecating plPython and Core

2005-08-17 Thread Joe Conway
Joshua D. Drake wrote: I find the whole argument that, lack of an untrusted version of the PL means it should be deprecated, crazy. There are plenty of situations where you don't care that the PL is untrusted. Yes you are absolutely correct. However my argument was more than that. Right.

[HACKERS] still looking for getaddrinfo

2005-08-17 Thread Andrew Dunstan
[redirecting to -hackers in the hope of more eyes ;-) ] (goal - to use native ip6 support in Windows) First, after the change Tom committed earlier, I added a test for ws2_32.dll to the win32 port section of config.in: AC_CHECK_LIB(ws2_32, main) That worked fine. The I added this line

Re: [HACKERS] SHM_LOCK under Linux ... do we use this?

2005-08-17 Thread Marc G. Fournier
On Wed, 17 Aug 2005, Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: A privileged user can prevent or allow swapping of a shared memory segment with the following cmds: SHM_LOCKprevents swapping of a shared memory segment. The user must

[HACKERS] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread Premsun Choltanwanich
Dear All, Ineed todistribute my applicationthat use PostgreSQL as databaseto my customer. But I still have some questions in my mindon database security. I understand that everybody who get my application databasewill be have a full control permission on my database in case thatPostgreSQL

Re: [HACKERS] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread Josh Berkus
Premsun, I need to distribute my application that use PostgreSQL as database to my customer. But I still have some questions in my mind on database security. I understand that everybody who get my application database will be have a full control permission on my database in case that

Re: [HACKERS] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread Tino Wildenhain
Am Donnerstag, den 18.08.2005, 09:56 +0700 schrieb Premsun Choltanwanich: Dear All, I need to distribute my application that use PostgreSQL as database to my customer. But I still have some questions in my mind on database security. I understand that everybody who get my application