Re: [GENERAL] dataset lock

2013-04-17 Thread Albe Laurenz
Philipp Kraus wrote: > My PG database is connected to differend cluster nodes (MPI). Each > programm / process on each node are independed and run the SQL > select * from table where status = waiting > after that I update the row with the update statement (set status = working) > > so in this case

Re: [GENERAL] Most efficient way to insert without duplicates

2013-04-17 Thread François Beausoleil
Le 2013-04-16 à 22:51, François Beausoleil a écrit : > Hi all! > > I track Twitter followers in my database. I have the following table: > > # \d persona_followers > Table "public.persona_followers" > Column|Type | Modifiers > -+--

[GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Aleksey Tsalolikhin
Hi. I was promoting PostgreSQL to an AIX/Oracle shop yesterday, they are looking to switch to open source to cut their licensing costs, and was asked how large a database does PostgreSQL support? Is there an upper bound on database size and if so, what it is? Aleksey Tsalolikhin

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Adrian Klaver
On 04/17/2013 06:23 AM, Aleksey Tsalolikhin wrote: Hi. I was promoting PostgreSQL to an AIX/Oracle shop yesterday, they are looking to switch to open source to cut their licensing costs, and was asked how large a database does PostgreSQL support? Is there an upper bound on database size and if

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Mark Felder
On Wed, 17 Apr 2013 08:23:41 -0500, Aleksey Tsalolikhin wrote: Hi. I was promoting PostgreSQL to an AIX/Oracle shop yesterday, they are looking to switch to open source to cut their licensing costs, and was asked how large a database does PostgreSQL support? Is there an upper bound on datab

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Bruce Momjian
On Wed, Apr 17, 2013 at 06:23:41AM -0700, Aleksey Tsalolikhin wrote: > Hi. I was promoting PostgreSQL to an AIX/Oracle shop yesterday, they are > looking to switch to open source to cut their licensing costs, and was asked > how large a database does PostgreSQL support? Is there an upper bound on

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Albe Laurenz
Aleksey Tsalolikhin wrote: > Hi. I was promoting PostgreSQL to an AIX/Oracle shop yesterday, they are > looking to switch to open > source to cut their licensing costs, and was asked how large a database does > PostgreSQL support? Is > there an upper bound on database size and if so, what it is

Re: [GENERAL] Most efficient way to insert without duplicates

2013-04-17 Thread Chris Curvey
> INSERT INTO persona_followers(service_id, follower_id, valid_at) > SELECT service_id, follower_id, NOW() > FROM (SELECT DISTINCT service_id, follower_id FROM import) AS import > WHERE NOT EXISTS(SELECT * FROM persona_followers WHERE import.service_id > = persona_followers.service_id AND imp

Re: [GENERAL] dataset lock

2013-04-17 Thread Philipp Kraus
On 2013-04-17 09:18:13 +0200, Albe Laurenz said: Philipp Kraus wrote: My PG database is connected to differend cluster nodes (MPI). Each programm / process on each node are independed and run the SQL select * from table where status = waiting after that I update the row with the update statemen

Re: [GENERAL] Can you spot the difference?

2013-04-17 Thread Moshe Jacobson
On Tue, Apr 16, 2013 at 7:29 PM, Adrian Klaver wrote: > " > The autovacuum daemon, if enabled, will automatically issue ANALYZE > commands whenever the content of a table has changed sufficiently. However, > administrators might prefer to rely on manually-scheduled ANALYZE > operations, particular

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-17 Thread Dale Fukami
On Tue, Apr 16, 2013 at 3:04 PM, Tom Lane wrote: > Dale Fukami writes: > > I'm having a problem on a standby server (streaming replication) where a > > table seems to exist but is not queryable. Essentially a select statement > > (and drop/insert/etc) fails but \d and pg_tables show it exists. T

Re: [GENERAL] Can you spot the difference?

2013-04-17 Thread Adrian Klaver
On 04/17/2013 07:49 AM, Moshe Jacobson wrote: On Tue, Apr 16, 2013 at 7:29 PM, Adrian Klaver mailto:adrian.kla...@gmail.com>> wrote: " The autovacuum daemon, if enabled, will automatically issue ANALYZE commands whenever the content of a table has changed sufficiently. However,

[GENERAL] SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

2013-04-17 Thread itishree sukla
Dear All, Can any one please help me to fix this issue, i am getting this error from our application, currently Database is running on 9.2. 2013-04-17 11:37:25:151 - {ERROR} database.ConnectionManager Thread [http-8080-1]; --- getConnection() Exception: org.apache.commons.dbcp.SQLNestedException

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Scott Marlowe
My experience, doing production and dev dba work on both postgresql and oracle, is that either works well, as long as you partition properly or even break things into silos. Oracle isn't magic pixie dust that suddenly gets hardware with 250MB/s seq read arrays to read at 1GB/s, etc. With oracle pa

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-17 Thread Tom Lane
Dale Fukami writes: > On Tue, Apr 16, 2013 at 3:04 PM, Tom Lane wrote: >> Either way, if it's working on the master, then you've had a replication >> failure since the standby's files evidently don't match the master's. >> >> What PG version is this (and which versions have been installed since

Re: [GENERAL] Roadmap for Postgres on AIX

2013-04-17 Thread Thomas Munro
On 19 March 2013 01:00, Tom Lane wrote: > Wasim Arif writes: > > What is the road map for Postgres on the AIX platform? I understand that > > the pg build farm contains an AIX 5.3 server; are there any plans to > > upgrade to 6.1 and 7.1? > > The reason there's an AIX 5.3 buildfarm member is tha

Re: [GENERAL] Most efficient way to insert without duplicates

2013-04-17 Thread Jeff Janes
On Wed, Apr 17, 2013 at 4:26 AM, François Beausoleil wrote: > > > Insert on public.persona_followers (cost=139261.12..20483497.65 > rows=6256498 width=16) (actual time=4729255.535..4729255.535 rows=0 loops=1) >Buffers: shared hit=33135295 read=4776921 >-> Subquery Scan on t1 (cost=1392

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Aleksey Tsalolikhin
Thanks for all the great answers, folks, I'll pass this along. Cheers! Aleksey On Wed, Apr 17, 2013 at 9:45 AM, Scott Marlowe wrote: > My experience, doing production and dev dba work on both postgresql > and oracle, is that either works well, as long as you partition > properly or even break t

Re: [GENERAL] GSL onto postgresql server 9.2

2013-04-17 Thread Yuriy Rusinov
Thanks a lot. I have compiled gsl with prefix=/usr and this is quite acceptable for us. On Mon, Apr 15, 2013 at 2:30 PM, Albe Laurenz wrote: > Yuriy Rusinov wrote: > > I have to put some C-language functions onto postgresql server 9.2. > These functions are used GSL > > software library http:/

Re: [GENERAL] Most efficient way to insert without duplicates

2013-04-17 Thread Moshe Jacobson
On Tue, Apr 16, 2013 at 10:51 PM, François Beausoleil wrote: > INSERT INTO persona_followers(service_id, follower_id, valid_at) > SELECT service_id, follower_id, NOW() > FROM (SELECT DISTINCT service_id, follower_id FROM import) AS import > WHERE NOT EXISTS(SELECT * FROM persona_followers WH

Re: [GENERAL] SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

2013-04-17 Thread Alfonso Afonso
Hi Itsrhree >From the machine where is running the tomcat, do you check that you can >connect to postgresql server (remember check parameters of connection, user, >password, ip)? Having this first step tested, then: Do you have the correct connection pool configured on Catalina (Tomcat) and le

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Michael Nolan
On 4/17/13, Scott Marlowe wrote: > My experience, doing production and dev dba work on both postgresql > and oracle, is that either works well, as long as you partition > properly or even break things into silos. Oracle isn't magic pixie > dust that suddenly gets hardware with 250MB/s seq read arr

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-17 Thread Dale Fukami
> > Hm ... there was a fix in 9.0.12 that might be relevant to this: > > http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=5840e3181b7e6c784fdb3aff708c4dcc2dfe551d > Whether that explains it or not, 9.0.5 is getting long in the tooth; > you really need to think about an update. Esp

[GENERAL] Fetching Server configured port from C Module

2013-04-17 Thread Mike Roest
Hi There, I'm having a bit of an issue finding a C function to fetch the configured server port from a C module. We have written a C module to allow for remote clients to call a function to run pg_dump/pg_restore remotely but create files locally on the db server. Currently it works fine if th

Re: [GENERAL] Fetching Server configured port from C Module

2013-04-17 Thread Bruce Momjian
On Wed, Apr 17, 2013 at 01:08:18PM -0600, Mike Roest wrote: > Hi There, >I'm having a bit of an issue finding a C function to fetch the configured > server port from a C module. > > We have written a C module to allow for remote clients to call a function to > run pg_dump/pg_restore remotely b

Re: [GENERAL] Fetching Server configured port from C Module

2013-04-17 Thread John R Pierce
On 4/17/2013 12:08 PM, Mike Roest wrote: I could hard code the port in the module when we build it but it would be nice to be able to change the configured postgres port and not have to rebuild the module. Anyone have any suggestions? SHOW PORT; ? works in 9.2, anyways. -- john r pierc

Re: [GENERAL] Fetching Server configured port from C Module

2013-04-17 Thread Mike Roest
> SHOW PORT; > test=> SELECT setting FROM pg_settings WHERE name = 'port'; setting - 5432 Both of these are from a query context. This is in a C module, I suppose I could run a query but there has to be a direct C function to get this data.

Re: [GENERAL] Fetching Server configured port from C Module

2013-04-17 Thread Bruce Momjian
On Wed, Apr 17, 2013 at 01:32:00PM -0600, Mike Roest wrote: > > > > SHOW PORT; > > test=> SELECT setting FROM pg_settings WHERE name = 'port'; > setting > - > 5432 > > Both of these are from a query context. This is in a C module, I suppose I > could r

Re: [GENERAL] How large can a PostgreSQL database get?

2013-04-17 Thread Scott Marlowe
On Wed, Apr 17, 2013 at 12:53 PM, Michael Nolan wrote: > On 4/17/13, Scott Marlowe wrote: >> My experience, doing production and dev dba work on both postgresql >> and oracle, is that either works well, as long as you partition >> properly or even break things into silos. Oracle isn't magic pixie

Re: [GENERAL] Most efficient way to insert without duplicates

2013-04-17 Thread François Beausoleil
Le 2013-04-17 à 14:15, Jeff Janes a écrit : > On Wed, Apr 17, 2013 at 4:26 AM, François Beausoleil > wrote: > > > Insert on public.persona_followers (cost=139261.12..20483497.65 > rows=6256498 width=16) (actual time=4729255.535..4729255.535 rows=0 loops=1) >Buffers: shared hit=33135295

[GENERAL] Single Row Mode in psql

2013-04-17 Thread Christopher Manning
I'm using psql to extract data from a redshift (based on postgres) instance, but psql/libpq collects the result in memory before writing it to a file and causes out of memory problems for large results. Using COPY TO STDOUT or FETCH_COUNT isn't an option since redshift doesn't support those. [Sing

Re: [GENERAL] Fetching Server configured port from C Module

2013-04-17 Thread Mike Roest
Perfect thanks Bruce that worked. I just extern'd PostPortNumber in my module and everything seems to be working. --Mike

Re: [GENERAL] Most efficient way to insert without duplicates

2013-04-17 Thread Jeff Janes
On Wed, Apr 17, 2013 at 1:19 PM, François Beausoleil wrote: > > Le 2013-04-17 à 14:15, Jeff Janes a écrit : > > > It looks like 12% of the time is being spent figuring out what rows to > insert, and 88% actually doing the insertions. > > So I think that index maintenance is killing you. You could

[GENERAL] Inherit Superuser Role Help

2013-04-17 Thread Carlos Mennens
What am I missing here? postgres=> SELECT current_user; current_user -- carlos (1 row) postgres=> CREATE DATABASE carlosdb; ERROR: permission denied to create database postgres=> \du List of roles Role name | Attributes

Re: [GENERAL] Inherit Superuser Role Help

2013-04-17 Thread Tom Lane
Carlos Mennens writes: > Shouldn't 'carlos' be a superuser based on him being a member of a > role which has createdb and superuser rights granted to it? No. Superuserness is quite intentionally not inheritable. It's perhaps a bit more debatable whether other role privilege bits such as CREATED