Re: Speedup twophase transactions

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Andres Freund <andres@anarazel.de>
Cc: David Fetter <david@fetter.org>, Michael Paquier <michael.paquier@gmail.com>, Stas Kelvich <s.kelvich@postgrespro.ru>, Simon Riggs <simon@2ndquadrant.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, Jesper Pedersen <jesper.pedersen@redhat.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2016-12-18T00:38:46Z
Lists: pgsql-hackers
On Sat, Dec 17, 2016 at 03:47:34PM -0800, Andres Freund wrote:
> On 2016-12-17 15:30:08 -0800, David Fetter wrote:
> > On Sat, Dec 17, 2016 at 05:54:04PM -0500, Bruce Momjian wrote:
> > > On Sun, Dec 18, 2016 at 07:41:50AM +0900, Michael Paquier wrote:
> > > > On Sun, Dec 18, 2016 at 6:42 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > > > > Uh, did you mean to attached patch here?
> > > >
> > > > Strange. I can confirm that I have received the patch as attached, but
> > > > it is not on the archives.
> > >
> > > It must have been stripped by our email system.  You were a direct
> > > CC so you received it.
> >
> > I was neither, and I received it, so I don't thing PostgreSQL's email
> > system stripped it.  It's pretty mystifying, though.
> 
> The mime construction in the email is weird. The attachement is below a
> multipart/alternative and multipart/mixed, besides the text/html version
> of the plain text email.  Because the attachement is below the
> multipart/alternative (i.e. the switch between plain text / html), it'll
> not be considered a proper attachement by many mail readers.
> 
> It seems quite borked to put an attachement there - weird that apple
> mail does so.

Oh, I now see the attachment _is_ in the original email, it is just that
mutt doesn't show it.  Here is the heirarchy of the email as shown by
mutt:

  I     1 <no description>                                                                                        [multipa/alternativ, 7bit, 27K]
  I     2 ├─><no description>                                                                                [text/plain, quoted, us-ascii, 0.8K]
  I     3 └─><no description>                                                                                          [multipa/mixed, 7bit, 26K]
  I     4   ├─><no description>                                                                               [text/html, quoted, us-ascii, 5.4K]
  A     5   ├─>twophase_recovery_list.diff                                                                        [applica/octet-stre, 7bit, 20K]
  I     6   └─><no description>                                                                                 [text/html, 7bit, us-ascii, 0.4K]

As Andres already stated, the problem is that there is a text/plain and
text/html of the same email, and the diff is _inside_ the multipa/mixed
HTML block.  I think it needs to be outside on its own.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Commits

  1. Speedup 2PC recovery by skipping two phase state files in normal path

  2. Add tests for two-phase commit

  3. Improve grammar of message about two-phase state files.

  4. Speedup 2PC by skipping two phase state files in normal path