DB/PostgreSQL 13

[PostgreSQL - DA] 테이블 스키마 조회 쿼리

맨날 짜서 하다가 귀찮아서 하나 만들어 놨다. 참고 해서 계속 써야지. - 20240102 수정 with schema_column_p as ( select c.table_schema , c.table_name , obj_description((c.table_schema || '.' || c.table_name)::regclass, 'pg_class') as table_comment , c.column_name , pgd.description as column_comment , (select d.constraint_name as pk from information_schema.constraint_column_usage d join information_schema.table_constraints e on ..

DB/PostgreSQL 2023.10.04

[PostgreSQL - DBA] Running out of temp space 관련..

프로젝트 내에서 Heroku 내의 postgresql DB 구동 중 Running out of temp space 관련 Warning이 발생했다. 검색해보니 나오는 사이트.. https://help.heroku.com/1I3XBKMT/my-heroku-postgres-instance-is-running-out-of-temporary-space My Heroku Postgres instance is running out of temporary space - Heroku Help My Heroku Postgres instance is running out of temporary space Issue PGError: could not write block blockid of temporary file: No ..

DB/PostgreSQL 2023.10.04

[PostgreSQL - DBA] DB 기본 설정값 확인

PostgerSQL DB 설정 값 확인 쿼리 SELECT name , context , unit -- 단위 , setting -- 현재 설정 값 , boot_val -- 기본 값 , reset_val -- 재기동 시 설정 될 값 FROM pg_settings WHERE name in ( 'shared_buffers' -- 공용 메모리 , 'temp_buffers' -- 임시 테이블 생성, 서버 메모리의 1/16 설정 , 'max_connections' -- 최대 동시 접속 허용 수 , 'work_mem' -- 정렬, 해시 등 서버 메모리. (max_connection * 2) 설정 , 'maintenance_work_mem' -- vaccoum, index 생성 등. 서버 메모리의 1/16 설정. , '..

DB/PostgreSQL 2023.10.04