From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby |
Date: | 2016-01-18 13:38:15 |
Message-ID: | 20160118133815.GT10941@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On 2015-12-21 16:26:25 +0900, Michael Paquier wrote:
> On Sun, Dec 20, 2015 at 10:14 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
> > Speaking of which, this patch was registered in this CF, I am moving
> > it to the next as a bug fix.
>
> I found a stupid bug in my previous patch: when issuing XLOG_SWITCH it
> is possible that the return LSN pointer is on the new segment that has
> been forcibly archived if RequestXLogSwitch is called multiple times
> and that subsequent calls are not necessary. Patch updated.
I find this patch rather unsatisfactory. Yes, it kinda solves the
problem of archive timeout, but it leaves the bigger and longer standing
problems of unneccessary checkpoints with wal_level=hs in place. It's
also somewhat fragile in my opinion.
I think we rather want a per backend (or perhaps per wal insertion lock)
flag that says 'last relevant record inserted at', and a way to not set
that during insertion. Then during a checkpoint or the relevant bgwriter
code, we look wether anything relevant happened in any backend since the
last time we performed a checkpoint/logged a running xacts snapshot.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | travis.smith | 2016-01-18 16:05:35 | BUG #13875: Error explaining query |
Previous Message | Amit Kapila | 2016-01-18 13:19:40 | Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby |
From | Date | Subject | |
---|---|---|---|
Next Message | Haribabu Kommi | 2016-01-18 13:44:38 | Re: Combining Aggregates |
Previous Message | Amit Kapila | 2016-01-18 13:19:40 | Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby |