Re: [GENERAL] Avoiding a deadlock

2013-03-12 Thread Albe Laurenz
Paul Jungwirth wrote: Out of curiosity: any reason the ORDER BY should be in the subquery? It seems like it ought to be in the UPDATE (if that's allowed). Hmm, it's not allowed. :-) It's still surprising that you can guarantee the order of a multi-row UPDATE by ordering a subquery. To

[GENERAL] Problems with PostgreSQL Replication (Log Shipping)

2013-03-12 Thread JotaComm
Hello, everybody I have one problem and I need some help. My environment: one master and one slave (PostgreSQL 9.2.2). My cluster has about 160GB and pg_basebackup to syncronize them (master and slave). The sintax is below: pg_basebackup -h productionaddress -p productionport -U

[GENERAL] indexing elements of a csv ?

2013-03-12 Thread Gauthier, Dave
Hi: v9.0.1 on linux. I have a table with a column that is a csv. Users will select records based upon the existence of an element of the csv. There is an index on that column but I'm thinking that it won't be of much use in this situation. Is there a way to facilitate these queries?

Re: [GENERAL] indexing elements of a csv ?

2013-03-12 Thread Ian Lawrence Barwick
2013/3/12 Gauthier, Dave dave.gauth...@intel.com: Hi: v9.0.1 on linux. I have a table with a column that is a csv. Users will select records based upon the existence of an element of the csv. There is an index on that column but I'm thinking that it won't be of much use in this situation.

Re: [GENERAL] indexing elements of a csv ?

2013-03-12 Thread Steve Erickson
An option would be to create a column of type tsvector. That way you could do text searches using partial words or words and get results including those containing forms of the word. From: pgsql-general-ow...@postgresql.org [pgsql-general-ow...@postgresql.org]

Re: [GENERAL] indexing elements of a csv ?

2013-03-12 Thread Ian Lawrence Barwick
2013/3/13 Ian Lawrence Barwick barw...@gmail.com: 2013/3/12 Gauthier, Dave dave.gauth...@intel.com: Hi: v9.0.1 on linux. I have a table with a column that is a csv. Users will select records based upon the existence of an element of the csv. There is an index on that column but I'm

[GENERAL] Testing Technique when using a DB

2013-03-12 Thread Perry Smith
I tried posting this from Google Groups but I did not see it come through after an hour so this may be a duplicate message for some. The current testing technique for things like Ruby On Rails has three choices but all of the choices will not work in my case. The first choice is truncate

Re: [GENERAL] Testing Technique when using a DB

2013-03-12 Thread Steve Crawford
On 03/12/2013 08:41 AM, Perry Smith wrote: One choice would be to create the database, use it, and then drop it for each test. I would create the database from a template that already has data taken from the production database (and probably trimmed down to a small subset of it). This

Re: [GENERAL] Testing Technique when using a DB

2013-03-12 Thread Steve Atkins
On Mar 12, 2013, at 8:41 AM, Perry Smith pedz...@gmail.com wrote: One choice would be to create the database, use it, and then drop it for each test. I would create the database from a template that already has data taken from the production database (and probably trimmed down to a

[GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Alexander Farber
Hello, I have a list of 40 non-english words, each on a separate line and in UTF8 format, which I'd like to put in the word column of the following table (also in UTF8 and 8.4.13): create table good_words ( word varchar(64) primary key, verified boolean not null default

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Ian Lawrence Barwick
2013/3/13 Alexander Farber alexander.far...@gmail.com: Hello, I have a list of 40 non-english words, each on a separate line and in UTF8 format, which I'd like to put in the word column of the following table (also in UTF8 and 8.4.13): create table good_words ( word

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Alexander Farber
Unfortunately doesn't work - On Tue, Mar 12, 2013 at 5:53 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2013/3/13 Alexander Farber alexander.far...@gmail.com: I have a list of 40 non-english words, each on a separate line and in UTF8 format, which I'd like to put in the word column

Re: [GENERAL] Using psql to feed a file line by line to a table column

2013-03-12 Thread Ian Lawrence Barwick
2013/3/13 Alexander Farber alexander.far...@gmail.com: Unfortunately doesn't work - On Tue, Mar 12, 2013 at 5:53 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2013/3/13 Alexander Farber alexander.far...@gmail.com: I have a list of 40 non-english words, each on a separate line and

Re: [GENERAL] PostgreSQL 9.2.3 performance problem caused Exclusive locks

2013-03-12 Thread Emre Hasegeli
2013-03-08 13:27:16 +0200 Emre Hasegeli emre.haseg...@tart.com.tr: PostgreSQL writes several following logs during the problem which I never saw before 9.2.3: LOG: process 4793 acquired ExclusiveLock on extension of relation 305605 of database 16396 after 2348.675 ms I tried * to

Re: [GENERAL] table spaces

2013-03-12 Thread Gregg Jaskiewicz
Ok, So by that token (more drives the better), I should have raid 5 (or whichever will work) with all 6 drives in it ? I was thinking about splitting it up like this. I have 6 drives (and one spare). Combine them into 3 separate logical drives in mirrored configuration (for some hardware

[GENERAL] Age of the WAL?

2013-03-12 Thread Erik Jones
What's the best way to determine the age of the current WAL? Not the current segment, but the whole thing. Put another way: is there a way to determine a timestamp for the oldest available transaction in the WAL? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] table spaces

2013-03-12 Thread John R Pierce
On 3/12/2013 2:31 PM, Gregg Jaskiewicz wrote: I was basically under impression that separating WAL is a big plus. On top of that, having separate partition to hold some other data - will do too. But it sounds - from what you said - like having all in single logical drive will work, because

Re: [GENERAL] table spaces

2013-03-12 Thread Gregg Jaskiewicz
On 12 March 2013 21:59, John R Pierce pie...@hogranch.com wrote: On 3/12/2013 2:31 PM, Gregg Jaskiewicz wrote: I was basically under impression that separating WAL is a big plus. On top of that, having separate partition to hold some other data - will do too. But it sounds - from what you

Re: [GENERAL] Age of the WAL?

2013-03-12 Thread Tom Lane
Erik Jones ejo...@engineyard.com writes: What's the best way to determine the age of the current WAL? Not the current segment, but the whole thing. Put another way: is there a way to determine a timestamp for the oldest available transaction in the WAL? Transaction commit and abort

Re: [GENERAL] Testing Technique when using a DB

2013-03-12 Thread Joe Van Dyk
On Mar 12, 2013, at 8:42 AM, Perry Smith pedz...@gmail.com wrote: I tried posting this from Google Groups but I did not see it come through after an hour so this may be a duplicate message for some. The current testing technique for things like Ruby On Rails has three choices but all of the

Re: [GENERAL] Testing Technique when using a DB

2013-03-12 Thread Perry Smith
To all who replied: Thank you. I did typo. I meant transaction instead of truncate. I had not seriously considered pg_dump / pg_restore because I assumed it would be fairly slow but I will experiment with pg_restore and template techniques this weekend and see which ones prove viable. I