Re: Slow standby snapshot - Mailing list pgsql-hackers

From Michail Nikolaev
Subject Re: Slow standby snapshot
Date
Msg-id CANtu0ojiLd-kL-HVtN2A=sx5eNNFX8kd92fHdgasuKjZCXQarw@mail.gmail.com
Whole thread Raw
In response to Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Responses Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
List pgsql-hackers
Hello, Kirill.

> Also, maybe it is better to reduce the invasivity by using a more
> simple approach. For example, use the first bit to mark xid as valid
> and the last 7 bit (128 values) as an optimistic offset to the next
> valid xid (jump by 127 steps in the worse scenario).
> What do you think?

I have tried such an approach but looks like it is not effective,
probably because of CPU caching issues.

I have looked again at your patch, ut seems like it has a lot of
issues at the moment:

* error in KnownAssignedXidsGetOldestXmin, `i` is uninitialized, logic is wrong
* error in compressing function
(```KnownAssignedXidsValidDLL[compress_index].prv = prv;```, `prv` is
never updated)
* probably other errors?
* compilation warnings
* looks a little complex logic with `KAX_DLL_ENTRY_INVALID`
* variable\methods placing is bad (see `KAX_E_INVALID` and others)
* need to update documentation about KnownAssignedXidsValid, see ```To
keep individual deletions cheap, we need to allow gaps in the array```
in procarray.c
* formatting is broken

Do you have plans to update it? If not - I could try to rewrite it.

Also, what is about to add a patch to commitfest?

Thanks,
Michail.



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Enhanced error message to include hint messages for redundant options error
Next
From: David Rowley
Date:
Subject: Re: enable_resultcache confusion