Re: [GENERAL] A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?

2012-03-18 Thread Mark Felder
On Sat, 17 Mar 2012 10:46:00 -0500, dennis jenkins wrote: Aleksey, a suggestion: The vast majority of the postgresql wire protocol compresses well. If your WAN link is not already compressed, construct a compressed SSH tunnel for the postgresql TCP port in the WAN link. I've done this when

Re: [GENERAL] why no create variable

2012-03-18 Thread mgould
<<< text/html; charset="utf-8": Unrecognized >>> <>

Re: [GENERAL] why no create variable

2012-03-18 Thread Chris Angelico
On Sun, Mar 18, 2012 at 11:26 PM, wrote: > > Getting the information from a table works.  I now have a sessionsettings > table, but I'm making way to many calls to it because there is no global pool > of variable.  Not IMO an efficient use of a table. Chances are that table, if you are indeed u

Re: [GENERAL] One more query

2012-03-18 Thread Adrian Klaver
On 03/17/2012 07:56 PM, prem tolani wrote: I get below error message> > PG "FATAL:� could not reattach to shared memory (key=5432001, addr=0210): Invalid argument. This messages occurs in windows 7 eventviewer log. Application log / postgresql log do not show anything. It is custom a

[GENERAL] Anonymized database dumps

2012-03-18 Thread Janning Vygen
Hi, I am working on postgresql 9.1 and loving it! Sometimes we need a full database dump to test some performance issues with real data. Of course we don't like to have sensible data like bunches of e-mail addresses on our development machines as they are of no interest for developers and s

[GENERAL] Ubuntu 11.10 Postgres 9.1.3 is missing pg_resetxlog; where can I get it?

2012-03-18 Thread jgenoese
Greetings. I installed postgresql-9.1 via apt-get on ubuntu 11.10. At first, it wouldn't start because of a missing pg_xlog directory. So I manually created it. Then, it wouldn't start, because of the following: 2012-03-18 13:18:20 EDT LOG: database system was interrupted; last known up a

Re: [GENERAL] How to perform full text search

2012-03-18 Thread Andrus
Parse the entry string into words (aka tokens) and assemble with the and operator. E.g. 'red cat' becomes 'red & cat'. >Then add vector; more info in articles I provide links to later in this note. WHERE to_tsvector ( productname || ' ' || productdescription ) @@ to_tsquery ( 'red & cat' ) Sin

Re: [GENERAL] How to perform full text search

2012-03-18 Thread John R Pierce
On 03/18/12 11:45 AM, Andrus wrote: select +case when productname ilike '%red%' then 2 else 0 end +case when productdescription ilike '%red%' then 1 else 0 end +case when productname ilike '%cat%' then 1.7 else 0 end +case when productdescription ilike '%cat%' then 0.7 else 0 end from product

[GENERAL] Re: Ubuntu 11.10 Postgres 9.1.3 is missing pg_resetxlog; where can I get it?

2012-03-18 Thread jgenoese
Problem solved...user error. I can't say what was wrong, bur after the third re-install everything worked. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Ubuntu-11-10-Postgres-9-1-3-is-missing-pg-resetxlog-where-can-I-get-it-tp5575465p5575486.html Sent from the Postgr

Re: [GENERAL] Ubuntu 11.10 Postgres 9.1.3 is missing pg_resetxlog; where can I get it?

2012-03-18 Thread Adrian Klaver
On 03/18/2012 11:41 AM, jgenoese wrote: Greetings. I installed postgresql-9.1 via apt-get on ubuntu 11.10. Was there another Postgres instance already installed on this machine? At first, it wouldn't start because of a missing pg_xlog directory. So I manually created it. Did you initdb a

[GENERAL] Multi server query

2012-03-18 Thread Florent THOMAS
Hy all of you, How do you query _multi servers_ and multi databases on postgresql? Regards

[GENERAL] How to isolate the result of SELECT's?

2012-03-18 Thread Andre Lopes
Hi, I need to do an operation that I will use some SELECT's and get the results, but I want to have sure that those tables have not been changed with INSERT's or UPDATES during the operation. Example: BEGIN OPERATION Select field from table1; ... Select other_field from table2; ... END OPERATION

Re: [GENERAL] How to isolate the result of SELECT's?

2012-03-18 Thread Michael Nolan
On Sun, Mar 18, 2012 at 6:33 PM, Andre Lopes wrote: > Hi, > > I need to do an operation that I will use some SELECT's and get the > results, but I want to have sure that those tables have not been > changed with INSERT's or UPDATES during the operation. > > Example: > > BEGIN OPERATION > Select f

Re: [GENERAL] How to isolate the result of SELECT's?

2012-03-18 Thread Adrian Klaver
On 03/18/2012 04:33 PM, Andre Lopes wrote: Hi, I need to do an operation that I will use some SELECT's and get the results, but I want to have sure that those tables have not been changed with INSERT's or UPDATES during the operation. Example: BEGIN OPERATION Select field from table1; ... Sele

Re: [GENERAL] Zero-length character breaking query?

2012-03-18 Thread Doug Gorley
Thanks Tom; this is at a client site, so I have limited access, but it looks like a REINDEX resolves the issue. Doug -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: March 16, 2012 6:33 AM To: Doug Gorley Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Zero-le

Re: [GENERAL] How to isolate the result of SELECT's?

2012-03-18 Thread Jayadevan M
Hi, > > I need to do an operation that I will use some SELECT's and get the > results, but I want to have sure that those tables have not been > changed with INSERT's or UPDATES during the operation. > > Example: > > BEGIN OPERATION > Select field from table1; > ... > Select other_field from tab

[GENERAL] nice'ing the postgres COPY backend process to make pg_dumps run more "softly"

2012-03-18 Thread Aleksey Tsalolikhin
Hi. When pg_dump runs, our application becomes inoperative (too slow). I was going to ask if nice'ing the postgres backend process that handles the COPY would help but I just realized probably the pg_dump takes out locks when it runs and nice'ing it would just make it run longer... However the m

Re: [GENERAL] Anonymized database dumps

2012-03-18 Thread Kiriakos Georgiou
I would store sensitive data encrypted in the database. Check the pgcrypto module. Kiriakos On Mar 18, 2012, at 1:00 PM, Janning Vygen wrote: > Hi, > > I am working on postgresql 9.1 and loving it! > > Sometimes we need a full database dump to test some performance issues with > real data.

Re: [GENERAL] How to isolate the result of SELECT's?

2012-03-18 Thread Kiriakos Georgiou
In all likelihood you do not want to do what you described (lock the tables.) You have to have a basic understanding of MVCC and transaction isolation levels to determine if the default behavior of mvcc + 'read committed' is sufficient. In a lot of cases it is. Kiriakos On Mar 18, 2012, at