Re: [GENERAL] Disk space usage discrepancy

2011-04-23 Thread Tom Lane
Yang Zhang writes: > We're trying to figure out how to account for our disk space > consumption in a database. > $ sudo du -shx /var/lib/postgresql/8.4/main/ > 1.9G/var/lib/postgresql/8.4/main/ > But when we query Postgresql to find out how much disk space is > actually being used by the var

Re: [GENERAL] 20110408pg_upgrade_fix and 'FATAL: could not access status of transaction...'

2011-04-23 Thread Henry C.
Resolved the startup problem by identifying which pg_clog file it was failing on with: strace postgres --single -D 9.0/data Then grabbed that file from the replication slave. Cheers h -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: h

Re: [GENERAL] 20110408pg_upgrade_fix and 'FATAL: could not access status of transaction...'

2011-04-23 Thread Henry C.
I managed to resolve this issue. Using strace -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Should I free this memory?

2011-04-23 Thread Tom Lane
=?ISO-8859-1?Q?Jorge_Ar=E9valo?= writes: > Interesting. I've read the README document at src/backend/utils/mmgr, > and I have some unclear points yet: > I've understood several well-known memory contexts exist > (TopMemoryContext, CacheMemoryContext, MessageContext, > CurTransactionContext...), b

[GENERAL] Need to replace SAN, best method with least downtime? (8.4.4)

2011-04-23 Thread Marinos Yannikos
Hi, I have a beefy server with 2 SANs, 1 "fast" (A) and 1 "slow" (B) and 1.3TB worth of 8.4.4 databases on A. A needs to be replaced/wiped completely with as little downtime as possible. It's flash-based and the modules need to be replaced, so no "swapping the SAN and keeping the disks". The d

Re: [GENERAL] Cross-schema view issue/question

2011-04-23 Thread Joshua Tolley
On Thu, Apr 14, 2011 at 07:33:17PM -0700, Bosco Rama wrote: > 1) a function that removes/creates the views, etc in the 'xyz' schema >that gets called as part of the replacement process for schema 'abc' > > 2) replacing the views, etc. with functions that return tables or >th

Re: [GENERAL] Should I free this memory?

2011-04-23 Thread Jorge Arévalo
On Sat, Apr 23, 2011 at 5:11 AM, Tom Lane wrote: > =?ISO-8859-1?Q?Jorge_Ar=E9valo?= writes: >> old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); >> p = palloc(100); >> MemoryContextSwitchTo(old_context); > > Why are you doing that? > It's a simplified example. The point is some memor

Re: [GENERAL] 20110408pg_upgrade_fix and 'FATAL: could not access status of transaction...'

2011-04-23 Thread Henry C.
On Sat, April 23, 2011 09:56, Henry C. wrote: > 1. how to proceed with getting db1 back up so I can run the script? > 2. how to proceed with replicated database (db2)? (switch to standalone > (since it's in readonly replication mode) and run upgrade fix script as per > wiki, or leave as-is...) R

[GENERAL] 20110408pg_upgrade_fix and "FATAL: could not access status of transaction..."

2011-04-23 Thread Henry C.
Hi, Lovely start to Saturday morning. My eyes are misting over with joy. I'm trying to figure out whether I'm affected (probably) by this beauty http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix (I missed the ANNOUNCE advisory, even more joy). One of my DBs fails at startup: 2011-04-23 09: