[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 followin

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

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, cei

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

Re: [ADMIN] upgrade 8.0.3 -> 8.2.4

2007-05-10 Thread Dan Harris
Steve Holdoway wrote: Are there any gotchas? I've got the opportunity to move to another database server for this application and yould like to take the opportunity to upgrade at the same time. Yes. One of them that got me was that in 8.0.x, you could insert "invalid" unicode byte sequences

[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 fro

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

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

[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 wh

[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 sys

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 require

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