On 4/3/18 4:48 PM, Michael Banck wrote:
>
> Attached is a patch which does that hopefully:
>
> 1. creates two user tables, one large enough for at least 6 blocks
> (around 360kb), the other just one block.
>
> 2. stops the cluster before scribbling over its data and starts it
> afterwards.
>
> 3. uses the blocksize (and the pager header size) to determine offsets
> for scribbling.
This patch looks reasonable to me.
> I've tested it with blocksizes 8 and 32 now, the latter should make sure
> that the first table is indeed large enough, but maybe something less
> arbitrary than "10000 integers" should be used?
It might be quicker to just stop the cluster and then write out an
arbitrary number of zero pages. Zero pages are always considered valid
so you can then corrupt whichever pages you want for testing.
--
-David
david@pgmasters.net