| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 | 
- mariaDB
 - mariaDB설치오류
 - autocommit설정
 - sqlp공부방법
 - inlist
 - 통계정보백업
 - 오블완
 - datadir 변경
 - Linux
 - postgreql 오브젝트 조회
 - 리눅스
 - sqlp합격후기
 - 오라클기동
 - 데이터csv생성
 - 오라클
 - DATABASELINK
 - 오라클인덱스힌트
 - ssh접속오류
 - num_index_keys
 - PROFILE EXPDP
 - job관리
 - sqlp시험일정
 - oracle
 - MariaDB기본디렉토리변경
 - 실제플랜조회
 - public synonym EXPDP
 - 티스토리챌린지
 - 통계정보복구
 - Connect Storage Engine
 - 대량dml튜닝
 
- Today
 
- Total
 
목록DATABASE/Postgresql (7)
IT study
docker 에 rocky9 linux 컨테이너 생성하여 그 위에 postgresql 설치 window 위에 docker desktop 설치하여 docker command로 작업 1. docker에 rocky linux 이미지 다운로드 및 실행# 이미지 다운로드 docker pull rockylinux:9#확인 docker images#컨테이너 생성 (run=생성&시작)docker run -it -d --name pgtest01 rockylinux:9#확인docker ps#컨테이너접속docker exec -it pgtest01 /bin/bash#중지되어있다면 docker start pgtest01로 시작 2. PostgreSQL 설치#패키지 업데이트[root@1ae72e5a5f0d /]# dnf upd..
테이블, 시퀀스, 함수, 트리거 등 각종 오브젝트에 대한 권한 조회입니다 -- 유저 grant role 조회select grantor::regrole::varchar(100) as grantor, member::regrole::varchar(100) as grantee, string_agg(roleid::regrole || (case when admin_option = true then '(★)' else '' end),', ' order by roleid::regrole,admin_option) as grant_roles -- admin_option: is_grantablefrom pg_catalog.pg_auth_members pam where member::regrole::varchar(100)..
테이블 스키마, 소유자 및 오브젝트 소유자 변경 관련 쿼리입니다. 간단한 문구로 소유자 변경이 가능합니다. 테이블 소유자 변경 alter table {table_name} owner to {new_role}; 테이블 스키마 변경 ALTER TABLE {table_name} SET SCHEMA {new_schema_name}; 특정 소유자가 소유한 모든 객체 owner 변경 REASSIGN OWNED BY {old_role} TO {new_role}; 하지만 ! 변경하려는 오브젝트가 사용중인 트랜잭션이 있다면.. Lock대기가 발생하겠죠 운영중에는 영향도를 파악하여 진행해야합니다. 관련 실습예제입니다./* 버전 : PostgreSQL 15.8 (Ubuntu 15.8-1.pgdg24.04+1) on x86_..
유저삭제시에 해당 유저가 소유한 객체와 부여받은 모든 권한이 제거되어야하므로 우선 소유한 객체를 확인하는 용도로 쿼리를 정리하였습니다. pg_catalog를 활용한 테이블, 뷰, 시퀀스, 인덱스, 함수, 프로시저, 트리거 등 오브젝트의 스키마, 소유자를 조회하는 쿼리입니다. select * from ( -- 테이블, 뷰, 시퀀스, 인덱스 ,Mview, toast table, foreign table 등 조회 SELECT r.rolname as owner, n.nspname as schema_nm , case when c.relkind = 'r' then 'table' when c.relkind = 'v' then 'view' when c.relkind = 'S' then 'sequence' when c...
스펙을 최대한 낮춰서 EC2 ubuntu환경에 postgresql 15 설치하다 사용 중 PG깨지는 현상이 발생했다.. 가장 큰 문제는 wal log를 수용할 디스크공간이 없던것!!psql 을 접속할 수 없어서 아무생각없이 wal log폴더 내 데이터 삭제해버림 ㅠ 그 결과 Postgresql 서버가 올라오지 못하고 DB시스템이 shut down됨!! 2024-11-14 16:05:19.069 KST [7685] LOG: starting PostgreSQL 15.8 (Ubuntu 15.8-1.pgdg24.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit2024-11-14 16:05:19.071 K..
Shared Memory 데이터베이스 기동 시 공용 메모리 공간인 Shared Memory가 할당모든 backend 프로세스들에 의해 공유되는 공간 1) Shared Buffers데이터 변경 사항을 Block 단위로 저장하여 물리적 I/O를 하지 않아 데이터 처리를 빠르게 함postgres=# show shared_buffers; shared_buffers---------------- 128MB --* Shared buffer 크기 : 128MB = 16384 * 8KBpostgres=# select name, setting from pg_settings where name = 'shared_buffers'; name | setting----------------+--------- sh..
postgresql 의 경우 객체가 생성될 때 일부 유형의 객체에 대해 기본 권한을 부여한다.이 중 함수와 프로시저는 생성시 모든 사용자가 실행가능하여 기본 권한 설정을 관리해주어야 한다. 표 5.2. Summary of Access PrivilegesObject TypeAll PrivilegesDefault PUBLIC Privilegespsql CommandDATABASECTcTc\lDOMAINUU\dD+FUNCTION or PROCEDUREXX\df+FOREIGN DATA WRAPPERUnone\dew+FOREIGN SERVERUnone\des+LANGUAGEUU\dL+LARGE OBJECTrwnoneSCHEMAUCnone\dn+SEQUENCErwUnone\dpTABLE (and table-like..
          