Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-14 Thread Stephen Frost
Robert, Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Sun, Aug 6, 2017 at 3:22 AM, Robert Haas wrote: > > All of (1)-(3) are legitimate user choices, although not everyone will > > make them. (4) is unfortunately the procedure recommended by our > > documentation, which is w

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-13 Thread Michael Paquier
On Sun, Aug 6, 2017 at 3:22 AM, Robert Haas wrote: > All of (1)-(3) are legitimate user choices, although not everyone will > make them. (4) is unfortunately the procedure recommended by our > documentation, which is where the problem comes in. I think it's > pretty lame that the documentation r

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Paul A Jungwirth
On Sat, Aug 5, 2017 at 6:22 PM, Robert Haas wrote: > On Sat, Aug 5, 2017 at 4:28 PM, Paul A Jungwirth > wrote: >> I don't have an opinion on the urgency of back-porting a fix, but if >> pg_stop_backup(boolean) allows for inconsistent backups, it does sound >> like a problem on 9.6 too. > > It doe

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Robert Haas
On Sat, Aug 5, 2017 at 4:28 PM, Paul A Jungwirth wrote: > I don't have an opinion on the urgency of back-porting a fix, but if > pg_stop_backup(boolean) allows for inconsistent backups, it does sound > like a problem on 9.6 too. It doesn't. The talk about inconsistent backups is, I think, not a

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Paul A Jungwirth
On Sat, Aug 5, 2017 at 1:28 PM, Paul A Jungwirth wrote: > On Sat, Aug 5, 2017 at 7:51 AM, Robert Haas wrote: >> After refreshing my memory further, I take it back. pg_stop_backup() >> doesn't even have a second argument on v9.6, so back-porting this fix >> to 9.6 is a meaningless thing; there's

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Paul A Jungwirth
On Sat, Aug 5, 2017 at 7:51 AM, Robert Haas wrote: > After refreshing my memory further, I take it back. pg_stop_backup() > doesn't even have a second argument on v9.6, so back-porting this fix > to 9.6 is a meaningless thing; there's nothing to fix. According to the docs at https://www.postgres

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Robert Haas
On Sat, Aug 5, 2017 at 12:07 PM, Michael Paquier wrote: > Because default values should be safe in the backup and restore area, > and wait_for_archive = false is not the default. Neither is archive_mode = always, without which wait_for_archive = true doesn't actually wait. > I would like to poin

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Michael Paquier
On Sat, Aug 5, 2017 at 4:51 PM, Robert Haas wrote: > On Sat, Aug 5, 2017 at 9:11 AM, Robert Haas wrote: >> If we apply these patches to 9.6, then pg_stop_backup() on a standby >> will start writing backup history files and removing no-longer-needed >> backup history files. That's a clear behavio

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Robert Haas
On Sat, Aug 5, 2017 at 9:11 AM, Robert Haas wrote: > If we apply these patches to 9.6, then pg_stop_backup() on a standby > will start writing backup history files and removing no-longer-needed > backup history files. That's a clear behavior change, and it isn't a > bug fix. Making the waitforar

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Tom Lane
Robert Haas writes: > On Sat, Aug 5, 2017 at 4:14 AM, Michael Paquier > wrote: >> If no other committer wants to take a shot at those patches, it may be >> better to push them after the next minor release happens? I don't like >> delaying bug fixes, but the release is close by and time flies. >

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Robert Haas
On Sat, Aug 5, 2017 at 4:14 AM, Michael Paquier wrote: > On Sat, Aug 5, 2017 at 5:27 AM, Stephen Frost wrote: >> Unfortunately the day got away from me due to some personal... adventures >> (having to do with lack of air conditioning first and then lack of gas, >> amongst a lot of other things go

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-05 Thread Michael Paquier
On Sat, Aug 5, 2017 at 5:27 AM, Stephen Frost wrote: > Unfortunately the day got away from me due to some personal... adventures > (having to do with lack of air conditioning first and then lack of gas, > amongst a lot of other things going on right now...). I just got things back > online but, we

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-04 Thread Stephen Frost
Robert, On Fri, Aug 4, 2017 at 23:17 Robert Haas wrote: > On Thu, Aug 3, 2017 at 9:49 PM, Stephen Frost wrote: > > Thanks for the patches. I'm planning to push them tomorrow morning > > after a bit more review and testing. I'll provide an update tomorrow. > > Obviously, the part about pushing

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-04 Thread Robert Haas
On Thu, Aug 3, 2017 at 9:49 PM, Stephen Frost wrote: > Thanks for the patches. I'm planning to push them tomorrow morning > after a bit more review and testing. I'll provide an update tomorrow. Obviously, the part about pushing them Friday morning didn't happen, and you're running out of time f

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Masahiko Sawada
On Fri, Aug 4, 2017 at 10:48 AM, Stephen Frost wrote: > Michael, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Wed, Aug 2, 2017 at 7:58 PM, Stephen Frost wrote: >> > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> >> Do you need a back-patchable version for 9.6? I could g

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Aug 3, 2017 at 4:29 AM, Stephen Frost wrote: > > I'll provide another update tomorrow. Hopefully Michael is able to produce > > a 9.6 patch, otherwise I'll do it. > > I have sent an updated version of the patch, with something that c

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Wed, Aug 2, 2017 at 7:58 PM, Stephen Frost wrote: > > * Michael Paquier (michael.paqu...@gmail.com) wrote: > >> Do you need a back-patchable version for 9.6? I could get one out of > >> my pocket if necessary. > > > > I was just t

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Michael Paquier
On Thu, Aug 3, 2017 at 4:29 AM, Stephen Frost wrote: > I'll provide another update tomorrow. Hopefully Michael is able to produce > a 9.6 patch, otherwise I'll do it. I have sent an updated version of the patch, with something that can be used for 9.6 as well. It would be nice to get something i

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Michael Paquier
On Wed, Aug 2, 2017 at 7:58 PM, Stephen Frost wrote: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> Do you need a back-patchable version for 9.6? I could get one out of >> my pocket if necessary. > > I was just trying to find a bit of time to generate exactly that- if > you have a coupl

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-02 Thread Stephen Frost
Noah, On Tue, Aug 1, 2017 at 20:52 Noah Misch wrote: > On Thu, Jul 27, 2017 at 10:27:36AM -0400, Stephen Frost wrote: > > Noah, all, > > > > * Noah Misch (n...@leadboat.com) wrote: > > > This PostgreSQL 10 open item is past due for your status update. > Kindly send > > > a status update within 2

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-02 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Mon, Jul 31, 2017 at 9:13 PM, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: > >> > * Noah Misch (n...@leadboat.com) wrote: > >> >> This PostgreSQL 10 open

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-02 Thread Michael Paquier
On Mon, Jul 31, 2017 at 9:13 PM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: >> > * Noah Misch (n...@leadboat.com) wrote: >> >> This PostgreSQL 10 open item is past due for your status update. Kindly >> >> send >>

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-01 Thread Noah Misch
On Thu, Jul 27, 2017 at 10:27:36AM -0400, Stephen Frost wrote: > Noah, all, > > * Noah Misch (n...@leadboat.com) wrote: > > This PostgreSQL 10 open item is past due for your status update. Kindly > > send > > a status update within 24 hours, and include a date for your subsequent > > status > >

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-31 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: > > * Noah Misch (n...@leadboat.com) wrote: > >> This PostgreSQL 10 open item is past due for your status update. Kindly > >> send > >> a status update within 24 hours, and include a date for yo

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-31 Thread Robert Haas
On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: >> This PostgreSQL 10 open item is past due for your status update. Kindly send >> a status update within 24 hours, and include a date for your subsequent >> status >> update. Refer to the policy on

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-27 Thread Stephen Frost
Noah, all, * Noah Misch (n...@leadboat.com) wrote: > This PostgreSQL 10 open item is past due for your status update. Kindly send > a status update within 24 hours, and include a date for your subsequent status > update. Refer to the policy on open item ownership: Based on the ongoing discussio

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-26 Thread Noah Misch
On Fri, Jul 21, 2017 at 07:04:32PM -0400, Stephen Frost wrote: > Masahiko, all, > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: > > On Tue, Jul 18, 2017 at 1:28 PM, Stephen Frost wrote: > > > Masahiko, Michael, > > > > > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: > > >> > This is beg

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-26 Thread Stephen Frost
All, * Masahiko Sawada (sawada.m...@gmail.com) wrote: > On Tue, Jul 25, 2017 at 4:43 AM, Michael Paquier > wrote: > > On Mon, Jul 24, 2017 at 6:45 PM, Stephen Frost wrote: > >> What the change would do is make the pg_stop_backup() caller block until > >> the last WAL is archvied, and perhaps tha

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-25 Thread Masahiko Sawada
On Tue, Jul 25, 2017 at 4:43 AM, Michael Paquier wrote: > On Mon, Jul 24, 2017 at 6:45 PM, Stephen Frost wrote: >> What the change would do is make the pg_stop_backup() caller block until >> the last WAL is archvied, and perhaps that ends up taking hours, and >> then the connection is dropped for

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread David Steele
On 7/24/17 3:28 PM, David Steele wrote: Yes, and this is another behavioral change to consider -- one that is more likely to impact users than the change to pg_stop_backup(). If pg_basebackup is not currently waiting for WAL on a standby (but does on a primary) then that's pretty serious.

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread Michael Paquier
On Mon, Jul 24, 2017 at 6:45 PM, Stephen Frost wrote: > What the change would do is make the pg_stop_backup() caller block until > the last WAL is archvied, and perhaps that ends up taking hours, and > then the connection is dropped for whatever reason and the backup fails > where it otherwise

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread David Steele
On 7/24/17 12:28 PM, Stephen Frost wrote: * David Steele (da...@pgmasters.net) wrote: While this patch brings pg_stop_backup() in line with the documentation, it also introduces a behavioral change compared to 9.6. Currently, the default 9.6 behavior on a standby is to return immediately from

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Jul 24, 2017 at 12:31 PM, Stephen Frost wrote: > > Those backup scripts might very well be, today, producing invalid > > backups though, which would be much less good.. > > True. However, I suspect that depends on what procedure is

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread Robert Haas
On Mon, Jul 24, 2017 at 12:31 PM, Stephen Frost wrote: > Those backup scripts might very well be, today, producing invalid > backups though, which would be much less good.. True. However, I suspect that depends on what procedure is actually being followed. If *everyone* who is using this is get

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Jul 24, 2017 at 11:40 AM, David Steele wrote: > > Before reviewing the patch, I would note that it looks like this issue was > > introduced in b6a323a8c before the 9.6 release. The documentation states > > that the pg_stop_backup() f

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread Stephen Frost
David, * David Steele (da...@pgmasters.net) wrote: > On 7/23/17 11:48 PM, Masahiko Sawada wrote: > >On Sat, Jul 22, 2017 at 8:04 AM, Stephen Frost wrote: > >> > >>I started discussing this with David off-list and he'd like a chance to > >>review it in a bit more detail (he's just returning from b

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread Robert Haas
On Mon, Jul 24, 2017 at 11:40 AM, David Steele wrote: > Before reviewing the patch, I would note that it looks like this issue was > introduced in b6a323a8c before the 9.6 release. The documentation states > that the pg_stop_backup() function will wait for all required WAL to be > archived, which

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-24 Thread David Steele
On 7/23/17 11:48 PM, Masahiko Sawada wrote: On Sat, Jul 22, 2017 at 8:04 AM, Stephen Frost wrote: I started discussing this with David off-list and he'd like a chance to review it in a bit more detail (he's just returning from being gone for a few weeks). That review will be posted to this th

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-23 Thread Masahiko Sawada
On Sat, Jul 22, 2017 at 8:04 AM, Stephen Frost wrote: > Masahiko, all, > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: >> On Tue, Jul 18, 2017 at 1:28 PM, Stephen Frost wrote: >> > Masahiko, Michael, >> > >> > * Masahiko Sawada (sawada.m...@gmail.com) wrote: >> >> > This is beginning to shap

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-21 Thread Stephen Frost
Masahiko, all, * Masahiko Sawada (sawada.m...@gmail.com) wrote: > On Tue, Jul 18, 2017 at 1:28 PM, Stephen Frost wrote: > > Masahiko, Michael, > > > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: > >> > This is beginning to shape. > >> > >> Sorry, I missed lots of typo in the last patch. All

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-17 Thread Masahiko Sawada
On Tue, Jul 18, 2017 at 1:28 PM, Stephen Frost wrote: > Masahiko, Michael, > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: >> > This is beginning to shape. >> >> Sorry, I missed lots of typo in the last patch. All comments from you >> are incorporated into the attached latest patch and I've c

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-17 Thread Stephen Frost
Masahiko, Michael, * Masahiko Sawada (sawada.m...@gmail.com) wrote: > > This is beginning to shape. > > Sorry, I missed lots of typo in the last patch. All comments from you > are incorporated into the attached latest patch and I've checked it > whether there is other typos. Please review it. I'

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-14 Thread Michael Paquier
On Fri, Jul 14, 2017 at 12:34 AM, Stephen Frost wrote: > Michael, all, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Thu, Jul 13, 2017 at 7:13 AM, Masahiko Sawada >> wrote: >> > Sorry, I missed lots of typo in the last patch. All comments from you >> > are incorporated into the

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-13 Thread Stephen Frost
Michael, all, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Jul 13, 2017 at 7:13 AM, Masahiko Sawada > wrote: > > Sorry, I missed lots of typo in the last patch. All comments from you > > are incorporated into the attached latest patch and I've checked it > > whether there is ot

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-13 Thread Michael Paquier
On Thu, Jul 13, 2017 at 7:13 AM, Masahiko Sawada wrote: > Sorry, I missed lots of typo in the last patch. All comments from you > are incorporated into the attached latest patch and I've checked it > whether there is other typos. Please review it. Thanks for providing a new version of the patch v

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-12 Thread Masahiko Sawada
On Wed, Jul 12, 2017 at 5:06 PM, Michael Paquier wrote: > On Tue, Jul 11, 2017 at 9:28 AM, Masahiko Sawada > wrote: >> Attached updated version patch. Please review it. > > Cool, thanks. Thank you for reviewing the patch. > > +useless. If the second parameter wait_for_archive is true > an

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-12 Thread Michael Paquier
On Tue, Jul 11, 2017 at 9:28 AM, Masahiko Sawada wrote: > Attached updated version patch. Please review it. Cool, thanks. +useless. If the second parameter wait_for_archive is true and +the backup is taken on a standby, pg_stop_backup waits for WAL +to archived when archive_mode is a

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-10 Thread Masahiko Sawada
On Mon, Jul 10, 2017 at 11:56 AM, Michael Paquier wrote: > On Sat, Jul 8, 2017 at 12:50 AM, Masahiko Sawada > wrote: >> On Fri, Jul 7, 2017 at 3:48 PM, Michael Paquier >> wrote: >>> So I would suggest the following things to address this issue: >>> 1) Generate a backup history file for backups

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-09 Thread Michael Paquier
On Sat, Jul 8, 2017 at 12:50 AM, Masahiko Sawada wrote: > On Fri, Jul 7, 2017 at 3:48 PM, Michael Paquier > wrote: >> So I would suggest the following things to address this issue: >> 1) Generate a backup history file for backups taken at recovery as well. >> 2) Archive it if archive_mode = alway

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-09 Thread Michael Paquier
On Sun, Jul 9, 2017 at 8:00 PM, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: >> [Action required within three days. This is a generic notification.] >> >> The above-described topic is currently a PostgreSQL 10 open item. Stephen, >> since you committed the patch believed to hav

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-09 Thread Stephen Frost
All, * Noah Misch (n...@leadboat.com) wrote: > On Fri, Jun 30, 2017 at 02:59:11PM -0400, Stephen Frost wrote: > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > > On 6/30/17 04:08, Masahiko Sawada wrote: > > > >> I'm not sure. I think this can be considered a bug in the > > > >>

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-09 Thread Noah Misch
On Fri, Jun 30, 2017 at 02:59:11PM -0400, Stephen Frost wrote: > Peter, all, > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > On 6/30/17 04:08, Masahiko Sawada wrote: > > >> I'm not sure. I think this can be considered a bug in the implementation > > >> for > > >> 10, and as s

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-07 Thread Masahiko Sawada
On Fri, Jul 7, 2017 at 3:48 PM, Michael Paquier wrote: > On Wed, Jul 5, 2017 at 4:57 PM, Michael Paquier > wrote: >> Why not refactoring a bit do_pg_stop_backup() so as the wait phase >> happens even if a backup is started in recovery? Now wait_for_archive >> is ignored because no wait is happeni

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-07 Thread Masahiko Sawada
On Fri, Jul 7, 2017 at 4:21 PM, Michael Paquier wrote: > On Fri, Jul 7, 2017 at 4:06 PM, Masahiko Sawada wrote: >> I agree with this idea. I've tried to make it wait for archiving but >> it seems to me that there are other two issues we need to deal with: >> the timeline ID on standby server is a

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-07 Thread Michael Paquier
On Fri, Jul 7, 2017 at 4:06 PM, Masahiko Sawada wrote: > I agree with this idea. I've tried to make it wait for archiving but > it seems to me that there are other two issues we need to deal with: > the timeline ID on standby server is always reset after created a > restart point, and ThisTimeLine

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-07 Thread Masahiko Sawada
On Wed, Jul 5, 2017 at 4:57 PM, Michael Paquier wrote: > On Wed, Jul 5, 2017 at 10:19 AM, Masahiko Sawada > wrote: >> I feel that since we cannot switch the WAL forcibly on the standby >> server we need to find a new way to do so. I'm not sure but it might >> be a hard work and be late for PG10.

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-06 Thread Michael Paquier
On Wed, Jul 5, 2017 at 4:57 PM, Michael Paquier wrote: > Why not refactoring a bit do_pg_stop_backup() so as the wait phase > happens even if a backup is started in recovery? Now wait_for_archive > is ignored because no wait is happening and the stop point is directly > returned back to the caller

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-05 Thread Michael Paquier
On Wed, Jul 5, 2017 at 10:19 AM, Masahiko Sawada wrote: > I feel that since we cannot switch the WAL forcibly on the standby > server we need to find a new way to do so. I'm not sure but it might > be a hard work and be late for PG10. Or you meant that you have a idea > for this? Why not refactor

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-04 Thread Masahiko Sawada
On Sun, Jul 2, 2017 at 4:39 PM, Michael Paquier wrote: > On Sat, Jul 1, 2017 at 3:59 AM, Stephen Frost wrote: >> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >>> On 6/30/17 04:08, Masahiko Sawada wrote: >>> >> I'm not sure. I think this can be considered a bug in the implementatio

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-02 Thread Michael Paquier
On Sat, Jul 1, 2017 at 3:59 AM, Stephen Frost wrote: > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> On 6/30/17 04:08, Masahiko Sawada wrote: >> >> I'm not sure. I think this can be considered a bug in the implementation >> >> for >> >> 10, and as such is "open for fixing". Howe

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-30 Thread Stephen Frost
Peter, all, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 6/30/17 04:08, Masahiko Sawada wrote: > >> I'm not sure. I think this can be considered a bug in the implementation > >> for > >> 10, and as such is "open for fixing". However, it's not a very critical bug > >> so I dou

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-30 Thread Peter Eisentraut
On 6/30/17 04:08, Masahiko Sawada wrote: >> I'm not sure. I think this can be considered a bug in the implementation for >> 10, and as such is "open for fixing". However, it's not a very critical bug >> so I doubt it should be a release blocker, but if someone wants to work on a >> fix I think we s

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-30 Thread Masahiko Sawada
On Thu, Jun 29, 2017 at 10:30 PM, Magnus Hagander wrote: > On Thu, Jun 22, 2017 at 6:22 PM, Masahiko Sawada > wrote: >> >> On Thu, Jun 22, 2017 at 10:36 PM, Magnus Hagander >> wrote: >> > >> > >> > On Thu, Jun 22, 2017 at 10:12 AM, Masahiko Sawada >> > >> > wrote: >> >> >> >> Hi, >> >> >> >> Si

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-29 Thread Magnus Hagander
On Thu, Jun 22, 2017 at 6:22 PM, Masahiko Sawada wrote: > On Thu, Jun 22, 2017 at 10:36 PM, Magnus Hagander > wrote: > > > > > > On Thu, Jun 22, 2017 at 10:12 AM, Masahiko Sawada > > > wrote: > >> > >> Hi, > >> > >> Since an optional second argument wait_for_archive of pg_stop_backup > >> has b

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-22 Thread Masahiko Sawada
On Thu, Jun 22, 2017 at 10:36 PM, Magnus Hagander wrote: > > > On Thu, Jun 22, 2017 at 10:12 AM, Masahiko Sawada > wrote: >> >> Hi, >> >> Since an optional second argument wait_for_archive of pg_stop_backup >> has been introduced in PostgreSQL 10 we can choose whether wait for >> archiving. But

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-22 Thread Magnus Hagander
On Thu, Jun 22, 2017 at 10:12 AM, Masahiko Sawada wrote: > Hi, > > Since an optional second argument wait_for_archive of pg_stop_backup > has been introduced in PostgreSQL 10 we can choose whether wait for > archiving. But my colleagues found that we can do pg_stop_backup with > wait_for_archive

[HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-22 Thread Masahiko Sawada
Hi, Since an optional second argument wait_for_archive of pg_stop_backup has been introduced in PostgreSQL 10 we can choose whether wait for archiving. But my colleagues found that we can do pg_stop_backup with wait_for_archive = true on the standby server but it actually doesn't wait for WAL arc