From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
Cc: | Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ivan Kartyshov <i(dot)kartyshov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: long transactions on hot standby feedback replica / proof of concept |
Date: | 2017-09-05 11:44:35 |
Message-ID: | CANP8+jL2ShD4cWTbmACTPH=PHrb3XsRPBHv_EC1_tNeatX-hUA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4 September 2017 at 09:06, Alexander Korotkov
<a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> Aborting read-only query on standby because of vacuum on master seems to be
> rather unexpected behaviour for user when hot standby feedback is on.
> I think we should work on this problem for v11.
Happy to help. My suggestion would be to discuss a potential theory of
operation and then code a patch.
As Alexander says, simply skipping truncation if standby is busy isn't
a great plan.
If we defer an action on standby replay, when and who will we apply
it? What happens if the standby is shutdown or crashes while an action
is pending.
Perhaps altering the way truncation requires an AccessExclusiveLock
would help workloads on both master and standby? If a Relation knew it
had a pending truncation then scans wouldn't need to go past newsize.
Once older lockers have gone we could simply truncate without the
lock. Would need a few pushups but seems less scary then trying to
make pending standby actions work well enough to commit.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2017-09-05 11:47:55 | Re: Should we cacheline align PGXACT? |
Previous Message | Etsuro Fujita | 2017-09-05 11:35:13 | Re: Tuple-routing for certain partitioned tables not working as expected |