Re: [GENERAL] idle in transaction process

2011-08-15 Thread Abbas
Best Regards, Abbas On Mon, Aug 15, 2011 at 11:14 PM, tamanna madaan < tamanna.mad...@globallogic.com> wrote: > Hi All > > I am using postgres-8.4.0 on a cluster setup with slony-2.0.4 being used > for replication. > Recently , I saw a "idle in transaction" postgres process as below. > > postgre

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 10:05 PM, Scott Marlowe wrote: > > Yep.  Also, it's REAL easy to stick a caching layer like memcached > into the middle tier app layer, but nearly impossible to do so in > pgsql.  For large systems, this would make pg as an app server a nogo. >  But for small to medium siz

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Scott Marlowe
On Mon, Aug 15, 2011 at 7:23 PM, Merlin Moncure wrote: > There are downsides too -- you lose access to the excellent middleware > tools out there, and you are 'stuck' on postgres and need to come up > with hard to find and expensive postgres talent.   You need to be > prepared to blaze a path, etc

Re: [GENERAL] streaming replication: one problem & several questions

2011-08-15 Thread Fujii Masao
On Thu, Aug 11, 2011 at 7:19 AM, Lonni J Friedman wrote: > First the problem.  On *only* one of the two standby servers, I'm > seeing errors like the following whenever I issue any SQL commands on > the master which write (insert, update, etc) to the database: > LOG:  invalid record length at 8/7A

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Darren Duncan
Chris Travers wrote: On Mon, Aug 15, 2011 at 3:47 PM, Darren Duncan wrote: I believe we basically have all the foundation already, with maybe procedures executable outside transactions being the last major part. Why is this desirable? Why is it more desirable than actually using the listen/n

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 5:14 PM, David Johnston wrote: >> This whole line is getting somewhat off-topic; we're not talking about a >> "computationally complete" application but simply one that can handle HTTP >> requests and dispatch calls to user-defined methods.  This seems like a >> small-e

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Merlin Moncure
On Mon, Aug 15, 2011 at 7:06 PM, Craig Ringer wrote: > On 15/08/2011 10:36 PM, Merlin Moncure wrote: >> >> On Sat, Aug 13, 2011 at 2:30 PM, Andreas Joseph Krogh >>  wrote: >>> >>> No, PG has never, and will never, act as an application-server. >> >> Why in the world not? > > The biggest reason is

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Darren Duncan Sent: Monday, August 15, 2011 6:48 PM To: David Johnston Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Using Postgresql as application server David

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Craig Ringer
On 15/08/2011 10:36 PM, Merlin Moncure wrote: On Sat, Aug 13, 2011 at 2:30 PM, Andreas Joseph Krogh wrote: No, PG has never, and will never, act as an application-server. Why in the world not? The biggest reason is safety. Beyond that, the lack of autonomous transactions, stored procedures

Re: [GENERAL] backup-strategies for large databases

2011-08-15 Thread John R Pierce
On 08/15/11 4:12 PM, Scott Marlowe wrote: Exactly. Sometimes PITR is the right answer, sometimes partitioning is. those answer two completely different questions. -- john r pierceN 37, W 122 santa cruz ca mid-left coast -- Sent via pgsql

Re: [GENERAL] backup-strategies for large databases

2011-08-15 Thread Scott Marlowe
On Mon, Aug 15, 2011 at 5:06 PM, MirrorX wrote: > i looked into data partitioning and it is definitely something we will use > soon. but, as far as the backups are concerned, how can i take a backup > incrementally? if i get it correctly, the idea is to partition a big table > (using a date field

Re: [GENERAL] backup-strategies for large databases

2011-08-15 Thread MirrorX
i looked into data partitioning and it is definitely something we will use soon. but, as far as the backups are concerned, how can i take a backup incrementally? if i get it correctly, the idea is to partition a big table (using a date field for example) and then take each night for example a dump

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 3:47 PM, Darren Duncan wrote: > > I believe we basically have all the foundation already, with maybe > procedures executable outside transactions being the last major part. > Why is this desirable? Why is it more desirable than actually using the listen/notify infrastruc

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Darren Duncan
David Johnston wrote: I believe that it is ideal for Postgres to be computationally complete in that one *could* use it to implement a complete application. That isn't to say one should do this as a matter of course, good to use appropriate tools for a >>job, but that it should at least be possi

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Merlin Moncure Sent: Monday, August 15, 2011 6:10 PM To: David Johnston Cc: Darren Duncan; pgsql-general@postgresql.org Subject: Re: [GENERAL] Using Postgresql as application

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-15 Thread Scott Marlowe
On Mon, Aug 15, 2011 at 11:33 AM, s...@bestmx.ru wrote: > Scott Marlowe пишет: >> >> On Sat, Aug 13, 2011 at 9:57 AM, c k  wrote: >>> >>> Dear Postgres users, >>> from last few months I am reading and searching for can postgresql used >>> as >>> application server? As postgresql supports many lang

Re: [GENERAL] Adapting existing extensions to use CREATE EXTENSION

2011-08-15 Thread Roger Leigh
On Mon, Aug 15, 2011 at 08:41:06PM +0200, Dimitri Fontaine wrote: > Hi, > > Roger Leigh writes: > > I've been looking at converting my existing "debversion" datatype > > extension to use the proper "CREATE EXTENSION" facility for 9.1, > > while also being backward compatible with 8.4 and 9.0. >

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Merlin Moncure
On Mon, Aug 15, 2011 at 4:54 PM, David Johnston wrote: >>> >>>I believe that it is ideal for Postgres to be computationally complete in >>>that one *could* use it to implement a complete application.  That isn't to >>>say one should do this as a matter of course, good to use appropriate tools >

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread David Johnston
>> >>I believe that it is ideal for Postgres to be computationally complete in >>that one *could* use it to implement a complete application. That isn't to >>say one should do this as a matter of course, good to use appropriate tools >>for a >>job, but that it should at least be possible if one

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 2:05 PM, Darren Duncan wrote: > 1.  Try using multiple processes.  You can have a separate process, in a > distinct transactional context, for sending the emails, and it only does so > under certain conditions, such as if it sees that a committed change has put > the proce

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Darren Duncan
Chris Travers wrote: On Mon, Aug 15, 2011 at 1:44 PM, Darren Duncan wrote: I believe that it is ideal for Postgres to be computationally complete in that one *could* use it to implement a complete application. That isn't to say one should do this as a matter of course, good to use appropriate

Re: [GENERAL] pgloader hangs with an invalid filename

2011-08-15 Thread Dimitri Fontaine
Tony Capobianco writes: > I'm running pgloader 2.3.2 and Postgres 9. Is there an upgraded version > of pgloader on the PgFoundry site? Yeah, it's now pgloader 2.3.3, 3 pre-releases have been done and the later one, 2.3.3~dev3 will soon'ish get tagged final 2.3.3. Also the development now happe

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Merlin Moncure
On Mon, Aug 15, 2011 at 3:50 PM, Chris Travers wrote: > On Mon, Aug 15, 2011 at 1:44 PM, Darren Duncan > wrote: > >> I believe that it is ideal for Postgres to be computationally complete in >> that one *could* use it to implement a complete application.  That isn't to >> say one should do this

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 1:44 PM, Darren Duncan wrote: > I believe that it is ideal for Postgres to be computationally complete in > that one *could* use it to implement a complete application.  That isn't to > say one should do this as a matter of course, good to use appropriate tools > for a job

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Darren Duncan
c k wrote: Dear Postgres users, from last few months I am reading and searching for can postgresql used as application server? As postgresql supports many languages like pl/perl, pl/python etc, supports dblink like functions to connect to other postgresql servers and now features are in develo

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Merlin Moncure
On Mon, Aug 15, 2011 at 9:50 AM, Andreas Joseph Krogh wrote: > På mandag 15. august 2011 kl 16:36:23 skrev du: >> On Sat, Aug 13, 2011 at 2:30 PM, Andreas Joseph Krogh >> wrote: >> > No, PG has never, and will never, act as an application-server. >> >> Why in the world not?  Now, it may or may no

Re: [GENERAL] pgloader hangs with an invalid filename

2011-08-15 Thread Tony Capobianco
I'm running pgloader 2.3.2 and Postgres 9. Is there an upgraded version of pgloader on the PgFoundry site? On Mon, 2011-08-15 at 20:34 +0200, Dimitri Fontaine wrote: > Tony Capobianco writes: > > Has anyone experienced the behavior of pgloader hanging when the .conf > > file has an incorrect fi

[GENERAL] idle in transaction process

2011-08-15 Thread tamanna madaan
Hi All I am using postgres-8.4.0 on a cluster setup with slony-2.0.4 being used for replication. Recently , I saw a "idle in transaction" postgres process as below. postgres 13052 14742 0 May13 ? 00:00:00 postgres: slon abc 172.16.1.1(49017) idle in transaction I wonder what could have lead to th

Re: [GENERAL] Adapting existing extensions to use CREATE EXTENSION

2011-08-15 Thread Dimitri Fontaine
Hi, Roger Leigh writes: > I've been looking at converting my existing "debversion" datatype > extension to use the proper "CREATE EXTENSION" facility for 9.1, > while also being backward compatible with 8.4 and 9.0. I've been doing the same exercise with pgfincore recently, and will probably do

Re: [GENERAL] pgloader hangs with an invalid filename

2011-08-15 Thread Dimitri Fontaine
Tony Capobianco writes: > Has anyone experienced the behavior of pgloader hanging when the .conf > file has an incorrect filename? > When I execute with the correct filename, everything works just fine. > However, when I use an incorrect filename, I get the below: That's certainly due to current

Re: [GENERAL] PostgreSQL 'hosting'

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 7:38 AM, Dragan Zubac wrote: > Hello > > Does anybody know if there're any companies offering PostgreSQL 'hosting' ? > By 'hosting', I mean you get access to a database to which your > application connects remotely and do sql stuff. > 'Hosting' company takes care of databas

Re: [GENERAL] Where to start, graphs and routing.

2011-08-15 Thread fork
Ondrej Ivanič gmail.com> writes: > On 14 August 2011 20:25, k_b yahoo.se> wrote: > > Hi. > > For learning purpose i would like to make a small database with a small > > graph of locations, roads and public transport information. > > Then calculate the fastest or cheapest way between two points.

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-15 Thread s...@bestmx.ru
Scott Marlowe пишет: On Sat, Aug 13, 2011 at 9:57 AM, c k wrote: Dear Postgres users, from last few months I am reading and searching for can postgresql used as application server? As postgresql supports many languages like pl/perl, Besides the previously mentioned nginx module there's apache'

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-15 Thread Benjamin Krajmalnik
Further to Scott's comment, we are running our application platform on nginx/php (using php-fpm). It scales very well and it is extremely fast. When running under Apache, we had to constantly restart the apache service because it could not handle the load (at 150 concurrent users hitting the app it

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Leif Biberg Kristensen
On Monday 15. August 2011 16.36.23 Merlin Moncure wrote: > Postgres is not just a database -- it's a language hosting platform if > you want to use it as such. Now, you can continue to do things as > you've always done (database 'here', code 'here', web server 'here'), > but why discourage people

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Chris Travers
On Mon, Aug 15, 2011 at 7:50 AM, Andreas Joseph Krogh wrote: > Sorry if I stepped on any toes here. But seriously - by my definition of > app-server PG is not suited at all. I strongly would discourage anyone from > using any RDBMS as an app-server. *IMO* it makes development, testing, > separ

Re: [GENERAL] [ADMIN] Using Postgresql as application server

2011-08-15 Thread Scott Marlowe
On Sat, Aug 13, 2011 at 9:57 AM, c k wrote: > Dear Postgres users, > from last few months I am reading and searching for can postgresql used as > application server? As postgresql supports many languages like pl/perl, Besides the previously mentioned nginx module there's apache's mod libpq http:/

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Andreas Joseph Krogh
På mandag 15. august 2011 kl 16:36:23 skrev du: > On Sat, Aug 13, 2011 at 2:30 PM, Andreas Joseph Krogh > wrote: > > No, PG has never, and will never, act as an application-server. > > Why in the world not? Now, it may or may not be a good idea but there > is no technical constraint that prevent

[GENERAL] PostgreSQL 'hosting'

2011-08-15 Thread Dragan Zubac
Hello Does anybody know if there're any companies offering PostgreSQL 'hosting' ? By 'hosting', I mean you get access to a database to which your application connects remotely and do sql stuff. 'Hosting' company takes care of database maintenance,backup,etc. Sincerely Dragan Zubac -- Sent via

Re: [GENERAL] Using Postgresql as application server

2011-08-15 Thread Merlin Moncure
On Sat, Aug 13, 2011 at 2:30 PM, Andreas Joseph Krogh wrote: > No, PG has never, and will never, act as an application-server. Why in the world not? Now, it may or may not be a good idea but there is no technical constraint that prevents postgresql from being used in this fashion. I think it's a

Re: [GENERAL] Pg_dump Query

2011-08-15 Thread Scott Marlowe
On Mon, Aug 15, 2011 at 6:10 AM, Rebecca Clarke wrote: > Hi > I want to pg_dump only a select amount of rows from a table and restore them > to a table on another server. > Is there away to do this? I thought of using a view but how would I upload > that into a specific table.  Copy? or is there s

[GENERAL] Pg_dump Query

2011-08-15 Thread Rebecca Clarke
Hi I want to pg_dump only a select amount of rows from a table and restore them to a table on another server. Is there away to do this? I thought of using a view but how would I upload that into a specific table. Copy? or is there something I can do with pg_restore. Rebecca

Re: [GENERAL] How to tame a gigantic (100+ lines) query in a web app?

2011-08-15 Thread Thomas Markus
Hi, use WITH queries, I use this regularly and it works fine. http://www.postgresql.org/docs/9.0/static/queries-with.html regards Thomas Am 14.08.2011 16:39, schrieb W. Matthew Wilson: I'm sure I'm not the first person to end up with a gigantic query that does lots of left joins and subselects

[GENERAL] altering foreign key without a table scan

2011-08-15 Thread Vincent de Phily
Hi list, as part of a db schema update, I'd like to alter the "on update" property of a fkey, for example going from : > ALTER TABLE ONLY foo ADD CONSTRAINT foo_barid_fkey FOREIGN KEY (barid) > REFERENCES bar(id) ON UPDATE CASCADE ON DELETE CASCADE; to : > ALTER TABLE ONLY foo ADD CONSTRAINT foo_

Re: [GENERAL] How to tame a gigantic (100+ lines) query in a web app?

2011-08-15 Thread Sim Zacks
On 08/14/2011 05:39 PM, W. Matthew Wilson wrote: Is there anything dangerous about making temporary tables in this way? Matt The only dangerous thing I have encountered with temp tables is that the planner compiles the table oid into the plan and if you