Closed japinli closed 7 months ago
I realized I can't approve running the Github Actions CI due the action never being triggered in the first place, due to how our if
statements work in our Github Actions. Something to look into…
not necessarily redundant. smgrsetowner
can fail silently when assertions are not enabled, so in the actual unlikely event that this fails, the unlikely
call should catch it.
not necessarily redundant.
smgrsetowner
can fail silently when assertions are not enabled, so in the actual unlikely event that this fails, theunlikely
call should catch it.
I cannot get your mind. Since ColumnarStorageIsCurrent()
has already checked this using unlikely()
, so if there is a fail, ColumnarStorageIsCurrent()
will catch it.
lines 376-380 of columnar_storage.c call smgrsetowner
which can silently fail to set an owner when assertions in Postgres are disabled (assertions are generally only enabled for development, not for distributed releases). this leaves rel->rd_smgr
as NULL
, and returns the results of ColumnarMetapageIsCurrent
.
lines 376-380 of columnar_storage.c call
smgrsetowner
which can silently fail to set an owner when assertions in Postgres are disabled (assertions are generally only enabled for development, not for distributed releases). this leavesrel->rd_smgr
asNULL
, and returns the results ofColumnarMetapageIsCurrent
.
Thanks for your patient explanation. Both ColumnarMetapageIsCurrent
and ColumnarStorageUpdateIfNeeded
have the same check and set logic for rel->rd_smgr
. If ColumnarMetapageIsCurrent
leaves rel->rd_smgr
as NULL
, how does ColumnarStorageUpdateIfNeeded
make it non-NULL? I'm feeling a bit confused about this.
The ColumnarStorageIsCurrent will attempt to open SMGR when it doesn't open, so ColumnarStorageUpdateIfNeeded is not required to check SMGR.
OTOH, ColumnarStorageIsCurrent only returns true if metapage exists and is the current version, so fix the comment.