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 applicati

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

[HACKERS] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread 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 database will be have a full control permission on my database in case that Pos

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 f

[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 t

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.

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

2005-08-17 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > I can reproduce this with a couple-of-days-old CVS tip: > TRAP: BadState(«!(((bool) ((OuterUserId) != ((Oid) 0», Archivo: > «/pg/source/00orig/src/backend/utils/init/miscinit.c», Línea: 336) Ooops, should have tested the full-AbortTransaction-to-c

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 i

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 chang

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] 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

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] 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 requir

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

2005-08-17 Thread Jim Nasby
> From: Tom Lane [mailto:[EMAIL PROTECTED] > Bruce Momjian 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 i

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

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

2005-08-17 Thread Tom Lane
Bruce Momjian 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 in the par

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 co

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 o

[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: 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'

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 o

[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 actua

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

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 te

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] 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] 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 0

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 in

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 s

[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», L

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 machine

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 w

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 to

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

Re: [HACKERS] [GENERAL] Cascades Failing

2005-08-17 Thread Darcy Buskermolen
On Tuesday 16 August 2005 09:17, Stephan Szabo wrote: > On Tue, 16 Aug 2005, Tom Lane wrote: > > [ redirected to -hackers ] > > > > I wrote: > > > This suggests that we need a way to prevent immediate execution of > > > freshly queued triggers at the end of a command fired by an FK trigger. > > > I

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? W

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: 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

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. Th

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 broadcast)--

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 t

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

[HACKERS] do we need inet_ntop check?

2005-08-17 Thread Andrew Dunstan
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.]) HAVE_IPV6=yes])],

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 is

[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; inse

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 next

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

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 br

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

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 c

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: wh

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: > http://archives.postgresql.org/pgsql-