PostgreSQL /etc/postgresql/9.6/main/environment

Original 📋 Debian 9 (Stretch) 7 lines

Works On

Viewing:
Debian 9 (Stretch)
Same on:
Other versions:

Details

Size
7 lines
MD5
a567730a646c4afdfc5cea58aa4bd49a
SHA256
1074010e46c5629825bdac2484052ddaec9b128e202c3861bc4d4f9c88cce9ec
/etc/postgresql/9.6/main/environment
# environment variables for postgres processes
# This file has the same syntax as postgresql.conf:
#  VARIABLE = simple_value
#  VARIABLE2 = 'any value!'
# I. e. you need to enclose any value which does not only consist of letters,
# numbers, and '-', '_', '.' in single quotes. Shell commands are not
# evaluated.

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/a567730a646c4afdfc5cea58aa4bd49a?hint=environment
wget:
wget -O environment https://exampleconfig.com/api/v1/config/original/a567730a646c4afdfc5cea58aa4bd49a?hint=environment

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/a567730a646c4afdfc5cea58aa4bd49a?hint=environment' /><config><app>PostgreSQL</app><os>Debian 9 (Stretch)</os><location>/etc/postgresql/9.6/main/environment</location><lines>7</lines><md5>a567730a646c4afdfc5cea58aa4bd49a</md5><sha256>1074010e46c5629825bdac2484052ddaec9b128e202c3861bc4d4f9c88cce9ec</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

Install PostgreSQL

Alpine Linux

sudo apk add postgresql

Debian

sudo apt update && sudo apt install postgresql

Red Hat Enterprise Linux

sudo yum install postgresql17-server

Ubuntu

sudo apt update && sudo apt install postgresql

File Location

File Path
/etc/postgresql/9.6/main/environment
Directory
/etc/postgresql/9.6/main/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this environment?

Use it to restore a missing default, confirm what shipped, or diff against your current PostgreSQL config.

How do I restore PostgreSQL defaults?

Download the file, back up the current one in /etc/postgresql/9.6/main/environment, replace it, then reload or restart PostgreSQL.

Is environment safe for production?

It is the vendor default for Debian 9 (Stretch). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Debian 9 (Stretch).

Can I use this for PostgreSQL troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.