PostgreSQL debugging Raiders

xiaoxiao2021-04-03  207

Need software: First of all, of course, the source code of PostgreSQL, this can go to www.postgresql.org above Down, now the latest should be 8.1.3, I am currently using the 8.1.1 version; other compiled development packs must not be less, this Different versions of each Linux come (APT-GET or RPM package), of course, it has been installed by default on most systems; and DDD is also necessary. This is a graphical GDB, and the newcomer is still from graphics Starting to get better. Step: 1. Obviously, our first step is to compile the PostgreSQL source code, unpack the compressed source code, don't need me to say it, unzipped folders are PostgreSQL-8.1 .1. After entering the folder, first, configure is configure, used to generate a Makefile file, execute the command ./configure --enable-debug --enable-assert --without-readline --without-zlib pay attention to here - -enable-debug key, it opens the GCC-intend option to generate symbols required by debugger. - Enbale-Cassert is used to open Assert's options, which is used for debugging. As --Without-Readline --without- Zlib, can not add, usually does not support readline and zlib, so if configure can't go, see the prompt to decide whether it is necessary to add these two .ok, the next step is to compile, this is simple, only simple Typing the Make command, wait for the system to compile, usually 5-10 minutes, if the system is almost possible, it may be long. This step is equal to the installation, the same simple, make install Get it. By default, it will be installed in / usr / local / pgsql / directory, until this, the installed task is completed. 2. Does the system do not have a Postgres group and a Postgres user, if not, you need to use super users to create a reorganization And users, because the database requires Postgres users, pay attention to the superuser. Then you need to create a folder for storing the data file, it is recommended to put it under / usr / local / pgsql, but it is not necessary, the user of the folder and The group must be postgres. Next, execute the command: INitdb -d data folder is used to initialize the database template template0 and other database files. 3. You can run DDD below .DDD / usr / local / pgsql / bin / Postgres & Haha, is it? The window came out, there is an source code. Then program-> run, fill in Test in Run with Arguments in the pop-up window, then enter the box, then look at the box, appear PostgreSQL Stand-alone backend 8.1.1backend> to So far, our task is completed, as for the Detailed debugging process of DDD to discuss or find the help documentation yourself.

转载请注明原文地址:https://www.9cbs.com/read-131653.html

New Post(0)