Top
Enterprise Postgres 18 Knowledge DataManagement FeatureUser's Guide

5.3.2 Model Load/Unload

Load/Unload the imported model.

Example) Model load request and retrieval of list

SELECT pgx_inference.pgx_load_model('sample-model-v1');
pgx_load_model
-----------------

SELECT * FROM pgx_inference.pgx_list_model_load_requests();
        Name      |     requests    |           last_updated              
------------------+-----------------+-------------------------------------
 sample-model_v1  |  load           |  Wed Aug 02 19:09:16.200357 2025 PDT

After loading the target model, if the total size of all loaded models exceeds the value set in total_model_size_limit, the loading will result in an error.

SELECT pgx_inference.pgx_load_model('model_name');
ERROR:  could not load model "good"
DETAIL:  toal model size exeed 1000MB

Example) Model unload request

SELECT pgx_inference.pgx_unload_model('model_name');
pgx_unload_model
-----------------