Skip to content

Commit

Permalink
Wait for wal to be available (#39)
Browse files Browse the repository at this point in the history
Signed-off-by: souravbiswassanto <[email protected]>
  • Loading branch information
souravbiswassanto authored Dec 18, 2024
1 parent 9a56ab6 commit 9b5a9e0
Show file tree
Hide file tree
Showing 11 changed files with 2,928 additions and 6 deletions.
1 change: 0 additions & 1 deletion role_scripts/13/standby/remote-replica.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ else
{ echo 'host all all ::/0 md5'; } >>tmp/pg_hba.conf
{ echo 'host replication postgres ::/0 md5'; } >>tmp/pg_hba.conf
fi

fi

mv /tmp/pg_hba.conf "$PGDATA/pg_hba.conf"
Expand Down
22 changes: 22 additions & 0 deletions role_scripts/17/primary/db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

# Copyright AppsCode Inc. and Contributors
#
# Licensed under the AppsCode Free Trial License 1.0.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Free-Trial-1.0.0.md
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

psql -c 'create database test;'
psql -c 'CREATE TABLE fruits( id SERIAL PRIMARY KEY, name VARCHAR NOT NULL );'
while true; do
sleep 1
psql -c "INSERT INTO fruits(name) VALUES('Orange');"
done
Loading

0 comments on commit 9b5a9e0

Please sign in to comment.