-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: postgres: add multiple database functionality
This commit contains the necessary changes to implement a multiple same-database system, utilizing a linked-list. Each linked list represents a database system, with each node being a different database. Changelog: - For each section parsed in the config file, create a node. If the config contains multiple of the same section, i.e. multiple databases of the same type, then allocate memory for a new node that will hold the config for each database. - Change `db_t` struct to take a `void *` argument instead of a specific database structure, and also change some functions in a similar way. This change was necessary in order to leverage generic programming for the main functions (connect, replicate, close). - Added some helper function for the linked list. - Added more thread safe functionality to critical sections of the codebase. Signed-off-by: Panagiotis Foliadis <pfoliadis@hotmail.com>
- Loading branch information
Showing
10 changed files
with
283 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.