Skip to content

Commit

Permalink
Make sure invalid reloptions are silently ignored when the caller req…
Browse files Browse the repository at this point in the history
…uests that

Per docs: https://www.postgresql.org/docs/current/index-functions.html

> validate is false when loading options already stored in pg_catalog;
an invalid entry could only be found if the access method has changed
its rules for options, and in that case ignoring obsolete entries is
appropriate.
  • Loading branch information
Ngalstyan4 committed Nov 8, 2024
1 parent e8e0472 commit d414036
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lantern_hnsw/src/hnsw/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ bytea *ldb_amoptions(Datum reloptions, bool validate)
};

#if PG_VERSION_NUM >= 130000
LDB_UNUSED(validate);
return (bytea *)build_reloptions(
reloptions, true, ldb_hnsw_index_withopts, sizeof(ldb_HnswOptions), tab, lengthof(tab));
reloptions, validate, ldb_hnsw_index_withopts, sizeof(ldb_HnswOptions), tab, lengthof(tab));
#else
// clang-format off
relopt_value *options;
Expand Down

0 comments on commit d414036

Please sign in to comment.