Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3rLJ-0004ap-1X for pgsql-admin@arkaria.postgresql.org; Thu, 27 Apr 2017 21:52:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3rLI-0003I4-Fd for pgsql-admin@arkaria.postgresql.org; Thu, 27 Apr 2017 21:52:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d3rJU-00008Y-9I for pgsql-admin@postgresql.org; Thu, 27 Apr 2017 21:51:00 +0000 Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d3rJL-00017o-KG for pgsql-admin@postgresql.org; Thu, 27 Apr 2017 21:50:59 +0000 Received: by mail-it0-x22d.google.com with SMTP id 70so6387693ita.0 for ; Thu, 27 Apr 2017 14:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=educationalmeasures-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=NbIrokpYYe5RuGPmifY2LLjf5ggvzwTx/eSKyqBSqTU=; b=vv/ttvUS+Xn6YwJT6XNlgKHcF1doeP7Pc65slBMbhkNxtV7x2AQMXf1bthyk5WZsfA F6HKuG0WfkWDxImi99oUPXSUCExXOM4/uxMEkLJdaGp64ZvIuCOoifvKSWnwOy8yEDs5 +EQQQ+HH/hnRR07HaQKVeB6f24dBFQg/s/Bk7rIFsQMxoXIwz1qA7KshN6K1HOeWS8sI lC/nle9x3zkyR/K1M/bo19HLBnsWsdInDPBC8KU69n0v8BP8t0cflpf/fDnER8Vj47zV 6DWpy64fdZRxl9OOZigZkh2sf83bq/eNLYDzwwWJ2zMIvyTLjwcfPov5tGNP5MhLFIpE gmAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=NbIrokpYYe5RuGPmifY2LLjf5ggvzwTx/eSKyqBSqTU=; b=ErBoWT2KyDrD7+BPzznHoXQ2VDEqBJddWUaO2R9R0VM54GJDbJcSPtmSXYYBJ6ebea eHaS3tV0gfxzgyD2odi8TnExPE5o79I44SJVvHiBF6Z8wJCWx5fl5YedS1LQ39NCeuFW kApT8+z1EdEhrkNmKUNszTR19eqy72AmsDo/vShwgIUIHrJec55m74GjUmYUYePmX8O7 CwHXDN9l0w0N+lJEAkL5nrowQYzxGN26T8zrYIY95k5FaKPvyKU9f1fC0LZoZkaOwhc2 aD1G++QDERFx52QwOQl5xNFgjOvA3zAzIILV2sAsAomPrLNnOhJy6MMGvNKvPtwAdSah 1Dug== X-Gm-Message-State: AN3rC/7srMPtvmedIFr9UN32orKvq1WgrN8Mf/VoXaB/mQP7Pg6Ik4MJ flP0r5+6rdaHOHnF X-Received: by 10.36.4.79 with SMTP id 76mr10766itb.62.1493329849540; Thu, 27 Apr 2017 14:50:49 -0700 (PDT) Received: from [10.1.20.35] (96-81-52-113-static.hfc.comcastbusiness.net. [96.81.52.113]) by smtp.gmail.com with ESMTPSA id 195sm1746737itk.10.2017.04.27.14.50.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 14:50:49 -0700 (PDT) From: Andrew Foster Message-Id: <97DA662B-D41B-4C0A-AAAD-DC1702C7A7EE@educationalmeasures.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_B06EA2A2-4CB2-436C-A6E6-6D37C3C0D3C4" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Unable to start postgres instance. Date: Thu, 27 Apr 2017 15:50:48 -0600 In-Reply-To: Cc: "Hunley, Douglas" , "pgsql-admin@postgresql.org" To: "Gone, Sajan" References: X-Mailer: Apple Mail (2.3273) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail=_B06EA2A2-4CB2-436C-A6E6-6D37C3C0D3C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Afternoon Sajan, I would try setting your wal_keep_segments to a higher value on the = master server. Depending on available HDD space on the master, you = should be able to keep a few dozen without any issues. Also, here is a = link to a resource that helped me with replication and seems to be a bit = better than the one you included upthread. = https://wiki.postgresql.org/wiki/Streaming_Replication = Best, Andrew Foster | Educational Measures, LLC Database Administrator 7100 E. Belleview Ave, Suite 350 Greenwood Village, CO 80111 303-548-6516 afoster@educationalmeasures.com > On Apr 27, 2017, at 3:43 PM, Gone, Sajan wrote: >=20 > Hi Douglas,=20 >=20 > Appreciate your help. >=20 > 'hot_standby =3D on' set up was already made but I restarted the = server just in case, however I am still getting the same error.=20 >=20 > But when I am attempting to reboot the database this is what I have = noticed on the error logs=20 >=20 > LOG: started streaming WAL from primary at 0/1B000000 on timeline 1 > FATAL: could not receive data from WAL stream: ERROR: requested WAL = segment 00000001000000000000001B has already been removed >=20 > LOG: received fast shutdown request > LOG: shutting down > LOG: database system is shut down >=20 > So, I am assuming the WAL files have already been deleted on the = Master. Is there any setting on Master I can toggle in order to increase = the expiry(retention policy) for the WAL files. >=20 > Thank You, > Sajan Gone > Database Administrator > L Brands > Mobile #: 517-990-5282 > Office #:=E2=80=82=E2=80=82 614-577-7622 > From: "Hunley, Douglas" > > Date: Thursday, April 27, 2017 at 3:45 PM > To: Sajan Gone > > Cc: "pgsql-admin@postgresql.org " = > > Subject: Re: [ADMIN] Unable to start postgres instance. >=20 >=20 > On Thu, Apr 27, 2017 at 3:38 PM, Gone, Sajan > wrote: > -bash-4.3$ psql -U postgres > psql: FATAL: the database system is starting up >=20 > However its been on that from quite a long time. It would really = appreciate if anyone could explain me on what is really going on. >=20 > It is doing exactly what it should. A standby is, by default, in = permanent recovery mode. If you wish to be able to connect to it in this = mode, you need to add 'hot_standby =3D on' to its postgresql.conf and = restart the standby.=20 >=20 >=20 > --=20 > { > "name" : "douglas j hunley", > "title" : "database engineer", > "email" : "douglas.hunley@openscg.com = ", > "mobile" : "+1 614 316 5079" > } >=20 >=20 > Notice: This communication may contain privileged and/or confidential = information. If you are not the intended recipient, please notify the = sender by email, and immediately delete the message and any attachments = without copying or disclosing them. LB may, for any reason, intercept, = access, use, and disclose any information that is communicated by or = through, or which is stored on, its networks, applications, services, = and devices. --Apple-Mail=_B06EA2A2-4CB2-436C-A6E6-6D37C3C0D3C4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Afternoon Sajan,

I would try setting your wal_keep_segments to a higher value = on the master server. Depending on available HDD space on the master, = you should be able to keep a few dozen without any issues. Also, here is = a link to a resource that helped me with replication and seems to be a = bit better than the one you included upthread. https://wiki.postgresql.org/wiki/Streaming_Replication


Best,

Andrew Foster | = Educational Measures, LLC
Database Administrator
7100 E. Belleview Ave, Suite 350
Greenwood Village, CO 80111
303-548-6516
afoster@educationalmeasures.com

On Apr 27, 2017, at 3:43 PM, Gone, Sajan <SGone@lb.com> = wrote:

Hi = Douglas, 

  = Appreciate your help.

'hot_standby = =3D on' set up was already made but I restarted the server just in case, = however I am still getting the same error. 

But when I = am attempting to reboot the database this is what I have noticed on the = error logs 

LOG:  started streaming WAL from primary at = 0/1B000000 on timeline 1
FATAL:  could not receive data from WAL stream: = ERROR:  requested WAL segment 00000001000000000000001B has = already been removed

LOG:  received fast shutdown request
LOG:  shutting down
LOG:  database system is shut down

 So, I = am assuming the WAL files have already been deleted on the Master. Is = there any setting on Master I can toggle in order to increase the = expiry(retention policy) for the WAL files.

Thank = You,
Sajan = Gone
Database = Administrator
L = Brands
Mobile #: = 517-990-5282
Office = #:=E2=80=82=E2=80=82 614-577-7622
From: "Hunley, = Douglas" <douglas.hunley@openscg.com>
Date: Thursday, April = 27, 2017 at 3:45 PM
To: Sajan Gone <sgone@lb.com>
Cc: "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>
Subject: Re: [ADMIN] = Unable to start postgres instance.


On Thu, Apr 27, 2017 at 3:38 PM, Gone, Sajan = <SGone@lb.com> wrote:
-bash-4.3$ = psql -U postgres
psql: = FATAL:  the database system is starting up

However its = been on that from quite a long time. It would really appreciate if = anyone could explain me on what is really going on.

It is doing exactly what it should. A standby is, by default, in = permanent recovery mode. If you wish to be able to connect to it in this = mode, you need to add 'hot_standby =3D on' to its postgresql.conf and = restart the standby. 


--
{
  = "name" : "douglas j hunley",
  = "title" : "database engineer",
  "email" : "douglas.hunley@openscg.com",
  "mobile" : "+1 = 614 316 5079"
}



Notice: This communication may contain privileged and/or confidential = information. If you are not the intended recipient, please notify the = sender by email, and immediately delete the message and any attachments = without copying or disclosing them. LB may, for any reason, intercept, access, use, and disclose any information that = is communicated by or through, or which is stored on, its networks, = applications, services, and devices.

= --Apple-Mail=_B06EA2A2-4CB2-436C-A6E6-6D37C3C0D3C4--