File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
testing/chainsaw/e2e/pgbackrest-restore/templates Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 2626 postgres-operator.crunchydata.com/cluster=original,
2727 postgres-operator.crunchydata.com/role=master
2828
29+ -
30+ description : >
31+ Wait for PostgreSQL to be ready
32+ script :
33+ skipCommandOutput : true
34+ timeout : 2m
35+ env :
36+ - name : PRIMARY
37+ value : ($primary)
38+ content : |
39+ until kubectl exec --namespace "${NAMESPACE}" "${PRIMARY}" \
40+ -- psql -qAt --command 'SELECT 1' 2>/dev/null; do
41+ sleep 1
42+ done
43+
2944 -
3045 description : >
3146 Read the timestamp at which PostgreSQL last started
Original file line number Diff line number Diff line change 3131 - name : PRIMARY
3232 value : ($primary)
3333 content : |
34+ # Wait for PostgreSQL to be ready
35+ until kubectl exec --namespace "${NAMESPACE}" "${PRIMARY}" \
36+ -- psql -qAt --command 'SELECT 1' 2>/dev/null; do
37+ sleep 1
38+ done
39+
3440 OBJECTIVE=$(
3541 kubectl exec --namespace "${NAMESPACE}" "${PRIMARY}" \
3642 -- psql -qAt --command 'SELECT clock_timestamp()'
Original file line number Diff line number Diff line change 1717 postgres-operator.crunchydata.com/role=master'
1818 )
1919
20+ # Wait for PostgreSQL to be ready
21+ until kubectl exec --namespace "${NAMESPACE}" "${PRIMARY}" \
22+ -- psql -qAt --command 'SELECT 1' 2>/dev/null; do
23+ sleep 1
24+ done
25+
2026 kubectl exec --namespace "${NAMESPACE}" "${PRIMARY}" \
2127 -- psql --command 'SELECT pg_switch_wal()' --pset footer=off
2228
You can’t perform that action at this time.
0 commit comments