[GENERAL] log_min_duration_statement modification for non superusers?

2012-06-27 Thread Paul McGarry
I have a situation where I'd like to lower the log_min_duration_statement for a particular connection . The DB is used for several reporting type queries which may reasonably take several seconds so the log_min_duration_statement in the DB is set accordingly. However there are critical paths in th

Re: [GENERAL] Changing table owner to db owner.

2010-12-14 Thread Paul McGarry
On Wed, Dec 15, 2010 at 12:39 PM, Adrian Klaver wrote: > You did not say what version you are using. In 9.0 you have this option: > http://www.postgresql.org/docs/9.0/interactive/sql-alterdefaultprivileges.html Our servers are a mix of 8.3 and 8.4. > I generally do as superuser; > > SET ROLE us

[GENERAL] Changing table owner to db owner.

2010-12-14 Thread Paul McGarry
I have a number of DBs that are all the same structure but are owned by different users and I want to add a table to each of those DBs. At the moment I have to either connect to each DB as it's user (which means digging up it's password) or do it as the DB super user and run an ALTER table ... OWN

Re: [GENERAL] Urgent -- High memory usage on PostgreSQL server

2010-12-12 Thread Paul McGarry
On Mon, Dec 13, 2010 at 4:49 PM, savio rodriges wrote: > Hello, > > We are facing very HIGH memory utilization on postgreSQL server and need > help. > > Mem: 8165696k total, 7943160k used, 222536k free, 282044k buffers > Swap: 8385920k total, 112828k used, 8273092k free, 4793732k cach

[GENERAL] Best way to fix Error: could not access status of transaction?

2008-01-07 Thread Paul McGarry
Hi, I have a database (8.1.10 via Ubuntu) that has started reporting: <2008-01-08 08:51:14 EST|>ERROR: could not access status of transaction 707406378 <2008-01-08 08:51:14 EST|>DETAIL: could not open file "pg_clog/02A2": No such file or directory when trying to do an autovacuum. By vacuumin

Re: [GENERAL] Joins with aggregate data

2005-07-07 Thread Paul McGarry
Thank you Michael, your suggestion works a charm (though I didn't bother coalescing the two grp because I think the USING takes care of that anyway. Paul On 7/8/05, Michael Fuhr <[EMAIL PROTECTED]> wrote: > SELECT coalesce(g.grp, b.grp) AS grp, >coalesce(g.count, 0) AS countgood, >

[GENERAL] Joins with aggregate data

2005-07-07 Thread Paul McGarry
Hi there everyone, I'm having trouble getting the data I want from my tables. Here is a simplified version of my tables: == create table lefty ( day date, good numeric(10,2), grp integer ); insert into lefty values ('2005-06-01',5.00,1); insert into lefty values ('2005-06-02',10.00,1); in

[GENERAL] Full outer join question.

2005-07-07 Thread Paul McGarry
Hi there everyone, I'm having trouble getting the rows I want from a full outer join with a where clause. Here is a simplified version of my tables: == create table lefty ( day date, goodamount numeric(10,2), grp integer ); insert into lefty values ('2005-06-01',5.00,1); insert into lefty