실제 DB가 파일로 저장되는 경로를 확인하는 방법

 

show data_directory;

[링크 : https://confluence.curvc.com/pages/viewpage.action?pageId=10092649]

Posted by 구차니

byte 단위로 나오려나?

 

select pg_relation_size('schema.table_name');

[링크 : https://korearank1.tistory.com/43]

[링크 : https://wiki.postgresql.org/wiki/Disk_Usage]

 

+

byte가 맞는듯

pg_size_pretty()로 감싸면 읽기 편한 단위로 바꾸어 준다

[링크 : https://ktdsoss.tistory.com/383]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql 테이블 크기  (0) 2020.01.15
postgresql data_directory  (0) 2020.01.13
sql combination 생성하기  (0) 2020.01.13
postgres limits - max capacity  (0) 2020.01.10
pgmodeler  (0) 2020.01.05
Posted by 구차니
Programming/Java(Spring)2020. 1. 13. 14:37

java VM 특성(?)으로 localhost에 대해서 주소를 IPv4와 IPv6로 resolve하는 것으로 보인다.

java -jar 앞에 아래의 옵션을 주면 해결!

 

-Djava.net.preferIPv4Stack=true

[링크 : https://hane-1.tistory.com/42]

'Programming > Java(Spring)' 카테고리의 다른 글

ckedtior file upload  (0) 2024.02.07
spring 다시 시작  (0) 2020.01.15
jsoup html body 사이즈 제한  (0) 2019.09.26
java 메모리 관련...2?  (0) 2019.07.06
java.lang.OutOfMemoryError: GC overhead limit exceeded  (1) 2019.07.06
Posted by 구차니

원래 글에서 응용해서 만들어 본 예제

4*3=12 개 나오는게 맞...겠지? 순열과 조합부터 다시 봐야하나 헷갈리네

 

select t1, t2
from (select unnest(array['a','b','c','d'])) as t1
join (select unnest(array['1','2','3'])) as t2 on t1 <> t2

[링크 : https://stackoverflow.com/questions/31129507/postgres-query-to-create-combinations]

 

t1과 t2가 동일 데이터가 있으면 안되기에 on에 조건을 true로 주면 문제없이 되긴 한다.

select t1, t2
from (select unnest(array['a','b'])) as t1
join (select unnest(array['1','2','3','a','as'])) as t2 on true

 

+

위의 예제에서 join on.. 대신 cross join 해도 되는 듯 하다

select t1, t2
from (select unnest(array['a','b','c','d'])) as t1
cross join (select unnest(array['1','2','3'])) as t2

[링크 : https://www.essentialsql.com/cross-join-introduction/]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql data_directory  (0) 2020.01.13
postgres table의 물리적 용량 확인하기  (0) 2020.01.13
postgres limits - max capacity  (0) 2020.01.10
pgmodeler  (0) 2020.01.05
스칼라 서브쿼리(scalar subquery)  (0) 2020.01.04
Posted by 구차니
Linux2020. 1. 13. 11:55

 

언제부터인지 확실히는 알 수 없으나

리눅스에서 메모리가 넉넉하면(이게 전제조건이라 발동하는걸 이제 본걸지도?)

디스크 IO를 캐싱한다.

pagecache 1은 파일의 내용을

pagecache 2는 파일의 속성 및 디렉토리 정보 등을 캐싱한다고 하는데

메모리가 몇 기가 이상이어야 캐싱을 하는지 이런것들에 대한 정보를 찾으려고 해도 보이질 않는다.

 

pagecache 해제 
echo 1 > /proc/sys/vm/drop_caches 

dentries, inodes 해제 
echo 2 > /proc/sys/vm/drop_caches 

pagecache, dentries, inodes 모두 해제 
echo 3 > /proc/sys/vm/drop_caches

[링크 : https://zetawiki.com/wiki/리눅스_캐시_메모리_비우기]

[링크 : https://en.wikipedia.org/wiki/Page_cache]

 

[링크 : https://www.linuxatemyram.com/play.html]

[링크 : https://www.thegeekdiary.com/how-to-clear-the-buffer-pagecache-disk-cache-under-linux/]

[링크 : https://discuss.aerospike.com/t/how-to-tune-the-linux-kernel-for-memory-performance/4195]

 

+

2.2 kernel 부터 들어있었으면 정말 오래전 부터인데. 메모리 양에 작동을 하던거라 존재를 몰랐을 뿐인건가?

The term, Buffer Cache, is often used for the Page Cache. Linux kernels up to version 2.2 had both a Page Cache as well as a Buffer Cache. As of the 2.4 kernel, these two caches have been combined. Today, there is only one cache, the Page Cache.

[링크 : https://www.thomas-krenn.com/en/wiki/Linux_Page_Cache_Basics]

'Linux' 카테고리의 다른 글

find -mmin  (0) 2020.12.04
linux 스토리지 정보  (0) 2020.10.14
dmesg 시간 환산하기  (0) 2020.01.07
screen 사용법  (0) 2019.12.18
byobu  (0) 2019.12.18
Posted by 구차니
게임2020. 1. 12. 22:04

몇년째 엔딩을 못보고 있는 녀석.. 공략을 보고라도 끝내야지 하면서 하는데..

게임 멀미가 없어서 참 다행이다만.. 길 찾기가 너무 어렵고

몇 곳에서는 공략 없으면 길을 못 찾는 미묘한 설계 라고 해야 하나..

조금 익숙해지니 뻔하게 직진만 하면 되도록 설계한게 보이지만

그럼에도 명중율 문제인지 적을 제압하질 못하니 계속 죽다가 동영상 공략 보고 하나하나 진행하는 중..

 

총 8시간이면 웬만해서는 엔딩을 본다는데

언넝 끝내고 다음편도 하고.. 그래야 하려나?

그냥 시작했으니.. 라는 의무감으로 하는 느낌이 너무 싫네

 

 

 

[링크 : https://blog.naver.com/2pnn/90177709064]

'게임' 카테고리의 다른 글

magicka 시작!  (0) 2020.03.20
remember me 한글 패치  (0) 2020.03.10
페이데이 스팀버전 한글패치  (0) 2019.07.17
DCS World 해봄  (4) 2018.04.08
프렌즈 마블 벨소리 ㅋㅋㅋ  (4) 2018.03.10
Posted by 구차니

아내가 오랫만에 애들이랑 놀아준다고 고생했다고

 

그럼에도 불구하고 자꾸 애들에게 짜증만 내서 아내에게 미안하고

애들에게 미안하네...

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

하루하루 정신없네  (0) 2020.01.26
정신없는 새해  (0) 2020.01.25
약간의 앨범정리  (0) 2019.12.28
지름 배송..  (2) 2019.11.17
지름의 날  (0) 2019.11.16
Posted by 구차니

왜 열거형(sequence)를 따라서 for문을 사용하게 했는지 모르겠지만..

일단은 열거형은 []로 나열되는 tuple의 list 혹은 array라고 하는데

node.js와 비교하면 배열을 foreach 로 반복하도록 문법을 제한한 느낌이라고 해야하나?

 

[링크 : https://www.w3schools.com/python/ref_func_range.asp]

[링크 : https://www.learnpython.org/en/Loops]

'Programming > python(파이썬)' 카테고리의 다른 글

python yield  (0) 2021.04.07
python 공부  (0) 2020.01.14
python print 와 while 문  (0) 2020.01.11
오랫만에 한가로움?  (0) 2020.01.11
python split  (0) 2020.01.10
Posted by 구차니
Linux/Ubuntu2020. 1. 11. 23:06

/var/crash에 파일이 있으면 보고하는거라고 하는데

[링크 : https://moordev.tistory.com/152]

 

오늘자로 크롬관련 에러도 있고 머지...

크롬을 재설치 해봐야하는건가..

 

/var/crash$ ll
합계 16884
drwxrwsrwt  2 root     whoopsie     4096  1월 10 19:16 ./
drwxr-xr-x 14 root     root         4096  8월  6 04:11 ../
-rw-r-----  1 root     whoopsie    42510  1월  8 18:57 _usr_bin_isdv4-serial-inputattach.0.crash
----------  1 minimonk whoopsie 17235968  1월 10 19:17 _usr_lib_chromium-browser_chromium-browser.1000.crash

 

isdv4 어쩌구는.. 설마했는데 wacom 타블렛 관련 드라이버..

도대체 애네가 왜 오류가 나지?

[링크 : https://github.com/linuxwacom/xf86-input-wacom/blob/master/tools/isdv4-serial-inputattach.c]

 

+

일단 한번 뿐이긴 하지만 해당 디렉토리의 파일을 삭제하고 다시 발생하고 있진 않다.

바보 같이 잘못설치되서 포맷할뻔 -_-

Posted by 구차니

 

if guess == number:
    print('same')
elif guess < number:
    print('larger then')
else:
    print('lesser then')

 

node.js와는 다르게 문자열과 숫자를 마음대로 + 로 출력할 수가 없다.

그리고 while 문에 대해서도 특이하게 else가 붙어서 마지막 조건에서 벗어날때 무언가를 할 수 있다.

(무슨 용도로 이걸 만들었을까..)

cnt = 10;

while cnt > 0:

cnt = cnt - 1;

print('cnt:', cnt);

else:

print('cnt <= a', cnt);

 

[링크 : https://www.opentutorials.org/module/2980/17535]

'Programming > python(파이썬)' 카테고리의 다른 글

python 공부  (0) 2020.01.14
python 반복문 for in range()  (0) 2020.01.11
오랫만에 한가로움?  (0) 2020.01.11
python split  (0) 2020.01.10
python 겅부  (0) 2020.01.09
Posted by 구차니