14.3. Настройка автоматической загрузки расширения DuckDB (axe.autoload_extension) #

По умолчанию расширения DuckDB, установленные с помощью хранимой процедуры axe.install_extension, автоматически загружаются в каждый сеанс, использующий аналитический механизм. Хранимая процедура axe.autoload_extension позволяет изменить это поведение.

Требуемые права: суперпользователь или администратор Postgres Pro AXE со следующими правами:

  • право EXECUTE на эту хранимую процедуру;

  • право UPDATE на служебную таблицу duckdb.extensions.

За подробной информацией об управлении доступом обратитесь к Главе 12.

Выполните следующую команду на сервере Postgres Pro AXE:

  SELECT axe.autoload_extension(имя_расширения, automatic_load => автоматическая_загрузка);

Где:

  • имя_расширения: имя установленного расширения DuckDB.

  • автоматическая_загрузка:указывает, следует ли автоматически загружать расширение DuckDB во все новые сеансы.

    Возможные значения:

    • true

    • false

    Значение по умолчанию: true.

Пример 14.3. Настройка автоматической загрузки расширения Iceberg

Отключение автоматической загрузки расширения DuckDB:

  SELECT axe.autoload_extension('iceberg', false);

Включение автоматической загрузки расширения DuckDB:

  SELECT axe.autoload_extension('iceberg', true);

14.3. Configuring Automatic Loading of a DuckDB Extension (axe.autoload_extension) #

By default, DuckDB extensions installed via the axe.install_extension stored procedure are loaded automatically into every session that uses the analytics engine. The axe.autoload_extension stored procedure allows you to change this behavior.

Required privileges: Superuser or the Postgres Pro AXE administrator with the following privileges:

  • the EXECUTE privilege on this stored procedure

  • the UPDATE privilege on the duckdb.extensions service table

For more information about access management, refer to Chapter 12.

Execute the following command on the Postgres Pro AXE server:

  SELECT axe.autoload_extension(extension_name, automatic_load => automatic_load);

Where:

  • extension_name: The name of the installed DuckDB extension.

  • automatic_load: Specifies whether the DuckDB extension must be automatically loaded into new sessions.

    Possible values:

    • true

    • false

    Default value: true.

Example 14.3. Configuring Automatic Loading of the Iceberg Extension

Disabling automatic loading of a DuckDB extension:

  SELECT axe.autoload_extension('iceberg', false);

Enabling automatic loading of a DuckDB extension:

  SELECT axe.autoload_extension('iceberg', true);

FAQ