Port details |
- postgresql17-server PostgreSQL is the most advanced open-source database available anywhere
- 17.4_1 databases
=8 17.4_1Version of this port present on the latest quarterly branch. - Maintainer: pgsql@FreeBSD.org
 - Port Added: 2024-08-08 13:03:08
- Last Update: 2025-02-20 14:41:24
- Commit Hash: e30c064
- People watching this port, also watch:: postfix, dovecot, postgresql17-client, php84, mariadb114-server
- License: PostgreSQL
- WWW:
- https://www.postgresql.org/
- Description:
- PostgreSQL is a sophisticated Object-Relational DBMS, supporting
almost all SQL constructs, including subselects, transactions, and
user-defined types and functions. It is the most advanced open-source
database available anywhere. Commercial Support is also available.
The original Postgres code was the effort of many graduate students,
undergraduate students, and staff programmers working under the direction of
Professor Michael Stonebraker at the University of California, Berkeley. In
1995, Andrew Yu and Jolly Chen took on the task of converting the DBMS query
language to SQL and created a new database system which came to known as
Postgres95. Many others contributed to the porting, testing, debugging and
enhancement of the Postgres95 code. As the code improved, and 1995 faded into
memory, PostgreSQL was born.
PostgreSQL development is presently being performed by a team of Internet
developers who are now responsible for all current and future development. The
development team coordinator is Marc G. Fournier (scrappy@PostgreSQL.ORG).
Support is available from the PostgreSQL developer/user community through the
support mailing list (questions@PostgreSQL.ORG).
PostgreSQL is free and the complete source is available.
¦ ¦ ¦ ¦ 
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - Dependency lines:
-
- postgresql17-server>0:databases/postgresql17-server
- Conflicts:
- CONFLICTS:
- To install the port:
- cd /usr/ports/databases/postgresql17-server/ && make install clean
- To add the package, run one of these commands:
- pkg install databases/postgresql17-server
- pkg install postgresql17-server
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: postgresql17-server
- Flavors: there is no flavor information for this port.
- distinfo:
- TIMESTAMP = 1739873710
SHA256 (postgresql/postgresql-17.4.tar.bz2) = c4605b73fea11963406699f949b966e5d173a7ee0ccaef8938dec0ca8a995fe7
SIZE (postgresql/postgresql-17.4.tar.bz2) = 21519810
Packages (timestamps in pop-ups are UTC):
- Slave ports:
-
- databases/postgresql17-client
- databases/postgresql17-contrib
- databases/postgresql17-docs
- databases/postgresql17-plperl
- databases/postgresql17-plpython
- databases/postgresql17-pltcl
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- bison : devel/bison
- gmake>=4.4.1 : devel/gmake
- pkgconf>=1.3.0_1 : devel/pkgconf
- gettext-runtime>=0.22_1 : devel/gettext-runtime
- msgfmt : devel/gettext-tools
- perl5>=5.36<5.37 : lang/perl5.36
- Library dependencies:
-
- libicudata.so : devel/icu
- liblz4.so : archivers/liblz4
- libxml2.so : textproc/libxml2
- libzstd.so : archivers/zstd
- libpq.so.5 : databases/postgresql17-client
- libLLVM-15.so : devel/llvm15
- libintl.so : devel/gettext-runtime
- This port is required by:
- for Build
-
- databases/postgresql17-plpython
- databases/postgresql17-pltcl
- for Run
-
- databases/postgresql17-plperl
- databases/postgresql17-plpython
- databases/postgresql17-pltcl
Configuration Options:
- ===> The following configuration options are available for postgresql17-server-17.4_1:
DEBUG=off: Build with debugging support
DOCS=on: Build and/or install documentation
DTRACE=off: Build with DTrace probes
GSSAPI=off: Build with GSSAPI from base (security/krb5)
LDAP=off: Build with LDAP authentication support
LLVM=on: Build with support for JIT-compiling expressions
LZ4=on: Build with LZ4 compression support
NLS=on: Use internationalized messages
OPTIMIZED_CFLAGS=off: Builds with compiler optimizations (-O3)
PAM=off: Build with PAM Support
SSL=on: Build with OpenSSL support
TZDATA=off: Use internal timezone database
XML=on: Build with XML data type
ZSTD=on: Build with ZSTD compression support
===> Use 'make config' to modify these settings
- Options name:
- databases_postgresql17-server
- USES:
- bison perl5 tar:bzip2 cpe gmake pgsql:17 pkgconfig llvm:min=11,lib gettext ssl
- pkg-message:
- For install:
- For procedural languages and postgresql functions, please note that
you might have to update them when updating the server.
If you have many tables and many clients running, consider raising
kern.maxfiles using sysctl(8), or reconfigure your kernel
appropriately.
The port is set up to use autovacuum for new databases, but you might
also want to vacuum and perhaps backup your database regularly. There
is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that
you may find useful. You can use it to backup and perform vacuum on all
databases nightly. Per default, it performs `vacuum analyze'. See the
script for instructions. For autovacuum settings, please review
~postgres/data/postgresql.conf.
If you plan to access your PostgreSQL server using ODBC, please
consider running the SQL script /usr/local/share/postgresql/odbc.sql
to get the functions required for ODBC compliance.
Please note that if you use the rc script,
/usr/local/etc/rc.d/postgresql, to initialize the database, unicode
(UTF-8) will be used to store character data by default. Set
postgresql_initdb_flags or use login.conf settings described below to
alter this behaviour. See the start rc script for more info.
To set limits, environment stuff like locale and collation and other
things, you can set up a class in /etc/login.conf before initializing
the database. Add something similar to this to /etc/login.conf:
---
postgres:\
:lang=en_US.UTF-8:\
:setenv=LC_COLLATE=C:\
:tc=default:
---
and run `cap_mkdb /etc/login.conf'.
Then add 'postgresql_login_class="postgres"' to /etc/rc.conf, or
set it as the postgres user's login class in /etc/passwd.
======================================================================
To use PostgreSQL, enable it in rc.conf using
sysrc postgresql_enable=yes
To initialize the database, run
service postgresql initdb
You can then start PostgreSQL by running:
service postgresql start
For postmaster settings, see ~postgres/data/postgresql.conf
NB. FreeBSD's PostgreSQL port logs to syslog by default
See ~postgres/data/postgresql.conf for more info
NB. If you're not using a checksumming filesystem like ZFS, you might
wish to enable data checksumming. It can be enabled during
the initdb phase, by adding the "--data-checksums" flag to
the postgresql_initdb_flags rcvar. Otherwise you can enable it later by
using pg_checksums. Check the initdb(1) manpage for more info
and make sure you understand the performance implications.
- Master Sites:
|
Notes from UPDATING |
- These upgrade notes are taken from /usr/ports/UPDATING
- 2024-07-23
Affects: users of databases/postgresql* and other software using PostgreSQL to run Author: kbowling@FreeBSD.org Reason:
The default version of PostgreSQL has been switched from 15 to 16.
The upgrade procedure can use up twice the space the databases
currently needs. If you have a big amount of stored data take a
closer look at the manpage of pg_upgrade for avoidance and/or
speedup of the upgrade.
The upgrade instructions consider a basic usage and do not match
complex scenarios like replication, sharding, or similar.
Upgrade instructions:
First stop your PostgreSQL, create PostgreSQL-binaries and backup your data.
If you have another Version of PostgreSQL installed, for example 15, your
files are named according to this.
# service postgresql stop
# pkg create postgresql15-server postgresql15-contrib
# mkdir /tmp/pg-upgrade
# tar xf postgresql15-server-15.7.pkg -C /tmp/pg-upgrade
# tar xf postgresql15-contrib-15.7.pkg -C /tmp/pg-upgrade
# pkg delete -f databases/postgresql15-server databases/postgresql15-contrib databases/postgresql15-client
Now update PostgreSQL:
pkg user:
# pkg install databases/postgresql16-server databases/postgresql16-contrib
# pkg upgrade
Portmaster users:
# portmaster databases/postgresql16-server databases/postgresql16-contrib
# portmaster -a
Portupgrade users:
# portinstall databases/postgresql16-server databases/postgresql16-contrib
# portupgrade -a
After installing the new PostgreSQL version you need to convert
all your databases to new version:
# su -l postgres -c "/usr/local/bin/initdb --encoding=utf-8 --lc-collate=C -D /var/db/postgres/data16 -U postgres"
# su -l postgres -c "pg_upgrade -b /tmp/pg-upgrade/usr/local/bin/ -d /var/db/postgres/data15/ -B /usr/local/bin/ -D /var/db/postgres/data16/ -U postgres "
Now the migration is finished. You can start PostgreSQL again with:
# service postgresql start
ATTENTION:
1) If you use non-default initdb options, you have to adjust the initdb-command accordingly
|
Number of commits found: 10
Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
Commit | Credits | Log message |
17.4_1 20 Feb 2025 14:41:24
    |
Palle Girgensohn (girgen)  |
databases/postgresql??-*: Upgrade to latest versions
The PostgreSQL Global Development Group has released an update to all
supported versions of PostgreSQL, including 17.4, 16.8, 15.12, 14.17,
and 13.20.
The issues listed below affect PostgreSQL 17. Some of these issues may
also affect other supported versions of PostgreSQL.
Improve behavior of quoting functions in libpq. The fix for
CVE-2025-1094 caused the quoting functions to not honor their string
length parameters and, in some cases, cause crashes. This problem could
be noticeable from a PostgreSQL client library, based on how it is
integrated with libpq.
Fix small memory leak in pg_createsubscriber.
Also fix a problem in the FreeBSD port, where the rc script wouldn't
return properly, messing up orchestration tools like ansible. [1]
PR: 272502 [1]
Release notes: https://www.postgresql.org/docs/release/ |
17.3_1 14 Feb 2025 23:12:32
    |
Daniel Engberg (diizzy)  |
*/*: Bump consumers of devel/icu
...to avoid library mismatches |
17.3 13 Feb 2025 15:13:24
    |
Palle Girgensohn (girgen)  |
databases/postgresql??-*: Update to latest versions
The PostgreSQL Global Development Group has released an update to all
supported versions of PostgreSQL, including 17.3, 16.7, 15.11, 14.16,
and 13.19. This release fixes 1 security vulnerability and over 70 bugs
reported over the last several months.
For the full list of changes, please review the release notes.
This commit also removes the broken support for Heimdal and fixes the
build when using MIT Kerberos. [1]
PR: 220325 suggested by Cullum Smith and many others. [1]
Release notes: https://www.postgresql.org/docs/release/
Security: fadf3b41-ea19-11ef-a540-6cc21735f730 |
17.2 20 Jan 2025 12:14:02
    |
Michael Osipov (michaelo)  |
databases/postgresql1{3,4,5,6,7}-client: Recommend py-psycopg over py-psycopg2
Upstream Python package maintainers recommend using the psycopg 3.x over
psycopg2 for new projects since the latter is in maintenance mode only.
Approved by: girgen (pgsql)
Differential Revision: https://reviews.freebsd.org/D48493 |
17.2 21 Nov 2024 14:35:13
    |
Palle Girgensohn (girgen)  |
databases/postgresql??-*: Update to latest version
The issues listed below affect PostgreSQL 17. Some of these issues may
also affect other supported versions of PostgreSQL.
- Restore functionality of ALTER ROLE .. SET ROLE and ALTER DATABASE ..
SET ROLE. The fix for CVE-2024-10978 accidentally caused settings for
role to not be applied if they came from non-interactive sources,
including previous ALTER {ROLE|DATABASE} commands and the PGOPTIONS
environment variable.
- Restore compatibility for the timescaledb and other PostgreSQL
extensions built using PostgreSQL prior to the 2024-11-14 release
(17.0, 16.4, 15.8, 14.13, 13.16, 12.20, and earlier). This fix restores
struct ResultRelInfo to its previous size, so that affected extensions (Only the first 15 lines of the commit message are shown above ) |
17.1 14 Nov 2024 16:30:50
    |
Palle Girgensohn (girgen)  |
databases/postgresql??-*: Update to latest versions
PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 Released!
The PostgreSQL Global Development Group has released an update to all
supported versions of PostgreSQL, including 17.1, 16.5, 15.9, 14.14,
13.17, and 12.21. This release fixes 4 security vulnerabilities and over
35 bugs reported over the last several months.
Also add XML back as an active default option due to popular demand. [1]
Clean up the ports a bit.
PR: 269115 [1]
Release notes: https://www.postgresql.org/docs/release/
Security: a03636f4-a29f-11ef-af48-6cc21735f730
Security: 12e3feab-a29f-11ef-af48-6cc21735f730
Security: a61ef21b-a29e-11ef-af48-6cc21735f730
Security: 3831292b-a29d-11ef-af48-6cc21735f730 |
17.0 08 Oct 2024 15:16:35
    |
Palle Girgensohn (girgen)  |
databases/postgresql17: Remove build dependency on fop
It is only required when building the postgresql17-docs port.
PR: 281814 |
17.0 26 Sep 2024 13:48:48
    |
Palle Girgensohn (girgen)  |
databases/postgresql17-*: Update to 17.0
Release
notes: https://www.postgresql.org/about/news/postgresql-17-released-2936/ |
17.r1 05 Sep 2024 13:32:31
    |
Palle Girgensohn (girgen)  |
databases/postgresql17-*: Upgrade to RC1
Several bug fixes were applied for PostgreSQL 17 during the Beta 3
period. These include:
- Revert the MERGE/SPLIT partition feature.
- Fix for feature that improves performance around logical decoding of
subtransactions. For a detailed list of fixes, please visit the open
items [1] page.
[1]: https://wiki.postgresql.org/wiki/PostgreSQL_17_Open_Items#resolved_before_17rc1
Release
notes: https://www.postgresql.org/about/news/postgresql-17-rc1-released-2926/ |
17.b3 08 Aug 2024 13:02:46
    |
Palle Girgensohn (girgen)  |
databases/postgresql17-*: new ports: Beta of the new major version 17 of
PostgreSQL
Release notes: https://www.postgresql.org/docs/17/release-17.html |
Number of commits found: 10
|