pg_ctl always shuts down the database cleanly unless used in immediate mode . So as long as you use -m fast or -m smart (default), your database will remain consistent (no data loss) and startup without any issues later on.
On Thu, Nov 6, 2014 at 3:49 PM, Mitchell Bösecke <mitchell.bosecke@xxxxxxxxxxx> wrote:
Thanks for any information,Hi,In my case, I WANT the pg_ctl command to hang until all files are archived because immediately after I issue "pg_ctl stop" I want to be able to unmount the disk that the archived logs are being copied to.
My understanding is that when postgresql is shutdown it triggers a checkpoint which triggers the archiving of completed tx logs. Will the "pg_ctl stop" command wait for archiving to complete or is the act of archiving completely asynchronous from the shutdown process?
Mitchell--Mitchell Bosecke, B.Sc.Software DeveloperFORCORP#101, 11710 Kingsway NWEdmonton , AB, T5G 0X5