Caused by: java.sql.SQLException: [Amazon](500310) Invalid operation: VACUUM is running;
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(Unknown Source)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(Unknown Source)
at com.amazon.redshift.client.PGMessagingContext.getErrorResponse(Unknown Source)
at com.amazon.redshift.client.PGClient.handleErrorsScenario3(Unknown Source)
at com.amazon.redshift.client.PGClient.handleErrors(Unknown Source)
at com.amazon.redshift.client.PGClient.handleAtomicStmtErrors(Unknown Source)
레드쉬프트(Redshift)의 Vacuum 작업은 데이터 파편화를 정리하는 작업입니다. Vacuum 동작은 한번씩 동작할 수 있습니다. 기존에 동작중인 Vacuum 동작이 있는데 다시 요청했을 때 오류가 발생합니다.이번 경우는 MR로 작업을 요청하고 MR을 kill 하였으나, 레드쉬프트 내부적으로 계속 Vacuum 작업이 진행되어 발생하였습니다. 이럴때는 동작중인 프로세스를 확인하고, Vacuum 작업을 kill 하거나 작업이 완료되는 것을 기다리면 됩니다.
# 동작중인 쿼리 확인
select pid, user_name, starttime, query
from stv_recents
where status='Running';
pid | btrim | starttime | substring
-------+------------+----------------------------+----------------------
18764 | masteruser | 2013-03-28 18:39:49.355918 | select sellerid, fir
(1 row)
# 실행중인 쿼리 취소
cancel 18764;
https://docs.aws.amazon.com/ko_kr/redshift/latest/dg/determine_pid.html
https://docs.aws.amazon.com/ko_kr/redshift/latest/dg/cancel_query.html
반응형
'AWS' 카테고리의 다른 글
[AWS] 비관리형, 관리형(Managed), 완전관리형(Fully-Managed) (0) | 2019.08.06 |
---|---|
[aws] 아마존 레드쉬프트(Amazon Redshift), EMR과 의 차이 (0) | 2019.07.29 |
[aws] S3 ls 명령에서 와일드카드 사용 대체하기 (0) | 2019.04.09 |
[S3] AWS EMR에서 _$folder$가 생성되는 이유 (0) | 2019.04.01 |
[AWS][S3] AWS 커맨드의 The AWS Access Key Id you provided does not exist in our records. 오류 처리 (0) | 2017.03.20 |