pg_duckdb icon indicating copy to clipboard operation
pg_duckdb copied to clipboard

Document non-superuser usage

Open lhofhansl opened this issue 1 year ago • 1 comments

Since I just spent some time on this, I thought it might be good to document this.

In order to use this as a regular user I had CREATE the extension as a super user, create a copy (or link) of the shared library in $libdir/plugins, and then LOAD the shared library from there in my regular user session.

So:

  • The superuser needs to install (CREATE) the extension into a database. That's OK.
  • The shared library needs to exists (or be linked into) $libdir/plugins.
  • A regular user needs to LOAD the extension from $libdir/plugins - otherwise the GUCs are visible and Duck path is never triggered.

lhofhansl avatar Sep 06 '24 19:09 lhofhansl

Thanks for checking out pg_duckdb!

This was discussed a bit in #160. It's my hope that the LOAD would not be necessary, but a user might use that if shared_preload_libraries or session_preload_libraries cannot be modified, and we also can't otherwise workaround needing it, which I suspect depends on a number of other design considerations.

The rest of this largely depends on your system configuration (i.e. you can certainly install and run Postgres as any user). You will definitely need to be a Postgres superuser to run CREATE EXTENSION -- unless you are also using and have configured pgextwlist to allow its use without superuser.

Regardless, yeah, expect we will cover these specifics as we get closer to release.

wuputah avatar Sep 06 '24 20:09 wuputah

Thanks for the report. Closing this in favor of #271

JelteF avatar Oct 16 '24 16:10 JelteF