Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
PostgreSQL loading a module without shared_preload_libraries

I'm writing an extension for PostgreSQL in C language. The extension is loaded by PostgreSQL when I specify its' name in shared_preload_libraries. Out of curiosity, is there a way for PG to load my extension without specifying its' name in shared_preload_libraries?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can load extension modules:

  • From shared_preload_libraries. This loads at postmaster start time, so the extension can register shared memory, locks, hooks etc before we start forking backends.

  • With session_preload_libraries. This loads after fork(), in a backend, so it can't register shmem etc.

  • With local_preload_libraries. Like session_preload_libraries, but limited to the plugins directory and settable by normal users.

  • With the LOAD statement, or implicitly by running a function that refers to a LANGUAGE c implementation.

There's no alternative to getting the full effect of shared_preload_libraries. The other options don't permit you to do things that require code to be run in the postmaster, like register addin LWLocks or static shared memory segments. But if you don't do those things a simple LOAD suffices.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!