This commit is contained in:
biosvos
2026-08-07 17:38:18 +09:00
commit 873193a243
9613 changed files with 2755992 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
각 script 설정 방법 및 간략 설명
---------------------------------------------------------------------
[get_load]
1. 설명: RCDB 에서 수행 중인 Query 중 현재 실행 중인 Query 정보를 화면에 출력
2. 상세 내역
- 설치경로 : ~pgsql/scripts
3. 설치 후 확인 사항
- 해당 스크립트의 pgsql 실행 권한 설정 여부 확인
- 해당 스크립트는 9.x 이상 버전에서 정상 동작함
---------------------------------------------------------------------
[create_RCDB.sh]
1. 설명: RCDB 기본 스키마 생성 스크립트 생성
2. 상세 내역
- 설치경로 : ~pgsql/scripts
3. 설치 후 확인 사항
- 해당 디렉토리에 rcdb_schema.sql 존재되어야 함
- initdb 수행하기 때문에 data 디렉토리가 없어야 함
---------------------------------------------------------------------
+60
View File
@@ -0,0 +1,60 @@
#!/bin/sh
USER_INF=`whoami`
if [ $USER_INF != "pgsql" ]; then
echo "Please use 'pgsql' account.[current $USER_INF]"
exit 1
fi
CNT=`find . -maxdepth 1 -name "rcdb_schema.sql" | wc -l`
if [ $CNT -eq 0 ]; then
echo "Not Found Schema File."
exit 1
fi
#clean
rm -f err > /dev/null 2>&1
echo -n "1. init db "
initdb --locale=C > /dev/null 2>err
if [ $? -ne 0 ]; then
echo "...[ERR]"
cat err
exit 1
fi
echo "...[OK]"
echo -n "2. start RCDB "
pg_ctl start > /dev/null 2>err
if [ $? -ne 0 ]; then
echo "...[ERR]"
cat err
exit 1
fi
echo -n "."
while [ 1 ]
do
echo -n "."
sleep 1
if [ -n ~/data/postmaster.pid ]; then
break
fi
done
echo ".[OK]"
echo -n "3. create RCDB schema "
psql postgres < rcdb_schema.sql > /dev/null 2>err
if [ $? -ne 0 ]; then
echo "...[ERR]"
cat err
exit 1
fi
echo "...[OK]"
echo -n "4. stop RCDB "
pg_ctl stop -m f > /dev/null 2>err
if [ $? -ne 0 ]; then
echo "...[ERR]"
cat err
exit 1
fi
echo "...[OK]"
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
# 8.4
#psql -p 5432 -c "select * from pg_stat_activity where current_query != '<IDLE>';" template1
# 9.x
psql -p 6543 -c "select * from pg_stat_activity where state != 'idle';" template1
File diff suppressed because it is too large Load Diff