Skip to content

Fix PostgreSQL 18 build failure in ambulkdelete - #378

Open
siddiqueirshad wants to merge 1 commit into
lanterndata:mainfrom
siddiqueirshad:fix/pg18-vacuum-delay-point
Open

siddiqueirshad wants to merge 1 commit into
lanterndata:mainfrom
siddiqueirshad:fix/pg18-vacuum-delay-point

Conversation

@siddiqueirshad

@siddiqueirshad siddiqueirshad commented Sep 9, 2026 •

Copy link
Copy Markdown

Summary

  • Fixes the PostgreSQL 18 build break reported in Build failure with PostgreSQL 18 beta 1 #375: vacuum_delay_point() now requires a bool is_analyze argument (postgres commit e5b0b0c).
  • Adds a version-gated compatibility shim in ldb_ambulkdelete() that expands to vacuum_delay_point(false) on PG 18+, matching the established approach used by pgvector for the same API change.
  • Leaves the zero-argument call site unchanged for PostgreSQL 12-17, so existing supported majors are unaffected.

Root cause

PostgreSQL 18 changed vacuum_delay_point from void vacuum_delay_point(void) to void vacuum_delay_point(bool is_analyze). Lantern's index vacuum path in lantern_hnsw/src/hnsw/delete.c still used the zero-argument form, so builds against PG 18 headers fail with too few arguments to function call.

Test plan

  • Confirmed open issue Build failure with PostgreSQL 18 beta 1 #375 has no assignees and no competing open PR
  • Confirmed REL_18_STABLE declares vacuum_delay_point(bool is_analyze) and REL_17_STABLE still declares the zero-arg form
  • Confirmed the shim matches the call-site pattern used by pgvector's PG 18 fix
  • CI matrix (PG 12-17) should remain green (shim is #if PG_VERSION_NUM >= 180000)
  • Build against PostgreSQL 18 headers should succeed where Build failure with PostgreSQL 18 beta 1 #375 previously failed

Fixes #375

PostgreSQL 18 requires vacuum_delay_point(bool is_analyze). Pass false
from the index vacuum path via a version-gated compatibility shim so
older majors keep the zero-argument call. Fixes lanterndata#375.

Co-authored-by: Cursor <cursoragent@cursor.com>
@siddiqueirshad

Copy link
Copy Markdown
Author

Hi @Ngalstyan4, when you get a chance, could you please take a look at this PR? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure with PostgreSQL 18 beta 1

1 participant