작성
·
127
0
안녕하세요 pgAdmin4 설치 부분을 하고있습니다.
17버전에서 Reference 설정하고 시도했을 때, 안됨
15버전으로 설치하고 Reference설정 후 시도해도 안됨
이 때 해 볼만한 방안이 있을까요? 바쁘신데 한 번 봐주시면 감사하겠습니다. 껄껄
아래 에러 내용입니다
.
pg_restore: ۾ ͺ ̽
pg_restore: EXTENSION "adminpack"
pg_restore: COMMENT "EXTENSION adminpack"
pg_restore: TABLE "public.gangnamgu_population"
pg_restore: TOC ó ϴ :
pg_restore: 215 TOC ; 1259 24662 TABLE gangnamgu_population postgres
pg_restore: : could not execute query: 오류: "gangnamgu_population" 이름의 릴레이션(relation)이 이미 있습니다
: CREATE TABLE public.gangnamgu_population (
administrative_agency character varying,
total_population integer,
male_population integer,
female_population integer,
sex_ratio double precision,
number_of_households integer,
number_of_people_per_household double precision,
id integer NOT NULL
);
pg_restore: SEQUENCE "public.gangnamgu_population_id_seq"
pg_restore: 216 TOC ; 1259 24667 SEQUENCE gangnamgu_population_id_seq postgres
pg_restore: : could not execute query: 오류: "gangnamgu_population_id_seq" 이름의 릴레이션(relation)이 이미 있습니다
: CREATE SEQUENCE public.gangnamgu_population_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
pg_restore: SEQUENCE OWNED BY "public.gangnamgu_population_id_seq"
pg_restore: DEFAULT "public.gangnamgu_population id"
pg_restore: "public.gangnamgu_population" ̺ ڷḦ ó
pg_restore: 3319 TOC ; 0 24662 TABLE DATA gangnamgu_population postgres
pg_restore: : "gangnamgu_population" ̺ COPY : 오류: 중복된 키 값이 "gangnamgu_population_pkey" 고유 제약 조건을 위반함
: (id)=(2) 키가 이미 있습니다.
: gangnamgu_population 복사, 1번째 줄
pg_restore: : SEQUENCE SET gangnamgu_population_id_seq
pg_restore: CONSTRAINT "public.gangnamgu_population gangnamgu_population_pkey"
pg_restore: 3176 TOC ; 2606 24675 CONSTRAINT gangnamgu_population gangnamgu_population_pkey postgres
pg_restore: : could not execute query: 오류: "gangnamgu_population" 테이블에는 이미 기본키가 있습니다
: ALTER TABLE ONLY public.gangnamgu_population
ADD CONSTRAINT gangnamgu_population_pkey PRIMARY KEY (id);
pg_restore: : ۾ õǾ : 4
답변 1
0
안녕하세요, 인프런 AI 인턴입니다. skagns601님!
현재 질문하신 PostgreSQL 복원 문제와 관련하여 도움을 드리기 위해 몇 가지 설명을 드리겠습니다. 또한, 유사한 문제를 겪었던 다른 사용자들의 질문과 해결 방법이 포함된 링크를 함께 제공합니다.
질문에서 주어 논 에러는 “중복 키 값이 ‘gangnamgu_population_pkey’ 고유 제약 조건을 위반함”이라는 메시지입니다. 이는 database 테이블 내에 이미 동일한 기본키가 존재하는 경우에 발생하는 일반적인 문제입니다. 이 문제를 해결하기 위해 다음과 같은 접근법을 시도해 보세요:
유사한 상황에서 도움이 될 수 있는 답변 링크도 첨부합니다:
PostgreSQL 복원 시 Binary Path 확인 - 이 게시물에서는 PostgreSQL을 설치한 경로에 있는 Binary Path를 올바르게 설정해야 한다고 설명하고 있습니다. Binary Path 설정이 문제의 원인이 될 수 있습니다.
디비 Restore 에러 - 복구 실패의 원인과 해결책으로 Binary Path 설정을 다시 설명하고 있는데, 문제 해결의 실마리가 되실 수 있습니다.
이 정보와 링크가 문제 해결에 도움이 되길 바랍니다. 각 링크 글에서 추가적인 설명과, 같은 문제를 겪은 다른 사용자들의 피드백을 확인하세요.
저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다. 현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏 추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.