Snapshot scalability patch issue

Started by Peter Geogheganabout 5 years ago4 messageshackers
Jump to latest

The call to heap_page_prune() within lazy_scan_heap() passes a bool
literal ('false') as its fourth argument. But the fourth argument is
of type TransactionId, not bool. This has been the case since the
snapshot scalability work performed by commit dc7420c2c92. Surely
something is amiss here.

I also notice some inconsistencies in the heap_page_prune() prototype
names vs the corresponding definition names. Might be worth doing
something about in passing.

--
Peter Geoghegan

#2Andres Freund
andres@anarazel.de
In reply to: Peter Geoghegan (#1)
Re: Snapshot scalability patch issue

Hi,

On 2021-02-14 18:42:18 -0800, Peter Geoghegan wrote:

The call to heap_page_prune() within lazy_scan_heap() passes a bool
literal ('false') as its fourth argument. But the fourth argument is
of type TransactionId, not bool. This has been the case since the
snapshot scalability work performed by commit dc7420c2c92. Surely
something is amiss here.

Looks like I accidentally swapped the InvalidTransactionId and false
around - luckily they have the same actual bit pattern...

I do wish C could pass arguments by name.

I'll push something once I'm back at my computer...

Greetings,

Andres Freund

#3Andres Freund
andres@anarazel.de
In reply to: Andres Freund (#2)
Re: Snapshot scalability patch issue

Hi,

On 2021-02-15 15:08:40 -0800, Andres Freund wrote:

On 2021-02-14 18:42:18 -0800, Peter Geoghegan wrote:

The call to heap_page_prune() within lazy_scan_heap() passes a bool
literal ('false') as its fourth argument. But the fourth argument is
of type TransactionId, not bool. This has been the case since the
snapshot scalability work performed by commit dc7420c2c92. Surely
something is amiss here.

Looks like I accidentally swapped the InvalidTransactionId and false
around - luckily they have the same actual bit pattern...

I do wish C could pass arguments by name.

I'll push something once I'm back at my computer...

Done. Thanks for noticing/reporting!

Greetings,

Andres Freund

In reply to: Andres Freund (#3)
Re: Snapshot scalability patch issue

On Mon, Feb 15, 2021 at 5:30 PM Andres Freund <andres@anarazel.de> wrote:

Done. Thanks for noticing/reporting!

Great, thanks!

--
Peter Geoghegan