Fix incorrect unpin condition in get_cached_relkind

This commit is contained in:
Kosntantin Knizhnik
2025-06-28 07:43:28 +03:00
committed by Konstantin Knizhnik
parent 2e34fe03c7
commit d5d41241fa
2 changed files with 2 additions and 2 deletions

View File

@@ -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 */

View File

@@ -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)