[ADMIN] help tuning query

2009-08-19 Thread Kevin Kempter
Hi all; we've been fighting this query for a few days now. we bumped up the statistict target for the a.id , c.url_hits_id and the b.id columns below to 250 and ran an analyze on the relevant tables. we killed it after 8hrs. Any suggestions? $ psql -ef expl.sql pwreport

Re: [ADMIN] trying to alter column

2009-08-19 Thread Scott Marlowe
On Wed, Aug 19, 2009 at 6:20 PM, Aras Angelo wrote: > Im trying to alter a column type from character varying(8) to int. > All the values in the column are numbers but im getting this message > > column "xx" cannot be cast to type integer > > Dropping and readding the column is an option but do

[ADMIN] trying to alter column

2009-08-19 Thread Aras Angelo
Im trying to alter a column type from character varying(8) to int. All the values in the column are numbers but im getting this message column "xx" cannot be cast to type integer Dropping and readding the column is an option but downtime is very critical to us, so i was wondering if im doing

Re: [ADMIN] Background triggers?

2009-08-19 Thread Tino Schwarze
Hi Dick, On Wed, Aug 19, 2009 at 09:23:22PM +0200, Dick Visser wrote: > A bit of a long first story, hope someone is able to help... > > We have got a Ubuntu 8.04 server running Postfix, which reads its > mailing list subscription files, aliases, virtual, domains, etc from a > Postgres database.

Re: [ADMIN] Background triggers?

2009-08-19 Thread Greg Stark
On Wed, Aug 19, 2009 at 8:23 PM, Dick Visser wrote: > > Is there a way to trigger stuff using NOTIFY/LISTEN, but WITHOUT an > external client doing the magic? Some kind of internal Postgres function > that listens for any changes, and then does the magic itself, without > tying up any 'real' client

Re: [ADMIN] Background triggers?

2009-08-19 Thread Tom Lane
Dick Visser writes: > Ideally I would like the trigger to fire and then do the actual work in > the background, but I found no way of doing this. > So I came to NOTIFY/LISTEN. But because there a several pieces of > software talking to the database, this is not ideal either. Well, the traditiona

[ADMIN] Background triggers?

2009-08-19 Thread Dick Visser
Hi guys A bit of a long first story, hope someone is able to help... We have got a Ubuntu 8.04 server running Postfix, which reads its mailing list subscription files, aliases, virtual, domains, etc from a Postgres database. This used to work fine when we had only a couple of e-mail distribution

[ADMIN] Please have a look at my PITR and verify script....

2009-08-19 Thread ml ml
Hello List, i wrote a little and simple Script to do AND verify Point-In-Time-Recovery automatically. Since i am not a Postgres or Bash Guru, i would like to ask you to have a look at it. Just to check if i made any logic mistake. I use this script for about 2 Month now, and it seems to do its jo

Re: [ADMIN] vacuum on empty table takes very long

2009-08-19 Thread Scott Marlowe
On Tue, Aug 18, 2009 at 11:44 AM, Anj Adu wrote: > We have a partitioned table structure where the partitions are created > on a daily basis. One of the inserts into the daily partition failed > (crashed) ..the partition was empty after the crash.  We did a vacuum > of the partition and it takes ve

[ADMIN] Duplicated keys in PITR

2009-08-19 Thread Ygor Degani
When recover a database using a continuous archive backup, i detected some duplicated keys. This there isn't in the production database. I use postgres-8.3.5. anyone know why this happens? Regards, -- Ygor Degani

[ADMIN] Partial WAL file replay before fail-over startup

2009-08-19 Thread Donald Fraser
Our current standby server, on detection of fail-over, gets all archived WAL files including the most resent partial WAL file copied into the pg_xlog directory. We then start postgresql and wait for it to come up. We would like to move over to the warm standby approach. However I would like to