Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Introspection issue for postgres version < 17 #8502

Open
thebuck25 opened this issue Mar 24, 2025 · 2 comments
Open

SQL Introspection issue for postgres version < 17 #8502

thebuck25 opened this issue Mar 24, 2025 · 2 comments

Comments

@thebuck25
Copy link

thebuck25 commented Mar 24, 2025

When starting a geldata 6.4 container with a PostGresSQL backend version < 17 the initialization of the backend fails consistently due to (I think) an issue with SQL Introspection. While #7886 seems to indicate that there is version checking to exclude irrelevant columns per version on versions != 17, this does not seem to be the case.

Column dathasloginevt is marked for v17, however when running any version below 17 the backend bootstrap fails because dathasloginevt is not part of the schema yet is included in the query:

2025-03-24T18:50:10.959Z | INFO 53 - 2025-03-24T18:50:10.959 edb.server: Finalizing database setup...
-- | --
  | 2025-03-24T18:50:17.954Z | ---- Exception occurred: column "dathasloginevt" does not exist ----
  | 2025-03-24T18:50:17.954Z | 1. edb.server.pgcon.errors.BackendError: column "dathasloginevt" does not exist
  | 2025-03-24T18:50:17.954Z | ---- Exception Context ----
  | 2025-03-24T18:50:17.954Z | query, line 13, in query
  | 2025-03-24T18:50:17.954Z | \| CREATE VIEW edgedbsql_v6_2f20b3fed0.pg_database AS
  | 2025-03-24T18:50:17.954Z | \|
  | 2025-03-24T18:50:17.954Z | \| SELECT
  | 2025-03-24T18:50:17.954Z | \| oid,
  | 2025-03-24T18:50:17.954Z | \| frontend_name.n as datname,
  | 2025-03-24T18:50:17.954Z | \| datdba,
  | 2025-03-24T18:50:17.954Z | \| encoding,
  | 2025-03-24T18:50:17.954Z | \| datlocprovider,
  | 2025-03-24T18:50:17.954Z | \| datcollate,
  | 2025-03-24T18:50:17.954Z | \| datctype,
  | 2025-03-24T18:50:17.954Z | \| datistemplate,
  | 2025-03-24T18:50:17.954Z | \| datallowconn,
  | 2025-03-24T18:50:17.954Z | > dathasloginevt,
  • EdgeDB Version: 6.4
  • EdgeDB CLI Version: n/a
  • OS Version: Debian Bookwork (docker)

Steps to Reproduce:

  1. Pull geldata:gel/latest
  2. Start with backend DSN pointed to a clean postgres install < v.17 (e.g. 15.xx, 16.x)

Tested against 15.10, 16.2 & 16.3 AWS RDS aurora-postgresql backends & local docker [email protected]

@scotttrinh
Copy link
Contributor

I think this might be fixed by #8501 ?

@thebuck25
Copy link
Author

@scotttrinh looking at that PR yeah I think that will likely solve it once it gets backported to 6.x.

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

No branches or pull requests

2 participants