[ The imperialist Japanese military must officially acknowledge and apologize for the coercion of young women into sexual slaves. / 幼い女性を性の奴隷にした帝國主義日本軍の?制性を公式に認め、謝罪しなければならない. ]

사용자

ID:
PW:

INDEX
01.게시판
게시판 [72]
02.File Book
File 자료실 [96]
Site Link [14]
개인폴더 [200]
03.Field Book
Altibase [19]
Tibero [30]
MS-SQL [28]
MySQL [47]
DB2 [79]
ORACLE [3099]
PSQL [135]
CUBRID [5]
기타정보 [170]
운영체제 [613]
04.Q/A Book
Q/A [53]
05.방명록
방명록 [54]
레벨업 [37]
구인/구직 [2]

기념일
Search
LINK
+ 가족 Hompy
+ DNSEver
IOTN :: Field Book :: PostgreSQL

 회원가입

pg_ctl start -D . | postmaster.pid | /tmp/.s.PGSQL.5432 |
최길호 [LIST]   2023-02-03 09:45:38, 조회 : 58


DB 위치 확인
postgres=# show data_directory;
      data_directory      
--------------------------
/home/postgres/15.1/data
(1 row)

cd /home/postgres/pg_basebackup
grep ^port postgresql.conf
port = 5433 [ 다르면 여러개 DB 운영 가능 ]

pg_ctl start -D .

cat postmaster.opts
-------------------------
/home/postgres/15.1/bin/postgres "-D" "."

cat postmaster.pid
-------------------------
67379
/home/postgres/pg_basebackup
1675382797      [ PID    ]
5433            [ 포트   ]
/tmp            [ 소켓   ]
0.0.0.0         [ 리스너 ]
22552355   3309576
ready

psql -p 5433 -c "insert into test values ( now() );"

운영중 한번더 start 실행하면
pg_ctl start -D . [ postmaster.pid 확인 하는 메세지 ]
-------------------------
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2023-02-03 09:10:13.209 KST [67781] FATAL:  lock file "postmaster.pid" already exists
2023-02-03 09:10:13.209 KST [67781] HINT:  Is another postmaster (PID 67379) running in data directory "/home/postgres/pg_basebackup"?
stopped waiting
pg_ctl: could not start server

ls -alrt /tmp | grep PG
-------------------------
-rw-------   1 postgres dba      52  2월  3 09:05 .s.PGSQL.5432.lock
srwxrwxrwx   1 postgres dba       0  2월  3 09:05 .s.PGSQL.5432
-rw-r-----   1 postgres dba      56  2월  3 09:35 .s.PGSQL.5433.lock
srwxrwxrwx   1 postgres dba       0  2월  3 09:35 .s.PGSQL.5433

fuser /tmp/.s.PGSQL.5432
-------------------------
/tmp/.s.PGSQL.5432:  73068

ps -ef | grep 73068
-------------------------
postgres 73068     1  0  2월02 ?       00:00:01 /home/postgres/15.1/bin/postgres
postgres 73069 73068  0  2월02 ?       00:00:00 postgres: logger
postgres 73070 73068  0  2월02 ?       00:00:00 postgres: checkpointer
postgres 73071 73068  0  2월02 ?       00:00:00 postgres: background writer
postgres 73073 73068  0  2월02 ?       00:00:00 postgres: walwriter
postgres 73074 73068  0  2월02 ?       00:00:00 postgres: autovacuum launcher
postgres 73075 73068  0  2월02 ?       00:00:00 postgres: archiver last was 0000000200000004000000A4
postgres 73076 73068  0  2월02 ?       00:00:00 postgres: logical replication launcher

vi postmaster.pid
67379 => 67370 변경하고 시작 하면
pg_ctl start -D . [ 비정상 확인하고 DB 서비스 종료 시킨다 ]
-------------------------
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2023-02-03 09:10:36.678 KST [67815] FATAL:  pre-existing shared memory block (key 22552355, ID 3309576) is still in use
2023-02-03 09:10:36.678 KST [67815] HINT:  Terminate any old server processes associated with data directory "/home/postgres/pg_basebackup".
stopped waiting
pg_ctl: could not start server
Examine the log output.
log 정보
-------------------------
LOG:  lock file "postmaster.pid" contains wrong PID: 67370 instead of 67379
LOG:  performing immediate shutdown because data directory lock file is invalid
LOG:  received immediate shutdown request
LOG:  database system is shut down
3.238.121.7


  LIST

제목 작성자 작성일 조회
Admin  pg_backup_start / pg_backup_stop / psql 세션 유지 / WARNING: aborting backup due to backend exiting before pg_backup_stop was called    최길호 2023/12/21 51
Admin  psql 10.7 oracle dblink [ oracle_fdw db link ]    최길호 2023/07/25 52
Admin  HA 복구 test    최길호 2023/03/03 97
Admin  log: COPY public.xxxx (xxx, xxx, xxx) TO stdout; / pg_dump 백업시 발생    최길호 2023/03/03 42
Admin  requested timeline x is not a child of this server's history    최길호 2023/03/02 39
Admin  recovery_target_action / archive log 받아서 계속 복구    최길호 2023/02/28 53
Admin  recovery_target_action = 'pause' / select pg_wal_replay_pause(); / select pg_get_wal_replay_pause_state();    최길호 2023/02/27 33
Admin  memory buffer cache    최길호 2023/02/06 35
Admin  active session, pid, lock sql , kill pid / pg_terminate_backend    최길호 2023/02/06 100
Admin  psql HA    최길호 2023/02/05 89
Admin  pg_ctl start -D . | postmaster.pid | /tmp/.s.PGSQL.5432 |    최길호 2023/02/03 58
Admin  pg_waldump    최길호 2023/02/03 38
Troubleshoot  $PGDATA/pg_wal/00000002.history 없는경우 [ ERROR: could not open file "pg_wal/00000002.history": ENOENT ]    최길호 2023/02/02 53
Admin  shmem_exit(0): 0 before_shmem_exit callbacks to make [ 로그 기록용 ]    최길호 2023/02/01 81
Troubleshoot  LOG: invalid resource manager ID in primary checkpoint record    최길호 2023/02/01 50
Admin  pg_restore [ 다른 계정, 다른 DB, sql 파일로 저장 ]    최길호 2023/01/30 45
Admin  pg_basebackup pg_dump pg_dumpall backup script    최길호 2023/01/30 153
Admin  session 정보    최길호 2023/01/27 50

    목록보기   다음페이지 1 [2][3][4][5][6][7]
       

Copyright 1999-2024 Zeroboard / skin by 최길호(gilho.kr@gmail.com)
최근 댓글
최근 게시물
07/22
[ORACLE]
ogg Rolling over remote file [....
by 최길호
07/15
[ORACLE]
PRKF-1125 : multiple values sp....
by 최길호
07/04
[운영체제]
NIC add cli / nmcli device sho....
by 최길호