Re: [PATCH] Lazy xid assingment V2
От | Gregory Stark |
---|---|
Тема | Re: [PATCH] Lazy xid assingment V2 |
Дата | |
Msg-id | 87lkbr45to.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Lazy xid assingment V2 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [PATCH] Lazy xid assingment V2
Re: [PATCH] Lazy xid assingment V2 |
Список | pgsql-hackers |
"Tom Lane" <tgl@sss.pgh.pa.us> writes: > "Florian G. Pflug" <fgp@phlo.org> writes: >> Tom Lane wrote: >>> I don't much like this, since as I mentioned before I don't think >>> MyProc->xmin is going to be constant over a whole transaction for >>> long. I don't think xid_age is performance-critical in any way, >>> so I'd vote for letting it force XID assignment. > >> Hm... I agree that xid_age is probably not performance-critical. >> I guess it's more the complete counter-intuitivity of forcing >> xid assignment in some arbitrary function thats bugging me a bit. > > Well, I don't see it as arbitrary --- we're trying to hide the fact that > XIDs are assigned lazily from user-visible behavior. It seems both this and some of the other cases of having to call ReadNewTransactionId would be eliminated if we invented a new xid treated similarly to current_time() and others which are calculated once per transaction and then cached for subsequent accesses. So xid_age() would measure relative to a fixed xid, it just wouldn't be *our* xid necessarily. Just a thought. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: