Re: REPACK enhancements - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: REPACK enhancements
Date
Msg-id 21489.1789756686@localhost
Whole thread
In response to Re: REPACK enhancements  (Antonin Houska <ah@cybertec.at>)
Responses Re: REPACK enhancements
List pgsql-hackers
Antonin Houska <ah@cybertec.at> wrote:

> shihao zhong <zhong950419@gmail.com> wrote:
> 
> > 2. 
> > Looks like some rows are lost when the table grows/gap fill.
> > 
> > heapScan->rs_nblocks is fixed when the scan starts. At a range boundary, 
> > changes to blocks at or beyond rs_nblocks are not in [range_start, range_end), 
> > so they are skipped. The next snapshot can see those tuples, but the scan never
> > reaches those blocks.
> > 
> > The attached extend.spec has 5 blocks. It uses
> > repack_snapshot_after = 2, pauses at the first boundary, and inserts 100
> > rows. 70 of them go to blocks 5 to 7 and are missing after REPACK.
> 
> Interestiong. I think we need to get the new rows from new blocks each time we
> process the concurrent changes.

I could spend a little while on this item. Attached is what fixes your
extend.spec.text.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [PATCH] Release replication slot on error in SQL-callable slot functions
Next
From: Masahiko Sawada
Date:
Subject: Re: pgoutput: schema cache cleanup after streamed 2PC