Re: [ADMIN] reindex in v8.2

2007-06-19 Thread Dan Harris
Bill Willits wrote: Hello: We are in the process of upgrading posgres from v7.3.9 to v8.2.4 In our current environment (v7.3), we run a reindex operation on all tables to recover space and improve performance (we have several tables with high insert/update load - no deletes). Is it likely

Re: [ADMIN] reclaiming disk space after major updates

2007-06-07 Thread Dan Harris
Andrew Sullivan wrote: On Wed, Jun 06, 2007 at 04:04:44PM -0600, Dan Harris wrote: of these operations or a full dump/reload. I do run VACUUM regularly, it's just that sometimes we need to go back and update a huge percentage of rows in a single batch due to changing customer requirements

[ADMIN] troubleshooting idle in transaction

2007-06-06 Thread Dan Harris
Greetings.. I'm running 8.0.12 and the system has been very stable for years now with no significant application changes. I am using Apache::Session::Postgres in a web application to store session state. This has really been flawless for us so far, but lately I've caught a few occurrences

[ADMIN] reclaiming disk space after major updates

2007-06-06 Thread Dan Harris
Our usage pattern has recently left me with some very bloated database clusters. I have, in the past, scheduled downtime to run VACUUM FULL and tried CLUSTER as well, followed by a REINDEX on all tables. This does work, however the exclusive lock has become a real thorn in my side. As our

[ADMIN] Function to offset current timestamp

2007-06-01 Thread Dan Harris
I'm trying to write a function that can do a select on an integer value from a table and subtract that value from current_timestamp. Let's say I have a table called users and a field called tz_offset.. I want my function to do something like : select current_timestamp - '( select tz_offset

Re: [ADMIN] Function to offset current timestamp

2007-06-01 Thread Dan Harris
Dan Harris wrote: I'm trying to write a function that can do a select on an integer value from a table and subtract that value from current_timestamp. Let's say I have a table called users and a field called tz_offset.. I want my function to do something like : select current_timestamp

Re: [ADMIN] Function to offset current timestamp

2007-06-01 Thread Dan Harris
Steve Crawford wrote: Dan Harris wrote: I'm trying to write a function that can do a select on an integer value from a table and subtract that value from current_timestamp. Let's say I have a table called users and a field called tz_offset.. I want my function to do something like : select

Re: [ADMIN] finding fragmented tables

2007-05-09 Thread Dan Harris
Carin Westblom wrote: How can I easily find specific tables and/or databases with a lot of space that may be reclaimed w a vacuum full? I picked up this tip on the list a while ago: SELECT pg_namespace.nspname, pg_class.relname, pg_class.reltuples, pg_class.relpages, rowwidths.avgwidth,

Re: [ADMIN] finding fragmented tables

2007-05-09 Thread Dan Harris
Dan Harris wrote: Carin Westblom wrote: How can I easily find specific tables and/or databases with a lot of space that may be reclaimed w a vacuum full? I picked up this tip on the list a while ago: SELECT pg_namespace.nspname, pg_class.relname, pg_class.reltuples, pg_class.relpages

[ADMIN] Can't restore a pg_dump due to encoding errors

2007-04-07 Thread Dan Harris
Hello all: I'm in a bit of a bind here. Today is my maintenance window for upgrading from 8.0.3 to 8.2.3. I did a pg_dumpall overnight ( resulting in a 72GB file ) and then a pg_dump on one of my small databases this morning to test pg_restore. When trying to reload, I'm getting the

Re: [ADMIN] Can't restore a pg_dump due to encoding errors

2007-04-07 Thread Dan Harris
Dan Harris wrote: Hello all: I'm in a bit of a bind here. Today is my maintenance window for upgrading from 8.0.3 to 8.2.3. I did a pg_dumpall overnight ( resulting in a 72GB file ) and then a pg_dump on one of my small databases this morning to test pg_restore. When trying to reload, I'm