mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-23 06:09:59 +00:00
Fix incorrect unpin condition in get_cached_relkind
This commit is contained in:
committed by
Konstantin Knizhnik
parent
2e34fe03c7
commit
d5d41241fa
@@ -310,7 +310,7 @@ typedef enum
|
||||
RELKIND_UNKNOWN,
|
||||
RELKIND_PERMANENT,
|
||||
RELKIND_UNLOGGED,
|
||||
RELKIND_UNLOGGED_BUILD //* buildig index for permanent relation */
|
||||
RELKIND_UNLOGGED_BUILD /* buildig index for permanent relation */
|
||||
} RelKind;
|
||||
|
||||
/* utils for neon relkind cache */
|
||||
|
||||
@@ -187,7 +187,7 @@ get_cached_relkind(NRelFileInfo rinfo, RelKind* relkind)
|
||||
if (found)
|
||||
{
|
||||
/* If relation persistence is known, then there is no need to pin it */
|
||||
if (entry->relkind == RELKIND_UNKNOWN)
|
||||
if (entry->relkind != RELKIND_UNKNOWN)
|
||||
{
|
||||
/* Fast path: normal (persistent) relation with kind stored in the cache */
|
||||
if (--entry->access_count == 0)
|
||||
|
||||
Reference in New Issue
Block a user