Technology Insights

What do pts and tty Mean on Linux? What is the Difference Between The Two Terminal Types?

I have been asked the question numerous times of what PTS and TTY mean in Linux regarding terminals. People ask because they may be newer to Linux and learning how to view a process list they may actually see a serial connection, SSH connection, or a telnet connection in the process list that might show something like pts/0, pts/2, tty1, or tty2 in the TTY column. Most processes will just have a question mark in this column but if something is connected to an actual terminal then it will list where it is connected in the TTY column of “ps”.

Technology Errors

PostgreSQL SkyTools walmgr: CDTWARNING: archive_mode enabled, yet archive_command is not set

If you are running walmgr for log shipping with PostgreSQL and you see the below error in your postgresql.log file it is because you are missing the recovery.conf file. The recovery.conf file should be located in your data directory on the slave server which typically is /var/lib/pgsql/data.

CDTWARNING: archive_mode enabled, yet archive_command is not set

This means you probably have not run the below command as the postgres user on the slave server which is the command that actually generates the recovery.conf file.

Technology Insights

How to Upgrade PostgreSQL SkyTools walmgr from 2.1.x to 2.1.9

Upgrading is easy since really this is just a python script. The most complicated part of the upgrade process will be keeping your database cluster up. Follow the below steps and you should avoid any downtime.

  1. Download Latest SkyTools: Visit PgFoundry to download the latest SkyTools. Issue the below command from /usr/local/src on each server.

    1. wget

Technology Errors

PostgreSQL SkyTools walmgr: Can’t boot Slave: DEBUG Only single loop requested, exiting

I ran into a silly error tonight during some configuration changes for PostgreSQL that took me awhile to figure out so I wanted to share so it might save others some time in the future. In an attempt to boot the slave server in a PostgreSQL SkyTools walmgr configuration I was unable to get it operational. The server would seem like it was stopping recovery mode however I was unable to login and the recovery process was still showing. Eventually I used the verbose switch to see if I could gain more information about why it was not booting up and the output is below.

Command: conf/wal-slave.ini boot -v

2009-04-22 01:24:22,949 3899 INFO Stopping recovery mode
2009-04-22 01:24:22,949 3899 DEBUG Using pg_auth file from master.
2009-04-22 01:24:22,950 3899 DEBUG Execute cmd: ‘cp’ ‘/var/lib/pgsql/walshipping/logs.complete/pg_auth’ ‘/var/lib/pgsql/data/global/pg_auth’
2009-04-22 01:24:22,955 3899 DEBUG Only single loop requested, exiting