Skip to content

unable to use postgis_raster extension: GDAL Drivers Disabled #1347

Open
@lookevink

Description

@lookevink

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I am working with large climate datasets and need to optimize using PostGIS Raster. Both PostGIS and PostGIS_Raster extensions are enabled, as confirmed by SELECT PostGIS_Full_Version(), which indicates proper versions for PostGIS, GDAL, and Raster. However, when attempting to insert raster data using ST_FromGDALRaster, I encounter the error rt_util_gdal_open: Cannot open file. All GDAL drivers disabled, suggesting that GDAL drivers are not correctly enabled despite proper setup. I'm also unable to enable the extensions w/o superuser permission

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Steps to Reproduce

  1. Setup PostgreSQL and PostGIS:
    • Install PostgreSQL 15 and PostGIS 3.3.2.
    • Ensure GDAL (version 3.8.5 or compatible) is installed.
  2. Enable PostGIS and Raster Extensions:
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_raster;
  1. Check PostGIS Version:
    Run the following query to confirm PostGIS and GDAL are properly installed:
SELECT PostGIS_Full_Version();

getting:

POSTGIS="3.3.2" [...] GDAL="GDAL 3.8.5" [...] RASTER

  1. Create a Table for Raster Data:
CREATE TABLE __gpcp_precip (
time TIMESTAMP PRIMARY KEY,
rast RASTER
);
  1. Attempt to Insert Raster Data:
    Use the following query with appropriate values:
INSERT INTO __gpcp_precip (time, rast)
VALUES ('2024-12-01 00:00:00', ST_FromGDALRaster('/path/to/raster.tif'))
ON CONFLICT (time) DO UPDATE
SET rast = EXCLUDED.rast;
  1. Error Encountered:
    The error rt_util_gdal_open: Cannot open file. All GDAL drivers disabled is thrown.

Expected behavior

data is inserted

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions