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

2010-06-01 Thread Szymon Guz
2010/6/1 > 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 ind

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 d

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

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

2010-06-01 Thread Szymon Guz
2010/6/1 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

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

2010-06-01 Thread Pavel Stehule
2010/6/1 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

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

2010-06-01 Thread Szymon Guz
2010/6/1 > > From: Szymon Guz [mailto:mabew...@gmail.com] > -snip- > >> 2010/6/1 > >> 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 rena

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 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 > email,

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 tran

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 us

Re: [GENERAL] INSERTing lots of data

2010-06-01 Thread Dimitri Fontaine
Greg Smith 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 multi-thread it. Each t

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

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

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 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.  By r

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

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

2010-06-01 Thread Tom Lane
Craig Ringer 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 > trivial, and has been

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 wrote: >> I wondering if write-able CTE's will be the silver bullet that will make rule based update-able views based multip

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

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 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 except in tha

[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 C:\\pgsql\\b

Re: [GENERAL] archive_command

2010-06-01 Thread Serge Fonville
Hi, On Tue, Jun 1, 2010 at 8:47 PM, Jun Wang 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 > command,

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

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 h

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

2010-06-01 Thread Bill Moran
In response to 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 Postgre

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 Gage 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 data would be one. USA

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 NSA

[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 http://www.apesol.org/lista

Re: [GENERAL] PosttgreSQL on AIX

2010-06-01 Thread Tom Lane
=?ISO-8859-1?Q?Ernesto_Qui=F1ones?= 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? http://www.postgresql.org/docs/8.4/static/installation-platform-notes.html#INSTALLATION-NO

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

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

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

2010-06-01 Thread Tom Lane
Ken Tanzer 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 or not, just that

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 i

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'

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 : > =?ISO-8859-1?Q?Ernesto_Qui=F1ones?= writes: >> Hi friends I need to configure two PgSQl servers on AIX working with a SAN >> I need to kno

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 (poss

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

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 inter

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 connect

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

2010-06-01 Thread Tom Lane
Ken Tanzer 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 the ability to ru

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 : > Ernesto Quiñones wrote: >> >> The "architectur

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

2010-06-01 Thread Bruce Momjian
Tom Lane wrote: > Craig Ringer 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 fa

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

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 (p

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

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 differ

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

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 t

Re: [GENERAL] archive_command

2010-06-01 Thread Fujii Masao
On Wed, Jun 2, 2010 at 3:47 AM, Jun Wang 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 > command, but i

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

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 wil

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

2010-06-01 Thread Tom Lane
Ken Tanzer 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 tweak) to disable

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 With

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 postgres