Re: [GENERAL] pg_attribute growing extremely

2014-06-05 Thread Martijn van Oosterhout
On Fri, Jun 06, 2014 at 03:56:23AM -, haman...@t-online.de wrote: > > Hi, > > on a server running 8.4 I observe that, since a while, the pg_attribute table > is growing > enormously. > Soon after reloading I have one file > ls -s 1249 > 1048580 1249 > a day later this is > 1048580 1249 > 1

Re: [GENERAL] pg_attribute growing extremely

2014-06-05 Thread David G Johnston
hamann.w wrote > Hi, > > on a server running 8.4 I observe that, since a while, the pg_attribute > table is growing > enormously. > Soon after reloading I have one file > ls -s 1249 > 1048580 1249 > a day later this is > 1048580 1249 > 1048580 1249.1 > 1048580 1249.10 > 1048580 1249.11 > 1048580

[GENERAL] pg_attribute growing extremely

2014-06-05 Thread hamann . w
Hi, on a server running 8.4 I observe that, since a while, the pg_attribute table is growing enormously. Soon after reloading I have one file ls -s 1249 1048580 1249 a day later this is 1048580 1249 1048580 1249.1 1048580 1249.10 1048580 1249.11 1048580 1249.12 1048580 1249.13 1048580 1249.14

Re: [GENERAL] help with a procedure

2014-06-05 Thread Adrian Klaver
On 06/05/2014 09:45 AM, Carlos Carcamo wrote: Just a little, I will read it again, thanks for your help. In particular: http://www.postgresql.org/docs/9.3/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING -- Adrian Klaver adrian.kla...@aklaver.com -- Sent via pgsql-g

Re: [GENERAL] PostgreSQL 9.2.4 + CentOS 6.5 64 bit - segfault error in initdb

2014-06-05 Thread Adrian Klaver
On 06/05/2014 09:11 AM, Bhushan Pathak wrote: It did create the data directory as well pg_log directory. I ran the initdb again with -d option, but it still printed the same line in the startup log, nothing more. $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident' $LOCALESTRING

Re: [GENERAL] Optimizer issue -- bad query plan?

2014-06-05 Thread Tom Lane
Moshe Jacobson writes: > On Thu, Jun 5, 2014 at 6:38 PM, David G Johnston > wrote: >> Without definitions of all the tables involved, as well as knowing what >> version you are running this query on, it is impossible to explain why. > Right, I'm aware of this feature -- I'm just curious why it's

Re: [GENERAL] Optimizer issue -- bad query plan?

2014-06-05 Thread Moshe Jacobson
On Thu, Jun 5, 2014 at 6:38 PM, David G Johnston wrote: > Without definitions of all the tables involved, as well as knowing what > version you are running this query on, it is impossible to explain why. > I'm running 9.3.4. https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.0 > Read

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-05 Thread Keith Fiske
On Thu, Jun 5, 2014 at 2:09 PM, Sébastien Lorion wrote: > On Thu, Jun 5, 2014 at 12:55 PM, Francisco Olarte > wrote: > >> Hi Sébastien: >> >> On Thu, Jun 5, 2014 at 5:41 PM, Sébastien Lorion >> wrote: >> >> > Correct me if I am wrong, but will it not also suffer the same >> > limitation as

Re: [GENERAL] Optimizer issue -- bad query plan?

2014-06-05 Thread David G Johnston
Moshe Jacobson wrote > I have the following query: > [...] > The EXPLAIN ANALYZE for this query indicates that all of the tables in the > query are being joined despite the fact that they are not needed at all. > > Why is this? Without definitions of all the tables involved, as well as knowing wh

Re: [GENERAL] Optimizer issue -- bad query plan?

2014-06-05 Thread Moshe Jacobson
On Thu, Jun 5, 2014 at 6:09 PM, John R Pierce wrote: > why would you join 28 tables you're not using ?? > The query is derived from a view. I want to select only one column from a view with many columns. I figured the optimizer would be smart enough in this case not to join all of the tables nee

Re: [GENERAL] Optimizer issue -- bad query plan?

2014-06-05 Thread John R Pierce
On 6/5/2014 2:43 PM, Moshe Jacobson wrote: The EXPLAIN ANALYZE for this query indicates that all of the tables in the query are being joined despite the fact that they are not needed at all. Why is this? why would you join 28 tables you're not using ?? -- john r pierce

[GENERAL] Optimizer issue -- bad query plan?

2014-06-05 Thread Moshe Jacobson
I have the following query: SELECT r.reset FROM tb_reset r LEFT JOIN tb_project pj ON pj.project = r.project LEFT JOIN tb_location l ON l.location = r.location LEFT JOIN tb_program pg ON pg.program = r.program LEFT JOIN tb_reset_survey rsv ON rsv.reset = r.reset LEFT JOIN tb_prog

Re: [GENERAL] screwed up authentication

2014-06-05 Thread Ray Stell
On Jun 5, 2014, at 3:24 PM, "john.tiger" wrote: > okay, figure this is a problem with postgresql user vs linux user - but how > to fix ? John, su and sudo are OS commands and the examples you provide using them demonstrate attempts to start a shell as the postgres, OS user. pg_hba.conf is

Re: [GENERAL] screwed up authentication

2014-06-05 Thread John R Pierce
On 6/5/2014 12:24 PM, john.tiger wrote: debian jessie 9.3 latest upgrade su - postgres password: x ==> Authentication failure thats the operating system user.to set it, try... sudo passwd postgres or, just use sudo as you did later. edited pg_hba.conf ==> local all all tr

[GENERAL] screwed up authentication

2014-06-05 Thread john.tiger
debian jessie 9.3 latest upgrade su - postgres password: x ==> Authentication failure edited pg_hba.conf ==> local all all trust restarted still failure sudo -u postgres pgsql ===> access okay, figure this is a problem with postgresql user vs linux user - but how to fix ? is it ea

Re: [GENERAL] Heartbleed Impact

2014-06-05 Thread Dev Kumkar
On Thu, Jun 5, 2014 at 11:03 PM, Magnus Hagander wrote: > Hi! > > The guys at EnterpriseDB are busy building new installers as we speak, I > would expect them to be out tomorrow or so. > > -- > Magnus Hagander > Me: http://www.hagander.net/ > Work: http://www.redpill-linpro.com/ > Thanks for

Re: [GENERAL] help with a procedure

2014-06-05 Thread David G Johnston
Carlos Carcamo wrote > SELECT myProcedure(product_id, p_description, price, qty, store_id, > store_description ); > > waiting for a response from procedure, maybe true or false. Note that forcing the procedure to return false instead of simply throwing an error is going to degrade performance. I

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-05 Thread Sébastien Lorion
On Thu, Jun 5, 2014 at 12:55 PM, Francisco Olarte wrote: > Hi Sébastien: > > On Thu, Jun 5, 2014 at 5:41 PM, Sébastien Lorion > wrote: > > > Correct me if I am wrong, but will it not also suffer the same > > limitation as any statement based replication, namely that the "merged" > > slave w

Re: [GENERAL] Heartbleed Impact

2014-06-05 Thread Magnus Hagander
On Thu, Jun 5, 2014 at 7:30 PM, Dev Kumkar wrote: > > On Wed, Apr 16, 2014 at 9:08 PM, Dev Kumkar > wrote: > >> On Wed, Apr 16, 2014 at 7:50 PM, Stephen Frost >> wrote: >> >>> * Dev Kumkar (devdas.kum...@gmail.com) wrote: >>> > I just downloaded the latest binaries from EnterpriseDB and when >>

Re: [GENERAL] Heartbleed Impact

2014-06-05 Thread Dev Kumkar
On Wed, Apr 16, 2014 at 9:08 PM, Dev Kumkar wrote: > On Wed, Apr 16, 2014 at 7:50 PM, Stephen Frost wrote: > >> * Dev Kumkar (devdas.kum...@gmail.com) wrote: >> > I just downloaded the latest binaries from EnterpriseDB and when checked >> > with libssl.so.1.0.0 can see this: >> > OpenSSL 1.0.1g

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-05 Thread Francisco Olarte
Hi Sébastien: On Thu, Jun 5, 2014 at 5:41 PM, Sébastien Lorion wrote: > Correct me if I am wrong, but will it not also suffer the same > limitation as any statement based replication, namely that the "merged" > slave will have to sustain the same write load as all shards combined ? I canno

Re: [GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
Just a little, I will read it again, thanks for your help. 2014-06-05 10:39 GMT-06:00 David G Johnston : > > Have you read this chapter of the documentation? > > http://www.postgresql.org/docs/9.3/interactive/plpgsql.html > > > Carlos Carcamo wrote > > What I need is some help with the procedure

Re: [GENERAL] help with a procedure

2014-06-05 Thread David G Johnston
Have you read this chapter of the documentation? http://www.postgresql.org/docs/9.3/interactive/plpgsql.html Carlos Carcamo wrote > What I need is some help with the procedure in postgres, I have searched > in > google, but I dont know how to do it, the goal is perform the first insert > and th

Re: [GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
What I need is some help with the procedure in postgres, I have searched in google, but I dont know how to do it, the goal is perform the first insert and then the second insert if the first one succeed in one procedure instead of using two separate inserts. Do you have some code like that? 2014-

Re: [GENERAL] help with a procedure

2014-06-05 Thread Seref Arikan
Sorry, I meant: "calling a stored procedure you'll write in postgres from php" On Thu, Jun 5, 2014 at 5:13 PM, Seref Arikan wrote: > Hi Carlos, > When you say procedures, do you mean calling a stored procedure you'll > write from php? Or executing the individual INSERT from php sequentially? >

Re: [GENERAL] help with a procedure

2014-06-05 Thread Seref Arikan
Hi Carlos, When you say procedures, do you mean calling a stored procedure you'll write from php? Or executing the individual INSERT from php sequentially? For the first scenario, you'd need to write a postgresql stored procedure (I suggest you google: PL/pgSQL tutorial) and call the from php. For

Re: [GENERAL] PostgreSQL 9.2.4 + CentOS 6.5 64 bit - segfault error in initdb

2014-06-05 Thread Bhushan Pathak
It did create the data directory as well pg_log directory. I ran the initdb again with -d option, but it still printed the same line in the startup log, nothing more. $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident' $LOCALESTRING -d" >> "$PGLOG" 2>&1 < /dev/null I then ran th

Re: [GENERAL] Merge a sharded master into a single read-only slave

2014-06-05 Thread Sébastien Lorion
On Wed, Jun 4, 2014 at 1:50 PM, Keith Fiske wrote: > Not sure if this will work for you, but sharing a similar scenario in case > it may work for you. > > An extension I wrote provides similar logical replication as you've > probably seen in other tools. > https://github.com/omniti-labs/mimeo > O

Re: [GENERAL] help with a procedure

2014-06-05 Thread Seref Arikan
Hi Carlos, Unless I'm missing something here, your queries are probably being called from a programming language (java/c# etc) and your database access api should support transactions. If you perform both operations under the same db transaction and commit your transaction things should be fine. If

Re: [GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
2014-06-05 9:32 GMT-06:00 Carlos Carcamo : > Hi everyone, I wonder if you could help me with a procedure that I would > like to perform in postgresql. > > I have an insert query like this: > > INSERT INTO products (product_id, description, price, qty, ...) values > ('01', 'some description', 10.15

[GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
Hi everyone, I wonder if you could help me with a procedure that I would like to perform in postgresql. I have an insert query like this: INSERT INTO products (product_id, description, price, qty, ...) values ('01', 'some description', 10.15, 5, ...) then if there is no problem, perform another

Re: [GENERAL] Postgresql service stopped automatically after restart

2014-06-05 Thread Kalai R
Hello, Can I use windows default service account "LocalSystem" for psql service account when installing. On Thu, Jun 5, 2014 at 11:01 AM, Kalai R wrote: > Thank You for your suggestions. > > In silent installation we use the following code in vb.net to install > postgres > > xinststr =" --m