Create a group for a system user (daemnos and program users like www-data, mysql...)
# addgroup --system jboss
Create a user (system user, without home -> See below the command, to the jboss group and no login shell)
| #include "postgres.h" | |
| #include <sys/file.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> | |
| #include "catalog/pg_type.h" | |
| #include "funcapi.h" | |
| #include "miscadmin.h" | |
| #include "postmaster/syslogger.h" |
| vinicius.schmidt@dls110:~$ export PGSERVICE=a4c_dump_test | |
| vinicius.schmidt@dls110:~$ psql9 | |
| psql9 (9.2.1, server 9.1.5) | |
| WARNING: psql9 version 9.2, server version 9.1. | |
| Some psql features might not work. | |
| Type "help" for help. | |
| a4c_dump_test=> \d | |
| No relations found. | |
| a4c_dump_test=> \l |
| vnxs:~ Vinnix$ dig www.facebook.com | |
| ; <<>> DiG 9.4.3-P3 <<>> www.facebook.com | |
| ;; global options: printcmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19911 | |
| ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;www.facebook.com. IN A |
| vnxs:~ Vinnix$ dig www.facebook.com | |
| ; <<>> DiG 9.4.3-P3 <<>> www.facebook.com | |
| ;; global options: printcmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 19977 | |
| ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;www.facebook.com. IN A |
| Looking about a weird scenario, when I try to restore only one table from a dump, | |
| but the restore does not work, without any errors. | |
| $ psql -d postgres | |
| psql (9.1.3) | |
| Type "help" for help. | |
| postgres=# create database my_poc; | |
| CREATE DATABASE | |
| postgres=# not null default nextval('testschema.testtable_id_seq'::regclass) |
| root (hd0) | |
| Filesystem type is ext2fs, using whole disk | |
| kernel /boot/vmlinuz-2.6.32-279.5.2.el6.x86_64 ro root=/dev/xvda1 init=/sbin/in | |
| it rootfstype=ext3 |
| [root@dls118 /usr/ports/irc/irchat-pj-emacs21]# ls -la | |
| total 0 | |
| [root@dls118 /usr/ports/irc/irchat-pj-emacs21]# cd .. | |
| [root@dls118 /usr/ports/irc]# rm -rf irchat-pj-emacs21/ | |
| g_vfs_done():ada0a[READ(offset=11719696384, length=4096)]error = 5 | |
| rm: irchat-pj-emacs21/: Directory not empty |
| postgres=# \l+ | |
| List of databases | |
| Name | Owner | Encoding | Collation | Ctype | Access privileges | Size | Tablespace | Description | |
| ------------+------------+----------+-----------+-------+-----------------------+---------+---------------+--------------------------- | |
| biocinese | site | LATIN1 | en_US | en_US | =Tc/site | 7078 kB | ts_biocinese | | |
| : site=CTc/site | |
| : qualidade=CTc/site | |
| curriculo | intranet | LATIN1 | en_US | en_US | | 21 MB | ts_curriculo | | |
| firewall | giovanni | LATIN1 | en_US | en_US | | 5670 kB | ts_firewall | | |
| intranet | intranet | LATIN1 | en_US | en_US | intranet=CTc/intranet | 2167 MB | ts_intranet | |
| 240c240 | |
| < logging_collector = off # Enable capturing of stderr and csvlog | |
| --- | |
| > logging_collector = on # Enable capturing of stderr and csvlog | |
| 248c248 | |
| < log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, | |
| --- | |
| > log_filename = 'postgresql-%a.log' # log file name pattern, | |
| 268c268 | |
| < silent_mode = on # Run server silently. |