Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-09 Thread Alvaro Herrera
Manuel Sugawara wrote: > Ok, will do that. Thanks a lot Alvaro. Want me to send more details to > debug the problem?. Yes, it would be good to know why the shared catalogs were not being vacuumed, if you can find that out. I would have guessed that they weren't being vacuumed due to the fact tha

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: > >> A friend is doing the queries right now but it takes time :-(, mean >> time I was wondering if it will be safe to apply the following patch >> just to get the database up and be able to run pg_dumpall: > > Yes, it is safe. J

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Alvaro Herrera
Manuel Sugawara wrote: > A friend is doing the queries right now but it takes time :-(, mean > time I was wondering if it will be safe to apply the following patch > just to get the database up and be able to run pg_dumpall: Yes, it is safe. Just make sure to get a copy of the database out in 50

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: >> Alvaro Herrera <[EMAIL PROTECTED]> writes: >> >> > Hmm, nope -- take away the relnamespace check, because there is a >> > different namespace for each backend (pg_temp_2, pg_temp_3, etc). >> >> Still no luck, changed the qu

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Alvaro Herrera
Manuel Sugawara wrote: Going back to your first message I see that I missed something important: > 1: relname = "pg_tablespace" (typeid = 19, len = 64, typmod = -1, byval = f) > 2: age = "2146484675" (typeid = 23, len = 4, typmod = -1, byval = t) > 1: relname = "pg_pltemplate" (typeid = 19, le

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Alvaro Herrera
Manuel Sugawara wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > Hmm, nope -- take away the relnamespace check, because there is a > > different namespace for each backend (pg_temp_2, pg_temp_3, etc). > > Still no luck, changed the query to: > > select relname, age(relfrozenxid) fro

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hmm, nope -- take away the relnamespace check, because there is a > different namespace for each backend (pg_temp_2, pg_temp_3, etc). Still no luck, changed the query to: select relname, age(relfrozenxid) from pg_class join pg_namespace n on (n.oi

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hmm, nope -- take away the relnamespace check, because there is a > different namespace for each backend (pg_temp_2, pg_temp_3, etc). And > as far as I've seen, most leftover temp tables are on "high" temp > schemas (i.e. those belonging to backends tha

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Alvaro Herrera
Manuel Sugawara wrote: > In each database executed: > > select relname, age(relfrozenxid) from pg_class where relnamespace = > '10406'::oid; > > (note that 10406 is the oid of the pg_temp_1 namespace) none of them > showed temp tables, Is this the correct way?, Any other idea?. Hmm, nope --

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: > > Hi Manuel, > >> The funny thing is that there was no open transactions, even after >> restarting the cluster the same message was logged. Today, the >> database stopped working as expected: >> >> ERROR: database is shut down

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Manuel Sugawara
Manuel Sugawara <[EMAIL PROTECTED]> writes: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > >> Hi Manuel, > > Hi Alvaro! > >> I suggest you look for temp tables that have not been reclaimed. >> We've had a couple of reports where leftover temp tables have >> stopped the frozen-xid counter from adva

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hi Manuel, Hi Alvaro! > I suggest you look for temp tables that have not been reclaimed. > We've had a couple of reports where leftover temp tables have > stopped the frozen-xid counter from advancing. (They would have a > very old relfrozenxid.) Th

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Alvaro Herrera
Manuel Sugawara wrote: Hi Manuel, > The funny thing is that there was no open transactions, even after > restarting the cluster the same message was logged. Today, the > database stopped working as expected: > > ERROR: database is shut down to avoid wraparound data loss in database > "postgres"

[GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Manuel Sugawara
We have a PostgreSQL 8.2.6 installation running for about six-months now. There was a lot of log entries saying (sometimes 10 or more in just one second): WARNING: oldest xmin is far in the past HINT: Close open transactions soon to avoid wraparound problems. (actually it was in Spanish but I t