Re:Re: equivalent thing of mtr in mysql

From: merryok <merryok(at)163(dot)com>
To: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re:Re: equivalent thing of mtr in mysql
Date: 2022-07-16 01:31:19
Message-ID: 2c01c02b.8c7.18204a1a906.Coremail.merryok@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 or
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.

At 2022-07-13 02:57:28, "Peter J. Holzer" <hjp-pgsql(at)hjp(dot)at> wrote:
>On 2022-07-12 22:39:31 +0800, merryok wrote:
>> Hi, guys. I'm new here.
>>
>> I'm eager to figure out what is the equivalent thing of mtr in mysql in PG.
>
>What is MTR? A search for "mtr mysql" yields "mysql test run" and
>"multi-threaded replication", neither of which seems to be what you are
>talking about. When referring to concepts from other databases, please
>include a link to the relevant documentation.
>
>> When a dml operation occurs, it may modify multiple pages and gererate multiple
>> redo log records. mtr can make those logs atomically be transferred to log
>> buffer and written to disk.
>> I think same situation exists in PG, but I can't find something like mtr, why ?
>
>Transactions in PostgreSQL are always atomic (That should also be the
>case with MySQL, unless you use MyISAM tables). Ensuring that these
>changes also result in an atomic disk write seems to be both pointless
>and impossible (that might be many gigabytes of data).
>
> hp
>
>--
> _ | Peter J. Holzer | Story must make more sense than reality.
>|_|_) | |
>| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
>__/ | http://www.hjp.at/ | challenge!"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ludwig Isaac Lim 2022-07-16 04:00:20 Re: Error when pasting function blocks into psql
Previous Message Zsolt Ero 2022-07-15 20:11:09 could not link file in wal restore lines