diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c index b2d60260934..d9ab39dd900 100644 --- a/contrib/pg_prewarm/autoprewarm.c +++ b/contrib/pg_prewarm/autoprewarm.c @@ -82,8 +82,8 @@ typedef struct AutoPrewarmSharedState int prewarmed_blocks; } AutoPrewarmSharedState; -void autoprewarm_main(Datum main_arg); -void autoprewarm_database_main(Datum main_arg); +PGDLLEXPORT void autoprewarm_main(Datum main_arg); +PGDLLEXPORT void autoprewarm_database_main(Datum main_arg); PG_FUNCTION_INFO_V1(autoprewarm_start_worker); PG_FUNCTION_INFO_V1(autoprewarm_dump_now); diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml index 73207f72fe1..3d4e4afcf91 100644 --- a/doc/src/sgml/bgworker.sgml +++ b/doc/src/sgml/bgworker.sgml @@ -141,14 +141,15 @@ typedef struct BackgroundWorker which the initial entry point for the background worker should be sought. The named library will be dynamically loaded by the worker process and bgw_function_name will be used to identify the - function to be called. If loading a function from the core code, this must - be set to "postgres". + function to be called. If calling a function in the core code, this must + be set to "postgres". - bgw_function_name is the name of a function in - a dynamically loaded library which should be used as the initial entry point - for a new background worker. + bgw_function_name is the name of the function + to use as the initial entry point for the new background worker. If + this function is in a dynamically loaded library, it must be marked + PGDLLEXPORT (and not static).