Re: Speedup twophase transactions

From: Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Speedup twophase transactions
Date: 2017-03-28 05:10:05
Message-ID: CAMGcDxdLn70LxOtuckLine6QT+o-ANhDe0G7Q9sV+GuFPeBynA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Micheal,

The latest patch looks good. By now doing a single scan of shmem two phase
data, we have removed the double loops in all the affected functions which
is good.

My only question is if the added call to restoreTwoPhaseData() is good
enough to handle all the 3
functions PrescanPreparedTransactions(), StandbyRecoverPreparedTransactions()
and RecoverPreparedTransactions() appropriately? It looks as if it does,
but we need to be doubly sure..

PFA, revised patch with a very minor typo fix and rebase against latest
master. The test cases pass as needed.

Oh, btw, while running TAP tests, I got a few errors in unrelated tests.

"# testing connection parameter "target_session_attrs"

not ok 5 - connect to node master if mode "read-write" and master,standby_1
listed

# Failed test 'connect to node master if mode "read-write" and
master,standby_1 listed'

# at t/001_stream_rep.pl line 93.

# got: ''

# expected: '1'

not ok 6 - connect to node master if mode "read-write" and standby_1,master
listed

# Failed test 'connect to node master if mode "read-write" and
standby_1,master listed'

# at t/001_stream_rep.pl line 93.

# got: ''

# expected: '1'

not ok 7 - connect to node master if mode "any" and master,standby_1 listed

# Failed test 'connect to node master if mode "any" and master,standby_1
listed'

# at t/001_stream_rep.pl line 93.

# got: ''

# expected: '1'

not ok 8 - connect to node standby_1 if mode "any" and standby_1,master
listed"

Again, not related to this recovery code path, but not sure if others see
this as well.

Regards,
Nikhils

On 27 March 2017 at 05:35, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> On Sun, Mar 26, 2017 at 4:50 PM, Nikhil Sontakke
> <nikhils(at)2ndquadrant(dot)com> wrote:
> > I was away for a bit. I will take a look at this patch and get back to
> you
> > soon.
>
> No problem. Thanks for your time!
> --
> Michael
>

--
Nikhil Sontakke http://www.2ndQuadrant.com/
PostgreSQL/Postgres-XL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
twophase_recovery_shmem_280317.patch application/octet-stream 33.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-03-28 05:10:25 Re: Crash on promotion when recovery.conf is renamed
Previous Message Vaishnavi Prabakaran 2017-03-28 04:57:28 Re: PATCH: Batch/pipelining support for libpq