Re: [GENERAL] server-side extension in c++

2010-06-01 Thread Craig Ringer
On 01/06/10 11:05, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Personally I would reduce this section to Don't. Well, I would have avoided this mine-trap except we have this 9.0 release note item: Allow use of productnameC++/ functions in backend code

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Scott Marlowe
2010/5/31 Nilesh Govindarajan li...@itech7.com: I run my site (see my signature) on a self managed VPS. I was using the default PGSQL RPM from the fedora repository, the site was getting way slow. So I compiled all the stuff apache, php and postgresql with custom gcc flags, which improved

[GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-01 Thread Gareth.Williams
Hi, We want to reindex the database behind a production service without interrupting the service. I had an idea for creating the index with a new name then dropping the existing index and renaming the new one - and it seems to work and would reduce the time without an index to be minimal. I

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-01 Thread Szymon Guz
2010/6/1 gareth.willi...@csiro.au Hi, We want to reindex the database behind a production service without interrupting the service. I had an idea for creating the index with a new name then dropping the existing index and renaming the new one - and it seems to work and would reduce the

Re: [GENERAL] INSERTing lots of data

2010-06-01 Thread Joachim Worringen
On 06/01/2010 05:45 AM, Greg Smith wrote: Two thoughts. First, build a test performance case assuming it will fail to scale upwards, looking for problems. If you get lucky, great, but don't assume this will work--it's proven more difficult than is obvious in the past for others. Second, if you

[GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
PG 8.2 I am using plpythonu to add application server functionality to my postgresql database. For example, I have triggers and functions that FTP files, sends email, processes files, etc.. Is there any good reason not to include this functionality directly in the database? (Too much parallel

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Szymon Guz
2010/6/1 Sim Zacks s...@compulab.co.il PG 8.2 I am using plpythonu to add application server functionality to my postgresql database. For example, I have triggers and functions that FTP files, sends email, processes files, etc.. Is there any good reason not to include this functionality

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Pavel Stehule
2010/6/1 Sim Zacks s...@compulab.co.il: PG 8.2 I am using plpythonu to add application server functionality to my postgresql database. For example, I have triggers and functions that FTP files, sends email, processes files, etc.. Is there any good reason not to include this functionality

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-01 Thread Szymon Guz
2010/6/1 gareth.willi...@csiro.au From: Szymon Guz [mailto:mabew...@gmail.com] -snip- 2010/6/1 gareth.willi...@csiro.au Hi, We want to reindex the database behind a production service without interrupting the service. I had an idea for creating the index with a new name then

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
On 6/1/2010 11:12 AM, Szymon Guz wrote: 2010/6/1 Sim Zacks s...@compulab.co.il mailto:s...@compulab.co.il PG 8.2 I am using plpythonu to add application server functionality to my postgresql database. For example, I have triggers and functions that FTP files, sends

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
Is there any good reason not to include this functionality directly in the database? (Too much parallel processing, engine not equipped for that kind of processing, threading issues...) there are some issues still * missing integrated scheduler * missing autonomous transaction if

Re: [GENERAL] plpythonu / using pg as an application server

2010-06-01 Thread Sim Zacks
As an example of a filesystem access that is transaction dependent: When I create a new supplier in the database, I need a set of directories built on the file system. If the directories are not there, it will cause a lot of problems when dealing with this supplier. When creating the supplier, I

Re: [GENERAL] INSERTing lots of data

2010-06-01 Thread Dimitri Fontaine
Greg Smith g...@2ndquadrant.com writes: Joachim Worringen wrote: my Python application (http://perfbase.tigris.org) repeatedly needs to insert lots of data into an exsting, non-empty, potentially large table. Currently, the bottleneck is with the Python application, so I intend to

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-01 Thread Gareth.Williams
From: Szymon Guz [mailto:mabew...@gmail.com] -snip- 2010/6/1 gareth.willi...@csiro.au Hi, We want to reindex the database behind a production service without interrupting the service. I had an idea for creating the index with a new name then dropping the existing index and renaming the

Re: [GENERAL] server-side extension in c++

2010-06-01 Thread David Fetter
On Tue, Jun 01, 2010 at 02:13:02PM +0800, Craig Ringer wrote: On 01/06/10 11:05, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Personally I would reduce this section to Don't. Well, I would have avoided this mine-trap except we have this 9.0 release note

Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-06-01 Thread David Fetter
On Sat, May 29, 2010 at 08:21:46PM -0700, Richard Broersma wrote: On Sat, May 29, 2010 at 6:25 PM, David Fetter da...@fetter.org wrote: I wondering if write-able CTE's will be the silver bullet that will make rule based update-able views based multiple vertically partitioned table robust.

Re: [GENERAL] Statement Pooling

2010-06-01 Thread Joshua Tolley
On Fri, May 28, 2010 at 10:09:22PM +0200, Janning wrote: On Thursday 27 May 2010 16:56:28 you wrote: Additionally c3p0 can cache java instances of java.sql.PreparedStatement which means it is caching the java object. So when using c3p0.maxStatementsPerConnection = 100 it caches at

Re: [GENERAL] server-side extension in c++

2010-06-01 Thread Tom Lane
Craig Ringer cr...@postnewspapers.com.au writes: On 01/06/10 11:05, Tom Lane wrote: I'd be interested to see a section like this written by someone who'd actually done a nontrivial C++ extension and lived to tell the tale. I can't speak up there - my own C++/Pg backend stuff has been fairly

Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-06-01 Thread Marko Tiikkaja
On 2010-06-01 16:07 +0300, David Fetter wrote: On Sat, May 29, 2010 at 08:21:46PM -0700, Richard Broersma wrote: On Sat, May 29, 2010 at 6:25 PM, David Fetter da...@fetter.org wrote: I wondering if write-able CTE's will be the silver bullet that will make rule based update-able views based

Re: [GENERAL] Installing version 8.4

2010-06-01 Thread Bob Pawley
Hi Ashesh I managed to get 8.4 running. I had previously downloaded PGAgent and installed it with no effect. However I just reinstalled it from the File Manager and it did the job. Now I want to get it going on XP but that isn`t quite so important. Thanks for all your help. Bob From:

Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-06-01 Thread Richard Broersma
On Tue, Jun 1, 2010 at 6:07 AM, David Fetter da...@fetter.org wrote: I'm not trying to be obtuse, but I am not understanding how you connect this issue, which has to do with the way PostgreSQL's RULE system works, with writeable CTEs, which have approximately nothing in common with the issue

[GENERAL] postgres authentication against Windows Domain

2010-06-01 Thread u235sentinel
Is there is a way to connect postgres to authenticate against a windows domain without recompiling and using gssapi. Ldap perhaps? Thanks!

Re: [GENERAL] archive_command

2010-06-01 Thread Jun Wang
The document recommends a command as below: archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f /dev/null' How can this be done using windows batch? I tried the following command, but it did not work: archive_command = 'if not exist

Re: [GENERAL] archive_command

2010-06-01 Thread Serge Fonville
Hi, On Tue, Jun 1, 2010 at 8:47 PM, Jun Wang junw2...@gmail.com wrote: The document recommends a command as below: archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f /dev/null' How can this be done using windows batch? I tried the following

[GENERAL] PostgreSQL and NeXpose Rapid 7 Vulnerbility scanning software

2010-06-01 Thread Arnold, Sandra
Is anyone using NeXpose Rapid 7 to scan your PostgreSQL databases for vulnerbilities? If so, what authentication are you using to allow it to connect to your database? Or, how are you configuring the software to allow it to connect to the database? Thanks, Sandra Arnold Sr. Database

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Steve Crawford
On 05/31/2010 01:29 AM, Michal Szymanski wrote: Hi, Currently we use Debian, but it chosen by our OS admnistrator. Now we can change our OS and it is question what Linux edition will be the best. We would like have access to new versions of Postgres as soon as possible, for Debian sometimes we

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Bill Moran
In response to Steve Crawford scrawf...@pinpointresearch.com: On 05/31/2010 01:29 AM, Michal Szymanski wrote: Hi, Currently we use Debian, but it chosen by our OS admnistrator. Now we can change our OS and it is question what Linux edition will be the best. We would like have access to

Re: [GENERAL] 110,000,000 rows

2010-06-01 Thread Steve Crawford
On 05/31/2010 03:48 AM, Jasen Betts wrote: On 2010-05-26, John Gagejsmg...@numericable.fr wrote: Please forgive this intrusion, and please ignore it, but how many applications out there have 110,000,000 row tables? I recently multiplied 85,000 by 1,400 and said now way Jose. census

Re: [GENERAL] 110,000,000 rows

2010-06-01 Thread John Gage
I was aware that there are, in fact, many applications such as census data or cell phone calls that would easily surpass this number. However these applications exist in very large companies/organizations that can throw essentially unlimited resources at the problem. One thinks of the

[GENERAL] PosttgreSQL on AIX

2010-06-01 Thread Ernesto Quiñones
Hi friends I need to configure two PgSQl servers on AIX working with a SAN I need to know how easy is compile PostgreSQL on AIx, some special consideration? is possible to run pgcluster only balnacer) or pgpool-II in aix? thanks -- Inscríbete en las listas de APESOL

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread Tom Lane
=?ISO-8859-1?Q?Ernesto_Qui=F1ones?= ernes...@gmail.com writes: Hi friends I need to configure two PgSQl servers on AIX working with a SAN I need to know how easy is compile PostgreSQL on AIx, some special consideration?

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Alban Hertroys
On 1 Jun 2010, at 22:03, Bill Moran wrote: In response to Steve Crawford scrawf...@pinpointresearch.com: On 05/31/2010 01:29 AM, Michal Szymanski wrote: Hi, Currently we use Debian, but it chosen by our OS admnistrator. Now we can change our OS and it is question what Linux edition will be

[GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
Hi. I'm wondering if it is possible to disable use of \! to execute commands in psql? I see this has come up on the list before (http://archives.postgresql.org/pgsql-admin/2007-07/msg00242.php), but I don't see anyone saying whether it is possible or not, just that it's a bad or useless

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Tom Lane
Ken Tanzer ken.tan...@gmail.com writes: Hi. I'm wondering if it is possible to disable use of \! to execute commands in psql? I see this has come up on the list before (http://archives.postgresql.org/pgsql-admin/2007-07/msg00242.php), but I don't see anyone saying whether it is possible

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Bruce Momjian
Ken Tanzer wrote: Hi. I'm wondering if it is possible to disable use of \! to execute commands in psql? I see this has come up on the list before (http://archives.postgresql.org/pgsql-admin/2007-07/msg00242.php), but I don't see anyone saying whether it is possible or not, just that it's

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
Sure use SHELL=/usr/bin/false: $ SHELL=/usr/bin/false psql psql (9.0beta1) Type help for help. postgres= \! postgres= Trouble is, that doesn't stop \! bash On 06/01/2010 04:57 PM, Bruce Momjian wrote: Ken Tanzer wrote: Hi. I'm

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread Ernesto Quiñones
Hi Tom, I read the page before, thanks maybe some friend can recommend me some load balancer solution for AIX with PostgreSQL thanks 2010/6/1 Tom Lane t...@sss.pgh.pa.us: =?ISO-8859-1?Q?Ernesto_Qui=F1ones?= ernes...@gmail.com writes: Hi friends I need to configure two PgSQl servers on AIX

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
The better way to go about that is to not let them have an account on the server machine in the first place. Just expose the postmaster port (perhaps via ssh tunneling) and let them run psql on their own machines. Somehow, exposing my database ports to the internet scares me more than any

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread John R Pierce
Ernesto Quiñones wrote: Hi Tom, I read the page before, thanks maybe some friend can recommend me some load balancer solution for AIX with PostgreSQL load balancing writes is problematic. load balancing reads is easy enough, although maintaining ACID with decent performance can still be

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Bruce Momjian
Ken Tanzer wrote: Sure use SHELL=/usr/bin/false: $ SHELL=/usr/bin/false psql psql (9.0beta1) Type help for help. postgres= \! postgres= Trouble is, that doesn't stop \! bash Ah, I see. libc hardcodes the SHELL executable into the system()

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Bruce Momjian
Ken Tanzer wrote: The better way to go about that is to not let them have an account on the server machine in the first place. Just expose the postmaster port (perhaps via ssh tunneling) and let them run psql on their own machines. Somehow, exposing my database ports to the internet

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread Ernesto Quiñones
The architecture that I need to install is: 1 AIX -- 3 AIX-- 1 load servers Storage balancerwith PostgreSQL (SAN) the 3 AIX PostgreSQL are PPC RS64-III with 1gb RAM the concurrence is near to 250 - 300

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Tom Lane
Ken Tanzer ken.tan...@gmail.com writes: The better way to go about that is to not let them have an account on the server machine in the first place. Somehow, exposing my database ports to the internet scares me more than any (possibly crazy) stuff I'm trying to do. :) If you're exposing

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread John R Pierce
Ernesto Quiñones wrote: The architecture that I need to install is: 1 AIX -- 3 AIX-- 1 load servers Storage balancerwith PostgreSQL (SAN) the 3 AIX PostgreSQL are PPC RS64-III with 1gb RAM the concurrence is

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread Ernesto Quiñones
How many concurrence can support a server with 4 PPC Power 6 and 16GB RAM??!! I was thinking install the load balancing in this machine but maybe I could run PostgreSQL in this machine without problems for my concurrence 2010/6/1 John R Pierce pie...@hogranch.com: Ernesto Quiñones wrote:

Re: [GENERAL] server-side extension in c++

2010-06-01 Thread Bruce Momjian
Tom Lane wrote: Craig Ringer cr...@postnewspapers.com.au writes: On 01/06/10 11:05, Tom Lane wrote: I'd be interested to see a section like this written by someone who'd actually done a nontrivial C++ extension and lived to tell the tale. I can't speak up there - my own C++/Pg backend

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
Ken, * Ken Tanzer (ken.tan...@gmail.com) wrote: Hi. I'm wondering if it is possible to disable use of \! to execute commands in psql? I see this has come up on the list before (http://archives.postgresql.org/pgsql-admin/2007-07/msg00242.php), but I don't see anyone saying whether it

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Craig Ringer
On 02/06/10 08:06, Ken Tanzer wrote: Somehow, exposing my database ports to the internet scares me more than any (possibly crazy) stuff I'm trying to do. :) Why? Surely it's less scary than exposing ssh+shell access (!!), even if you think the shell is locked down to running only a crippled

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
Thanks for asking a bunch of good questions, that I don't have good answers to all of... :) But I'll try: If you're exposing the ability to run psql, what makes you think you're not effectively exposing the database? I could be way off base, but it seems like the exposure is limited. Sure,

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
OK, hadn't seen your response (and Stephen Frost's) before sending mine. I think I hear everybody loud and clear--bad idea! Ken On 06/01/2010 06:47 PM, Craig Ringer wrote: On 02/06/10 08:06, Ken Tanzer wrote: Somehow, exposing my database ports to the internet scares me more than any

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
OK one more question on this thread. It occurs to me that for the web app, DB username and password is read from a configuration file. (I understand this to be a common method for web applications.) But since apache needs to read the file, then all users can read each others' passwords.

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
Ken, * Ken Tanzer (ken.tan...@gmail.com) wrote: I could be way off base, but it seems like the exposure is limited. Sure, each user can access their database, providing they can authenticate successfully. (Of course, I don't care what they do with their database.) This essentially

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread John R Pierce
Ernesto Quiñones wrote: How many concurrence can support a server with 4 PPC Power 6 and 16GB RAM??!! I was thinking install the load balancing in this machine but maybe I could run PostgreSQL in this machine without problems for my concurrence Power 6 and Powerpc are two completely

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
* Ken Tanzer (ken.tan...@gmail.com) wrote: OK one more question on this thread. It occurs to me that for the web app, DB username and password is read from a configuration file. (I understand this to be a common method for web applications.) But since apache needs to read the file,

Re: [GENERAL] server-side extension in c++

2010-06-01 Thread Craig Ringer
On 02/06/10 09:23, Bruce Momjian wrote: Tom Lane wrote: Craig Ringer cr...@postnewspapers.com.au writes: On 01/06/10 11:05, Tom Lane wrote: I'd be interested to see a section like this written by someone who'd actually done a nontrivial C++ extension and lived to tell the tale. I can't

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
I had thought I was going to have people use sftp/scp, but I can see that apparently doesn't work without a more normal shell than psql. (Although maybe you could build that support in?;) ) Erm, I don't believe you need a real shell to allow them sftp.. You just have to set

Re: [GENERAL] archive_command

2010-06-01 Thread Fujii Masao
On Wed, Jun 2, 2010 at 3:47 AM, Jun Wang junw2...@gmail.com wrote: The document recommends a command as below: archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f /dev/null' How can this be done using windows batch? I tried the following

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
* Ken Tanzer (ken.tan...@gmail.com) wrote: You realize that some information (like roles/users) is shared cluster-wide and isn't limited to a specific database, right? That's usually where web-hosting folks trip up first.. I think it's fair to say I realize it, but am perhaps not drawing

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
Eh, it's just that the users usually complain about seeing other people's roles and databases and whatnot.. That makes sense. I don't think that would be a problem in this case. Also, it means you can't grant 'create role' to anyone, so users can't create or drop their own roles (an admin

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Tom Lane
Ken Tanzer ken.tan...@gmail.com writes: You will for example be making it awfully difficult for them to use \copy, \i, \e, \g, the list goes on. I'm not really eager to go down this path, but nonetheless it's not obvious to me why giving psql a lobotomy (or hopefully a careful surgical

Re: [GENERAL] server-side extension in c++

2010-06-01 Thread Bruce Momjian
Craig Ringer wrote: ( BTW, all in all, I agree with Tom Lane - the best answer is don't. Sometimes you need to access functionality from C++ libraries, but unless that's your reason I wouldn't ever consider doing it. ) Here's a rough outline of the rules I follow when mixing C/C++ code,

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Ken Tanzer
psql is really, really meant to be run on the client side. I appreciate that, but the people I'm targeting are just not going to have psql on their systems. No, you missed the point: those functions, as well as others, are useless unless psql is running inside a filesystem that the user

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Greg Smith
Nilesh Govindarajan wrote: I run my site (see my signature) on a self managed VPS. I was using the default PGSQL RPM from the fedora repository, the site was getting way slow. So I compiled all the stuff apache, php and postgresql with custom gcc flags, which improved performance like hell

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-01 Thread Greg Smith
gareth.willi...@csiro.au wrote: So the rest of the question is, if I have two indexes with identical definitions, what happens? I've confirmed that I can create indexes with identical definitions (except name) without postgres complaining - and without breaking the client on my test system -

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Bret S. Lambert
On Wed, Jun 02, 2010 at 01:32:44AM -0400, Greg Smith wrote: Nilesh Govindarajan wrote: I run my site (see my signature) on a self managed VPS. I was using the default PGSQL RPM from the fedora repository, the site was getting way slow. So I compiled all the stuff apache, php and postgresql