From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Min Xid problem proposal |
Date: | 2005-12-09 17:32:21 |
Message-ID: | 29507.1134149541@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> My proposal to solve that problem, is to make any transaction that
> inserts or modifies tuples in a table that is marked as frozen, unfreeze
> it first. The problem I had last time was finding a good spot in the
> code for doing so. I'm now proposing to do it in the parser, in
> setTargetTable().
My god, no. Do you have any idea how many paths for updates you've missed?
(Think about prepared plans for starters.)
Furthermore, you can't do this in the way you propose (non-WAL-logged
update to pg_class). What if the system crashes without ever having
written this update to disk? The inserted tuples might have made it ---
whether they're committed or not doesn't matter, you've still blown it.
I don't see any very good argument for allowing this mechanism to set
minxid = FrozenXid in the first place. If there are only frozenXid in
the table, set minxid = current XID. That eliminates the entire problem
at a stroke.
(Yes, I know what you are going to say. The idea of freezing a table
and then never having to vacuum it at all is NOT worth the cost of
putting in a mechanism that would guarantee its safety.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2005-12-09 17:34:09 | Re: Log of CREATE USER statement |
Previous Message | Bruce Momjian | 2005-12-09 17:28:55 | Re: Log of CREATE USER statement |