Re: What is the purpose of segment level checkpoint before DROP/TRUNCATE of a table?

From: Paresh Yadav <yparesh_at_gmail.com>
Date: Sun, 10 Jul 2011 01:12:00 -0400
Message-ID: <CAPXEL0JcL05ej9xo1nPuHcO_gcYfbHni4ew=aH5-bPN0w=V2Sg_at_mail.gmail.com>



Everyone, Thanks for trying to answer my question.

Jonathan, Your answer explains "why for drop". Why do you consider it as a side effect on truncate for piggy backing on same code? i.e. What is wrong with Truncate honoring Cross-DDL read-consistency?

Can you connect this with anything regarding recovery and PITR?

Thanks,
Paresh

On Fri, Jul 8, 2011 at 12:27 PM, Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk
> wrote:

>
> Mark,
>
> You've given me a clue.
>
> Cross-DDL read-consistency - e.g. long running query meets exchange
> partition.
>
> The query is allowed to continue because it know the physical location of
> the original partition, and the query will only crash if something
> overwrites the original. This came in in 8.1 I think, possibly even 8.0.
>
> I've just run:
>
> session 1 - start long running query against IOT
> session 2 - drop IOT, flush buffer cache
> session 1 - carries on running, after re-reading the block from disk.
>
> The same test fails instantly with truncate because truncate does its local
> write to overwrite the root block of the IOT with an empty block, so session
> 1 immediately gets ORA-01410 invalid rowid. However the cross-DDL
> requirement would explain the writes on drop, and perhaps the writes on
> truncate are simply a side effect of piggy-backing the same code rather than
> writing a new piece.
>
>
>
>
> Regards
>
> Jonathan Lewis
> http://jonathanlewis.**wordpress.com <http://jonathanlewis.wordpress.com>
>
>
> ----- Original Message ----- From: "Mark W. Farnham" <mwf_at_rsiz.com>
> To: <saibabu_d_at_yahoo.com>; "'Jonathan Lewis'" <jonathan_at_jlcomp.demon.co.uk>;
> "'free'" <oracle-l_at_freelists.org>
> Sent: Friday, July 08, 2011 3:07 PM
> Subject: RE: What is the purpose of segment level checkpoint before
> DROP/TRUNCATE of a table?
>
>
>
> I now see your concern about the ability to checksum. But that is not
>> guaranteed (or needed by the recovery model) and since those blocks are no
>> longer assigned to a segment any contents are immaterial. If someone is
>> doing checksums or binary diffs between datafiles through the same point
>> in
>> recovery, it might break their sanity check, but it does not compromise
>> the
>> integrity of the standby in any way I can grok.
>>
>>
> --
> http://www.freelists.org/**webpage/oracle-l<http://www.freelists.org/webpage/oracle-l>
>
>
>

-- 
Thanks
Paresh
416-688-1003

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Jul 10 2011 - 00:12:00 CDT

Original text of this message