[GENERAL] Instangram is powered by PostgreSQL

2012-04-09 Thread unclesam
just wanna to share that Instagram use PostgreSQL. excellent ! this company worth for 1 billion is powered by PostgreSQL Click link below http://highscalability.com/blog/2012/4/9/the-instagram-architecture-facebook-bought-for-a-cool-billio.html http://instagram-engineering.tumblr.com/post/2054

Re: [GENERAL] Resize numeric column without changing data?

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 5:16 PM, Jeff Davis wrote: > On Mon, 2012-04-09 at 16:06 -0400, Lukas Eklund wrote: >> Ah. I must have not noticed that the typmod for views is not inherited >> automatically. I'm okay with developing a script to recreate the 15 or >> so views the depend on that table. What

Re: [GENERAL] Resize numeric column without changing data?

2012-04-09 Thread Jeff Davis
On Mon, 2012-04-09 at 16:06 -0400, Lukas Eklund wrote: > Ah. I must have not noticed that the typmod for views is not inherited > automatically. I'm okay with developing a script to recreate the 15 or > so views the depend on that table. What I'm trying to avoid is locking > that table for a substa

Re: [GENERAL] Resize numeric column without changing data?

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 3:06 PM, Lukas Eklund wrote: > On Mon, Apr 9, 2012 at 2:51 PM, Merlin Moncure wrote: >> On Mon, Apr 9, 2012 at 9:57 AM, Lukas Eklund wrote: >>> Is it safe to resize a numeric column using in pg_attribute without >>> altering the table? >>> >> >> One thing that's pretty wei

Re: [GENERAL] Resize numeric column without changing data?

2012-04-09 Thread Lukas Eklund
On Mon, Apr 9, 2012 at 2:51 PM, Merlin Moncure wrote: > On Mon, Apr 9, 2012 at 9:57 AM, Lukas Eklund wrote: >> Is it safe to resize a numeric column using in pg_attribute without >> altering the table? >> > > One thing that's pretty weird is that dependent view columns keep the > old typmod.  Tha

Re: [GENERAL] Help needed to mount a dmp file

2012-04-09 Thread John R Pierce
On 04/09/12 12:40 PM, François Beausoleil wrote: It depends on whether you have a SQL dump file or a custom archive type. I believe pg_restore can restore both kinds. no, pg_restore can only restore from custom archives (made with pg_dump -Fc) . straight SQL dumps are fed to psql -- john

Re: [GENERAL] Help needed to mount a dmp file

2012-04-09 Thread François Beausoleil
Le lundi 9 avril 2012 à 12:47, Lux a écrit : > Hi, > I am new to Postgresql and have no clue. The first task given to me was to > try to mount this dmp file on Postgresql which has been downloaded from Jive. > I am not sure how to go about and where to start. Can someone please help me. > Than

[GENERAL] Help needed to mount a dmp file

2012-04-09 Thread Lux
Hi, I am new to Postgresql and have no clue. The first task given to me was to try to mount this dmp file on Postgresql which has been downloaded from Jive. I am not sure how to go about and where to start. Can someone please help me. Thanks & Regards, Lux.

Re: [GENERAL] Resize numeric column without changing data?

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 9:57 AM, Lukas Eklund wrote: > Is it safe to resize a numeric column using in pg_attribute without > altering the table? > > I have a large table (over 900 million rows) that, due to some poor > design choices years ago, has a column numeric(8,2) that needs to > modified to

Re: [GENERAL] GROUP BY or alternative means to group

2012-04-09 Thread Bruno Wolff III
On Mon, Apr 09, 2012 at 13:55:04 -0400, Michael Gould wrote: Thanks that is a help. I would be nice if any key could be used as those are normally the things I would do group by's This is what the 9.1 documentation says: "When GROUP BY is present, it is not valid for the SELECT list express

Re: [GENERAL] GROUP BY or alternative means to group

2012-04-09 Thread Michael Gould
Thanks that is a help. I would be nice if any key could be used as those are normally the things I would do group by's Regards Mike Gould From my Samsung Android tablet on T-Mobile. The first nationwide 4G networkBruno Wolff III wrote:On Mon, Mar 12, 2012 at 16:18:05 -0400,    Michael Gou

Re: [GENERAL] My main/base/pgsql_tmp directory has over 5.7 millions files

2012-04-09 Thread Tom Lane
Francois Lacoursiere writes: > Is there any reason why these files aren't cleaned-up ? We have just > installed postgresql-9.1.3 and it seems we have this problem since this > update. They're certainly supposed to be cleaned up. Can you provide a test case that causes one to be created and not

[GENERAL] My main/base/pgsql_tmp directory has over 5.7 millions files

2012-04-09 Thread Francois Lacoursiere
Is there any reason why these files aren't cleaned-up ? We have just installed postgresql-9.1.3 and it seems we have this problem since this update. I haven't checked the ratio (ls takes more than 5 minutes to return) but most of these files seems to be empty. It causes me problem when I try to t

Re: [GENERAL] GROUP BY or alternative means to group

2012-04-09 Thread Bruno Wolff III
On Mon, Mar 12, 2012 at 16:18:05 -0400, Michael Gould wrote: You need to include all columns that are not aggregrative columns in the group by. Even though that is the standard it is a pain to list all columns even if you don't need them In later versions of postgres this is relaxed a bit

[GENERAL] Resize numeric column without changing data?

2012-04-09 Thread Lukas Eklund
Is it safe to resize a numeric column using in pg_attribute without altering the table? I have a large table (over 900 million rows) that, due to some poor design choices years ago, has a column numeric(8,2) that needs to modified to numeric(12,2). I would like to avoid running an ALTER TABLE stat

Re: [GENERAL] Regarding NOTIFY

2012-04-09 Thread Bret Stern
On Mon, 2012-04-09 at 09:03 +, Jasen Betts wrote: > On 2012-03-09, Bret Stern wrote: > > We have a concrete batching application composed of two parts. > > 1. The Monitor. > > The Monitor cycles every 60 seconds, and looks into a Postgresql table > > for jobs to run. Primarily these jobs upda

[GENERAL] Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.

2012-04-09 Thread leaf_yxj
Thanks Guys. I wrote this function in a specific schema and granted to the dba users only. Thanks. Problem solved. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Questions-of-the-privileges-to-use-the-pg-cancel-backend-and-pg-terminate-backend-function-Thanks-tp5618129p

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-09 Thread Adrian Klaver
On 04/09/2012 03:33 AM, 乔志强 wrote: But after some minutes the master output: requested WAL segment XXX has already been removed the standby output: FATAL: could not receive data from WAL stream: FATAL: requested WAL segment XXX has already been removed Question:

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-09 Thread Condor
On 09.04.2012 13:33, 乔志强 wrote: I use postgresql-9.1.3-1-windows-x64.exe on windows 2008 R2 x64. 1 master and 1 standby. The standby is a synchronous standby use streaming replication (synchronous_standby_names = '*', archive_mode = off), the master output: standby "walreceiver" is now

[GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-09 Thread 乔志强
I use postgresql-9.1.3-1-windows-x64.exe on windows 2008 R2 x64. 1 master and 1 standby. The standby is a synchronous standby use streaming replication (synchronous_standby_names = '*', archive_mode = off), the master output: standby "walreceiver" is now the synchronous standby with prior

Re: [GENERAL] Regarding NOTIFY

2012-04-09 Thread Jasen Betts
On 2012-03-09, Bret Stern wrote: > We have a concrete batching application composed of two parts. > 1. The Monitor. > The Monitor cycles every 60 seconds, and looks into a Postgresql table > for jobs to run. Primarily these jobs update Postgresql tables with > data from external applications. > >

[GENERAL] Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.

2012-04-09 Thread Jasen Betts
On 2012-04-04, leaf_yxj wrote: > Hi Aaron: thanks. I tried the security definer. it works well as follows : > > CREATE FUNCTION kill_process(integer) RETURNS boolean AS 'select > pg_cancel_backend($1);' LANGUAGE SQL SECURITY DEFINER; > > One more question about this function : if non-super us