git을 전송할때 압축하는데 서버측에서 메모리 부족으로 뻗을수 있으니

로컬에서 압축하지 않고 보내도록 하면 되는 듯?

remote: Counting objects: 50044, done.
remote: aborting due to possible repository corruption on the remote side.
fatal: 프로토콜 오류: 잘못된 묶음 헤더

 

Adding git config --global pack.window "0" worked for me...along with following

git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m" 
git config --global pack.threads "1"
Reason:

Git clone compresses the data while cloning the repository

It compresses the data on the server memory before receiving the data/files.

If the server has out of memory you will get the above error while packing the objects

You can fix the issue by making git clone the repository without packing the objects on the server with the following.

git config --global pack.window "0"

[링크 : https://stackoverflow.com/questions/4170317/git-pull-error-remote-object-is-corrupted]

Posted by 구차니

어짜다 보니 오늘도 출근하는데

 

오는길에 또 다시 병이 도져서 가슴이 막 조여지고 간질간질 해서

욕을 하고 싶고 내가 왜 무슨 죄를 지어서 이래야 하나 싶다가도

조금은 용기를 내서 해보자 하면서 소리를 소심하게 질러 보았다

 

그래 이까짓것 해내버리자!! 별거 아니잖아?!

으아아!!!

 

막 소리 지르고 싶은데 소리 지를데도 없고

그래도 아주 조금 용기가 충전되는 느낌

 

머.. 그렇다고 해서 완전히 해결되는건 또 아니라는게 함정..

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

골골골  (0) 2019.11.14
폭풍전야의 고요?  (0) 2019.11.12
인간은 역시 사람들 사이에서 살아야 하나보다.  (4) 2019.11.09
그래 주말만 버티자  (0) 2019.11.08
언제나 현자타임  (0) 2019.11.07
Posted by 구차니

값을 추적하다 보니 몇개가 사라져서 역으로 찾다보니

unnest() 안에 들어가는 항목이 null 일 경우에는 (empty array가 아닌 null)

아예 해당 항목 자체가 select 되지 않는 문제가 존재한다.

 

해결법이 맞는진 모르겠지만..

null일 조건 비교해서 두번 선택해야 할지도?

(한번에 선택하는 법이 있으면 좋겠네)..

 

값을 비교해서 unnest 하거나, lateral join을 쓴다는데

lateral join을 아직 모르니.. 일단 값 비교 하는걸로 해야겠다.

(다만, case 에서 multiple row는 리턴하지 못하도록 되어있으니 주의)

[링크 : https://stackoverflow.com/questions/15175187/postgresql-unnest-with-empty-array]

[링크 : https://dba.stackexchange.com/questions/119201/how-does-unnest-treat-null-values-and-empty-arrays]

 

+

SQL 특성(?)인지 당연하게도 해당 내용이 있는지 확인하고

배열이 있으면 해당 배열을 unnest 하고

배열이 없으면 null 배열을 넣어서 처리하도록 하면 해결은 된다..

(null 배열이 아니라 해당 필드가 null 이기 때문에 발생한 경우는 해결 됨)

WITH tbl(id, arr) AS (
   VALUES
     (1, '{a}'::text[])
   , (2, '{NULL}'::text[])
   , (3, '{}'::text[])
   , (4, '{x,y,z}'::text[])
   )
SELECT id, elem
FROM   tbl t
     , unnest (
          CASE WHEN array_length(t.arr, 1) >= 1
               THEN t.arr
               ELSE '{null}'::text[] END
       ) elem;

[링크 : https://dba.stackexchange.com/questions/119201/how-does-unnest-treat-null-values-and-empty-arrays]

Posted by 구차니