citus/src/backend
Emel Şimşek 24ca677162 Start Maintenance Daemon for Main DB at the server start. (#7254)
DESCRIPTION: This change starts a maintenance deamon at the time of
server start if there is a designated main database.

This is the code flow:

1. User designates a main database:
   `ALTER SYSTEM SET citus.main_db =  "myadmindb";`

2. When postmaster starts, in _PG_Init, citus calls 
    `InitializeMaintenanceDaemonForMainDb`
  
This function registers a background worker to run
`CitusMaintenanceDaemonMain `with `databaseOid = 0 `

3. `CitusMaintenanceDaemonMain ` takes some special actions when
databaseOid is 0:
     - Gets the citus.main_db  value.
     - Connects to the  citus.main_db
     - Now the `MyDatabaseId `is available, creates a hash entry for it.
     - Then follows the same control flow as for a regular db,
2023-11-13 13:29:10 -05:00
..
columnar bump citus and columnar into 12.2devel (#7200) 2023-11-13 13:29:10 -05:00
distributed Start Maintenance Daemon for Main DB at the server start. (#7254) 2023-11-13 13:29:10 -05:00
.gitignore Initial commit of Citus 5.0 2016-02-11 04:05:32 +02:00