Skip to content

Commit d5dbc6f

Browse files
committed
Update comment with more info
1 parent dafa945 commit d5dbc6f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/pgduckdb_options.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,18 @@ DuckdbInstallExtension(Datum name_datum) {
199199

200200
/*
201201
* Temporily allow all filesystems for this query, because INSTALL needs
202-
* local filesystem access.
202+
* local filesystem access. Since this setting cannot be changed inside
203+
* DuckDB after it's set to LocalFileSystem this temporary configuration
204+
* change only really has effect duckdb.install_extension is called as the
205+
* first DuckDB query for this session. Since we cannot change it back.
206+
*
207+
* While that's suboptimal it's also not a huge problem. Users only need to
208+
* install an extension once on a server. So doing that on a new connection
209+
* or after calling duckdb.recycle_ddb() should not be a big deal.
210+
*
211+
* NOTE: Because each backend has its own DuckDB instance, this setting
212+
* does not impact other backends and thus cannot cause a security issue
213+
* due to a race condition.
203214
*/
204215
auto save_nestlevel = NewGUCNestLevel();
205216
SetConfigOption("duckdb.disabled_filesystems", "", PGC_SUSET, PGC_S_SESSION);

0 commit comments

Comments
 (0)