Re: [HACKERS] Questions on extending a relation

2005-06-27 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> writes > > Yes. That's intentional --- otherwise they'd all block each other. > So if I saw the last two pages on a disk relation are half full, that's nothing wrong? > > Why wouldn't we replay xlog? Note in particular that the bgwriter is > not allowed to push p

Re: [HACKERS] Questions on extending a relation

2005-06-27 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > 1. When we want a new page, we will do something like this: > LockPage(relation, 0, ExclusiveLock); > blockNum = smgrnblocks(reln->rd_smgr); > /* Try to locate this blockNum in buffer pool, but definitely can't? */ > smgrextend(blockNum); > LockPage(re

[HACKERS] Questions on extending a relation

2005-06-27 Thread Qingqing Zhou
Hi Hackers, Here I have two questions related to extending a relation: 1. When we want a new page, we will do something like this: LockPage(relation, 0, ExclusiveLock); blockNum = smgrnblocks(reln->rd_smgr); /* Try to locate this blockNum in buffer pool, but definitely can't? */ smgrextend(block