From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Per-table freeze limit proposal |
Date: | 2005-11-15 22:36:33 |
Message-ID: | 1132094193.3388.95.camel@holly |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Mon, 2005-11-14 at 23:40 -0300, Alvaro Herrera wrote:
> The whole thing is pretty fragile is somebody manually updates a
> catalog. But we tell people not to do that, so it should be their
> fault, right?
Hmmmm...sounds scary. Cool ideas in the patch though.
> I discovered one problem with the whole approach. Per this patch, we
> only store normal Xids in relminxid/relvacuumxid. So if a table is
> completely frozen, we will store RecentXmin. We do this because it
> would actually be unsafe to store, say, FrozenXid: if another
> transaction stores/changes a tuple while we are vacuuming it, the Frozen
> mark wouldn't be correct and thus the table could be corrupted if a Xid
> wraparound happens (which is why we use RecentXmin in the first place:
> to cope with the possibility of someone else using the table during the
> vacuum.)
Yep. And because VACUUM FULL FREEZE is no longer possible.
> The problem comes when this is done to template1, and it is copied to
> another database after some millions of transactions have come and go --
> it will seem like the database has suffered wraparound. We would need
> to vacuum it completely after copied for the stats to be accurate.
I don't understand the issue, can you explain more? I see no problem. If
an identical copy gives a problem then surely template1 should also.
> I'm not sure what to do about that. I think storing FrozenXid may not
> actually be a totally bad idea. Comments?
Its not a totally bad idea, but it has some risk, which where
transactions are concerned is not really acceptable.
Perhaps we should reinstate VACUUM FULL FREEZE to do just a FREEZE with
a table lock and skip all that moving data around.
Best Regards, Simon Riggs
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-11-15 23:09:03 | Re: someone working to add merge? |
Previous Message | Simon Riggs | 2005-11-15 22:11:34 | Re: MERGE vs REPLACE |
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Yarra | 2005-11-15 22:59:04 | pl/pgSQL doco patch |
Previous Message | Andreas Seltenreich | 2005-11-15 16:33:06 | Re: TODO item -- Improve psql's handling of multi-line queries |