From: | Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Questions related to xlog |
Date: | 2005-12-23 20:37:31 |
Message-ID: | Pine.LNX.4.58.0512231534300.22064@eon.cs |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have several questions in understanding xlog code:
(1)
In RecordTransactionCommit():
* (If it made no transaction-controlled XLOG entries, its XID appears
* nowhere in permanent storage
We have this in XLogInsert():
/* Insert record header */
record->xl_xid = GetCurrentTransactionIdIfAny();
So in some situations (i.e., this transaction was already assigned an
XID), XLOG_NO_TRAN entries' XID does show up in permante storage?
(2)
In smgrcreate():
* Make a non-transactional XLOG entry showing the file creation. It's
* non-transactional because we should replay it whether the transaction
* commits or not
lsn = XLogInsert(... XLOG_NO_TRAN ...);
Do we replay *all* xlogs no matter it commits or not? AFAICS, the only
usage of marking xlog non transaction-controlled is not to move
MyLastRecPtr pointer (so possiblly reduce some work at transaction
prepare/commit/abort point), and other usage?
(3)
Also in smgrcreate():
* ...; the WAL sequence will tell whether to drop the file.
*/
void
smgrcreate(SMgrRelation reln, bool isTemp, bool isRedo)
Seems nobody is reponsible to remove the smgrcreate()'d file if only
XLOG_SMGR_CREATE entry is flushed and system crash?
Regards,
Qingqing
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2005-12-23 20:38:56 | default resource limits |
Previous Message | Michael Fuhr | 2005-12-23 20:18:34 | Re: where is the output |