File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,24 @@ wait_for_postgres() {
146
146
return 1
147
147
}
148
148
149
+ check_orioledb_ready () {
150
+ local max_attempts=30
151
+ local attempt=1
152
+
153
+ while [ $attempt -le $max_attempts ]; do
154
+ if " ${PSQLBIN} /psql" -v ON_ERROR_STOP=1 -U " $PGSQL_SUPERUSER " -p " $PORTNO " -h localhost -d postgres -c " SELECT * FROM pg_am WHERE amname = 'orioledb'" | grep -q orioledb; then
155
+ echo " Orioledb extension is ready!"
156
+ return 0
157
+ fi
158
+ echo " Waiting for orioledb to be ready (attempt $attempt /$max_attempts )..."
159
+ sleep 2
160
+ attempt=$(( attempt + 1 ))
161
+ done
162
+
163
+ echo " Orioledb failed to initialize after $max_attempts attempts"
164
+ return 1
165
+ }
166
+
149
167
trim_schema () {
150
168
case " $CURRENT_SYSTEM " in
151
169
" x86_64-darwin" |" aarch64-darwin" )
@@ -215,6 +233,13 @@ migrate_version() {
215
233
echo " Failed to connect to PostgreSQL server"
216
234
exit 1
217
235
fi
236
+
237
+ if [ " $PSQL_VERSION " = " orioledb-17" ]; then
238
+ if ! check_orioledb_ready; then
239
+ echo " Failed to initialize orioledb extension"
240
+ exit 1
241
+ fi
242
+ fi
218
243
219
244
echo " PostgreSQL server is ready"
220
245
You can’t perform that action at this time.
0 commit comments