Tag Info

Hot answers tagged

12

Check out Why does the 'bin' user need a login shell? It says this pattern for system users is Common in Debian, and not so much in other distributions. Considered a bug / genuine security issue by several people. Required in order to run cron jobs as that user, and perhaps also by some scripts if they use su -c to run as this user. It should be ...


11

The short version You can safely install the PostgreSQL package from the backports. You'll probably get a stable piece of software that will not nuke your system. The longer version Debian comes in three flavours: stable, testing and unstable. See Debian Releases. You are apparently running Debian stable, which is the preferred release for a production ...


5

The same way you'd time any other shell command: use the time command. $ time pg_restore ... real 1m0.000s user 1m0.000s sys 0m0.000s Here, real is the elapsed wall clock time, which is probably the only meaningful value, since most of the work is being done in a separate process (the PostgreSQL server).


5

It's likely the result of this postgres bug: https://wiki.postgresql.org/wiki/May_2015_Fsync_Permissions_Bug


4

If you do not specify the hostname psql assumes domain socket connections. As per the man page: If you omit the host name, psql will connect via a Unix-domain socket to a server on the local host, or via TCP/IP to localhost on machines that don't have Unix-domain sockets. Try adding -h localhost to the psql command line. As to the Oracle error, I would ...


4

On Linux and with OpenJDK at least, the value returned by exitValue() is the same as what a shell like zsh or bash and most sh implementations (but not ksh93 or yash) would assign to its $? variable. That is, it's: if the process exited with exit(n) or return n from main(): the lower 8 bits of n (n & 0xFF). if the process was killed by signal n: n + ...


3

I installed Postgresql with the apt-get command. Do I have to create a postgres-user and change ownership of the installed postgresql files? No, you don't need to create postgre-user, postgresql package will automatically create the users that require. You can check using : getent passwd postgres or just grep in /etc/passwd file I see that the ...


3

When I use the useradd command I don't specify a password. [...] Does this mean that the user is disabled until it is done? Yes, if you don't specify a password hash using useradd's option -p, password-based login to the newly created account will be locked until you set a password using passwd. I installed Postgresql with the apt-get command. Do I ...


3

You might want to try the directions described in this post titled: Install latest PostgreSQL on Linux Mint. General steps: create /etc/apt/sources.list.d/pgdg.list containing: deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main Import the repository signing key, and update the package lists $ wget --quiet -O - ...


3

In my case I had two sets of databases some running on the old version of Postgresql 8.4 and other running on version 9.1. What I did was to locate pg_dump in Linux machine using the locate command below $locate pg_dump result /usr/bin/pg_dump /usr/bin/pg_dumpall /usr/lib/postgresql/8.4/bin/pg_dump /usr/lib/postgresql/8.4/bin/pg_dumpall ...


3

apt-get will upgrade to the packages available in the repository from the source that apt is configured to use. The postgresql-9.1 package is version 9.1.4 in the squeeze-backports repository. Add the following to /etc/apt/sources.list.d/backports.sources.list deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free Then ...


3

It would appear that you have your your syntax a bit backwards. rc.d usage: rc.d action daemon ... e.g: rc.d list rc.d help rc.d start sshd gpm So you would want to do rc.d start postgresql The rc.d script is simply for convenience. It makes starting multiple ...


3

The best method to incremental backup Postgres is to use periodic hot physical backups and continuous WAL archiving. http://www.postgresql.org/docs/9.1/static/continuous-archiving.html The periodic physical backup can be done with rsync using the --copy-dest= option to take advantage of any previous copy reusing unchanged files. This is a very effective ...


3

The protocol is plain TCP/IP. From posgresql documentation about "frontends" and "backends" protocol: PostgreSQL uses a message-based protocol for communication between frontends and backends (clients and servers). The protocol is supported over TCP/IP and also over Unix-domain sockets. Port number 5432 has been registered with IANA as the customary TCP ...


2

If the database servers are running, ask them: psql -l mysql <<< 'show databases' Just searching the filesystem for relational databases is not a trivial task.


2

Edit your PATH so that /usr/pgsql-9.1/bin/ (the newer one) comes before /usr/bin/. A less package-manager-safe safe alternative is to move/remove/rename the psql in /usr/bin/ and create a symlink in /usr/bin/ to the new one (not tested): > cd /usr/bin # move the old one however you like > ln -s /usr/pgsql-9.1/bin/psql .


2

Couple of options. Download .deb 9.1 from the Postgres site Take a look at this page titled: Linux downloads (Debian) - PostgreSQL. You can either download an updated .deb from the site directly, or re-point to their repository, and do a command like this: apt-get install postgresql-9.1 Debian backports You may be able to find specific versions here, ...


2

Add this to your sources.list: deb http://ftp.de.debian.org/debian/ wheezy main non-free contrib deb-src http://ftp.de.debian.org/debian/ wheezy main non-free contrib Make sure you use the appropriate mirror for your location. Run aptitude update or apt-get update and finish the installation. The interactive mode of aptitude is quite useful to solve ...


2

Like the comments in this answer suggest, just edit the file /etc/shadow as root (e.g. run sudo nano /etc/shadow in a terminal) and replace the hashed password in postgres's line with *. (If you don't have that line or that file, it'd be interesting to know which Linux distribution and nsswitch settings you use.)


2

Checklist: Have you reloaded/restarted the server after configuration changes? Is the firewall configured to pass TCP port 5432 from the client? Is PostgreSQL actually running on that port? Use netstat -tnlp | grep :5432 to find out. (run as root to get the program name) Is no other rule in pg_hba.conf blocking access? Are there any errors in your error ...


2

The following assumes that the unix user running psql has a postgresql account which is capable of accessing 'nm.table1'. If not, you will also need to provide authentication details to psql. The best way to do that is to have a ~/.pgpass file containing the authentication details. Anyway, once authentication is sorted out, getting data from psql queries ...


2

It is likely you have more than one version of PostgreSQL and the wrong version of psql is being used. Try sudo find / -name psql Then check the version of the files and use the right one by setting PATH. /usr/pgsql-9.3/bin/psql -V psql (PostgreSQL) 9.3.2 You can also try yum list installed | grep postgres to see which versions of PostgreSQL are ...


2

As I'm sure you know, Ubuntu is based upon Debian (Ubuntu releases are rebased against Debian testing periodically) and a there is a lot of similarity between the two. That said, they do differ in sometimes quite significant ways. For example, for many years Ubuntu used upstart as its default init system whereas Debian stuck to sysvinit (both use systemd as ...


2

# systemctl start postgresql.service Some environments would translate service <name> start to systemctl start <name>.service, but you don't have to rely on it.


2

See comments, but essentially removing some lingering configuration files which still pointed at /opt/pgAgent solved this. Suggest it is marked as answered. (OP did a manual cleanup of remaining configuration files and this enabled the install to work correctly)


1

It won't. You have 3 options if you want yum to deal with your new software. Option #1 - use deadly force Download the .rpm files that you're attempting to install and tell rpm to install them for you. You can do this using 1 or a combination of these 2 switches to get what you want. --nodeps do not verify package dependencies ...


1

It is Debian distribution policy that configuration files, binaries, and data are stored at these three different locations. There are various reasons for this, including: consistency between packages easier to tell which directories to back up, to audit, to tune, etc. could mount /usr read-only The reason the binaries are split over two directories has ...


1

This splitting is pretty typical for most services. I'm on Fedora but most distributions do the same in terms of organizing files based on their type, into designated areas. Taking a look at the Postgres SQL server: The configuration files go into /etc/ Executables go into /usr/bin Libraries go into /usr/lib64/pgsql/ Locale information goes into ...


1

I think what you're looking for is this product, it's open source and it's called dbmail. Based on it's description it sounds like exactly what you want: DBMail is an open-source project that enables storage of mail messages in a relational database. Currently MySQL, PostgreSQL, Oracle, and SQLite can be used as storage backends.


1

stefan@laptop ~ $ su - Password: laptop ~ # useradd example laptop ~ # su example example@laptop /root $ exit laptop ~ # logout stefan@laptop ~ $ su example Password: The user can only be logged in as root without a password. To log in as the postgre user try to su as root (if you have root). So try a: sudo su postgres and that should work.



Only top voted, non community-wiki answers of a minimum length are eligible