Re: vacuum freeze - possible improvements

2021-04-13 Thread Virender Singla
exactly my point, want to scan only 500GB data instead of 1TB. That can be handy for vacuum freeze at a dangerous stage (reaching towards 2B). "Maybe we can track the oldest xid per page in a map like visiblity map or integrate it with visibility map. We need to freeze only pages that are all-vi

Re: vacuum freeze - possible improvements

2021-04-13 Thread Masahiko Sawada
On Tue, Apr 13, 2021 at 1:51 PM Virender Singla wrote: > > Thanks Masahiko for the response. > > "What is > the use case where users want to freeze fewer transactions, meaning > invoking anti-wraparound frequently?" > > My overall focus here is anti wraparound vacuum on huge tables in emergency >

Re: vacuum freeze - possible improvements

2021-04-13 Thread David Rowley
On Tue, 13 Apr 2021 at 19:48, Virender Singla wrote: > Yes another thing here is anti wraparound vacuum also cleans dead tuples but > i am not sure what we can do to avoid that. > There can be vacuum to only freeze the tulpes? You might want to have a look at [1], which was just pushed for PG14.

Re: vacuum freeze - possible improvements

2021-04-13 Thread Virender Singla
Thanks Masahiko for the response. "What is the use case where users want to freeze fewer transactions, meaning invoking anti-wraparound frequently?" My overall focus here is anti wraparound vacuum on huge tables in emergency situations (where we reached very close to 2B transactions or already i

Re: vacuum freeze - possible improvements

2021-04-12 Thread Masahiko Sawada
On Mon, Apr 12, 2021 at 5:38 PM Virender Singla wrote: > > Hi Postgres Community, > > Regarding anti wraparound vacuums (to freeze tuples), I see it has to scan > all the pages which are not frozen-all (looking at visibility map). That > means even if we want to freeze less transactions only (Fo