Re: [GENERAL] Show in psql does any calculations?

2011-12-27 Thread Raghavendra
Thanks all for clarifying me... Good to know this... --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ 2011/12/27 Filip Rembiałkowski > so as long as actual logic is buried in the guts of psql, best you can > do in SQL to get human-readable value is > > SELE

[GENERAL] PostgreSQL 9.1 pg_dump setval() sets wrong value

2011-12-27 Thread Greg Donald
I upgraded to PostgreSQL 9.1. I was using 8.4 previously. My problem is with the new version of pg_dump. It no longer (consistently) dumps my sequence values correctly. For example, I have a table CREATE TABLE setting ( id integer NOT NULL, company_id integer NOT NULL, [...] ); T

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Tom Lane
Thomas Kellerer writes: > Tom Lane wrote on 27.12.2011 20:22: >> More specifically, look to see if the current transaction has assigned >> itself a transaction ID. I think the easiest place to see this is in >> pg_locks --- it will be holding exclusive lock on a TransactionId object >> if so. >

Re: [GENERAL] Kindly Please Help Me

2011-12-27 Thread Merlin Moncure
On Tue, Dec 27, 2011 at 5:11 PM, wrote: > Hi every1 how are u all??? Members i am new in postgres and want to work on > pgrouting but i am facing some issue will u please help me??? > I have loaded my line shapefile in pgadmin environment but when i made a > query at it it will show that ur table

[GENERAL] Kindly Please Help Me

2011-12-27 Thread saqib11
Hi every1 how are u all??? Members i am new in postgres and want to work on pgrouting but i am facing some issue will u please help me??? I have loaded my line shapefile in pgadmin environment but when i made a query at it it will show that ur table (Route dont have relation)..wht is this???

Re: [GENERAL] invalid memory alloc request size

2011-12-27 Thread Tomas Vondra
On 27.12.2011 23:23, Merlin Moncure wrote: > On Tue, Dec 27, 2011 at 4:07 PM, Tomas Vondra wrote: >> That's not likely. The corruption is usually the cause, when it hits >> varlena header - that's where the length info is stored. In that case >> PostgreSQL suddenly thinks the varlena field has a n

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Tom Lane wrote on 27.12.2011 20:22: If I'm understanding you correctly, you could just make it check the transaction status. If there's an active transaction, then there are "uncommitted changes". Sounds like what I want, but how do I check the "transaction status" (I'm using JDBC) More sp

Re: [GENERAL] invalid memory alloc request size

2011-12-27 Thread Merlin Moncure
On Tue, Dec 27, 2011 at 4:07 PM, Tomas Vondra wrote: >>> Googling around, it sounds like this is often due to table corruption, >>> which would be unfortunate, but usually seems to be repeatable. I can >>> re-run that query without issue, and in fact can select * from the entire >>> table witho

Re: [GENERAL] invalid memory alloc request size

2011-12-27 Thread Tomas Vondra
On 27.12.2011 18:34, Ben Chobot wrote: > On Dec 26, 2011, at 8:08 AM, Ben Chobot wrote: > >> Yesterday I had a problem on a 64-bit 9.1.1 install: >> >> # select version(); >>version >> >>

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
thanks -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Tuesday, December 27, 2011 2:48 PM To: Jacques Lamothe Cc: r...@iol.ie; pgsql-general@postgresql.org Subject: Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL On 12/27/2011 11:44 AM, Jacq

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
Correct, I'll take off -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of John R Pierce Sent: Tuesday, December 27, 2011 2:46 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 543

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Adrian Klaver
On 12/27/2011 11:44 AM, Jacques Lamothe wrote: Yes I'm running on amazon.aws and yes I requested my admin to open the port, do you know how I can check its status The AWS firewall is for an account so it lives outside the instances. The way I check is using the AWS Management Console. You nee

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread John R Pierce
On 12/27/11 11:34 AM, Jacques Lamothe wrote: Output [root@vpdb1 ~]# iptables -L -vn Chain INPUT (policy ACCEPT 44094 packets, 6327K bytes) pkts bytes target prot opt in out source destination 0 0 ACCEPT tcp -- * * 0.0.0.0/00.0.0.0

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
Yes I'm running on amazon.aws and yes I requested my admin to open the port, do you know how I can check its status iptables -L -vn Chain INPUT (policy ACCEPT 44554 packets, 6381K bytes) pkts bytes target prot opt in out source destination 0 0 ACCEPT tcp --

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Adrian Klaver
On 12/27/2011 11:39 AM, Jacques Lamothe wrote: Yes I did More guesses. Looks like you may be running on Amazon AWS? If so, did you change the AWS firewall to allow port 5436? -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
Yes I did -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Tuesday, December 27, 2011 2:39 PM To: Jacques Lamothe Cc: r...@iol.ie; pgsql-general@postgresql.org Subject: Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL On 12/27/2011 11:31 AM, J

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Adrian Klaver
On 12/27/2011 11:31 AM, Jacques Lamothe wrote: 1) Error: Error connecting to data database. Connection refused. C heck that hostname and port are correct and postmaster is accepting TCP/IP connection. So did you restart the server listening on port 5436 after changing the listen_addresses set

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
Output [root@vpdb1 ~]# iptables -L -vn Chain INPUT (policy ACCEPT 44094 packets, 6327K bytes) pkts bytes target prot opt in out source destination 0 0 ACCEPT tcp -- * * 0.0.0.0/00.0.0.0/0 tcp dpt:5436 Chain FORWARD (policy

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
1) Error: Error connecting to data database. Connection refused. C heck that hostname and port are correct and postmaster is accepting TCP/IP connection. 2) pg_hba.conf for both clusters are similar DB2 - Port 5436 -Amzndev01 # IPv4 local connections: hostall all

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Tom Lane
Thomas Kellerer writes: > Bill Moran wrote on 27.12.2011 19:37: >>> is there a way I can detect if the current session has any uncommitted >>> changes? >> If I'm understanding you correctly, you could just make it check the >> transaction status. If there's an active transaction, then there are

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Raymond O'Donnell
On 27/12/2011 19:07, Jacques Lamothe wrote: > > > Hi, I have 2 cluster databases, running on the same host, Linux with > redHat. My fist database port is set to default, 5432, but my second > database port is set to 5436 in the postgresql.conf file. While > everything is ok with local connection

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Adrian Klaver
On 12/27/2011 11:07 AM, Jacques Lamothe wrote: Hi, I have 2 cluster databases, running on the same host, Linux with redHat. My fist database port is set to default, 5432, but my second database port is set to 5436 in the postgresql.conf file. While everything is ok with local connections, I canno

Re: [GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread John R Pierce
On 12/27/11 11:07 AM, Jacques Lamothe wrote: Hi, I have 2 cluster databases, running on the same host, Linux with redHat. My fist database port is set to default, 5432, but my second database port is set to 5436 in the postgresql.conf file. While everything is ok with local connections, I can

[GENERAL] UNABLE TO CONNECT REMOTELY TO port 5436 - CRITICAL

2011-12-27 Thread Jacques Lamothe
Hi, I have 2 cluster databases, running on the same host, Linux with redHat. My fist database port is set to default, 5432, but my second database port is set to 5436 in the postgresql.conf file. While everything is ok with local connections, I cannot connect remotely using any of my tools to t

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Bill Moran wrote on 27.12.2011 19:37: is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the mailing list that involved the

Re: [GENERAL] Detecting uncommitted changes

2011-12-27 Thread Bill Moran
In response to Thomas Kellerer : > Hi, > > is there a way I can detect if the current session has any uncommitted > changes? > > I'm not trying to find uncommitted changes from other sessions (connections) > only for the *current* one. > > I thought there was a discussion on the mailing list

[GENERAL] Detecting uncommitted changes

2011-12-27 Thread Thomas Kellerer
Hi, is there a way I can detect if the current session has any uncommitted changes? I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one. I thought there was a discussion on the mailing list that involved the txid_XXX functions, but I couldn'

Re: [GENERAL] invalid memory alloc request size

2011-12-27 Thread Ben Chobot
On Dec 26, 2011, at 8:08 AM, Ben Chobot wrote: > Yesterday I had a problem on a 64-bit 9.1.1 install: > > # select version(); >version > >

[GENERAL] not-always-full vacuuming in 9.0 ?

2011-12-27 Thread david.sahagian
select version() "PostgreSQL 9.0.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit" I ran the [check_bloat] query from check_postgres.pl (v 2.18.0) twice, doing a VACUUM FULL in between: -- the RS db, schemaname, tablename, tups, pages, otta, tblo

Re: [GENERAL] Example of a pg_gethostname() function. Feedback?

2011-12-27 Thread bricklen
On Fri, Dec 23, 2011 at 8:22 PM, Craig Ringer wrote: > Only that it might be less hassle to wrap gethostname from pl/perl or > pl/python rather than adding a new C function, particularly if this is only > for DB testing and is not performance critical. > > -- > Craig Ringer Hi Craig, That was my

[GENERAL] Replication order

2011-12-27 Thread Martin S
Hello List! I've been playing around with replication for a few weeks. What I made was master+slave with both log shipping (NFS on a 3rd server) and streaming replication. Before hitting production environment with this schema, I was trying to reproduce some issues that we may face in the future

Re: [GENERAL] postgresql triggers - defining a global resource (java)

2011-12-27 Thread Merlin Moncure
On Mon, Dec 26, 2011 at 8:32 AM, Aman Gupta wrote: > Hey Alban, > > Thanks for the reply. I had a follow up question w.r.t listen/notify: > > I am planning to associate a NOTIFY with an update on a table - a trigger is > associated with the update, and we execute NOTIFY in the trigger code. The >

Re: [GENERAL] Error while loading sql file

2011-12-27 Thread Adrian Klaver
On Monday, December 26, 2011 9:32:41 pm Adarsh Sharma wrote: > Thanks for the Explaination, > I find it hard to determine the way to store data in different encodings > to store in postgresql, below is the demo of some data :- > > INSERT INTO conceptnet_frame > VALUES(3884,'ja','{1}?{2}???',16

Re: [GENERAL] Show in psql does any calculations?

2011-12-27 Thread Filip Rembiałkowski
so as long as actual logic is buried in the guts of psql, best you can do in SQL to get human-readable value is SELECT name, setting, unit, case when unit='kB' then pg_size_pretty(setting::int*1024) when unit='8kB' then pg_size_pretty(setting::int*1024*8) else coalesce(setting||' '||unit,setting)

Re: [GENERAL] Error while loading sql file

2011-12-27 Thread Bèrto ëd Sèra
> > HI Ardash! > > INSERT INTO conceptnet_frame > VALUES(3884,'ja','{1}は{2}を持っている。',16,3,2140,NULL,NULL,NULL); > > Can you still access the database that produced the dump? If so, you may want to produce a number of dumps for distinct language values. Japanese, in particular, is a very compli

Re: [GENERAL] Why does index not use for CTE query?

2011-12-27 Thread robins . tharakan
This message has been digitally signed by the sender. Re___GENERAL__Why_does_index_not_use_for_CTE_query_.eml Description: Binary data - Hi-Tech Gears Ltd, Gurgaon, India -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] Why does index not use for CTE query?

2011-12-27 Thread Robins Tharakan
Hi, I believe then, may be some understanding of CTE may help here. Postgres would try to execute a CTE query independently as if there was no WHERE clause outside it. This means that if you run ten UNION ALLs as you say, if they are queries that are probably better off using table scans, an

Re: [GENERAL] Show in psql does any calculations?

2011-12-27 Thread Guillaume Lelarge
On Tue, 2011-12-27 at 15:21 +0530, Raghavendra wrote: > > > On Tue, Dec 27, 2011 at 3:16 PM, Guillaume Lelarge > wrote: > On Tue, 2011-12-27 at 14:56 +0530, Raghavendra wrote: > > Respected, > > > > Am in PG 9.1. See below ouputs. > > > >

Re: [GENERAL] Show in psql does any calculations?

2011-12-27 Thread Raghavendra
On Tue, Dec 27, 2011 at 3:16 PM, Guillaume Lelarge wrote: > On Tue, 2011-12-27 at 14:56 +0530, Raghavendra wrote: > > Respected, > > > > Am in PG 9.1. See below ouputs. > > > > *By query:* > > postgres=# SELECT name, setting, unit,context FROM pg_settings WHERE > > category like '%Resource Usage /

Re: [GENERAL] Show in psql does any calculations?

2011-12-27 Thread Guillaume Lelarge
On Tue, 2011-12-27 at 14:56 +0530, Raghavendra wrote: > Respected, > > Am in PG 9.1. See below ouputs. > > *By query:* > postgres=# SELECT name, setting, unit,context FROM pg_settings WHERE > category like '%Resource Usage / Memory%' ORDER BY name; >name| setting | unit |

[GENERAL] Show in psql does any calculations?

2011-12-27 Thread Raghavendra
Respected, Am in PG 9.1. See below ouputs. *By query:* postgres=# SELECT name, setting, unit,context FROM pg_settings WHERE category like '%Resource Usage / Memory%' ORDER BY name; name| setting | unit | context ---+-+--+ ma

Re: [GENERAL] Why does index not use for CTE query?

2011-12-27 Thread AI Rumman
I know that. I wrote here only a sample. I have to have UNION ALL on the CTE expression for severral times where UNION ALL and a CONCAT SELECT will be changed. That's why I can't include the where condition in the CTE expression. On Tue, Dec 27, 2011 at 2:50 PM, Robins Tharakan wrote: > Hi, > >

Re: [GENERAL] Why does index not use for CTE query?

2011-12-27 Thread robins . tharakan
This message has been digitally signed by the sender. Re___GENERAL__Why_does_index_not_use_for_CTE_query_.eml Description: Binary data - Hi-Tech Gears Ltd, Gurgaon, India -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] Why does index not use for CTE query?

2011-12-27 Thread Robins Tharakan
Hi, The CTE is a distinct query and you're trying to do a SELECT * FROM t1. Which is quite expected to do a table scan. If you do a WHERE i=2 *within the CTE*, you should start seeing usage of the index where you're expecting to. -- Robins Tharakan On 12/27/2011 02:15 PM, AI Rumman wrote:

[GENERAL] Why does index not use for CTE query?

2011-12-27 Thread AI Rumman
Why does index not use for CTE query? I am using Postgresql 9.1 select version(); version PostgreSQL 9.1.1 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50), 32-bi