Re: [PATCHES] Improve XLOG_NO_TRAN related comments

2005-12-26 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes:
> On Sat, 24 Dec 2005, Tom Lane wrote:
>> Removing these comments entirely, without changing the code they explain,
>> doesn't strike me as an improvement.

> I just checked if we can remove XLOG_NO_TRAN happily, and the conclusion
> is that it could bring some benefits (though not much) to our system. The
> key is the CheckpointStartLock lock.

Hm.  Perhaps we could keep the current behavior and re-document
XLOG_NO_TRAN as meaning that the xlog record does not involve the
insertion of our XID into permanent storage.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [PATCHES] Improve XLOG_NO_TRAN related comments

2005-12-25 Thread Qingqing Zhou


On Sat, 24 Dec 2005, Tom Lane wrote:
>
> Removing these comments entirely, without changing the code they explain,
> doesn't strike me as an improvement.
>

I just checked if we can remove XLOG_NO_TRAN happily, and the conclusion
is that it could bring some benefits (though not much) to our system. The
key is the CheckpointStartLock lock. If we remove XLOG_NO_TRAN, then even
statement like this will block/wait checkpoint:

SELECT nextval('serial');

Of course, we can add a test in XLogInsert() to solve this problem like
this:

no_tran == ((rmid == RM_XLOG_ID) || (rmid == RM_SEQ_ID) || ...)

But the better way is leave XLOG_NO_TRAN for now till we find a way to
avoid CheckpointStartLock lock.

Regards,
Qingqing

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [PATCHES] Improve XLOG_NO_TRAN related comments

2005-12-24 Thread Qingqing Zhou


On Sat, 24 Dec 2005, Tom Lane wrote:
>
> Removing these comments entirely, without changing the code they explain,
> doesn't strike me as an improvement.
>

Well, I still kept the XLOG_NO_TRAN and collect repeated comments to
xlog.h where it is defined.

Regards,
Qingqing

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] Improve XLOG_NO_TRAN related comments

2005-12-24 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes:
> The following patch improves XLOG_NO_TRAN related comments per discussion.

Removing these comments entirely, without changing the code they explain,
doesn't strike me as an improvement.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq