-
Notifications
You must be signed in to change notification settings - Fork 21
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
"failed to open SQLite DB" when it's a DuckDB file (file permissions? USER MAPPING?) #55
Comments
Well I just tried rebuilding the foreign table set after mapping both users to the server. I got some interesting results - including a return of data in JetBrains Rider that looked like the data was coming back but then the postgres instance gave an error back a few seconds after the data was returned in the SQL Console view.
Here's what the tail on the log has to say
The good news is that when I restart the server and query for row counts on the main view from either user the queries return a good value,.
HOWEVER when running a query that has some calculations in it postgres hangs.
|
I have two users on a database that's essentially just a set of foreign tables into a duckdb DB file. When I run a query against the postgres endpoint I get the following error in the log
cmsadmin@medptd ERROR: failed to open SQLite DB. rc=1 path=/home/postgres/medptd.db
The 'cmsadmin' is salient here because they are the user that "owns" this database. When I go into a psql prompt as the cmsadmin user on the DB I get the same error.
So when I look at this file I see that the cmsadmin group is the "owner" of the file
And when I run duckdb as either postgres or cmsadmin I have no issue. (added both user to the "cmsadmin" group which owns the folder and file)
So I'm down to a few potential issues I wanted to ask here. When setting up the fdw there's no mention of user mapping. I'm wondering if that matters here.
CREATE USER MAPPING FOR cmsadmin SERVER duckdb_server;
Does this register as meaningful to anyone here? Is there anything else that should be considered when setting up
duckdb_server
in the postgres instance? I feel like there's some detail I'm missing in understanding how the extension accesses the .db file.Thanks in advance to anyone that can shed light on this issue.
The text was updated successfully, but these errors were encountered: