Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-28 Thread Tomas Vondra
On 11/28/18 3:31 AM, Andres Freund wrote: > Hi, > > On 2018-11-28 03:06:58 +0100, Petr Jelinek wrote: >> On 28/11/2018 02:14, Andres Freund wrote: >>> On 2018-11-28 02:04:18 +0100, Tomas Vondra wrote: Pushed and backpatched to 9.4- (same as e9edc1ba). >>> >>> Backpatching seems on the more

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-27 Thread Andres Freund
Hi, On 2018-11-28 03:06:58 +0100, Petr Jelinek wrote: > On 28/11/2018 02:14, Andres Freund wrote: > > On 2018-11-28 02:04:18 +0100, Tomas Vondra wrote: > >> Pushed and backpatched to 9.4- (same as e9edc1ba). > > > > Backpatching seems on the more aggressive end of things for an > > optimization.

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-27 Thread Petr Jelinek
Hi, On 28/11/2018 02:14, Andres Freund wrote: > Hi, > > On 2018-11-28 02:04:18 +0100, Tomas Vondra wrote: >> >> On 11/24/18 12:20 AM, Tomas Vondra wrote: >>> ... >>> >>> OK, here's an updated patch, tweaking the reorderbuffer part. I plan >>> to push this sometime mid next week. >>> >> >> Pushed

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-27 Thread Andres Freund
Hi, On 2018-11-28 02:04:18 +0100, Tomas Vondra wrote: > > On 11/24/18 12:20 AM, Tomas Vondra wrote: > > ... > > > > OK, here's an updated patch, tweaking the reorderbuffer part. I plan > > to push this sometime mid next week. > > > > Pushed and backpatched to 9.4- (same as e9edc1ba). Backpatc

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-27 Thread Tomas Vondra
On 11/24/18 12:20 AM, Tomas Vondra wrote: > ... > > OK, here's an updated patch, tweaking the reorderbuffer part. I plan > to push this sometime mid next week. > Pushed and backpatched to 9.4- (same as e9edc1ba). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-23 Thread Tomas Vondra
On 11/19/18 11:44 AM, Tomas Vondra wrote: > On 11/19/18 10:28 AM, Masahiko Sawada wrote: >> On Mon, Nov 19, 2018 at 6:52 AM Tomas Vondra >> wrote: >>> >>> ... >>> >>> This does fix the issue, because we still decode the TOAST changes but >>> there are no data and so >>> >>> if (change->data.t

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-19 Thread Tomas Vondra
On 11/19/18 10:28 AM, Masahiko Sawada wrote: On Mon, Nov 19, 2018 at 6:52 AM Tomas Vondra wrote: Hi, It seems we have pretty annoying problem with logical decoding when performing VACUUM FULL / CLUSTER on a table with toast-ed data. The trouble is that the rewritten heap is WAL-logged using

Re: logical decoding vs. VACUUM FULL / CLUSTER on table with TOAST-ed data

2018-11-19 Thread Masahiko Sawada
On Mon, Nov 19, 2018 at 6:52 AM Tomas Vondra wrote: > > Hi, > > It seems we have pretty annoying problem with logical decoding when > performing VACUUM FULL / CLUSTER on a table with toast-ed data. > > The trouble is that the rewritten heap is WAL-logged using XLOG/FPI > records, the TOAST data is