From: Greg Stark on
On Fri, Feb 26, 2010 at 9:41 AM, Bernd Helmle <mailings(a)oopsware.de> wrote:
>
>
> --On 24. Februar 2010 16:01:02 -0500 Tom Lane <tgl(a)sss.pgh.pa.us> wrote:
>
>> One objection to this is that it's not very clear to the user when
>> pg_stop_backup has finished with actual work and is just waiting for the
>> archiver, ie when is it safe to hit control-C?  Maybe we should emit a
>> "backup done, waiting for archiver to complete" notice before entering
>> the sleep loop.
>
> +1 for this. This hint would certainly help to recognize the issue
> immediately (or at least point to a possible cause).

So looking at the code we *do* print something in pg_stop_backup(). We
just wait 60s before doing so. I propose we shorten that to 10s.

Secondarily, the message printed at this time and when the process is
finished doesn't actually give the user any information on how much
longer to expect the process to take.

It would be nice to say what the target archive log we're waiting on
is and then periodically print out what the last archived log file
was. Or perhaps just do the arithmetic and periodically print how many
megabytes of log files remain to be archived.


--
greg

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Fujii Masao on
On Fri, Feb 26, 2010 at 2:47 AM, Bruce Momjian <bruce(a)momjian.us> wrote:
> Postgres 9.0 will be the first release to mention /bin/true as a way of
> turning off archiving in extraordinary circumstances:
>
>        http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html


> Setting archive_mode to a command that does nothing but return true, e.g. /bin/true,

"return true" seems ambiguous for me. How about writing clearly
"return a zero exit status" instead?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Fujii Masao on
On Fri, Feb 26, 2010 at 10:00 PM, Greg Stark <gsstark(a)mit.edu> wrote:
> Secondarily, the message printed at this time and when the process is
> finished doesn't actually give the user any information on how much
> longer to expect the process to take.
>
> It would be nice to say what the target archive log we're waiting on
> is and then periodically print out what the last archived log file
> was.

+1

We would be easily able to calculate the last archived log file from
the existence of archive status files.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Greg Smith on
Fujii Masao wrote:
> On Fri, Feb 26, 2010 at 2:47 AM, Bruce Momjian <bruce(a)momjian.us> wrote:
>
>> Postgres 9.0 will be the first release to mention /bin/true as a way of
>> turning off archiving in extraordinary circumstances:
>>
>> http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html
>>
>> Setting archive_mode to a command that does nothing but return true, e.g. /bin/true,
>>
>
> "return true" seems ambiguous for me. How about writing clearly
> "return a zero exit status" instead?
>

This is a good catch, and I have a work in progress update to that doc
section that fixes that wording, as well as rearranging the recent
additions a bit. Really that whole "/bin/true" big needs to go after
the example. A very brief intro to what "exit status" means on various
platforms might be in order too. I'm adjusting all that to read better,
once I'm happy with it I'll submit a doc patch in the next week or two
with the final result.

--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg(a)2ndQuadrant.com www.2ndQuadrant.us

From: Greg Smith on
Fujii Masao wrote:
> We would be easily able to calculate the last archived log file from
> the existence of archive status files.
>

Right, but you have to actually scan the whole archive directory to
figure that out, and I'd rather not see that code get duplicated
somewhere else when it's already inside the archive_command logic. If
it just shared that info with the rest of the system instead this would
be trivial to discover.

--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg(a)2ndQuadrant.com www.2ndQuadrant.us


--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers