Problem seems to be with start-stop-daemon from openrc and with its (incomplete) functionality of sending multiple termination signals (my guess). The corresponding /etc/init.d/postgresql part: stop() { ebegin "Stopping PostgreSQL" # Note: we have to do --oknodo here, otherwise it will always fail # when there are open transactions. This bug has been corrected # in baselayout-1.13.0_alpha8. start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \ --retry -TERM/${WAIT_FOR_DISCONNECT}/-INT/${WAIT_FOR_CLEANUP}/-QUIT --oknodo eend $? } Database server receives SIGTERM (verified with postgresql debug5 log) and shuts down cleanly, but start-stop-daemon returns 'failed' status. Reproducible: Always Steps to Reproduce: Actual Results: lebrodyl data # /etc/init.d/postgresql stop * Stopping PostgreSQL ... [ !! ] * ERROR: postgresql failed to stop lebrodyl log # emerge --info Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6 x86_64) ================================================================= System uname: 2.6.25-gentoo-r6 x86_64 Intel(R) Pentium(R) 4 CPU 3.20GHz Timestamp of tree: Sat, 12 Jul 2008 04:45:02 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r13 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r2 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -fexpensive-optimizations -fomit-frame-pointer -pipe -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=nocona -O2 -fexpensive-optimizations -fomit-frame-pointer -pipe -msse3" DISTDIR="/usr/portage/distfiles" FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://src.gentoo.pl" LANG="en_US.utf8" LC_ALL="pl_PL.utf8" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="7zip X a52 aac accessibility ace acpi additions alsa amd64 apache2 bash-completion branding bzip2 cddb cli cracklib crypt cups curl dbus divx dri dv dvd dvdr dvdread dynamic encode exif ffmpeg fontconfig ftp gadu gd gif glibc-omitfp gnokii hal history iconv javascript jpeg kde kdeenablefinal kdehiddenvisibility kdexdeltas kickoff lm_sensors mad mbox midi mng mp3 mplayer mudflap ncurses no-net2 nolvm1 nonfsv4 nptl nptlonly nsplugin ogg openal openexr opengl openmp pam pch pcre pg-intdatetime png postgres qt3 qt3support quicktime rar rdesktop readline reiserfs rtc sensord session sms sndfile sockets spell spl srt sse sse2 ssl svg symlink theora threads threadsonly tiff toolkit-scroll-bars truetype unicode urandom usb utempter vorbis x264 xcomposite xorg xpm xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon radeonhd" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
It's a bad init script. Not an issue with s-s-d.
right, removing --oknodo does the thing
em, I'll probably close this as won't fix. Please use dev-db/postgresql-server instead of dev-db/postgresql
If dev-db/postgresql (not splitted postgresql ebuild) going to be removed from portage soon? If not I guess it would be better to add baselayout-2 support (remove --oknodo from init.d script when baselayout-2 detected) just to avoid further problems when eventually baselayout-2 hits stable. I examined init script from dev-db/postgresql-server (splitted ebuild) and it seems that it intentionally deprecates the one from dev-db/postgresql - or it's just lack of cohesion? Going for splitted ebuild in anyway good idea. And I guess that all 8.x versions are keyword masked just to avoid being auto installed due to database cluster incompatibility with latest 'stable' - not for stability issues (I haven't encountered single crash). cheers
(In reply to comment #4) > If dev-db/postgresql (not splitted postgresql ebuild) going to be removed from > portage soon? I hope so, yes. > If not I guess it would be better to add baselayout-2 support > (remove --oknodo from init.d script when baselayout-2 detected) just to avoid > further problems when eventually baselayout-2 hits stable. > I examined init script from dev-db/postgresql-server (splitted ebuild) and it > seems that it intentionally deprecates the one from dev-db/postgresql - or it's > just lack of cohesion? Intentional. A lot of bugs are solved with the new (splitted) ebuilds. > Going for splitted ebuild in anyway good idea. > And I guess that all 8.x versions are keyword masked just to avoid being auto > installed due to database cluster incompatibility with latest 'stable' - not > for stability issues (I haven't encountered single crash). > cheers > No, it's just lack of time that we didn't mark those stable. I'll do that as soon as I have time. The problem of the db cluster incompatibility is not a problem anymore with the splitted ebuilds since they're also slotted. Means you can install 7.4,8.{0,1,2,3} side-by-side and then do the pgdump/pgload.