Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCjki-00014i-DC for pgsql-general@arkaria.postgresql.org; Sat, 16 Jul 2022 15:30:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oCjkh-0006eT-8T for pgsql-general@arkaria.postgresql.org; Sat, 16 Jul 2022 15:30:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCjkf-0006VH-Ng for pgsql-general@lists.postgresql.org; Sat, 16 Jul 2022 15:30:42 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCjka-0004lP-Oi for pgsql-general@lists.postgresql.org; Sat, 16 Jul 2022 15:30:41 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id EAD0532000D7; Sat, 16 Jul 2022 11:30:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 16 Jul 2022 11:30:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1657985431; x= 1658071831; bh=fkj9od3rxrDxCbKfsHMONWgcC0MJBth8dv/bX8k7Vxw=; b=L GVVE5LtI0PMxAZBmh6LVuNzoJi/lMl382l2NezPDW2lnReHtW9jQ1KZR1y3QKe8g AK2i/xe2A+j668Lamgs2J/I/fAa6ZCuHOPVfocEGYTfnk2ZOj0bJUJTUIV0I7f2U L2DWxBHVm0w6ECcLyoic+ECA84xdtLyU3/0dVXbWsMuPxU02ayTIwtsh6syo/aoT B7gcW/4SV/yEJdGEhN5xAJCG/N4CjqzB/ZPLx+ExzlaZlH7zXxFn349zgFEcFUJ7 p3cqLJjzVoHFTmrHpnI/XfpYkGVkiJ/KfkJHYAnSxUhFIaXFp6bjnKrl0oMxXpDe D0eiH2sJ4LLVUPyw6Ptjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657985431; x= 1658071831; bh=fkj9od3rxrDxCbKfsHMONWgcC0MJBth8dv/bX8k7Vxw=; b=J nAWgfcLLWHi7Q7q1hbLjIHhWV/LmV+MCo+AC50QIEDR+zWtGybSymjy82fTVghzn lLu9FZQqRjWdwLUx5Oe3n6Op+QhrwUKD23gOfAae369emkyU65ipTwOxnwof8sXr O9tksrQJLhMKVP8VAyrFrKrtCUPQLzzOeuTPkP+rO+jaEL7gOWOkiIBvdTA4PmGI SsIGsV9XX6U0svqCK+8CH4Lgl8YlNfxXw+/+7aILADXH2uh7weFHco/7sYNt0/s1 o2kt1GoNfMLUtBgiaa3YJfDrXQCpTGvb0F+G9t15nKYuCPU+GCuHrf4plHZBrAFZ hKO0AS+Hjqi4l5iTk6UCg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudekfedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeegfeeute eiffeujefhheeuieektedvffffhfekfeehleefueduhffgtdfhuddvtdenucffohhmrghi nhepmhihshhqlhdrtghomhdpphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgv rhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Jul 2022 11:30:30 -0400 (EDT) Message-ID: <52b03573-1e24-9cde-3bcb-41ecb60906ec@aklaver.com> Date: Sat, 16 Jul 2022 08:30:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: equivalent thing of mtr in mysql Content-Language: en-US To: merryok , "Peter J. Holzer" Cc: pgsql-general@lists.postgresql.org References: <4114f05b.8c8d.181f2d9d679.Coremail.merryok@163.com> <20220712185728.vubbosjtlgffs2th@hjp.at> <2c01c02b.8c7.18204a1a906.Coremail.merryok@163.com> From: Adrian Klaver In-Reply-To: <2c01c02b.8c7.18204a1a906.Coremail.merryok@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 >  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. > Read this: https://www.postgresql.org/docs/current/wal.html and see if it answers your questions. -- Adrian Klaver adrian.klaver@aklaver.com