Re: Min Xid problem proposal
От | Tom Lane |
---|---|
Тема | Re: Min Xid problem proposal |
Дата | |
Msg-id | 29507.1134149541@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Min Xid problem proposal (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: Min Xid problem proposal
Re: Min Xid problem proposal |
Список | pgsql-hackers |
Alvaro Herrera <alvherre@alvh.no-ip.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
В списке pgsql-hackers по дате отправления: