반응형

To dump the contents of a file that contains the command-line arguments used to launch PostgreSQL, you can follow these steps:

 

Step 1: Locate the PostgreSQL Configuration File The first step is to locate the PostgreSQL configuration file. Depending on your operating system and PostgreSQL installation method, the configuration file can have different names and locations. Commonly, the configuration file is named postgresql.conf or postgres.conf.

On Linux, it is often located in the /etc/postgresql/<version>/main/ directory, where <version> is the PostgreSQL version you have installed. For example, /etc/postgresql/12/main/.

On Windows, it is typically found in C:\Program Files\PostgreSQL\<version>\data\.

 

Step 2: Open the Configuration File Once you have located the PostgreSQL configuration file, you can open it using a text editor like nano, vi, vim, gedit on Linux/Unix systems, or Notepad, Notepad++, or Visual Studio Code on Windows.

For example, on Linux, you can use the following command to open the configuration file using nano (you may need to use sudo if you don't have the necessary permissions):

 

Step 3: View the Contents After opening the file in your text editor, you should be able to see the contents, which typically include various configuration options for PostgreSQL, such as database paths, memory settings, authentication options, and more.

 

Step 4: Find the Command-Line Arguments Look for the section in the configuration file that specifies the command-line arguments used to launch PostgreSQL. This section is usually located at the beginning of the file or under the header Command-line options.

The command-line arguments might look something like this:

 

Step 5: Close and Save the File Once you have viewed the contents and found the relevant command-line arguments, save any changes you made to the file and close the text editor.

Remember that some PostgreSQL configurations may not be stored in the main postgresql.conf file. In such cases, you might have additional configuration files, such as pg_hba.conf for authentication settings or pg_ident.conf for user mapping. Be sure to check those files if you're looking for specific configuration details.

 

The configuration files will specify various settings and parameters, including server options and database connections, but they do not store the direct command-line arguments used at the time of launch.

 

brew services >> .plist >> value after -D is the data directory >> find postgres.config file to alter values

반응형

'프로그래밍' 카테고리의 다른 글

JAVA / 자바에 대하여  (0) 2022.09.10
반응형

안녕하세요.

 

SAP 소프트웨어에서 현재 종사하고 있는 개발자입니다.

 

모든지 기본기가 중요하니까요. 자바라는 언어에 대하여 설명하고자 합니다.

 

전체적인 자바라는 언어, 혹은 플랫폼이라고 하는 데 배우시기 전에 큰 그림을 알고 있는 게 나중에도 큰 도움이 됩니다.

 

 

역사적으로 먼저 자바는 James Gosling이라는 사람과 그 팀원들이 Sun microsystems라는 회사에서 처음으로 시작됩니다.

프로젝트 중에 온라인 투표로 많은 사람들의 시간적 공간적 문제를 해결하고자 했는데 1991년도에 이러한 테크놀로지는 많이 앞서갔다고 보입니다. 그 이후로 Green team이라는 팀으로 계속 활동을 하며 프로그래밍의 문제점중에 하나이자 많은 비용이 투자되는 compiler, 즉 코드를 변환 해주는 변환기를 비용을 절감하고자 Java라는 프로그램이 출시되게 됩니다.

 

이제 부터 방금 말씀 드린 자바의 시스템을 조금 더 쉽게 풀어 보겠습니다.

 

프로그래밍은 기본적인 high-level에서 low-level language로 풀어져서 전달 됩니다. high-level은 우리가 쓰는 용어로 듣고 쉽게 쓰고 이해할 수 있는 용어이며 low-level은 컴퓨터가 우리가 쓰는 언어를 컴퓨터 용어, bycode로 변환되어 컴퓨터가 인식을 하게됩니다. 이 bycode는 이진법으로 기계가 사용하는 0과 1로 표기되어 입력됩니다.

 

그렇다면 여기서 자바의 맨처음에 high-level로 써서 표기가 되며 그 표기된 언어가 compiler(변환기)로 컴퓨터가 인식 할 수있게 컴퓨터 용어로 정리되서 컴퓨터에 입력을 합니다. 처음에 쓰는 high-level용어는 개발자에 의해서 .java확장자 파일로 저장이 됩니다. 이것이 compiler를 통해 .class란 확장자로 다른 파일로 변환됩니다. 

 

이 .class파일이 어떤 컴퓨터 operating system(os) 예를 들어 윈도우, 맥 등 컴퓨터 시스템에 따라 프로세스 하는 방식이 다릅니다. .class파일 어느 os에도 읽혀지지 않기때문에 그에 맞는 interpreter(번역기)를 쓰게 됩니다. 여기서 JVM이라는 java virtual machine이 각각 컴퓨터 os 에 맞게 해석해서 .class에 있는 bycode들이 실행되어집니다. 이 JVM이라는 도구가 결정적으로 java에 가장 특화되어 어떤 플랫폼이든 사용할 수 있게 만듭니다. 모바일이든지 컴퓨터이든지 실행시킬 수 있는 것이지요.

 

 

이제는 자바의 장점을 한번 보겠습니다

  • High level Programming: 누구든지 쉽게 읽고 쓰고 할 수 있습니다. 일명 프로그래밍의 문법이 누구나 보면 어떠한 기능을 하는 구나 라고 대략적으로 알고 이해할 수 있도록 설계되었습니다.
  • Class based: 클라스라고 하여 예를 들어 학교에서 수학클라스, 중국어 클라스, 체육 클라스가 있다고 하면 그 클라스에 맞는 용어, 학업내용, 진도가 있듯이 잘 정돈되어서 쓰여지는 언어입니다.
  • OOP (object-orientated language): OOP 는 규율이라고 큰 틀로 보면 되겠습니다. OOP는 4가지의 성질을 가지고 있는데 Abstraction, Encapsulation, Inheritance, polymorphism형식으로 코드를 짜게 되어있습니다.
  •  platform-independant: 어떠한 디바이스나 기기에서 사용할 수 있게 되있습니다. 자바 플랫폼에서 쓰여서 여러 플랫폼에 applications이 사용됩니다.
  • Multi-threading: 여러 일들을 한번에 처리할 수 있는 멀티타스킹이 됩니다.
  • High performance: C 와 C++언어로 쓰여지고 이 언어들만큼 빠르지 않지만 기능적으로 훨씬 뛰어납니다. 변환을 시키고 어느 플랫폼이든 연동이 쉽습니다. 에러가 나올 확율도 적습니다.
  • Frameworks: spring, hibernate처럼 이미 쓰여진 코드들을 불러오는 방식으로 빠르고 간편하게 쓸 수 있습니다.

여기까지 기본적인 자바에 대해서 알아 봤습니다.

이 외의 궁금하신 점은 댓글로 남겨주세요.

 

 

 

반응형

'프로그래밍' 카테고리의 다른 글

Postgres config file  (0) 2023.07.31

+ Recent posts