Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121865 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43548 invoked from network); 29 Nov 2023 23:10:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Nov 2023 23:10:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D59C7180032 for ; Wed, 29 Nov 2023 15:10:38 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 29 Nov 2023 15:10:38 -0800 (PST) Received: from smtpclient.apple (99.151.159.133.rev.vmobile.jp [133.159.151.99]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 3FB0E401D1 for ; Thu, 30 Nov 2023 08:10:27 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1701299427; bh=orglxS35t30TY1un+r0epCDklbxeW6PcYLHTMupN9s4=; h=From:Date:Subject:To:From; b=S9OMCeX7bk+yVao3s/v/sTk65e6pD6QO2dOGavw5Omhi2V+ErHRfa7InHmvcQDpFb qPWmiXZq8rALmjR80MjCn3IagT0bpCeFKUgIe9Ze5Jbuyhjbq1UlX52fEJcstIYIWI 6BDms5WIq4Nateoncy8oQVuV2J5gkHfDrlVfwrb4= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Thu, 30 Nov 2023 08:10:14 +0900 Message-ID: <6A2118D9-6DD0-4273-A2C0-A1088C05314D@sakiot.com> To: PHP internals X-Mailer: iPhone Mail (21B91) Subject: [PDO] 2 phase commit From: saki@sakiot.com (Saki Takamachi) Hi internals, For the past few days I've been thinking about whether to make a suggestion t= o add two-phase commit functionality to pdo. I would like to hear everyone's opinions. About two-phase commit Regular transactions do not guarantee consistency across multiple DBs. For e= xample, if you update DB1 and DB2 at the same time, only DB1 may be updated a= nd the DB2 update may fail. When using two-phase commit, it is as if a common transaction has been start= ed for multiple DBs, and their consistency can be guaranteed. Currently, pdo does not have such a feature as a method, but it is possible t= o use two-phase commit by executing a query. Think of it as adding such func= tionality as a method. Although I have only written about the advantages, two-phase commit also has= disadvantages, such as the possibility that locks may not be released forev= er under certain conditions. Regards. Saki=