Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c3b59a

Browse files
committed
Fix failure when a shared tidbitmap has only one page.
Commit98e6e89 made inadequateprovision for the case of a single-page shared tidbitmap. Itallocate space for a shared PagetableEntry, but failed toinitialize it.Report by Thomas Munro. Patch by Dilip Kumar, with some commentchanges by me.Discussion:http://postgr.es/m/CAEepm=19Cmnfbi-j2Bw-a6yGPeHE1OVhKvvKz9bRBTJGKfGHMA@mail.gmail.com
1 parent28b0478 commit4c3b59a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/nodes/tidbitmap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,12 +866,14 @@ tbm_prepare_shared_iterate(TIDBitmap *tbm)
866866
elseif (tbm->status==TBM_ONE_PAGE)
867867
{
868868
/*
869-
* In one page mode allocate the space for one pagetable entry and
870-
* directly store its index i.e. 0 in page array
869+
* In one page mode allocate the space for one pagetable entry,
870+
* initialize it, and directly store its index (i.e. 0) in the
871+
* page array.
871872
*/
872873
tbm->dsapagetable=dsa_allocate(tbm->dsa,sizeof(PTEntryArray)+
873874
sizeof(PagetableEntry));
874875
ptbase=dsa_get_address(tbm->dsa,tbm->dsapagetable);
876+
memcpy(ptbase->ptentry,&tbm->entry1,sizeof(PagetableEntry));
875877
ptpages->index[0]=0;
876878
}
877879

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp