From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Ivan Kartyshov <i(dot)kartyshov(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: long transactions on hot standby feedback replica / proof of concept |
Date: | 2017-11-03 21:57:15 |
Message-ID: | CAPpHfdu07pzJxpiU=Z491k3xqDGwji30pJzafgqh4CWLS0Zzsg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 2, 2017 at 5:56 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Oct 31, 2017 at 2:47 PM, Alexander Korotkov
> <a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> > However, from user prospective of view, current behavior of
> > hot_standby_feedback is just broken, because it both increases bloat and
> > doesn't guarantee that read-only query on standby wouldn't be cancelled
> > because of vacuum. Therefore, we should be looking for solution: if one
> > approach isn't good enough, then we should look for another approach.
> >
> > I can propose following alternative approach: teach read-only queries on
> hot
> > standby to tolerate concurrent relation truncation. Therefore, when
> > non-existent heap page is accessed on hot standby, we can know that it
> was
> > deleted by concurrent truncation and should be assumed to be empty. Any
> > thoughts?
>
> Sounds like it might break MVCC?
I don't know why it might be broken. VACUUM truncates heap only when tail
to be truncated is already empty. When applying truncate WAL record,
previous WAL records deleting all those tuples in the tail are already
applied. Thus, if even MVCC is broken and we will miss some tuples after
heap truncation, they were anyway were gone before heap truncation.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2017-11-03 22:04:22 | Re: WIP: long transactions on hot standby feedback replica / proof of concept |
Previous Message | Jeff Janes | 2017-11-03 21:51:11 | Re: Re: PANIC: invalid index offnum: 186 when processing BRIN indexes in VACUUM |