Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-12-01 Thread Peter Eisentraut
On 11/21/17 05:16, Martín Marqués wrote: > El 21/11/17 a las 04:56, Arthur Zakirov escribió: >> On Mon, Nov 20, 2017 at 04:45:48PM -0300, Martín Marqués wrote: >>> New version of patch, without the --batch-mode option and using isatty() >>> >> >> Great! >> >>> + fprintf(stderr, "waiting f

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-30 Thread Michael Paquier
On Tue, Nov 21, 2017 at 8:24 PM, Martín Marqués wrote: > Thank you very much for reviewing the patch and for your valuable > input (you made me read the Microsoft Visual C specs ;)) + if (!isatty(fileno(stderr))) + fprintf(stderr, "\n"); + else + fprintf(stderr, "\r"); Er, why is

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-21 Thread Martín Marqués
Arthur, Thank you very much for reviewing the patch and for your valuable input (you made me read the Microsoft Visual C specs ;)) Regards, 2017-11-21 8:11 GMT-03:00 Arthur Zakirov : > On Tue, Nov 21, 2017 at 07:16:46AM -0300, Martín Marqués wrote: >> >> Ups! Attached the corrected version.:) >>

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-21 Thread Arthur Zakirov
On Tue, Nov 21, 2017 at 07:16:46AM -0300, Martín Marqués wrote: > > Ups! Attached the corrected version.:) > Thank you for the new version. The patch applies via 'patch' command without warnings and errors, tests passed. Marked the patch as "Ready for Commiter". -- Arthur Zakirov Postgres Pr

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-21 Thread Martín Marqués
El 21/11/17 a las 04:56, Arthur Zakirov escribió: > On Mon, Nov 20, 2017 at 04:45:48PM -0300, Martín Marqués wrote: >> New version of patch, without the --batch-mode option and using isatty() >> > > Great! > >> +fprintf(stderr, "waiting for checkpoint"); >> +if (isatty(fil

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-20 Thread Arthur Zakirov
On Mon, Nov 20, 2017 at 04:45:48PM -0300, Martín Marqués wrote: > New version of patch, without the --batch-mode option and using isatty() > Great! > + fprintf(stderr, "waiting for checkpoint"); > + if (isatty(fileno(stderr))) > + fprintf(stderr, "\n")

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-20 Thread Martín Marqués
El 09/11/17 a las 09:29, Arthur Zakirov escribió: > Hello, > > On Sun, Oct 01, 2017 at 04:49:17PM -0300, Martin Marques wrote: >> Updated patch with documentation of the new option. >> > > I have checked the patch. > The patch is applied and compiled correctly without any errors. Tests passed. >

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-20 Thread Martín Marqués
El 14/11/17 a las 06:25, Arthur Zakirov escribió: > On Fri, Nov 10, 2017 at 10:32:23AM -0300, Martín Marqués wrote: >> An example where using isatty() might fail is if you run pg_basebackup >> from a tty but redirect the output to a file, I believe that in that >> case isatty() will return true, bu

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-18 Thread Tomas Vondra
On 11/10/2017 02:32 PM, Martín Marqués wrote: > Hi, > > Thanks for having a look at this patch. > > 2017-11-09 20:55 GMT-03:00 Jeff Janes : >> On Fri, Sep 29, 2017 at 4:00 PM, Martin Marques >> wrote: >>> >>> Hi, >>> >>> Some time ago I had to work on a system where I was cloning a standby >>>

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-14 Thread Arthur Zakirov
On Fri, Nov 10, 2017 at 10:32:23AM -0300, Martín Marqués wrote: > An example where using isatty() might fail is if you run pg_basebackup > from a tty but redirect the output to a file, I believe that in that > case isatty() will return true, but it's very likely that the user > might want batch mod