22
33A high-performance PostgreSQL database backend for Gramps genealogy software that provides advanced database capabilities and superior performance for genealogical data management while maintaining full compatibility with the Gramps data model.
44
5- ** Version:** 1.5.1
5+ ** Version:** 1.6.0
66** Project Status:** Experimental - Rigorous testing completed | [ GitHub Repository] ( https://github.com/glamberson/gramps-postgresql-enhanced ) | [ Submit Issues] ( https://github.com/glamberson/gramps-postgresql-enhanced/issues )
77
88## Recent Updates
99
10+ ### Version 1.6.0 (2025-12-19)
11+ - ** Gramps 6.0.6 compatibility** - Added required json_extract_expression() method
12+ - ** Import guard** - Prevents registration when psycopg not available
13+ - ** Performance index** - Added person_name_composite index for faster name searches
14+ - ** Better error messages** - Clear guidance when dependencies missing
15+
1016### Version 1.5.1 (2025-08-11)
1117- ** Fixed VARCHAR(255) truncation issue** - All string fields now use TEXT type to match SQLite behavior
1218- ** Automatic migration** - Existing databases are automatically upgraded when opened
@@ -22,9 +28,9 @@ The PostgreSQL Enhanced addon provides a professional-grade database backend for
2228
2329- ** Modern psycopg3** - Uses the latest PostgreSQL adapter (psycopg 3, not psycopg2)
2430- ** Dual Storage Format** - Maintains both pickle blobs (for Gramps compatibility) and JSONB (for advanced queries)
25- - ** Two Database Modes ** - Both fully tested and working :
26- - ** Monolithic Mode ** - All family trees in one database with table prefixes
27- - ** Separate Mode ** - Each family tree gets its own PostgreSQL database
31+ - ** Two Backend Options ** - Select mode at tree creation :
32+ - ** Monolithic** - All family trees in one database with table prefixes (recommended)
33+ - ** Separate** - Each family tree gets its own PostgreSQL database
2834- ** Full Gramps Compatibility** - Works with all existing Gramps tools and reports
2935- ** Transaction Safety** - Proper savepoint handling and rollback capabilities
3036- ** Data Preservation** - Intelligent design that preserves data when trees are removed from Gramps
@@ -197,76 +203,83 @@ Create or edit `connection_info.txt` with the following format:
197203
198204``` ini
199205# PostgreSQL Enhanced Connection Configuration
200- # This file controls how the addon connects to PostgreSQL
201206
202207# Connection details
203- host = 192.168.10.90 # PostgreSQL server address
208+ host = localhost # PostgreSQL server address
204209port = 5432 # PostgreSQL port
205210user = genealogy_user # Database username
206211password = YourPassword # Database password
207212
208- # Database mode: 'separate' or 'monolithic'
209- database_mode = monolithic
210-
211- # For monolithic mode only: name of the shared database
212- shared_database_name = gramps_monolithic
213+ # For Monolithic mode: name of the shared database
214+ shared_database_name = gramps_shared
213215
214- # Optional settings (uncomment to use)
216+ # Optional settings
215217# pool_size = 10 # Connection pool size
216218# sslmode = prefer # SSL connection mode
217- # connect_timeout = 10 # Connection timeout in seconds
218219```
219220
220- ### Database Modes - Both Fully Tested and Working
221+ ** Note** : Mode selection (Monolithic vs Separate) is now done by choosing the backend in the tree creation dialog, not in this file.
222+
223+ ### Database Modes
224+
225+ ** Mode selection is now part of backend choice** - you pick the mode when creating a tree.
221226
222- #### Monolithic Mode
227+ #### Monolithic Mode (Recommended)
228+
229+ ** Select** : "PostgreSQL Enhanced (Monolithic)" in backend dropdown
223230
224231- ** How it works** : All family trees share one PostgreSQL database
225232- ** Table naming** : Each tree's tables are prefixed with ` tree_<treeid>_ `
226233- ** Example** : Tree "68932301" creates tables like ` tree_68932301_person `
227- - ** Configuration** : Uses central ` connection_info.txt ` in plugin directory
228234- ** Advantages** :
229235 - Single database to manage and backup
230236 - Can query across multiple trees
231237 - Works without CREATEDB privilege
232238 - Simplified administration
233- - ** Best for** : Organizations managing multiple related trees
239+ - ** Best for** : Most users, organizations managing multiple related trees
240+
241+ #### Separate Mode (Advanced)
234242
235- #### Separate Mode
243+ ** Select ** : "PostgreSQL Enhanced ( Separate)" in backend dropdown
236244
237245- ** How it works** : Each family tree gets its own PostgreSQL database
238246- ** Database naming** : Creates database named after the tree ID
239247- ** Table naming** : Direct names without prefixes
240- - ** Configuration** : Uses central ` connection_info.txt ` in plugin directory
241248- ** Advantages** :
242249 - Complete isolation between trees
243250 - Simpler table structure
244251 - Per-tree backup/restore
245252 - Better for multi-user scenarios
246253 - Independent database tuning per tree
247- - Lightning fast
248254- ** Best for** : Large independent trees or multi-tenant environments
255+ - ** Requires** : PostgreSQL user with CREATEDB privilege
249256
250257## Creating a Family Tree
251258
252259### Step 1: Configure the Connection
253260
254- Before creating a tree, ensure your ` connection_info.txt ` is properly configured:
261+ Ensure your ` connection_info.txt ` is configured in the plugin directory :
255262
256263``` bash
257264# Edit the configuration file
258265nano ~ /.local/share/gramps/gramps60/plugins/PostgreSQLEnhanced/connection_info.txt
259266```
260267
268+ Set at minimum: host, port, user, password, and shared_database_name (for Monolithic mode)
269+
261270### Step 2: Create Tree in Gramps
262271
2632721 . Open Gramps
2642732 . Go to ** Family Trees → Manage Family Trees**
2652743 . Click ** New**
2662754 . Enter a name for your tree
267- 5 . For ** Database backend** , select "PostgreSQL Enhanced"
276+ 5 . For ** Database backend** , select:
277+ - ** PostgreSQL Enhanced (Monolithic)** - Recommended: shared database
278+ - ** PostgreSQL Enhanced (Separate)** - Advanced: individual databases
2682796 . Click ** Load Family Tree**
269280
281+ ** The mode you select determines how your tree is stored.** No additional configuration needed.
282+
270283### What Happens Behind the Scenes
271284
272285When you create a new tree:
@@ -302,12 +315,13 @@ After registration, restart Gramps and the tree will appear in the Family Tree M
302315
303316### Switching Between Modes
304317
305- To switch from monolithic to separate mode (or vice versa) :
318+ To switch a tree from one mode to another :
306319
3073201 . Export your tree as GEDCOM or Gramps XML
308- 2 . Edit ` connection_info.txt ` to change ` database_mode `
309- 3 . Create a new tree in Gramps
310- 4 . Import your exported data
321+ 2 . Create a new tree selecting the desired backend:
322+ - PostgreSQL Enhanced (Monolithic), or
323+ - PostgreSQL Enhanced (Separate)
324+ 3 . Import your exported data
311325
312326## Design Features
313327
0 commit comments