Re: [GENERAL] PostgreSQL and XA Distributed Transaction Protocol

2011-05-09 Thread Albe Laurenz
Christian Ferrari wrote: >>> Writing a specific stub to wrap-up PostgreSQL is not a too >>> difficult task, but I would be sure I am not re-inventing the wheel. >>> How can I am sure the standard XA interface is not availble? >>> Do you know if there is any document about this matter? > >> I search

[GENERAL] Possible to replicate a single table with Pg 9.0.4?

2011-05-09 Thread Henry C.
Hi, Is it possible to replicate only a single or selected tables (as opposed to the whole shebang) using PG's built-in replication? I can't seem to find much on this topic, so I'm guessing not. I have a feeling I'll need to return to Londiste for this particular application. Thanks -- Sen

Re: [GENERAL] Possible to replicate a single table with Pg 9.0.4?

2011-05-09 Thread Guillaume Lelarge
On 05/09/2011 11:18 AM, Henry C. wrote: > Hi, > > Is it possible to replicate only a single or selected tables (as opposed to > the whole shebang) using PG's built-in replication? > No. > I can't seem to find much on this topic, so I'm guessing not. > > I have a feeling I'll need to return to

[GENERAL] Streaming replication info

2011-05-09 Thread mephysto
Hi there, I would to configure a multinode PostgreSQL system using streaming replication. In my mind, I would have a base configuration with a master node and more than one slaves in streaming replication. I have no difficult to imagine start situation, but my problems come when master fails: if m

Re: [GENERAL] Multiple table relationship constraints

2011-05-09 Thread Jack Christensen
On 5/5/2011 3:26 PM, Rick Genter wrote: Hm. I think the way I would handle this is to put the business logic for inserting/updating into the room_assignments table into one or more functions and have a special user that owns the tables and owns the functions and declare the functions to be SE

Re: [GENERAL] Streaming replication info

2011-05-09 Thread Gabriele Bartolini
Hi, Il 09/05/11 09:18, mephysto ha scritto: I would to configure a multinode PostgreSQL system using streaming replication. In my mind, I would have a base configuration with a master node and more than one slaves in streaming replication. Cool. I have no difficult to imagine start situation,

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-09 Thread Leonardo Francalanci
> > I have an index on a timestamp value that is inserted, for 90% > > of the inserts, in increasing order. No updates, no deletes on the > > table (appends only). > > The bit about "increasing order" is a red herring here. If you have > no updates, then you can leave the FILLFACTOR alone. >

[GENERAL] stunnel with just postgresql client part

2011-05-09 Thread zhong ming wu
Hi My postgresql client (ejabberd postgresql lib) does not seem to be capable of ssl connection to postgresql server (with hostssl in pg_hba) So I tried to use run stunnel on the client box (ejabberd). It appears not to work. Here is stunnel log on the client end -- 2011.05.09 0

[GENERAL] simple update query too long

2011-05-09 Thread F T
Hi list I use PostgreSQL 8.4.4. (with Postgis 1.4) I have a simple update query that takes hours to run. The table is rather big (2 millions records) but it takes more than 5 hours to run !! The query is just : *UPDATE grille SET inter = 0* The explain command seems ok : "Seq Scan on grille50

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-09 Thread Simon Riggs
On Mon, May 9, 2011 at 3:32 PM, Leonardo Francalanci wrote: >> > I  have an index on a timestamp value that is inserted, for 90% >> > of the  inserts, in increasing order. No updates, no deletes on the >> > table  (appends only). >> >> The bit about "increasing order" is a red herring  here.  If y

Re: [GENERAL] simple update query too long

2011-05-09 Thread Guillaume Lelarge
On 05/09/2011 04:39 PM, F T wrote: > Hi list > > I use PostgreSQL 8.4.4. (with Postgis 1.4) > > I have a simple update query that takes hours to run. > The table is rather big (2 millions records) but it takes more than 5 hours > to run !! > > The query is just : > *UPDATE grille SET inter = 0*

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-09 Thread Leonardo Francalanci
> It will be really useful to see some test results where you alter the > fillfactor and report various measurables. It's not that easy... stressing "only" the index insertion speed won't be simple. I would have liked some "theory"... The docs seem to imply there are some guidelines, it's just

Re: [GENERAL] simple update query too long

2011-05-09 Thread tv
> On 05/09/2011 04:39 PM, F T wrote: >> Hi list >> >> I use PostgreSQL 8.4.4. (with Postgis 1.4) >> >> I have a simple update query that takes hours to run. >> The table is rather big (2 millions records) but it takes more than 5 >> hours >> to run !! >> >> The query is just : >> *UPDATE grille SET

[GENERAL] ALTER TABLE ... DISABLE TRIGGERS Isolation leve

2011-05-09 Thread CG
I'm using 8.4.1 I want to add a column to a table, but there are update triggers that will fire that don't need to fire for this operation. So, I'd like to add the column with triggers off. Normally this operation would take 10 or so seconds, so locking the table for that amount of time is not

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 9:35 AM, zhong ming wu wrote: > Hi > > My postgresql client (ejabberd postgresql lib) does not seem to be > capable of ssl connection to postgresql server (with hostssl in > pg_hba) > > So I tried to use run stunnel on the client box (ejabberd).  It > appears not to work. >

Re: [GENERAL] ALTER TABLE ... DISABLE TRIGGERS Isolation leve

2011-05-09 Thread Tom Lane
CG writes: > I want to add a column to a table, but there are update triggers that will > fire that don't need to fire for this operation. So, I'd like to add the > column with triggers off. Normally this operation would take 10 or so > seconds, so locking the table for that amount of time is n

[GENERAL] Table name as parameter

2011-05-09 Thread Sairam Krishnamurthy
All, I have a function that takes the table name the parameter. After some digging I found that this can be made possible by have the query as a string and EXECUTE it. EXECUTE 'SELECT * FROM "' || table || '" WHERE '; The above works. But I want the result in a record variable for further proce

Re: [GENERAL] simple update query too long

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 10:29 AM, wrote: >> On 05/09/2011 04:39 PM, F T wrote: >>> Hi list >>> >>> I use PostgreSQL 8.4.4. (with Postgis 1.4) >>> >>> I have a simple update query that takes hours to run. >>> The table is rather big (2 millions records) but it takes more than 5 >>> hours >>> to run

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread zhong ming wu
On Mon, May 9, 2011 at 2:01 PM, Merlin Moncure wrote: . . . >>  It seems to be shame that I have to run stunnel on the pg box as well. >> >> My question is that client only stunnel to pg server requiring ssl >> connection is not expected to work?  Or am I doing something wrong? > > what version st

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 3:24 PM, zhong ming wu wrote: > On Mon, May 9, 2011 at 2:01 PM, Merlin Moncure wrote: > . > . > . >>>  It seems to be shame that I have to run stunnel on the pg box as well. >>> >>> My question is that client only stunnel to pg server requiring ssl >>> connection is not exp

Re: [GENERAL] Table name as parameter

2011-05-09 Thread Adrian Klaver
On 05/09/2011 12:33 PM, Sairam Krishnamurthy wrote: All, I have a function that takes the table name the parameter. After some digging I found that this can be made possible by have the query as a string and EXECUTE it. EXECUTE 'SELECT * FROM "' || table || '" WHERE '; The above works. But I

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-09 Thread Tomas Vondra
Dne 9.5.2011 17:25, Leonardo Francalanci napsal(a): >> It will be really useful to see some test results where you alter the >> fillfactor and report various measurables. > > > It's not that easy... stressing "only" the index insertion > speed won't be simple. I would have liked some "theory"..

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-09 Thread Tomas Vondra
Dne 9.5.2011 17:25, Leonardo Francalanci napsal(a): > I know that theory is one thing and real testing another; but I can't > test everything; if there are some (proved?) guidelines I'd like to > use them (example: I'm not going to test that fillfactor in table creation > in my case won't make any

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread zhong ming wu
On Mon, May 9, 2011 at 4:37 PM, Merlin Moncure wrote: >> I was not setting protocol.  But since I got your message, I tried >> 'protocol = pgsql' in stunnel.conf > > see: > http://pgbouncer.projects.postgresql.org/doc/faq.html#_how_to_use_ssl_connections_with_pgbouncer > > "Use Stunnel. Since ver

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 5:03 PM, zhong ming wu wrote: > On Mon, May 9, 2011 at 4:37 PM, Merlin Moncure wrote: >>> I was not setting protocol.  But since I got your message, I tried >>> 'protocol = pgsql' in stunnel.conf >> >> see: >> http://pgbouncer.projects.postgresql.org/doc/faq.html#_how_to_u

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread zhong ming wu
On Mon, May 9, 2011 at 6:42 PM, Merlin Moncure wrote: >> Thanks.  Yes, when I installed the latest stunnel-4.36 it works. >> >> One strange thing I notice.  When I do ssl connect with psql I am >> supposed to get a message like >> >> SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) >> >> Wit

[GENERAL] pg_upgrade only to 9.0 ?

2011-05-09 Thread Iain Barnett
Hi, I'm currently running 8.4.4. I downloaded the source for 9.0.4 and installed it, and then installed pg_upgrade and ran it, and got the following message: > This utility can only upgrade to PostgreSQL version 9.0. It seems strange to me that it can only upgrade to that and not 4 patch points

Re: [GENERAL] pg_upgrade only to 9.0 ?

2011-05-09 Thread Scott Marlowe
On Mon, May 9, 2011 at 6:10 PM, Iain Barnett wrote: > Hi, > > I'm currently running 8.4.4. I downloaded the source for 9.0.4 and installed > it, and then installed pg_upgrade and ran it, and got the following message: > >> This utility can only upgrade to PostgreSQL version 9.0. > > It seems stra

Re: [GENERAL] pg_upgrade only to 9.0 ?

2011-05-09 Thread Iain Barnett
On 10 May 2011, at 01:16, Scott Marlowe wrote: > On Mon, May 9, 2011 at 6:10 PM, Iain Barnett wrote: >> Hi, >> >> I'm currently running 8.4.4. I downloaded the source for 9.0.4 and installed >> it, and then installed pg_upgrade and ran it, and got the following message: >> >>> This utility ca

Re: [GENERAL] stunnel with just postgresql client part

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 7:17 PM, zhong ming wu wrote: > On Mon, May 9, 2011 at 6:42 PM, Merlin Moncure wrote: >>> Thanks.  Yes, when I installed the latest stunnel-4.36 it works. >>> >>> One strange thing I notice.  When I do ssl connect with psql I am >>> supposed to get a message like >>> >>> SS

Re: [GENERAL] "interval hour to minute" or "interval day to minute"

2011-05-09 Thread Noah Misch
On Sun, Apr 17, 2011 at 04:55:51PM +0100, Jack Douglas wrote: > I discovered the 'fields' option of 'interval', but i can't figure out > from the docs how it is supposed to work. Are "hour to minute" and "day > to minute" really the same thing? And if not, in what circumstances are > they tre