Skip to content

Commit d62de29

Browse files
author
Kosntantin Knizhnik
committed
Fix incorrect unpin condition in get_cached_relkind
1 parent c39208d commit d62de29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pgxn/neon/pagestore_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ typedef enum
294294
RELKIND_UNKNOWN,
295295
RELKIND_PERMANENT,
296296
RELKIND_UNLOGGED,
297-
RELKIND_UNLOGGED_BUILD //* buildig index for permanent relation */
297+
RELKIND_UNLOGGED_BUILD /* buildig index for permanent relation */
298298
} RelKind;
299299

300300
/* utils for neon relkind cache */

pgxn/neon/relkind_cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ get_cached_relkind(NRelFileInfo rinfo, RelKind* relkind)
187187
if (found)
188188
{
189189
/* If relation persistence is known, then there is no need to pin it */
190-
if (entry->relkind == RELKIND_UNKNOWN)
190+
if (entry->relkind != RELKIND_UNKNOWN)
191191
{
192192
/* Fast path: normal (persistent) relation with kind stored in the cache */
193193
if (--entry->access_count == 0)

0 commit comments

Comments
 (0)