RE: [Patch] Optimize dropping of relation buffers using dlist - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: [Patch] Optimize dropping of relation buffers using dlist
Date
Msg-id TYAPR01MB2990D9D83C1C5533A4E126EFFE1C0@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: [Patch] Optimize dropping of relation buffers using dlist  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Responses RE: [Patch] Optimize dropping of relation buffers using dlist
List pgsql-hackers
RelationTruncate() invalidates the cached fork sizes as follows.  This causes smgrnblocks() return accurate=false,
resultingin not running optimization.  Try commenting out for non-recovery case. 

    /*
     * Make sure smgr_targblock etc aren't pointing somewhere past new end
     */
    rel->rd_smgr->smgr_targblock = InvalidBlockNumber;
    for (int i = 0; i <= MAX_FORKNUM; ++i)
        rel->rd_smgr->smgr_cached_nblocks[i] = InvalidBlockNumber;


Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2
Next
From: Peter Smith
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions