mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Remove lsn from HashScanPosData.
This was intended as infrastructure for weakening VACUUM's locking
requirements, similar to what was done for btree indexes in commit
2ed5b87f96. However, for hash indexes,
it seems that the improvements which are possible are actually
extremely marginal. Furthermore, performing the LSN cross-check will
end up skipping cleanup far more often than is necessary; we only care
about page modifications due to a VACUUM, but the LSN check will fail
if ANY modification has occurred. So, rather than pressing forward
with that "optimization", just rip the LSN field out.
Patch by me, reviewed by Ashutosh Sharma and Amit Kapila
Discussion: http://postgr.es/m/CAA4eK1JxqqcuC5Un7YLQVhOYSZBS+t=3xqZuEkt5RyquyuxpwQ@mail.gmail.com
This commit is contained in:
@@ -117,7 +117,6 @@ typedef struct HashScanPosItem /* what we remember about each match */
|
||||
typedef struct HashScanPosData
|
||||
{
|
||||
Buffer buf; /* if valid, the buffer is pinned */
|
||||
XLogRecPtr lsn; /* pos in the WAL stream when page was read */
|
||||
BlockNumber currPage; /* current hash index page */
|
||||
BlockNumber nextPage; /* next overflow page */
|
||||
BlockNumber prevPage; /* prev overflow or bucket page */
|
||||
@@ -153,7 +152,6 @@ typedef struct HashScanPosData
|
||||
#define HashScanPosInvalidate(scanpos) \
|
||||
do { \
|
||||
(scanpos).buf = InvalidBuffer; \
|
||||
(scanpos).lsn = InvalidXLogRecPtr; \
|
||||
(scanpos).currPage = InvalidBlockNumber; \
|
||||
(scanpos).nextPage = InvalidBlockNumber; \
|
||||
(scanpos).prevPage = InvalidBlockNumber; \
|
||||
|
||||
Reference in New Issue
Block a user