Skip to content

Commit 5aca64d

Browse files
committed
chore: ship the initialized data dir at a different location
The reason for not shipping it originally was to avoid any possibility of the server starting up off a datadir on ephemeral storage. The initdb process itself is decently heavy though. We can tread the middle ground between the two by shipping the datadir at a secondary location, which the server never gets configured to run off. This datadir can be moved to the appropriate place on persistent storage prior to server startup. The simpler operation of copying the files over should be faster than the initdb routine.
1 parent 196e3ad commit 5aca64d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ansible/vars.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.0.1.54-orioledb"
12+
postgresorioledb-17: "17.0.1.55-orioledb"
1313
postgres17: "17.4.1.004"
1414
postgres15: "15.8.1.061"
1515

ebssurrogate/scripts/qemu-bootstrap-nix.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ function clean_system {
144144
install_nix
145145
execute_stage2_playbook
146146
# we do not want to ship an initialized DB as this is performed as needed
147-
rm -rf /data/pgdata
147+
mkdir -p /db/template
148+
mv /data/pgdata /db/template
148149
clean_system
149150
cloud-init clean --logs

0 commit comments

Comments
 (0)