Future breakpoints
Set break point on future shared library:set breakpoint pending on
Debug fork
To hold the forked process by gdb and not allow it to run independently:
set detach-on-fork off
set breakpoint pending on
set detach-on-fork off
Open the document in vim, press v and move to select text and then press one of the following:
U - converts to upper case u - converts to lower case ~ - toggles the case of selected
ggVGureplace u with U for uppercase and ~ to toggle.
vim ~/.psqlrcand add the following to the file
\timingWhen you connect to database and run a query, the time is also displayed:
postgres=# SELECT current_timestamp;
now
----------------------------------
2014-03-11 10:34:40.378455+05:30
(1 row)
Time: 43.821 ms
:let @a=1 | %s/<old_word>/\='<new_word>'.(@a+setreg('a',@a+1))/g
$ cd <rpm_download_dir>
$ su
Password:
# rpm -ivh pgdg-centos91-9.1-4.noarch.rpm
# yum install postgresql91-server postgresql91If yum install fails with 'PG key retrieval failed: [Errno 14]' then perform the steps mentioned at http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x before trying again.
# /etc/init.d/postgresql-9.1 initdb
# service postgresql-9.1 start
# su postgres
bash-4.1$ psql
psql (9.1.11)
Type "help" for help.
$ cd <rpm_download_dir>
$ su
Password:
# rpm -ivh <rpm_name>.rpm
# rpm -e postgresql91-server postgresql91
# rm -rf /var/lib/pgsql/
$ CFLAGS="-g -O0" ./configure --enable-debug --enable-cassert --enable-depend --prefix=<install_path> --with-openssl
$ make
$ make install
$ cd <postgres_install_path>/bin
$ ./initdb -d <cluster_path>
ssl = on
$ cd <cluster_path>
$ openssl req -new -text -out server.reqEnter a pass phrase (at least 4 char long).
$ openssl rsa -in privkey.pem -out server.keyEnter the same pass phrase entered before.
$ openssl req -x509 -in server.req -text -key server.key -out server.crt
$ chmod og-rwx server.key
$ cd <postgres_install_path>/bin
$ ./pg_ctl -D <cluster_path> start
$ ./psql "sslmode=require host=localhost dbname=postgres"
psql (9.2.5)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
postgres=#