Objective. Students install PostgreSQL on a Linux server VM, verify the service is running, and identify physical and electrical hazards in a server-room environment.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
A server room is an electrical environment first and a computing environment second. Before you log in to a single terminal, you need to understand the physical hazards present and how to control them.
Electrical hazards. Server racks carry high-voltage AC power from PDUs (Power Distribution Units) and UPS (Uninterruptible Power Supply) systems. Locate the main electrical panel and any secondary breaker panels on your first walk-through. Never open a panel yourself unless you are a licensed electrician. If a device must be powered down for hardware work, follow your site's lockout/tagout (LOTO) procedure: de-energize the circuit, lock the breaker with your personal lock, and tag it before any hands-on work begins. This is an OSHA-recognized control for preventing unexpected re-energization.
Electrostatic discharge (ESD). Static electricity can destroy storage drives, RAM, and NIC cards instantly and silently. Any time you handle an exposed circuit board, RAM stick, drive, or NIC, put on an ESD wrist strap and connect it to the rack's grounding point before touching the component. Do not walk across carpet, then handle hardware without re-grounding.
Raised floors and cable management. Many data centers use raised-floor systems. Tiles can be removed for cabling and left open, creating fall hazards. Watch for open floor tiles, unsecured cable bundles, and sharp rack edges. Safety shoes with reinforced toes protect against dropped equipment—servers can weigh 30 lbs or more per rack unit.
Proper lifting. Use your legs, not your back. Keep the load close to your body. For equipment over roughly 35–40 lbs, use a two-person lift or a server-lift cart. Rack-mount rails should be fully extended and locked before sliding a server in or out.
Environmental awareness. Server rooms run cold (typically 65–75 °F) for equipment protection. Hot and cold aisles channel airflow; standing in a hot aisle for extended periods in front of exhaust can cause discomfort. Emergency exits, fire suppression system controls (often gaseous suppression—do not block the discharge nozzles), and eyewash stations should be identified on your walkthrough.
Complete every field on the signed safety log before beginning any hands-on lab work. Your instructor will not sign off on the lab without it.
---
PostgreSQL is a multi-process relational database management system (RDBMS). Understanding its process model helps you diagnose problems, tune performance, and interpret log files.
The postmaster process is the parent of all other PostgreSQL processes. It listens for incoming client connections on a configured TCP port (default 5432) and forks a new backend worker process for each accepted connection. The backend worker handles SQL parsing, planning, and execution for that single client session. When the session ends, the backend exits.
Background worker processes handle essential ongoing tasks:
On-disk directory structure ($PGDATA).
`$PGDATA` is the root of the PostgreSQL data directory, set at `initdb` time (commonly `/var/lib/pgsql/<version>/data/` on RPM-based systems or `/var/lib/postgresql/<version>/main/` on Debian/Ubuntu). Inside you will find:
This entire directory must be owned by the `postgres` OS user, with permissions `700`. If any other user can read it, you have a security misconfiguration.
---
The PostgreSQL Global Development Group (PGDG) maintains official package repositories for both RPM-based (Rocky Linux, RHEL, Fedora) and Debian-based (Ubuntu, Debian) distributions. Using the PGDG repo—rather than the distribution's default repo—gives you the current stable release and clean upgrade paths.
General steps (Rocky Linux example):
1. Install the PGDG RPM repo package for your OS version from [postgresql.org/download](https://www.postgresql.org/download/).
2. Disable the built-in PostgreSQL module so it does not conflict: `sudo dnf -qy module disable postgresql`.
3. Install the server package: `sudo dnf install -y postgresql16-server`.
4. Initialize the data directory: `sudo /usr/pgsql-16/bin/postgresql-16-setup initdb`.
5. Enable and start the service: `sudo systemctl enable --now postgresql-16`.
Verifying the service. Run `systemctl status postgresql-16` and confirm `Active: active (running)`. Check that `$PGDATA` is owned by `postgres:postgres` with permissions `drwx------` using `ls -ld $PGDATA`.
Service control commands. You can manage the service two ways. `systemctl` is the standard systemd interface (`start`, `stop`, `restart`, `reload`). `pg_ctl` is PostgreSQL's own utility and gives you finer control—useful for scripting or when systemd is not available (`pg_ctl start -D $PGDATA`, `pg_ctl reload -D $PGDATA`).
Capture all terminal output as evidence for your lab submission.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.