pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_basebackup: could not get write-ahead log end position from server: ERROR
7+ messages / 4 participants
[nested] [flat]

* pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-06-08 18:27  Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
  0 siblings, 1 reply; 7+ messages in thread

From: Saeed Ahmed (DB) @ 2018-06-08 18:27 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Database Services <db.is@telenor.com.pk>

Dear Team,

1)Whilst taking full backup via pg_basebackup I have facing below error. Backup is schedule via cronjob.

================================================================================
****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT 2018.
080618204036
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1
17624153/17624153 kB (100%), 2/2 tablespaces
pg_basebackup: could not get write-ahead log end position from server: ERROR:  requested WAL segment 000000010000004300000040 has already been removed
pg_basebackup: removing data directory "/db01/pgdata/hot_backup/080618204036"




2)Also after complete backup I have to manually delete the wal archive files using pg_archivecleanup. Is there any way to automatically delete after full backup is complete and wal archive are no longer required.

pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A


Kindly let me know how to rectify.

pg_basebackup -z -X fetch --progress -v --format=t -D /db01/pgdata/hot_backup/$DD --no-password



Current Version:

                                                 version
---------------------------------------------------------------------------------------------------------
PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit


LINUX : .10.0-327.el7.x86_64


Regards,

Saeed Ahmed

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-06-08 21:41  Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
  parent: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
  0 siblings, 2 replies; 7+ messages in thread

From: Ahmed, Nawaz @ 2018-06-08 21:41 UTC (permalink / raw)
  To: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>; pgsql-admin; +Cc: Database Services <db.is@telenor.com.pk>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
@font-face
	{font-family:"Cambria Math"}
@font-face
	{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline}
span.EmailStyle17
	{font-family:"Calibri","sans-serif";
	color:windowtext}
.MsoChpDefault
	{font-family:"Calibri","sans-serif"}
@page WordSection1
	{margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
	{}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div style="font-family:Calibri,HelveticaNeue,sans-serif">
<div dir="auto">
<div dir="auto">
<div dir="auto">Hi,</div>
<div dir="auto"><br>
</div>
<div dir="auto">1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?</div>
<div dir="auto"><br>
</div>
<div dir="auto">2) As&nbsp;far as I know the cleanup of archive destination has to done manually.&nbsp;</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards,</div>
<div dir="auto">Nawaz<br>
<div dir="auto"><br>
</div>
</div>
</div>
</div>
</div>
<hr>
<div dir="auto" style="font-family:Calibri,HelveticaNeue,sans-serif"><br>
<b>From:</b> Saeed Ahmed (DB) &lt;saeed.ahmed1@telenor.com.pk&gt;<br>
<b>Date:</b> 9 June 2018 at 4:27:25 am AEST<br>
<b>To:</b> pgsql-admin@postgresql.org &lt;pgsql-admin@postgresql.org&gt;<br>
<b>Cc:</b> Database Services &lt;db.is@telenor.com.pk&gt;<br>
<b>Subject:</b> pg_basebackup: could not get write-ahead log end position from server: ERROR<br>
</div>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal">Dear Team,</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">1)Whilst taking full backup via pg_basebackup I have facing below error. Backup is schedule via cronjob.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="background:yellow">================================================================================</span></p>
<p class="MsoNormal"><span style="background:yellow">****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT 2018.</span></p>
<p class="MsoNormal"><span style="background:yellow">080618204036</span></p>
<p class="MsoNormal"><span style="background:yellow"></span></p>
<p class="MsoNormal"><span style="background:yellow">pg_basebackup: initiating base backup, waiting for checkpoint to complete</span></p>
<p class="MsoNormal"><span style="background:yellow">pg_basebackup: checkpoint completed</span></p>
<p class="MsoNormal"><span style="background:yellow">pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1</span></p>
<p class="MsoNormal"><span style="background:yellow">17624153/17624153 kB (100%), 2/2 tablespaces&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></p>
<p class="MsoNormal"><span style="background:yellow">pg_basebackup: could not get write-ahead log end position from server: ERROR:&nbsp; requested WAL segment 000000010000004300000040 has already been removed</span></p>
<p class="MsoNormal"><span style="background:yellow">pg_basebackup: removing data directory &quot;/db01/pgdata/hot_backup/080618204036&quot;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">2)Also after complete backup I have to manually delete the wal archive files using pg_archivecleanup. Is there any way to automatically delete after full backup is complete and wal archive are no longer required.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Kindly let me know how to rectify. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">pg_basebackup -z -X fetch --progress -v --format=t -D /db01/pgdata/hot_backup/$DD --no-password</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><b><u><span style="text-decoration:none">&nbsp;</span></u></b></p>
<p class="MsoNormal"><b><u><span style="text-decoration:none">&nbsp;</span></u></b></p>
<p class="MsoNormal"><b><u>Current Version:</u></b></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
<p class="MsoNormal">---------------------------------------------------------------------------------------------------------</p>
<p class="MsoNormal">PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><b><u>LINUX : .10.0-327.el7.x86_64</u></b></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Regards,</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Saeed Ahmed</p>
<p class="MsoNormal">&nbsp;</p>
</div>
</div>
<h3>Disclaimer</h3>
<p>The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified
 that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on &#43; 61 2 9452 9000 or by reply e-mail to the sender and delete the document
 and all copies thereof.</p>
<br>
<p>Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu
 Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication
 or any files attached.</p>
<br>
<p>If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com</p>
<p></p>
</body>
</html>


^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-06-09 03:43  Pavan Teja <pavan.postgresdba@gmail.com>
  parent: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Pavan Teja @ 2018-06-09 03:43 UTC (permalink / raw)
  To: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>; +Cc: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>; pgsql-admin@postgresql.org, Database Services <db.is@telenor.com.pk>

Hi,

>2) As far as I know the cleanup of >archive destination has to done
>manually.
It can also be done by using "pg_archivecleanup" command. We also can
schedule it as a cron job for automatic deleting of WAL files.


Regards,
Pavan.

On Sat, Jun 9, 2018, 3:12 AM Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com> wrote:

> Hi,
>
> 1) have you configured the archive_command to a script that archives the
> online WAL to the archive destination and deletes the file?
>
> 2) As far as I know the cleanup of archive destination has to done
> manually.
>
> Regards,
> Nawaz
>
> ------------------------------
>
> *From:* Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
> *Date:* 9 June 2018 at 4:27:25 am AEST
> *To:* pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
> *Cc:* Database Services <db.is@telenor.com.pk>
> *Subject:* pg_basebackup: could not get write-ahead log end position from
> server: ERROR
>
> Dear Team,
>
>
>
> 1)Whilst taking full backup via pg_basebackup I have facing below error.
> Backup is schedule via cronjob.
>
>
>
>
> ================================================================================
>
> ****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT
> 2018.
>
> 080618204036
>
> pg_basebackup: initiating base backup, waiting for checkpoint to complete
>
> pg_basebackup: checkpoint completed
>
> pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1
>
> 17624153/17624153 kB (100%), 2/2
> tablespaces
>
> pg_basebackup: could not get write-ahead log end position from server:
> ERROR:  requested WAL segment 000000010000004300000040 has already been
> removed
>
> pg_basebackup: removing data directory
> "/db01/pgdata/hot_backup/080618204036"
>
>
>
>
>
>
>
>
>
> 2)Also after complete backup I have to manually delete the wal archive
> files using pg_archivecleanup. Is there any way to automatically delete
> after full backup is complete and wal archive are no longer required.
>
>
>
> pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A
>
>
>
>
>
> Kindly let me know how to rectify.
>
>
>
> pg_basebackup -z -X fetch --progress -v --format=t -D
> /db01/pgdata/hot_backup/$DD --no-password
>
>
>
>
>
>
>
> *Current Version:*
>
>
>
>
> version
>
>
> ---------------------------------------------------------------------------------------------------------
>
> PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7
> 20120313 (Red Hat 4.4.7-18), 64-bit
>
>
>
>
>
> *LINUX : .10.0-327.el7.x86_64*
>
>
>
>
>
> Regards,
>
>
>
> Saeed Ahmed
>
>
> Disclaimer
>
> The information in this e-mail is confidential and may contain content
> that is subject to copyright and/or is commercial-in-confidence and is
> intended only for the use of the above named addressee. If you are not the
> intended recipient, you are hereby notified that dissemination, copying or
> use of the information is strictly prohibited. If you have received this
> e-mail in error, please telephone Fujitsu Australia Software Technology Pty
> Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the
> document and all copies thereof.
>
> Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly
> transmit a virus within an email communication, it is the receiver’s
> responsibility to scan all communication and any files attached for
> computer viruses and other defects. Fujitsu Australia Software Technology
> Pty Ltd does not accept liability for any loss or damage (whether direct,
> indirect, consequential or economic) however caused, and whether by
> negligence or otherwise, which may result directly or indirectly from this
> communication or any files attached.
>
> If you do not wish to receive commercial and/or marketing email messages
> from Fujitsu Australia Software Technology Pty Ltd, please email
> unsubscribe@fast.au.fujitsu.com
>
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* RE: pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-06-09 11:47  Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
  parent: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Saeed Ahmed (DB) @ 2018-06-09 11:47 UTC (permalink / raw)
  To: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>; pgsql-admin; +Cc: Database Services <db.is@telenor.com.pk>

Hi Nawaz,

Many thanks for the update.


1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?
Yes
2) As far as I know the cleanup of archive destination has to done manually.

Ok


Regards,

Saeed Ahmed



From: Ahmed, Nawaz [mailto:Nawaz@fast.au.fujitsu.com]
Sent: Saturday, June 09, 2018 2:41 AM
To: Saeed Ahmed (DB); pgsql-admin@postgresql.org
Cc: Database Services
Subject: Re: pg_basebackup: could not get write-ahead log end position from server: ERROR

Hi,

1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?

2) As far as I know the cleanup of archive destination has to done manually.

Regards,
Nawaz

________________________________

From: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk<mailto:saeed.ahmed1@telenor.com.pk>>
Date: 9 June 2018 at 4:27:25 am AEST
To: pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org> <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Cc: Database Services <db.is@telenor.com.pk<mailto:db.is@telenor.com.pk>>
Subject: pg_basebackup: could not get write-ahead log end position from server: ERROR

Dear Team,

1)Whilst taking full backup via pg_basebackup I have facing below error. Backup is schedule via cronjob.

================================================================================
****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT 2018.
080618204036
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1
17624153/17624153 kB (100%), 2/2 tablespaces
pg_basebackup: could not get write-ahead log end position from server: ERROR:  requested WAL segment 000000010000004300000040 has already been removed
pg_basebackup: removing data directory "/db01/pgdata/hot_backup/080618204036"




2)Also after complete backup I have to manually delete the wal archive files using pg_archivecleanup. Is there any way to automatically delete after full backup is complete and wal archive are no longer required.

pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A


Kindly let me know how to rectify.

pg_basebackup -z -X fetch --progress -v --format=t -D /db01/pgdata/hot_backup/$DD --no-password



Current Version:

                                                 version
---------------------------------------------------------------------------------------------------------
PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit


LINUX : .10.0-327.el7.x86_64


Regards,

Saeed Ahmed

Disclaimer

The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the document and all copies thereof.


Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication or any files attached.


If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com<mailto:unsubscribe@fast.au.fujitsu.com>


^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* RE: pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-06-11 21:43  Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
  parent: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
  0 siblings, 1 reply; 7+ messages in thread

From: Ahmed, Nawaz @ 2018-06-11 21:43 UTC (permalink / raw)
  To: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>; pgsql-admin; +Cc: Database Services <db.is@telenor.com.pk>

That explains it, the script deletes the WAL file as soon as it is archived but pg_basebackup is not aware of this so it generates that error.

The second point is, you have to clean-up archives manually using pg_archivecleanup or something similar based on your situation as Pavan had noted. In order for the clean-up of unneeded WAL after a successful base backup should be implemented using bash (Linux / Unix) or batch/Powershell (Win) scripting.

Best Regards,

Nawaz Ahmed
Software Development Engineer

Fujitsu Australia Software Technology Pty Ltd
14 Rodborough Road, Frenchs Forest NSW 2086, Australia
T +61 2 9452 9027
Nawaz@fast.au.fujitsu.com<mailto:Nawaz@fast.au.fujitsu.com>
fastware.com.au<http://fastware.com.au/;

[cid:image001.jpg@01D40221.111F5770]
[cid:image002.jpg@01D40221.111F5770]

From: Saeed Ahmed (DB) [mailto:saeed.ahmed1@telenor.com.pk]
Sent: Saturday, 9 June 2018 9:48 PM
To: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>; pgsql-admin@postgresql.org
Cc: Database Services <db.is@telenor.com.pk>
Subject: RE: pg_basebackup: could not get write-ahead log end position from server: ERROR

Hi Nawaz,

Many thanks for the update.


1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?
Yes
2) As far as I know the cleanup of archive destination has to done manually.

Ok


Regards,

Saeed Ahmed



From: Ahmed, Nawaz [mailto:Nawaz@fast.au.fujitsu.com]
Sent: Saturday, June 09, 2018 2:41 AM
To: Saeed Ahmed (DB); pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>
Cc: Database Services
Subject: Re: pg_basebackup: could not get write-ahead log end position from server: ERROR

Hi,

1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?

2) As far as I know the cleanup of archive destination has to done manually.

Regards,
Nawaz

________________________________

From: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk<mailto:saeed.ahmed1@telenor.com.pk>>
Date: 9 June 2018 at 4:27:25 am AEST
To: pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org> <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Cc: Database Services <db.is@telenor.com.pk<mailto:db.is@telenor.com.pk>>
Subject: pg_basebackup: could not get write-ahead log end position from server: ERROR

Dear Team,

1)Whilst taking full backup via pg_basebackup I have facing below error. Backup is schedule via cronjob.

================================================================================
****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT 2018.
080618204036
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1
17624153/17624153 kB (100%), 2/2 tablespaces
pg_basebackup: could not get write-ahead log end position from server: ERROR:  requested WAL segment 000000010000004300000040 has already been removed
pg_basebackup: removing data directory "/db01/pgdata/hot_backup/080618204036"




2)Also after complete backup I have to manually delete the wal archive files using pg_archivecleanup. Is there any way to automatically delete after full backup is complete and wal archive are no longer required.

pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A


Kindly let me know how to rectify.

pg_basebackup -z -X fetch --progress -v --format=t -D /db01/pgdata/hot_backup/$DD --no-password



Current Version:

                                                 version
---------------------------------------------------------------------------------------------------------
PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit


LINUX : .10.0-327.el7.x86_64


Regards,

Saeed Ahmed

Disclaimer

The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the document and all copies thereof.


Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication or any files attached.


If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com<mailto:unsubscribe@fast.au.fujitsu.com>

Disclaimer

The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the document and all copies thereof.


Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication or any files attached.


If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com


Attachments:

image001.jpg (image/jpeg, 7.7K) download view image
image002.jpg (image/jpeg, 3.8K) download view image
^ permalink raw reply [nested|flat] 7+ messages in thread

* RE: pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-06-11 23:03  Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
  parent: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Saeed Ahmed (DB) @ 2018-06-11 23:03 UTC (permalink / raw)
  To: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>; pgsql-admin; +Cc: Database Services <db.is@telenor.com.pk>

Hi,

Thanks for the support and your time.

The issue was resolved after increasing wal_keep_segments to 20 means it will keep 20 files in directory /PGDATA/pg_wal .


and ran "pg_ctl reload" to enable the configuration without rebooting the db.


Regards,

Saeed Ahmed


From: Ahmed, Nawaz [mailto:Nawaz@fast.au.fujitsu.com]
Sent: Tuesday, June 12, 2018 2:44 AM
To: Saeed Ahmed (DB); pgsql-admin@postgresql.org
Cc: Database Services
Subject: RE: pg_basebackup: could not get write-ahead log end position from server: ERROR

That explains it, the script deletes the WAL file as soon as it is archived but pg_basebackup is not aware of this so it generates that error.

The second point is, you have to clean-up archives manually using pg_archivecleanup or something similar based on your situation as Pavan had noted. In order for the clean-up of unneeded WAL after a successful base backup should be implemented using bash (Linux / Unix) or batch/Powershell (Win) scripting.

Best Regards,

Nawaz Ahmed
Software Development Engineer

Fujitsu Australia Software Technology Pty Ltd
14 Rodborough Road, Frenchs Forest NSW 2086, Australia
T +61 2 9452 9027
Nawaz@fast.au.fujitsu.com<mailto:Nawaz@fast.au.fujitsu.com>
fastware.com.au<http://fastware.com.au/;

[cid:image001.jpg@01D40202.51652400]
[cid:image002.jpg@01D40202.51652400]

From: Saeed Ahmed (DB) [mailto:saeed.ahmed1@telenor.com.pk]
Sent: Saturday, 9 June 2018 9:48 PM
To: Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com<mailto:Nawaz@fast.au.fujitsu.com>>; pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>
Cc: Database Services <db.is@telenor.com.pk<mailto:db.is@telenor.com.pk>>
Subject: RE: pg_basebackup: could not get write-ahead log end position from server: ERROR

Hi Nawaz,

Many thanks for the update.


1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?
Yes
2) As far as I know the cleanup of archive destination has to done manually.

Ok


Regards,

Saeed Ahmed



From: Ahmed, Nawaz [mailto:Nawaz@fast.au.fujitsu.com]
Sent: Saturday, June 09, 2018 2:41 AM
To: Saeed Ahmed (DB); pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>
Cc: Database Services
Subject: Re: pg_basebackup: could not get write-ahead log end position from server: ERROR

Hi,

1) have you configured the archive_command to a script that archives the online WAL to the archive destination and deletes the file?

2) As far as I know the cleanup of archive destination has to done manually.

Regards,
Nawaz

________________________________

From: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk<mailto:saeed.ahmed1@telenor.com.pk>>
Date: 9 June 2018 at 4:27:25 am AEST
To: pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org> <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Cc: Database Services <db.is@telenor.com.pk<mailto:db.is@telenor.com.pk>>
Subject: pg_basebackup: could not get write-ahead log end position from server: ERROR

Dear Team,

1)Whilst taking full backup via pg_basebackup I have facing below error. Backup is schedule via cronjob.

================================================================================
****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT 2018.
080618204036
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1
17624153/17624153 kB (100%), 2/2 tablespaces
pg_basebackup: could not get write-ahead log end position from server: ERROR:  requested WAL segment 000000010000004300000040 has already been removed
pg_basebackup: removing data directory "/db01/pgdata/hot_backup/080618204036"




2)Also after complete backup I have to manually delete the wal archive files using pg_archivecleanup. Is there any way to automatically delete after full backup is complete and wal archive are no longer required.

pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A


Kindly let me know how to rectify.

pg_basebackup -z -X fetch --progress -v --format=t -D /db01/pgdata/hot_backup/$DD --no-password



Current Version:

                                                 version
---------------------------------------------------------------------------------------------------------
PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit


LINUX : .10.0-327.el7.x86_64


Regards,

Saeed Ahmed

Disclaimer

The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the document and all copies thereof.


Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication or any files attached.


If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com<mailto:unsubscribe@fast.au.fujitsu.com>

Disclaimer

The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the document and all copies thereof.


Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication or any files attached.


If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com<mailto:unsubscribe@fast.au.fujitsu.com>


Attachments:

image001.jpg (image/jpeg, 7.7K) download view image
image002.jpg (image/jpeg, 3.8K) download view image
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: pg_basebackup: could not get write-ahead log end position from server: ERROR
@ 2018-07-04 09:03  Jaime Soler <jaime.soler@gmail.com>
  parent: Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
  0 siblings, 0 replies; 7+ messages in thread

From: Jaime Soler @ 2018-07-04 09:03 UTC (permalink / raw)
  To: saeed.ahmed1@telenor.com.pk; +Cc: pgsql-admin; db.is@telenor.com.pk

Also you could change your pg_basebackup parameter and set it as  -X stream
instead of -X fetch  and you don't have to worry about increasing
wal_keep_segments in the future



El mar., 12 jun. 2018 a las 1:03, Saeed Ahmed (DB) (<
saeed.ahmed1@telenor.com.pk>) escribió:

> Hi,
>
>
>
> Thanks for the support and your time.
>
>
>
> The issue was resolved after increasing wal_keep_segments to 20 means it
> will keep 20 files in directory /PGDATA/pg_wal .
>
>
>
>
>
> and ran "pg_ctl reload" to enable the configuration without rebooting the
> db.
>
>
>
>
>
> Regards,
>
>
>
> Saeed Ahmed
>
>
>
>
>
> *From:* Ahmed, Nawaz [mailto:Nawaz@fast.au.fujitsu.com]
> *Sent:* Tuesday, June 12, 2018 2:44 AM
> *To:* Saeed Ahmed (DB); pgsql-admin@postgresql.org
> *Cc:* Database Services
> *Subject:* RE: pg_basebackup: could not get write-ahead log end position
> from server: ERROR
>
>
>
> That explains it, the script deletes the WAL file as soon as it is
> archived but pg_basebackup is not aware of this so it generates that error.
>
>
>
> The second point is, you have to clean-up archives manually using
> pg_archivecleanup or something similar based on your situation as Pavan had
> noted. In order for the clean-up of unneeded WAL after a successful base
> backup should be implemented using bash (Linux / Unix) or batch/Powershell
> (Win) scripting.
>
>
>
> Best Regards,
>
>
>
>
>
>
> *Nawaz AhmedSoftware Development EngineerFujitsu Australia Software
> Technology Pty Ltd*
> 14 Rodborough Road, Frenchs Forest NSW 2086, Australia
> *T* +61 2 9452 9027
> Nawaz@fast.au.fujitsu.com
> fastware.com.au
>
>
>
>
> *From:* Saeed Ahmed (DB) [mailto:saeed.ahmed1@telenor.com.pk
> <saeed.ahmed1@telenor.com.pk>]
> *Sent:* Saturday, 9 June 2018 9:48 PM
> *To:* Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>; pgsql-admin@postgresql.org
> *Cc:* Database Services <db.is@telenor.com.pk>
> *Subject:* RE: pg_basebackup: could not get write-ahead log end position
> from server: ERROR
>
>
>
> Hi Nawaz,
>
>
>
> Many thanks for the update.
>
>
>
>
>
> 1) have you configured the archive_command to a script that archives the
> online WAL to the archive destination and deletes the file?
>
> Yes
>
> 2) As far as I know the cleanup of archive destination has to done
> manually.
>
>
>
> Ok
>
>
>
>
>
> Regards,
>
>
>
> Saeed Ahmed
>
>
>
>
>
>
>
> *From:* Ahmed, Nawaz [mailto:Nawaz@fast.au.fujitsu.com
> <Nawaz@fast.au.fujitsu.com>]
> *Sent:* Saturday, June 09, 2018 2:41 AM
> *To:* Saeed Ahmed (DB); pgsql-admin@postgresql.org
> *Cc:* Database Services
> *Subject:* Re: pg_basebackup: could not get write-ahead log end position
> from server: ERROR
>
>
>
> Hi,
>
>
>
> 1) have you configured the archive_command to a script that archives the
> online WAL to the archive destination and deletes the file?
>
>
>
> 2) As far as I know the cleanup of archive destination has to done
> manually.
>
>
>
> Regards,
>
> Nawaz
>
>
> ------------------------------
>
>
> *From:* Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
> *Date:* 9 June 2018 at 4:27:25 am AEST
> *To:* pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
> *Cc:* Database Services <db.is@telenor.com.pk>
> *Subject:* pg_basebackup: could not get write-ahead log end position from
> server: ERROR
>
>
>
> Dear Team,
>
>
>
> 1)Whilst taking full backup via pg_basebackup I have facing below error.
> Backup is schedule via cronjob.
>
>
>
>
> ================================================================================
>
> ****** Full Backup of posgresql database started Fri Jun 8 20:40:36 PKT
> 2018.
>
> 080618204036
>
> pg_basebackup: initiating base backup, waiting for checkpoint to complete
>
> pg_basebackup: checkpoint completed
>
> pg_basebackup: write-ahead log start point: 43/400252F8 on timeline 1
>
> 17624153/17624153 kB (100%), 2/2
> tablespaces
>
> pg_basebackup: could not get write-ahead log end position from server:
> ERROR:  requested WAL segment 000000010000004300000040 has already been
> removed
>
> pg_basebackup: removing data directory
> "/db01/pgdata/hot_backup/080618204036"
>
>
>
>
>
>
>
>
>
> 2)Also after complete backup I have to manually delete the wal archive
> files using pg_archivecleanup. Is there any way to automatically delete
> after full backup is complete and wal archive are no longer required.
>
>
>
> pg_archivecleanup -d /db01/wal_archive 00000001000000390000000A
>
>
>
>
>
> Kindly let me know how to rectify.
>
>
>
> pg_basebackup -z -X fetch --progress -v --format=t -D
> /db01/pgdata/hot_backup/$DD --no-password
>
>
>
>
>
>
>
> *Current Version:*
>
>
>
>
> version
>
>
> ---------------------------------------------------------------------------------------------------------
>
> PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7
> 20120313 (Red Hat 4.4.7-18), 64-bit
>
>
>
>
>
> *LINUX : .10.0-327.el7.x86_64*
>
>
>
>
>
> Regards,
>
>
>
> Saeed Ahmed
>
>
> Disclaimer
>
> The information in this e-mail is confidential and may contain content
> that is subject to copyright and/or is commercial-in-confidence and is
> intended only for the use of the above named addressee. If you are not the
> intended recipient, you are hereby notified that dissemination, copying or
> use of the information is strictly prohibited. If you have received this
> e-mail in error, please telephone Fujitsu Australia Software Technology Pty
> Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the
> document and all copies thereof.
>
>
>
> Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly
> transmit a virus within an email communication, it is the receiver’s
> responsibility to scan all communication and any files attached for
> computer viruses and other defects. Fujitsu Australia Software Technology
> Pty Ltd does not accept liability for any loss or damage (whether direct,
> indirect, consequential or economic) however caused, and whether by
> negligence or otherwise, which may result directly or indirectly from this
> communication or any files attached.
>
>
>
> If you do not wish to receive commercial and/or marketing email messages
> from Fujitsu Australia Software Technology Pty Ltd, please email
> unsubscribe@fast.au.fujitsu.com
> Disclaimer
>
> The information in this e-mail is confidential and may contain content
> that is subject to copyright and/or is commercial-in-confidence and is
> intended only for the use of the above named addressee. If you are not the
> intended recipient, you are hereby notified that dissemination, copying or
> use of the information is strictly prohibited. If you have received this
> e-mail in error, please telephone Fujitsu Australia Software Technology Pty
> Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the
> document and all copies thereof.
>
>
>
> Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly
> transmit a virus within an email communication, it is the receiver’s
> responsibility to scan all communication and any files attached for
> computer viruses and other defects. Fujitsu Australia Software Technology
> Pty Ltd does not accept liability for any loss or damage (whether direct,
> indirect, consequential or economic) however caused, and whether by
> negligence or otherwise, which may result directly or indirectly from this
> communication or any files attached.
>
>
>
> If you do not wish to receive commercial and/or marketing email messages
> from Fujitsu Australia Software Technology Pty Ltd, please email
> unsubscribe@fast.au.fujitsu.com
>

Attachments:

image001.jpg (image/jpeg, 7.7K) download view image
image002.jpg (image/jpeg, 3.8K) download view image
image001.jpg (image/jpeg, 7.7K) download view image
^ permalink raw reply [nested|flat] 7+ messages in thread


end of thread, other threads:[~2018-07-04 09:03 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 18:27 pg_basebackup: could not get write-ahead log end position from server: ERROR Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
2018-06-08 21:41 ` Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
2018-06-09 03:43   ` Pavan Teja <pavan.postgresdba@gmail.com>
2018-06-09 11:47   ` Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
2018-06-11 21:43     ` Ahmed, Nawaz <Nawaz@fast.au.fujitsu.com>
2018-06-11 23:03       ` Saeed Ahmed (DB) <saeed.ahmed1@telenor.com.pk>
2018-07-04 09:03         ` Jaime Soler <jaime.soler@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox