From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [WIP] Add relminxid column to pg_class |
Date: | 2006-04-02 23:16:56 |
Message-ID: | 25748.1144019816@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I just noticed a problem, which is why I labeled it a WIP: the current
> implementation turns pg_database.datminxid to InvalidTransactionId when
> the table that has the minimum relminxid is dropped. The problem is
> that this could cause "vacuum starvation" if autovacuum is using
> datminxid to decide what database to vacuum, and the minimum Xid table
> is being dropped continuously. I had refrained from calculating
> pg_database.datminxid each time said table is dropped, because doing it
> means scanning pg_class and locking pg_database -- I'm wary of deadlock
> problems. Not sure what to do here. (Maybe the answer is to do nothing
> -- this is a very low probability scenario anyway. Opinions?)
I'd argue that you should do nothing, ie, dropping a table should never
affect datminxid. The proper interpretation of the pg_database columns
is that we guarantee that all XID's in the database are *at least* thus-
and-so, not that the minimum is exact.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-04-03 00:31:51 | Re: [WIP] Add relminxid column to pg_class |
Previous Message | Neil Conway | 2006-04-02 20:11:08 | Re: psql patch: new host/port without leaving session |