Skip to content

shshakya/pg_startup_proc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg_startup_proc

Overview

pg_startup_proc is a PostgreSQL extension that allows you to run one or more stored procedures immediately after the database completes recovery. This is useful for initializing application state, recreating logical replication slots, or triggering automation workflows.

Features

  • Run multiple stored procedures after recovery
  • Enforce timeout limits to prevent endless loops
  • Execute before accepting client connections
  • Configurable via GUC parameters

Installation

  1. Clone the repository:

    git clone https://github.com/shshakya/pg_startup_proc.git
    cd pg_startup_proc
  2. Build and install:

    make
    sudo make install
  3. Update postgresql.conf:

    shared_preload_libraries = 'startup_proc_extension'
    startup.proc_list = 'proc_one,proc_two'
    startup.timeout_ms = 10000
    
  4. Restart PostgreSQL.

Compatibility

Tested with PostgreSQL 14 and above.

License

MIT

About

`pg_startup_proc` is a PostgreSQL extension that allows you to run one or more stored procedures immediately after the database completes recovery. This is useful for initializing application state, recreating logical replication slots, or triggering automation workflows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors