Re: [GENERAL] Large amount of serialization errors in transactions

2013-05-14 Thread Vegard Bønes
Thanks, I tried increasing max_pred_locks_per_transaction by a factor 20, and that seems to have helped. btw, is there any reason, beside memory concerns, not to have a very high value for max_pred_locks_per_transaction? - Vegard - Original Message - Fra: "Kevin Grittner" Til: "Vegar

Re: [GENERAL] dblink does not resolve DNS, but works with IP

2013-05-14 Thread Mike Christensen
Though I'm a bit curious why there's a host and hostaddr. Why can't it just resolve whatever you give it? On Tue, May 14, 2013 at 9:31 PM, Mike Christensen wrote: > Excellent! Thanks so much. > > > On Tue, May 14, 2013 at 9:25 PM, Adrian Klaver wrote: > >> On 05/14/2013 09:17 PM, Mike Christen

Re: [GENERAL] dblink does not resolve DNS, but works with IP

2013-05-14 Thread Mike Christensen
Excellent! Thanks so much. On Tue, May 14, 2013 at 9:25 PM, Adrian Klaver wrote: > On 05/14/2013 09:17 PM, Mike Christensen wrote: > >> If I have this: >> >> CREATE OR REPLACE VIEW Link.Foo AS >>select * from dblink( >> 'hostaddr=123.123.123.123 dbname=KitchenPC user=Website >> passwor

Re: [GENERAL] dblink does not resolve DNS, but works with IP

2013-05-14 Thread Adrian Klaver
On 05/14/2013 09:17 PM, Mike Christensen wrote: If I have this: CREATE OR REPLACE VIEW Link.Foo AS select * from dblink( 'hostaddr=123.123.123.123 dbname=KitchenPC user=Website password=secret', 'select * from Foo') as ... Then it works. However, if I do: CREATE OR REPLACE VIEW L

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Jashaswee asked: > i want to convert numbers into words in postgresql. > is there any query for it? Easy enough with PlPerl: $ sudo apt-get install liblingua-en-inflect-perl $ createlang plperlu $ psql < create or replace function numwords(i

[GENERAL] dblink does not resolve DNS, but works with IP

2013-05-14 Thread Mike Christensen
If I have this: CREATE OR REPLACE VIEW Link.Foo AS select * from dblink( 'hostaddr=123.123.123.123 dbname=KitchenPC user=Website password=secret', 'select * from Foo') as ... Then it works. However, if I do: CREATE OR REPLACE VIEW Link.Foo AS select * from dblink( 'hostaddr=db.d

Re: [GENERAL] Running out of memory at vacuum

2013-05-14 Thread Jeff Janes
On Tuesday, May 14, 2013, Ioana Danes wrote: > Hi all, > > I have a production database that sometimes runs out of memory at nightly > vacuum. > > The application runs typically with around 40 postgres connections but > there are times when the connections increase because of some queries going >

Re: [GENERAL] PostgreSQL TCL extension - Redhat 5

2013-05-14 Thread John R Pierce
On 5/14/2013 5:38 PM, ocalde...@solucionesaplicativas.com wrote: Can you provide me the link to that rpm please? Because I tried some rpms of postgres91 tcl that requires 8.5 version. Also I had the problem that also those packages that I tried asked me to install dependencies postgresql91 and

Re: [GENERAL] PostgreSQL TCL extension - Redhat 5

2013-05-14 Thread John R Pierce
On 5/14/2013 5:02 PM, Oscar Calderon wrote: So i searched for an older version and i found this: http://yum.postgresql.org/8.4/redhat/rhel-5-x86_64/postgresql-tcl-1.6.2-1PGDG.rhel5.x86_64.rpm I had installed it without problems, and it appears when i execute SELECT * FROM pg_available_extensio

[GENERAL] PostgreSQL TCL extension - Redhat 5

2013-05-14 Thread Oscar Calderon
Hi to everybody, this is my first email in this list. I wanna ask you this because i couldn't find accurated information in google about it. Currently our company gives maintenance service to another company in postgresql. They have a redhat 5 server of 64 bits with postgresql 9.1.1 . The server ha

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Adrian Klaver
On 05/14/2013 03:27 PM, Merlin Moncure wrote: On Tue, May 14, 2013 at 5:24 PM, Adrian Klaver wrote: Seems to only work with money type. from the source: /* cash_words() * This converts a int4 as well but to a representation using words * Obviously way North American centric - sorry */

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Julian
On 15/05/13 08:27, Merlin Moncure wrote: > On Tue, May 14, 2013 at 5:24 PM, Adrian Klaver > wrote: >> On 05/14/2013 03:17 PM, John R Pierce wrote: >>> >>> On 5/14/2013 2:57 PM, Alvaro Herrera wrote: Jashaswee escribió: > >> i want to convert numbers into words in postgresql.is t

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Alvaro Herrera
John R Pierce wrote: > not sure I'd call that documentation. I was asking, where is that > described in the postgresql manual? I looked in every category I > thought was appropriate here, > http://www.postgresql.org/docs/current/static/functions.html and > didn't find it. A quick grep in doc/s

Re: [GENERAL] Storing Special Characters

2013-05-14 Thread CR Lender
On 2013-05-15 00:31, Chris Angelico wrote: > Which, in UTF-8, is represented by the byte sequence C2 A3. (The > latter would be represented as EC 8A A3.) Right, my bad. I read Unicode instead of UTF-8. - crl -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread John R Pierce
On 5/14/2013 3:24 PM, Adrian Klaver wrote: um, where is that documented? I've searched the various 'functions' pages, and not seen it, nor is it in the manual Index. production=> \df cash_words List of functions Schema |Name| Result data type | Argu

Re: [GENERAL] Storing Special Characters

2013-05-14 Thread Chris Angelico
On Wed, May 15, 2013 at 8:20 AM, CR Lender wrote: > On 2013-05-14 19:32, Paul Jungwirth wrote: >> The UTF-8 encoding for a pound sign is 0xc2a3, not just 0xa3. You >> might want to make sure your PHP file is correct. > > Just for the record, the Unicode code point for the pound symbol (£) is > act

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Merlin Moncure
On Tue, May 14, 2013 at 5:24 PM, Adrian Klaver wrote: > On 05/14/2013 03:17 PM, John R Pierce wrote: >> >> On 5/14/2013 2:57 PM, Alvaro Herrera wrote: >>> >>> Jashaswee escribió: >i want to convert numbers into words in postgresql.is there any query for it? >if yes please reply

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Merlin Moncure
On Tue, May 14, 2013 at 4:32 PM, John R Pierce wrote: > On 5/13/2013 11:27 PM, Jashaswee wrote: >> >> i want to convert numbers into words in postgresql.is there any query for >> it? >> if yes please reply soon > > > you mean, like 123 -> "one hundred twenty three" ?that would be better > don

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Adrian Klaver
On 05/14/2013 03:17 PM, John R Pierce wrote: On 5/14/2013 2:57 PM, Alvaro Herrera wrote: Jashaswee escribió: >i want to convert numbers into words in postgresql.is there any query for it? >if yes please reply soon Try cash_words() um, where is that documented? I've searched the various 'fu

Re: [GENERAL] Storing Special Characters

2013-05-14 Thread CR Lender
On 2013-05-14 19:32, Paul Jungwirth wrote: > The UTF-8 encoding for a pound sign is 0xc2a3, not just 0xa3. You > might want to make sure your PHP file is correct. Just for the record, the Unicode code point for the pound symbol (£) is actually 0x00A3. 0xC2A3 is the Hangul syllable Syuh (슣). - crl

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread John R Pierce
On 5/14/2013 2:57 PM, Alvaro Herrera wrote: Jashaswee escribió: >i want to convert numbers into words in postgresql.is there any query for it? >if yes please reply soon Try cash_words() um, where is that documented? I've searched the various 'functions' pages, and not seen it, nor is it in

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Scott Marlowe
Meant to add: I'd definitely be looking at using pgbouncer if you can to pool locally. Makes a huge difference in how the machine behaves should things go badly (i.e. it starts to slow down and connections want to pile up) On Tue, May 14, 2013 at 4:15 PM, Scott Marlowe wrote: > On Tue, May 14, 20

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Scott Marlowe
On Tue, May 14, 2013 at 11:25 AM, Ioana Danes wrote: > I agree and I will do. > Now let me ask you this. How much memory would be decent you put on a server > with 2000 users creating transactions every 4-10 seconds (2 to 20 inserts) at > pick times? I know more should be considered when taking

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Alvaro Herrera
Jashaswee escribió: > i want to convert numbers into words in postgresql.is there any query for it? > if yes please reply soon Try cash_words() -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-general mail

Re: [GENERAL] In what situations do you use -U of initdb?

2013-05-14 Thread Kevin Grittner
"Tsunakawa, Takayuki" wrote: > I'd like to hear other cases like: > > - Packaged applications (not OS) that embeds or uses PostgreSQL > - The corporate environment where some security policy is >   enforced that the OS user and the database administrator user >   must be different Well, where I

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread John R Pierce
On 5/14/2013 10:25 AM, Ioana Danes wrote: I agree and I will do. Now let me ask you this. How much memory would be decent you put on a server with 2000 users creating transactions every 4-10 seconds (2 to 20 inserts) at pick times? I know more should be considered when taking such decision but

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread John R Pierce
On 5/13/2013 11:27 PM, Jashaswee wrote: i want to convert numbers into words in postgresql.is there any query for it? if yes please reply soon you mean, like 123 -> "one hundred twenty three" ?that would be better done in your client software. -- john r pierce

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Raymond O'Donnell
On 14/05/2013 07:27, Jashaswee wrote: > i want to convert numbers into words in postgresql.is there any query > for it? if yes please reply soon What exactly are you trying to do? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql-genera

[GENERAL] Running out of memory at vacuum

2013-05-14 Thread Ioana Danes
Hi all, I have a production database that sometimes runs out of memory at nightly vacuum. The application runs typically with around 40 postgres connections but there are times when the connections increase because of some queries going on. The reason is that the operations are slow, the termi

[GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Jashaswee
i want to convert numbers into words in postgresql.is there any query for it? if yes please reply soon -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-convert-numbers-into-words-in-postgresql-tp5755370.html Sent from the PostgreSQL - general mailing list archive

[GENERAL] check_postgres_last_vacuum for all databases

2013-05-14 Thread AI Rumman
Hi, I have been setting up nagios alert for check_postgres_last_vacuum. I went through the code and saw that I have to define the databases in order to check for all database tables. In my environment, database creation and deletion is dynamic. So any time any one can create database or delete for

Re: [GENERAL] Storing Special Characters

2013-05-14 Thread Paul Jungwirth
The UTF-8 encoding for a pound sign is 0xc2a3, not just 0xa3. You might want to make sure your PHP file is correct. If you're on Linux, you can use a command like `od --format=ax1 foo.php` to see the actual byte values. If that shows the wrong value, then the problem is your text editor is saving t

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Ioana Danes
I agree and I will do. Now let me ask you this. How much memory would be decent you put on a server with 2000 users creating transactions every 4-10 seconds (2 to 20 inserts) at pick times? I know more should be considered when taking such decision but I would like to know your point of view at

Re: [GENERAL] How to clone a running master cluster?

2013-05-14 Thread Jeff Janes
On Sun, May 12, 2013 at 5:54 AM, Moshe Jacobson wrote: > That option doesn't seem to exist, but pg_basebackup does seem to be the > way to go. > Thanks for the help, Jeff! > --xlog-method was add in 9.2. Cheers, Jeff

Re: [GENERAL] Storing Special Characters

2013-05-14 Thread Leif Biberg Kristensen
Tirsdag 14. mai 2013 18.05.05 skrev Rebecca Clarke: > Hi there. > > This may be the wrong forum to inquire in, but I'd be grateful if I could > directed in the right direction if that is the case. > > I am currently using Postgresql 9.1. > > I have a table in which I want to store shop names. So

[GENERAL] Storing Special Characters

2013-05-14 Thread Rebecca Clarke
Hi there. This may be the wrong forum to inquire in, but I'd be grateful if I could directed in the right direction if that is the case. I am currently using Postgresql 9.1. I have a table in which I want to store shop names. Some of the shop names contain 'é' and '£'. The query below works whe

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Scott Marlowe
Well definitely look at getting more memory in it if you can. 8G is seriously pretty small. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Ioana Danes
Hi Scott, I am running with the same configuration since 2 years ago and this only started to happen 2-3 month ago.  I agree that in some conditions that configuration could not be enough for over 100 connections and in that case I would expect the system to complain during these queries bu

Re: [GENERAL] Vacuum problem

2013-05-14 Thread Scott Marlowe
Not saying you HAVE bloating there, saying you MIGHT. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Vacuum problem

2013-05-14 Thread S H
I am doing regular insertion/deletion on the same tables .. and running vacuum in an hour... I suspect there is bloating in my tables.. but how does bloating in pgcatalog is happening is not clear...> Normally vacuum full is NOT required on a regular basis. However, if > you did something like

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Scott Marlowe
On Tue, May 14, 2013 at 8:30 AM, Ioana Danes wrote: > Hi Igor, > > 1. I could remove the nightly vacuum but I think that is > not the cause. The vacuum is only catching the problem. If I ignore the > vacuum message for few days the system is gonna run out of memory on > queries... You should be

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Igor Neyman
> -Original Message- > From: Ioana Danes [mailto:ioanasoftw...@yahoo.ca] > Sent: Tuesday, May 14, 2013 11:29 AM > To: Igor Neyman; PostgreSQL General > Subject: Re: [GENERAL] Running out of memory on vacuum > > > > Hi Igor, > > I don't need the manual vacuum. I just don't want to remo

Re: [GENERAL] bloating vacuum

2013-05-14 Thread Scott Marlowe
On Tue, May 14, 2013 at 9:06 AM, S H wrote: > Got some information from following > > http://www.depesz.com/2011/07/06/bloat-happens/ > > What is the general solution to avoid bloating. 1: Don't do massive deletes 2: Make sure your autovacuum is tuned aggressively enough to keep up with your work

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Ioana Danes
Hi Igor, I don't need the manual vacuum. I just don't want to remove it now because it gives me a clue that something is wrong and I need to restart postgres to free up the memory. Otherwise I run out of memory later in the day and that is something I want to avoid. Even if "I don't need it"

Re: [GENERAL] Vacuum problem

2013-05-14 Thread Scott Marlowe
On Tue, May 14, 2013 at 7:27 AM, S H wrote: >> I wonder if you've got a bloated pg catalog then. Certainly sounds >> like it's a possibility. >> So other than vacuuming when you recreate this, is the server working >> hard? What is vacuum vacuuming when this happens (pg_stat_activity >> should sho

Re: [GENERAL] postgres and xquery

2013-05-14 Thread Merlin Moncure
On Tue, May 14, 2013 at 9:48 AM, kristian kvilekval wrote: > > I was really hoping to see be able to store several ten's of millions XML > documents in postgres, but I would also like to use Xquery to retrieve > results. Back in 2010 there was some mailing list discussion about using > integratin

Re: [GENERAL] bloating vacuum

2013-05-14 Thread S H
Got some information from following http://www.depesz.com/2011/07/06/bloat-happens/ What is the general solution to avoid bloating. > On Tue, 2013-05-14 at 14:51 +, S H wrote: > > I am doing some experiment to understand the behaviour of manual > > vacuum. > > > > I created small table and sta

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Igor Neyman
> -Original Message- > From: Ioana Danes [mailto:ioanasoftw...@yahoo.ca] > Sent: Tuesday, May 14, 2013 10:30 AM > To: Igor Neyman; PostgreSQL General > Subject: Re: [GENERAL] Running out of memory on vacuum > > Hi Igor, > > 1. I could remove the nightly vacuum but I think that is not t

Re: [GENERAL] bloating vacuum

2013-05-14 Thread bricklen
On Tue, May 14, 2013 at 7:51 AM, S H wrote: > I created small table and started doing insertion/deletion/updation on > 2 rows in infinite loop. It started bloating around 844 times, but after it > stopped bloating.. what could be the reason? > Did autovacuum kick in and clean up the table? Is

Re: [GENERAL] postgres and xquery

2013-05-14 Thread Rob Sargent
On 05/14/2013 08:48 AM, kristian kvilekval wrote: I was really hoping to see be able to store several ten's of millions XML documents in postgres, but I would also like to use Xquery to retrieve results. Back in 2010 there was some mailing list discussion about using integrating the xquery pro

Re: [GENERAL] bloating vacuum

2013-05-14 Thread Reid Thompson
On Tue, 2013-05-14 at 14:51 +, S H wrote: > I am doing some experiment to understand the behaviour of manual > vacuum. > > I created small table and started doing insertion/deletion/updation on > 2 rows in infinite loop. It started bloating around 844 times, but > after it stopped bloating.. w

[GENERAL] bloating vacuum

2013-05-14 Thread S H
I am doing some experiment to understand the behaviour of manual vacuum. I created small table and started doing insertion/deletion/updation on 2 rows in infinite loop. It started bloating around 844 times, but after it stopped bloating.. what could be the reason? In between i am running manual

Re: [GENERAL] postgres and xquery

2013-05-14 Thread kristian kvilekval
I was really hoping to see be able to store several ten's of millions XML documents in postgres, but I would also like to use Xquery to retrieve results. Back in 2010 there was some mailing list discussion about using integrating the xquery processor of zorba into postgres. I was trying to gauge

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Ioana Danes
Hi Igor, 1. I could remove the nightly vacuum but I think that is not the cause. The vacuum is only catching the problem. If I ignore the vacuum message for few days the system is gonna run out of memory on queries... 2. There is no autovacuum running in the same time. I tried to run vacuum ve

Re: [GENERAL] Running out of memory on vacuum

2013-05-14 Thread Igor Neyman
> Subject: [GENERAL] Running out of memory on vacuum > > Hi all, > > I have a production database that sometimes runs out of memory=at > nightly vacuum. > > The application runs typically with around 40 post=res connections but > there are times when the connections increase because =f some quer

Re: [GENERAL] FATAL: database "a/system_data" does not exist

2013-05-14 Thread Adrian Klaver
On 05/14/2013 03:30 AM, sumita wrote: I put the log_statement to 'all' and log_connections too. I get below May 14 09:18:45 LOG: execute : SELECT gid FROM pg_prepared_xacts May 14 09:18:45 LOG: connection received: host=127.0.0.1 port=55618 May 14 09:18:45 LOG: connection authorized: user=po

[GENERAL] Running out of memory on vacuum

2013-05-14 Thread Ioana Danes
Hi all,   I have a production database that sometimes runs out of memory=at nightly vacuum.   The application runs typically with around 40 post=res connections but there are times when the connections increase because =f some queries going on. The reason is that the operations are slow, the t=rmin

Re: [GENERAL] Vacuum problem

2013-05-14 Thread S H
> I wonder if you've got a bloated pg catalog then. Certainly sounds > like it's a possibility. > So other than vacuuming when you recreate this, is the server working > hard? What is vacuum vacuuming when this happens (pg_stat_activity > should show that) Does vacuum full is required to avoid bloa

Re: [GENERAL] FATAL: database "a/system_data" does not exist

2013-05-14 Thread sumita
Has anything changed in terms of search_path in postgres 9.2.4 I have upgraded postgres from 9.1.3 where I donot see these errors in the log file -- View this message in context: http://postgresql.1045698.n5.nabble.com/FATAL-database-a-system-data-does-not-exist-tp5754839p5755399.html Sent from

Re: [GENERAL] FATAL: database "a/system_data" does not exist

2013-05-14 Thread sumita
Further analysis on my product code does not show this query being fired from the product code at interval. Not sure which application is invoking this at every 130 seconds -- View this message in context: http://postgresql.1045698.n5.nabble.com/FATAL-database-a-system-data-does-not-exist-tp575

Re: [GENERAL] FATAL: database "a/system_data" does not exist

2013-05-14 Thread sumita
I put the log_statement to 'all' and log_connections too. I get below May 14 09:18:45 LOG: execute : SELECT gid FROM pg_prepared_xacts May 14 09:18:45 LOG: connection received: host=127.0.0.1 port=55618 May 14 09:18:45 LOG: connection authorized: user=postgres database=a/system_data May 14 09

Re: [GENERAL] postgres and xquery

2013-05-14 Thread John R Pierce
On 5/13/2013 9:31 PM, kristian kvilekval wrote: I saw on the mailing list that back in 2010 there was some discussion of using Zorba to add xquery capabilities to postgres. I was wondering if any progress had been made on this and what the current interest levels of supporting xml in postgr