Repository: edgedb/edgedb

Issue:
Postgres 13 bootstrap failure: type anymultirange does not exist
- EdgeDB Version: 4.0-dev.50+local, built on 2023-07-25T03:08Z from revision 379dbb5f5 (2023-07-25T00:00Z)
- Postgres: Docker `fantix/pgvector:13`

```
2023-07-25T03:08:22.4678164Z INFO 2916 2023-07-25T03:08:22.467 edb.server: instance name: '_localdev'
2023-07-25T03:08:22.4680737Z INFO 2916 2023-07-25T03:08:22.467 edb.server: development mode active
2023-07-25T03:08:24.1027281Z INFO 2916 2023-07-25T03:08:24.102 edb.server: Detected 97 backend connections available.
2023-07-25T03:08:24.1031785Z INFO 2916 2023-07-25T03:08:24.102 edb.server: Using max_backend_connections=82 under test mode.
2023-07-25T03:08:24.1887011Z INFO 2916 2023-07-25T03:08:24.188 edb.server: Creating template database...
2023-07-25T03:08:24.4646674Z INFO 2916 2023-07-25T03:08:24.464 edb.server: Creating the necessary PostgreSQL extensions...
2023-07-25T03:08:24.7960403Z INFO 2916 2023-07-25T03:08:24.795 edb.server: Initializing the standard library...
2023-07-25T03:08:25.5990198Z ---- Exception occurred: type anymultirange does not exist ----
2023-07-25T03:08:25.5990802Z 
2023-07-25T03:08:25.5992022Z 1. edb.server.pgcon.errors.BackendError: type anymultirange does not exist
2023-07-25T03:08:25.5992490Z 
2023-07-25T03:08:25.6064062Z ---- Traceback ----
2023-07-25T03:08:25.6064631Z 
2023-07-25T03:08:25.6065086Z     /home/runner/.virtualenvs/.venv/bin/edb, line 8, in <module>
2023-07-25T03:08:25.6065782Z         > sys.exit(edbcommands())
2023-07-25T03:08:25.6066804Z     /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/click/core.py, line 829, in __call__
2023-07-25T03:08:25.6067251Z         > return self.main(*args, **kwargs)
2023-07-25T03:08:25.6067775Z     /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/click/core.py, line 782, in main
2023-07-25T03:08:25.6068187Z         > rv = self.invoke(ctx)
2023-07-25T03:08:25.6069590Z     /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/click/core.py, line 1259, in invoke
2023-07-25T03:08:25.6070457Z         > return _process_result(sub_ctx.command.invoke(sub_ctx))
2023-07-25T03:08:25.6071005Z     /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/click/core.py, line 1066, in invoke
2023-07-25T03:08:25.6071424Z         > return ctx.invoke(self.callback, **ctx.params)
2023-07-25T03:08:25.6071938Z     /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/click/core.py, line 610, in invoke
2023-07-25T03:08:25.6072306Z         > return callback(*args, **kwargs)
2023-07-25T03:08:25.6072672Z     /home/runner/work/edgedb/edgedb/edb/tools/edb.py, line 57, in server
2023-07-25T03:08:25.6073027Z         > srv_main.server_main(**kwargs)
2023-07-25T03:08:25.6073380Z     /home/runner/work/edgedb/edgedb/edb/server/main.py, line 707, in server_main
2023-07-25T03:08:25.6073757Z         > asyncio.run(run_server(server_args))
2023-07-25T03:08:25.6074157Z     /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/asyncio/runners.py, line 44, in run
2023-07-25T03:08:25.6074902Z         > return loop.run_until_complete(main)
2023-07-25T03:08:25.6075281Z     uvloop/loop.pyx, line 1517, in uvloop.loop.Loop.run_until_complete
2023-07-25T03:08:25.6075807Z         
2023-07-25T03:08:25.6076173Z     /home/runner/work/edgedb/edgedb/edb/server/main.py, line 559, in run_server
2023-07-25T03:08:25.6076582Z         > new_instance = await _init_cluster(cluster, args)
2023-07-25T03:08:25.6077010Z     /home/runner/work/edgedb/edgedb/edb/server/main.py, line 145, in _init_cluster
2023-07-25T03:08:25.6077466Z         > new_instance = await bootstrap.ensure_bootstrapped(cluster, args)
2023-07-25T03:08:25.6077932Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 2255, in ensure_bootstrapped
2023-07-25T03:08:25.6078337Z         > await _bootstrap(ctx)
2023-07-25T03:08:25.6078740Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 2102, in _bootstrap
2023-07-25T03:08:25.6079180Z         > stdlib, config_spec, compiler = await _init_stdlib(
2023-07-25T03:08:25.6079609Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 1313, in _init_stdlib
2023-07-25T03:08:25.6080132Z         > await _execute(conn, tpldbdump.decode('utf-8'))
2023-07-25T03:08:25.6080572Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 204, in _execute
2023-07-25T03:08:25.6080998Z         > return await metaschema.execute_sql_script(conn, query)
2023-07-25T03:08:25.6081467Z     /home/runner/work/edgedb/edgedb/edb/pgsql/metaschema.py, line 7491, in execute_sql_script
2023-07-25T03:08:25.6081981Z         > await conn.sql_execute(sql_text.encode("utf-8"))
2023-07-25T03:08:25.6082417Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 153, in sql_execute
2023-07-25T03:08:25.6082826Z         > return await self._retry_conn_errors(_task)
2023-07-25T03:08:25.6083264Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 145, in _retry_conn_errors
2023-07-25T03:08:25.6083664Z         > result = await task()
2023-07-25T03:08:25.6084040Z     /home/runner/work/edgedb/edgedb/edb/server/bootstrap.py, line 152, in _task
2023-07-25T03:08:25.6084444Z         > await self._conn.sql_execute(sql)
2023-07-25T03:08:25.6084815Z     edb/server/pgcon/pgcon.pyx, line 1529, in sql_execute
2023-07-25T03:08:25.6085205Z         > return await self._sql_execute(sql_string)
2023-07-25T03:08:25.6085578Z     edb/server/pgcon/pgcon.pyx, line 1515, in _sql_execute
2023-07-25T03:08:25.6085929Z         > raise exc[0](fields=exc[1])
2023-07-25T03:08:25.6086110Z 
2023-07-25T03:08:25.6086359Z edb.server.pgcon.errors.BackendError: type anymultirange does not exist
2023-07-25T03:08:26.7505230Z ##[error]Process completed with exit code 1.

```

https://github.com/edgedb/edgedb/actions/runs/5652183771/job/15311449002



Discussion:
We need to decide if this means we are just dropping postgres 13 support?
> We need to decide if this means we are just dropping postgres 13 support?

Yes, need to communicate this clearly in the release changelog and make sure we're checking the version appropriately.

Resolving patch:
diff --git a/edb/server/defines.py b/edb/server/defines.py
--- a/edb/server/defines.py
+++ b/edb/server/defines.py
@@ -37,7 +37,7 @@
 EDGEDB_SPECIAL_DBS = s_def.EDGEDB_SPECIAL_DBS
 
 EDGEDB_CATALOG_VERSION = buildmeta.EDGEDB_CATALOG_VERSION
-MIN_POSTGRES_VERSION = (13, 0)
+MIN_POSTGRES_VERSION = (14, 0)
 
 # Resource limit on open FDs for the server process.
 # By default, at least on macOS, the max number of open FDs


Test patch: