Search Postgresql Archives

Re: equivalent thing of mtr in mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've read the doc, and it doesn't help too much.
Finally I've found START_CRIT_SECTION and END_CRIT_SECTION. It's like mtr.start(), mtr.commit() in mysql. May I ask why many places are wrapped into START_CRIT_SECTION/END_CRIT_SECTION during a single dml operation ?

And if Assert(CritSectionCount > 0) isn't satisfied (CritSectionCount need't be protected ?), PG server will panic and exit ? If so, what's the probability of that ?





发自我的小米手机
在 Adrian Klaver <adrian.klaver@xxxxxxxxxxx>,2022年7月16日 23:30写道:

On 7/15/22 18:31, merryok wrote:
> I'm sorry, first time to post a thread. mtr is short for mini-transaction.
> About mtr in mysql, we can refer to
> https://dev.mysql.com/doc/refman/8.0/en/glossary.html
> <https://dev.mysql.com/doc/refman/8.0/en/glossary.html> or
> https://dev.mysql.com/blog-archive/mysql-8-0-new-lock-free-scalable-wal-design/
> <https://dev.mysql.com/blog-archive/mysql-8-0-new-lock-free-scalable-wal-design/>
>
>
>
> So an insert in mysql,  wrapped in a user transaction, may result in
> multiple mini-transactions, one is responsible for writing redo for
> undo, the other one for writing redo for clustered index/secondary
> index, and so on. Each mtr may modify multiple pages,  whose redo logs
> are guaranteed by mtr to be written into disk or none of them are written.
>

Read this:

https://www.postgresql.org/docs/current/wal.html

and see if it answers your questions.


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux