2001-07-25 08:16:46 +00:00
|
|
|
Using PostgreSQL in an OpenBSD environment
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2006-10-29 08:27:05 +00:00
|
|
|
At least two different accounts are involved when working with PostgreSQL:
|
2007-06-07 20:39:51 +00:00
|
|
|
One is an OpenBSD userid, '_postgresql', which is used as the userid of files
|
2006-10-29 08:27:05 +00:00
|
|
|
that are part of PostgreSQL. The other, usually named 'postgres', is not an
|
|
|
|
OpenBSD userid, i.e. you will not find it in /etc/passwd, but an account
|
|
|
|
internal to the database system. The 'postgres' account is called the dba
|
|
|
|
account (database administrator) and is created when a new database is
|
|
|
|
initialized using the initdb command.
|
|
|
|
|
2006-10-18 13:54:22 +00:00
|
|
|
If you are installing PostgreSQL for the first time, you have to create
|
|
|
|
a default database first. In the following example we install a database
|
|
|
|
in /var/postgresql/data with a dba account 'postgres' and md5 authentication.
|
|
|
|
We will be prompted for a password to protect the dba account:
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2003-06-23 19:11:10 +00:00
|
|
|
# su - _postgresql
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
$ mkdir /var/postgresql/data
|
2006-10-18 13:54:22 +00:00
|
|
|
$ initdb -D /var/postgresql/data -U postgres -A md5 -W
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
|
2006-10-29 08:27:05 +00:00
|
|
|
It is strongly advised that you do not work with the postgres dba account
|
|
|
|
other than creating more users and/or databases or for administrative task.
|
|
|
|
Use the PostgreSQL permission system to make sure that a database is only
|
|
|
|
accessed by programs/users that have the right to do so.
|
|
|
|
|
2006-10-18 13:54:22 +00:00
|
|
|
Please consult the PostgreSQL website for more information, especially when
|
|
|
|
you are upgrading an existing database installation.
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
|
|
|
|
Auto Start and Stop
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2006-10-18 13:54:22 +00:00
|
|
|
To start PostgreSQL at boot and shut it down when the system shuts down,
|
|
|
|
add the following lines to /etc/rc.local and /etc/rc.shutdown, respectively:
|
|
|
|
|
|
|
|
/etc/rc.local:
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
if [ -x !!PREFIX!!/bin/pg_ctl ]; then
|
2007-05-18 16:21:30 +00:00
|
|
|
echo -n ' postgresql'
|
2006-10-09 12:22:53 +00:00
|
|
|
su -l _postgresql -c "nohup !!PREFIX!!/bin/pg_ctl start \
|
2006-10-18 13:54:22 +00:00
|
|
|
-D /var/postgresql/data -l /var/postgresql/logfile \
|
2007-05-18 16:21:30 +00:00
|
|
|
-o '-D /var/postgresql/data' >/dev/null"
|
1999-11-11 02:40:05 +00:00
|
|
|
fi
|
|
|
|
|
2006-10-18 13:54:22 +00:00
|
|
|
/etc/rc.shutdown:
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
|
|
|
|
if [ -f /var/postgresql/data/postmaster.pid ]; then
|
2003-06-23 19:11:10 +00:00
|
|
|
su -l _postgresql -c "!!PREFIX!!/bin/pg_ctl stop -m fast \
|
2006-10-18 13:54:22 +00:00
|
|
|
-D /var/postgresql/data"
|
2001-07-25 08:16:46 +00:00
|
|
|
rm -f /var/postgresql/data/postmaster.pid
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
fi
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
Network Connections and Tuning
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
To allow connections over TCP (and other options) edit the file:
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
/var/postgresql/data/postgresql.conf
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
and also edit the pg_hba.conf (in the same directory) making the
|
|
|
|
appropriate changes to allow connection from your network.
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2001-07-25 08:16:46 +00:00
|
|
|
The default sizes in the GENERIC kernel for SysV semaphores
|
|
|
|
are not really large enough for a database with more than a
|
|
|
|
handful of connections. A server running such a database should
|
2004-07-26 10:10:46 +00:00
|
|
|
have at least the following in /etc/sysctl.conf:
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2004-07-26 10:10:46 +00:00
|
|
|
kern.seminfo.semmni=256
|
|
|
|
kern.seminfo.semmns=2048
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
To serve a large number of connections (>250), you may also need
|
|
|
|
to increase the maximum shared memory segment size, on the i386
|
|
|
|
try:
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2004-07-26 10:10:46 +00:00
|
|
|
kern.shminfo.shmmax=50331648 # this is 48MB.
|
|
|
|
# default on i386 is 32MB
|
|
|
|
# other archs will vary
|
|
|
|
|
|
|
|
These numbers should be tuned depending on system use. You will also
|
|
|
|
need to tune the values in the postgresql.conf file to increase the
|
|
|
|
number of connections to the backend.
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2004-07-26 10:10:46 +00:00
|
|
|
By default, the _postgresql user, and so the postmaster and backend
|
|
|
|
processes run in the login(1) class of "daemon". On a busy server,
|
2005-12-31 10:40:39 +00:00
|
|
|
it may be advisable to put the _postgresql user and processes in
|
2004-07-26 10:10:46 +00:00
|
|
|
their own login(1) class with tuned resources, such as more open
|
|
|
|
file descriptors etc.
|
1999-11-11 02:40:05 +00:00
|
|
|
|
2004-07-26 10:10:46 +00:00
|
|
|
For example, add this to the login.conf(5) file:
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
postgresql:\
|
|
|
|
:openfiles-cur=768:\
|
2004-07-26 10:10:46 +00:00
|
|
|
:tc=daemon:
|
|
|
|
|
|
|
|
Rebuild the login.conf.db file if necessary:
|
|
|
|
|
|
|
|
# cap_mkdb /etc/login.conf
|
|
|
|
|
|
|
|
Change the login class with either vipw(8) or chsh(8).
|
1999-11-11 02:40:05 +00:00
|
|
|
|
Upgrade to postgresql 7.1. ok'd espie@
* The package is now called `postgresql' and not `pgsql'.
* The default user that is suggested for the admin account is also
`postgresql'. This will work with OpenBSD-current with long username
support. If anything breaks please report to the maintainers.
* pgwrap is no longer shipped or supported
* Please note, you will HAVE TO BACKUP your old data if you are
upgrading from a previous release of postgresql. Do this before
removing the old pgsql package.
From the announcement last weekend:
Key New Features and Capabilities of Version 7.1 Include:
* Write-ahead Log (WAL) increases data integrity and processing
speed. To maintain database consistency in case of an operating
system crash, previous releases of PostgreSQL have forced all all
data modifications to disk before each transaction commit. With
WAL, only one log file must be flushed to disk, greatly improving
performance. (Tech note: can eliminate use of -F in to disable disk
flushes)
* TOAST (The Oversized-Attribute Storage Technique) Past releases
had compiled-in row length limit typically between 8Kb & 32Kb. This
restriction made storage of long text fields difficult, cumbersome
and slow. TOAST enables rows of any length while maintaing the high
performance PostgreSQL users have come to expect.
* SQL92 Outer Joins are now supported. (Tech note: eliminates the
UNION/NOT IN workaround)
* 64-bit C Language Function Manager support The previous C function
manager did not handle support 64-bit CPU's (e.g. Alpha, Sun,
Itanium). (Tech note: This change should not impact existing custom
functions developed for past versions, but performance will be
improved through rewriting to use the new call interface.)
* Complex Queries that are better, stronger and faster Many complex
queries were unsupported in previous releases. With v7.1 combinations
of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables are enabled. Inherited tables are now accessed by default,
and subqueries in FROM are now supported.
2001-04-21 18:25:42 +00:00
|
|
|
For more than about 250 connections, these numbers should be
|
|
|
|
increased. Please report any changes and experiences to the package
|
|
|
|
maintainers so that we can update this file for future versions.
|
2006-10-29 08:27:05 +00:00
|
|
|
|
2006-10-29 09:29:29 +00:00
|
|
|
Kerberos authentication
|
|
|
|
|
|
|
|
By default the postgresql server requires it's own krb5.keytab file. It
|
|
|
|
should be readable only by the _postgresql user. The default location of
|
|
|
|
the file is '/etc/postgresql/krb5.keytab' but is tunable by setting the
|
|
|
|
krb_server_keyfile line in postgresql.conf.
|
|
|
|
|
|
|
|
To generate the keytab:
|
|
|
|
|
|
|
|
# mkdir /etc/postgresql
|
2006-10-31 06:50:24 +00:00
|
|
|
# ktutil -k /etc/postgresql/krb5.keytab get postgres/server.domain
|
2006-10-29 09:29:29 +00:00
|
|
|
# chown _postgresql:_postgresql /etc/postgresql/krb5.keytab
|
|
|
|
|
2006-10-29 08:27:05 +00:00
|
|
|
Clients/Frontends
|
|
|
|
|
|
|
|
Many applications can use the PostgreSQL database right away. To faciliate
|
|
|
|
administration of a PostgreSQL database, two clients are notable:
|
|
|
|
|
|
|
|
www/phppgadmin A web based user interface that uses PHP5
|
|
|
|
databases/pgadmin3 A graphical user interface that uses wxWidgets
|