NAlexPear / pg_branch

Experimental Postgres extension for quickly branching databases through file system snapshots
MIT License
309 stars 8 forks source link

invalid create database strategy "snapshot" #3

Open hparfr opened 3 months ago

hparfr commented 3 months ago

First thanks for this interesting project.

I have succeed to build and install the extension on pg16:

postgres=# select * from pg_extension ;
  oid  |  extname  | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition 
-------+-----------+----------+--------------+----------------+------------+-----------+--------------
 13547 | plpgsql   |       10 |           11 | f              | 1.0        |           | 
 16390 | pg_branch |       10 |         2200 | f              | 0.0.1      |           | 

Then createdb somebase -T some_template is slow as usual.

I can't force a strategy:

postgres=# create database somebase template some_template strategy snapshot;
ERROR:  invalid create database strategy "snapshot"
hparfr commented 3 months ago

It's slow because it's not using subvolumes. The only subvolumes are the one created by init.sh (1/ , 4/ , 5/)

I'm new to pgrx. I want to use the system' postgres, so I did: cargo pgrx init --base-port 5432 --pg16 /usr/bin/pg_config cargo pgrx install --release