새우잠 조금 자고 도대체 얼마나 오래 살아있는건지..

요즘은 집에서 안자면 낮잠도 밤잠도 잘 못자네..

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

좋은 소식? 나쁜 소식?  (4) 2020.02.11
예정된 철야..  (0) 2020.02.06
빨간날.. 철야? 야근?  (0) 2020.01.27
출근길 일기?  (2) 2020.01.19
피곤한 하루  (2) 2020.01.18
Posted by 구차니

 

-n schema
--schema=schema
Dump only schemas matching schema; this selects both the schema itself, and all its contained objects. When this option is not specified, all non-system schemas in the target database will be dumped. Multiple schemas can be selected by writing multiple -n switches. Also, the schema parameter is interpreted as a pattern according to the same rules used by psql's \d commands (see Patterns), so multiple schemas can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent the shell from expanding the wildcards; see Examples.

Note: When -n is specified, pg_dump makes no attempt to dump any other database objects that the selected schema(s) might depend upon. Therefore, there is no guarantee that the results of a specific-schema dump can be successfully restored by themselves into a clean database.

Note: Non-schema objects such as blobs are not dumped when -n is specified. You can add blobs back to the dump with the --blobs switch.

-N schema
--exclude-schema=schema
Do not dump any schemas matching the schema pattern. The pattern is interpreted according to the same rules as for -n. -N can be given more than once to exclude schemas matching any of several patterns.

When both -n and -N are given, the behavior is to dump just the schemas that match at least one -n switch but no -N switches. If -N appears without -n, then schemas matching -N are excluded from what is otherwise a normal dump.

[링크 : https://www.postgresql.org/docs/9.1/app-pgdump.html]

[링크 : https://stackoverflow.com/questions/14486241/how-can-i-export-the-schema-of-a-database-in-postgresql]

[링크 : https://dba.stackexchange.com/questions/53185/postgresql-how-to-backup-only-one-schema-from-a-database-and-restore-it-on-anot]

 

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

sql에서 null 비교  (0) 2020.02.07
ER 다이어그램 식별 / 비식별  (0) 2020.02.07
drop database와 postgres  (0) 2020.02.04
union / intersect / minus  (0) 2020.01.22
one to one , one to only one  (0) 2020.01.17
Posted by 구차니

postgresql은 WAL로 인해서 table을 drop 해도 용량이 늘어나고

full vacuum을 통해서 공간을 줄일수 있다.

 

유일한 예외(?)가 drop database

하드 디스크 거의 100% 채워서 뻗은 시스템을 이제야 복구하는데

 

drop database [database_name]

해주면서 df -h 를 보고 있노라니 용량이 쑥쑥 줄어든다.

 

아무튼 공간 부족해서 터져 나간건 복구도 힘들구나.. 라는걸 깨닫는 중

Posted by 구차니
Linux/centos2020. 2. 4. 12:57

패키지 설치

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=6979708]

 

 

sshd_config 설정

[링크 : https://stackoverflow.com/questions/38961495/x11-forwarding-request-failed-on-channel-0]

AllowTcpForwarding yes 
#GatewayPorts no 
X11Forwarding yes 
X11DisplayOffset 10 
#X11UseLocalhost no 
#PermitTTY yes 
PrintMotd no 
PrintLastLog yes 
TCPKeepAlive yes 
#UseLogin no 
UsePrivilegeSeparation sandbox 

[링크 : https://sonumb.tistory.com/79]

[링크 : https://harryp.tistory.com/684]

'Linux > centos' 카테고리의 다른 글

centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
리눅스 로그인 실패 로그  (2) 2019.07.07
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
httpd + php + selinux..  (0) 2019.03.20
Posted by 구차니

openrefine을 이용해서 웹에서 특정 값을 빼내는 방법이라는데

쓸데없이(?) 용어가 거창하네.

아무튼 한번 써보긴 해야 하는데 귀찮아 -ㅁ-

 

[링크 : https://programminghistorian.org/en/lessons/fetch-and-parse-data-with-openrefine#fetch-html]

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

openrefine 설명서  (0) 2020.01.23
open refine memory 설정  (0) 2020.01.20
Posted by 구차니
Programming/node.js2020. 2. 1. 18:29

숫자라고 숫자로 인식하는게 아니라서 정렬 순서가 엉망으로 보일수 있음

그렇기에 숫자라면 sort() 함수에 sort용 함수를 넣어주어야 한다.

 

[링크 : http://dudmy.net/javascript/2015/11/16/javascript-sort/]

'Programming > node.js' 카테고리의 다른 글

웹소켓  (0) 2022.03.25
broadway / jsmpeg  (0) 2020.09.16
node.js postgresql transaction  (0) 2020.01.31
for 에서 async, await  (0) 2020.01.30
es6 전개문구 (...)  (0) 2020.01.29
Posted by 구차니
Programming/node.js2020. 1. 31. 01:20

async와 await를 이용해서 순차적으로 실행하여 트랜잭션을 구현한 예제

[링크 : https://node-postgres.com/features/transactions]

'Programming > node.js' 카테고리의 다른 글

broadway / jsmpeg  (0) 2020.09.16
node.js array.sort() 주의사항  (0) 2020.02.01
for 에서 async, await  (0) 2020.01.30
es6 전개문구 (...)  (0) 2020.01.29
node.js 객체 합치기  (0) 2020.01.29
Posted by 구차니
Programming/node.js2020. 1. 30. 22:25

for문을 돌리는데 비동기로 돌아버려서

그걸 강제로 동기로 돌리는 방법 찾는중

루프를 async - await new Promise()로 하는게 일단 작동하는걸 확인함

(async function loop() {
    for (let i = 0; i < 10; i++) {
        await new Promise(resolve => setTimeout(resolve, Math.random() * 1000));
        console.log(i);
    }
})();

[링크 : https://stackoverflow.com/questions/40328932/javascript-es6-promise-for-loop/40329190]

'Programming > node.js' 카테고리의 다른 글

node.js array.sort() 주의사항  (0) 2020.02.01
node.js postgresql transaction  (0) 2020.01.31
es6 전개문구 (...)  (0) 2020.01.29
node.js 객체 합치기  (0) 2020.01.29
unserscore 라이브러리  (0) 2020.01.29
Posted by 구차니
Programming/node.js2020. 1. 29. 17:45

... 은 es6부터 추가된 문법으로

배열을 풀어서 인자로 만들어 주는 듯

 

function sum(x, y, z) {
  return x + y + z;
}

const numbers = [1, 2, 3];

console.log(sum(...numbers));
// expected output: 6

[링크 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Spread_syntax]

[링크 : https://2ality.com/2015/01/es6-set-operations.html]

'Programming > node.js' 카테고리의 다른 글

node.js postgresql transaction  (0) 2020.01.31
for 에서 async, await  (0) 2020.01.30
node.js 객체 합치기  (0) 2020.01.29
unserscore 라이브러리  (0) 2020.01.29
node.js 집합연산  (0) 2020.01.23
Posted by 구차니
Programming/node.js2020. 1. 29. 17:05

assign()을 쓰면 가능은 한데..

동일 이름일 경우에는 어떻게 해야할까?

 

[링크 : https://4urdev.tistory.com/22]

+

키 이름을 미리 바꾸고 합치면 되려나?

[링크 : https://www.freecodecamp.org/news/30-seconds-of-code-rename-many-object-keys-in-javascript-268f279c7bfa/]

'Programming > node.js' 카테고리의 다른 글

for 에서 async, await  (0) 2020.01.30
es6 전개문구 (...)  (0) 2020.01.29
unserscore 라이브러리  (0) 2020.01.29
node.js 집합연산  (0) 2020.01.23
node.js promise  (0) 2020.01.20
Posted by 구차니