| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pg_upgrade binary is not in postgresql-upgrade package now.
In some upgrade scenarios, postgresql-upgrade is redundant package
(SCLs/PGRPMSs). Hack the code so postgresql-setup is able to
correctly advice which package should be installed to make the
"old" engine available.
* postgresql-setup.in (upgrade): Don't check for pg_upgrade binary
existence but rather for postgres binary, and warn user with
proper package name if missing.
* share/postgresql-setup/library.sh.in (parse_upgrade_setup):
White-list also 'package' constant name.
* configure.ac: Bump version.
|
|
|
|
|
| |
* configure.ac: Version bump.
* NEWS: Document.
|
|
|
|
|
|
|
|
|
|
| |
Resolves: rhbz#1247477
* configure.ac (MOUNTPOINT): New configure-time variable.
* postgresql-setup.in: Warn if $pgdata or `dirname $pgdata` is
a mountpoint.
* NEWS: Document.
* README: Document that its better to have util-linux in BR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't always use '$upgradefrom_id' as "default" previous
service name. This broken in-place upgrades with
'--unit postgresqlPORT' (old style service files layout) or
'postgresql@port'. Now, by default, use the same service name
for both older and newer PG stack.
While we are on it, make it a bit more automatic and pick
'postgresql92@second' as "older stack" if upgrading into unit
'postgresql93@second'.
Add new option --upgrade-from-unit which allows us to override
default decision.
* postgresql-setup.in: Set 'option_upgradefrom_unit' to hopefully
correct default. Add new info message in case we are not
upgrading from differently named unit.
(USAGE_STRING): Document new --upgrade-from-unit option.
(service_configuration): Don't fork based on $mode and simply use
fourth parameter as 'service'. Fix the debug message a bit.
(long_opts): Add new option upgrade-from-unit.
* NEWS: Document.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit should resolve complaints against pg_ctl -w usage from
initscript (see rhbz#800534 for more info).
The problem is that pg_ctl -w can block whole system startup too
long - until the server is fully ready to accept connections. The
commit 8c7b2cd5f6d9efb59568382cd8b6e88d9be517bb thus invented
basically bad approach for initscript.
Now, the "-w" option is used only if the PGSTARTWAIT is explicitly
set to 1 by administrator. In this case, the PGSTARTTIMEOUT
numeric value (in seconds) is respected (or limit 30 seconds is
set by default).
Otherwise, if PGSTARTWAIT is unset (default), initscript keeps
checking only for the pidfile existence (at most PGSTARTTIMEOUT
seconds). The hardwired 'sleep 2' command (activated before
8c7b2cd5f6 commit) is still not used - regular/default system
startup should be a bit faster than before.
* postgresql.init.in (start): Fix handling of PGDATA, PGPORT,
PGOPTS and PGSCLS - to respect special quoting characters inside,
we should escape the strings before passing those to command
evaluation. Use printf %q as we use bash and we don't care too
much about portability. Also, don't call postgresql-ctl with -w
option if PGSTARTWAIT is empty or undefined. Implement pidfile
polling for the cases PGSTARTWAIT is unset. Return success faster
if server is already running.
($PGSTARTWAIT): New env variable.
* postgresql-ctl.in: Don't parse $PGPORT into -o option as it is
not needed. Unset PGPORT if the variable is empty - postgres
server would fail with empty value.
* configure.ac: Bump version to 3.3.
* NEWS: Document bugfixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not left created dropin directory in case of some initdb
failure, or so. This allow user run the same --new-systemd-unit
repeatedly without changing the command-line.
* postgresql-setup.in (exit_handler): New exit callback wrapper.
($cleanup_dropin): Code to be executed to clean drop-in directory.
(generate_systemd_dropin): Fill $cleanup_dropin callback.
(initdb): Clean $cleanup_dropin in case of successful initdb.
This is not needed for upgrade() because we never create drop-ins
there.
* NEWS: Document changes.
|
|
|
|
|
|
|
| |
* postgresql-setup.in (service_configuration): Move the setting of
pgdata into sysvinit-only branch.
* NEWS: Document fixed bug.
* configure.ac: Bump version to 3.2.
|
|
|
|
|
|
|
|
| |
* postgresql-setup.in (upgrade): Call old_data_in_use to ensure
that the old database server is not running.
(old_data_in_use): New function.
($cleaup): Rename to $failure_cleanup.
* NEWS: Document.
|
|
|
|
|
|
|
| |
* postgresql-setup.in (upgrade): Don't use --link option if we are
not doing in-place upgrade.
* NEWS: Document.
* configure.ac: Bump minor version.
|
|
|
|
|
|
|
| |
* postgresql-ctl.in: Respect PGSCLS env variable.
* postgresql.init.in: Export PGSCLS variable possibly sourced from
sysconfig configuration file.
* NEWS: Document.
|
|
|
|
|
|
|
|
|
| |
* postgresql.init.in (PGSTARTTIMEOUT): New variable.
(start): Use postgresql-ctl and respect PGSTARTTIMEOUT.
* postgresql.service.in: Better document the timeouts.
(PGSTARTTIMEOUT): New env variable.
(ExecStart): Respect PGSTARTTIMEOUT.
* NEWS: Document.
|
|
|
|
| |
* NEWS: See $subject.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its now configurable what software collections will be enabled for
pg_upgrade run, in case it is needed (new 'scls' option).
Similarly, pg_upgrade needs to be told to send
unix_socket_directories instead of unix_socket_directory to
PostgreSQL server built for RHEL.
* etc/postgresql-setup/upgrade/postgresql.conf: Add configuration
examples for new options.
* postgresql-setup.in (parse_upgrade_setup): Parse 'scls' and
'redhat_sockets_hack' options.
(upgrade): Adjust the environment of 'su - postgres' call to
pg_upgrade, optionally.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we do not consider the postgresql@ unit variants (that would
require libexec/initscripts/legacy-actions/postgresql@CONCRETE
symlink to the default legacy-scripts directory), there is no need
to do run-time checks.
* Makefile.am (upgrade): Create from legacy-sysv-script.in
template.
(initdb): Likewise.
(systemdlegacyscripts_DATA): Substitute with ..
(systemdlegacyscripts_SCRIPTS): .. this to have execute bit after
installation.
(GENERATED_FILES): Add _SCRIPTS variant for systemdlegacyscripts.
* legacy-sysv-script.in: New unified template for legacy scripts.
* initdb.in: Remove.
* upgrade.in: Likewise.
* NEWS: Document.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The setup script was reported to not work if user 'postgres' has
/sbin/nologin in /etc/passwd (explicitly set by administrator).
This configuration does not seem to be terribly useful but there
is no need to fail at all.
Resolves: rhbz#1122143
* postgresql-setup.in ($SU_L_POSTGRES): New wrapping variable,
using '-s /bin/sh' to bypass /sbin/nologin. This option should be
supported both by 'su' and 'runuser'.
* NEWS: Document.
|
|
|
|
|
| |
* NEWS: Mention previous commit.
* configure.ac: s/lt/le/.
|
|
|
|
|
| |
* NEWS: Mention legacy scripts.
* configure.ac (AC_INIT): Remove beta stamp.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now, if ./configure --with-sysvinit is done, we install init
script and do not install systemd files. Original patch written
by Jozef MlĂch (jmlich@redhat.com).
* Makefile.am (initscriptsdir, nodist_initscripts_DATA): New
variables. New postgresql.init target.
* configure.ac: Add --with-sysvinit option.
* postgresql.init.in: New sysvinit template.
* .gitignore: Mention postgresql.init.
* NEWS: Document.
|
|
|
|
|
| |
* NEWS: Adjust.
* configure.ac: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now, admin may run single command to instantiate secondary
PostgreSQL server.
* postgresql-setup.in: Reorganize a little to avoid processing
of port, datadir, etc. on different places. Process new options.
Also make some warnings more clear.
* postgresql-setup.in (warn_q, info_q): New echo wrappers.
(generate_systemd_dropin): New function.
(USAGE_STRING): Document new options.
* NEWS: Document changes.
|
|
|
|
|
|
|
|
|
|
|
| |
Because we rely on parsing of `systemctl show -p` outuput heavily,
we need to detect whether the service file or some dropin did not
change (or was not added). So from now we rather instruct admin
to do daemon-reload when something changed..
* postgresql-setup.in: Detect the NeedDaemonReload and warn if
yes.
* NEWS: Document.
|
|
|
|
|
|
|
|
| |
* postgresql-setup.in (USAGE_STRING): Mention --port option.
(initdb): Mention in info output the non-standard port, when used.
* postgresql-setup.in: Do not throw the default-port message
always, remved remaining sysconfig leftover.
* NEWS: Mention that env files are now supported.
|
|
|
|
| |
(and bump version to 0.9.2~beta)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If user removes currently provided /etc/postgresql/postgresql
configuration file, PGDATA env variable is not set. The
`systemctl start postgresql` would fail similarly to
`systemctl start postgresql@NOTCONFIGURED` when the configuration
file was not created yet with cryptic message
"Usage: ... "
Stop this behavior rather explicitly with proper error in
check-db-dir script.
Warn also user in similar fashion that the configuration should be
adjusted in case the PGDATA was set directly in service file.
|
|
|
|
|
|
| |
Follow the new processes - different options of postgresql-setup,
instantiable unit files. Simplify the documentation thanks to
the template.
|
|
|
|
| |
Merge changes with ChangeLog & NEWS files. Bump version.
|
|
This makes us to do some additional documentation, but it should
not be so hard.
|