1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-04 10:44:46 +02:00
Commit Graph

2893 Commits

Author SHA1 Message Date
Michael Paquier
129b21ca4e Remove show timeline commands in regression tests
"show timeline" has actually been removed.
2014-01-13 12:42:04 +09:00
Michael Paquier
f6cc608c43 Correct installation of pg_rman.1 to $PGINSTALL/share/man/man1
This is to avoid to have to define several paths for MANPATH for a user
or a distribution.
2014-01-13 19:41:59 +09:00
Michael Paquier
4e6dd05628 Add a note about XML_CATALOG_FILES on OSX for doc compilation
Without this parameter correctly set, compilation could fail at xml
validation.
2014-01-11 22:57:48 +09:00
Michael Paquier
1868223c52 Use strong text for option names and underline option values
This makes the whole documentation more readable.
2014-01-12 03:50:13 +09:00
Michael Paquier
26ed2bbe14 Fix typo in documentation 2014-01-12 03:28:33 +09:00
Michael Paquier
c7b758a93f Fix and refactor large parts of the documentation
A couple of issues have been found on the documentation after re-reading
it related mainly to paging.
2014-01-12 03:25:54 +09:00
Michael Paquier
d274d27cfc Remove PHONY option in documentation Makefile
This was kicking all the time a clean up of everything, rather unwelcome.
2014-01-12 03:08:57 +09:00
Michael Paquier
6639785305 Use asciidoc and xmlto to automatic generation of man and html docs
This has the merit to put all the documentation of the project into a
single banner, and to centralize all the project in a single place at
code level.

Compiling documentation can be made by setting the variables ASCIIDOC
and XMLTO. As PostgreSQL extension system is not that smart for doc
generation, some custom Makefile path is used to install man pages into
a folder that could directly by used in MANPATH.
2014-01-12 03:03:30 +09:00
Michael Paquier
1c3512fadf Fix old backup removal for specified number of days
Backups could be removed even if generation number was set to infinite
without caring of the day threashold calculated. Backups are removed
if they either satisfy the generation or the day threshold.
2014-01-10 08:42:54 +09:00
Michael Paquier
3d0a22308c Change output format in documentation for command show
This is to be in-line with modifications of last commit.
2014-01-10 04:18:43 +09:00
Michael Paquier
37c3be1168 Refactor write/read calculation size of backups
This commit simplifies the way backup sizes are saved internally by
reusing the same variable for incremental and full backup, which were
using separated and exclusively used variables, resulted in a couple
of bytes wasted all the time. This was also reflected by a useless
column in the output table of subcommand "show".
2014-01-10 04:11:27 +09:00
Michael Paquier
9cd8e33508 Remove undocumented option "force" for delete command
This was in code, not in the docs...
2014-01-10 02:57:15 +09:00
Michael Paquier
e04426361f Allow only one keep parameter to trigger log and archive deletion
Same as previously, having two satisfy two conditions where most of the
users will just look for one policy usually is kind of awkward.
2014-01-10 02:48:11 +09:00
Michael Paquier
fcaae1a34b Allow only one keep parameter to trigger backup deletion
Having files satisfying both conditions seems somewhat awkward, as users
would usually choose either the number of generations to keep or the
amount of days to keep the files. Hence deletion of a backup is bypassed
only when both parameters are set to infinite.

At the same time correct some typos and incorrections in the deletion
code.
2014-01-10 02:37:33 +09:00
Michael Paquier
cb939f6bef Block backup operations for standbys
Backup from standbys should use a method based on replication protocol
in a way similar to what is done in pg_basebackup, as it cannot use
pg_start/stop_backup. As I am not sure what would be the right approach
by the way, it is better for the time being to block backups taken
from a standby. It does not penalize the functionality though as taking
disk snapshots is not forbidden either, and a user can still recover
from that. This commit removes at the same time some home-made functions
that created custom backup label files, this is not relyable, especially
if Postgres core format for this file changes across versions. Removing
them at least will save from some bugs for sure.
2013-12-26 21:16:01 +09:00
Michael Paquier
85f0c1e802 Block archive backup for a standby node
A standby node only replays WAL, and does not actually archive them so
in this case this mode does not have much sense.
2013-12-25 08:52:38 +09:00
Michael Paquier
a66e683dd4 Improve comment explaining how search_next_wal works with LSN
This makes the explanation a bit clearer, as the LSN in this function
is used with the current timeline to generate the file name.
2013-12-25 08:26:25 +09:00
Michael Paquier
ced83f7703 Fix WAL segment file generation
Name file of WAL segment was generated using the API of xlog_internal.h
called XlogFileName, based on XLogSegNo and not XLogRecPtr as the
previous code assumed. This leaded to backup incorrect, actually too
many WAL files in the archive code path because the analysis was based
on a name completely fucked up. This commit fixes at the same time an
issue in search_next_wal where the function could loop for a too long
amount of time, eating much CPU when looking for the next WAL file.

Regression tests are passing cleanly with this patch.
2013-12-25 08:17:01 +09:00
Michael Paquier
78d92ff8fb Fix typo 2013-12-25 05:33:50 +09:00
Michael Paquier
1bc1f1d1b6 Improve backup mode management
This commit makes mandatory the presence of a full backup when doing
an incremental or archive backup on an existing timeline. In this case
the process will now simply error out and not take any backup. It looks
safer to use that as a default by the way, so as user will be forced
to take a full backup once a recovery has been done.

Database backup also contained the following condition when doing an
incremental backup:
prev_backup->tli != current.tli
This means that an incremental backup cannot be taken if there is not
already a full backup present in the same timeline. The same condition
should also be used for archive backup but it didn't seem to be the
case...
2013-12-25 05:27:25 +09:00
Michael Paquier
26b8870665 Fix archive backup mode due to incorrect timeline assigned
This bug has been introduced by some older code, it looks that it will be
necessary to re-create a battery of regression tests to test all those
things automtically, as former tests contain nothing to test archive
mode directly.
2013-12-25 04:36:07 +09:00
Michael Paquier
e5ab0917cc Fix pg_switch_xlog for archive mode
An additional parenthesis was present in the code.
2013-12-25 03:53:18 +09:00
Michael Paquier
3f79be1789 Add documentation of pg_rman
Documentation is fairly refactored and rewritten, fixing many typos and
many grammar mistakes in the previous version of the docs.
2013-12-25 03:48:36 +09:00
Michael Paquier
8efe5c9da4 Change version number to 1.3dev 2013-12-18 19:25:26 +08:00
Michael Paquier
a8f98e9e27 Update project and bug report URLs
As this project has been forked to github...
2013-12-18 19:24:27 +08:00
Michael Paquier
90c2f645f6 Mention in README platforms supported 2013-12-15 22:07:32 +09:00
Michael Paquier
8acd23c28a Add README to project
This was still missing, and explains the fundamentals of the project.
2013-12-15 22:05:36 +09:00
Michael Paquier
3af0a65383 Fix create_dir not working properly for OSX
This makes pg_rman working normally, caused by some OS-related subtility...
2013-12-15 21:32:02 +09:00
Michael Paquier
ef59f85d0d Remove duplicated definition of Datum and MemoryContext 2013-12-16 01:16:08 +09:00
Michael Paquier
f4cf982e9f Correct typo in comment 2013-12-16 01:10:29 +09:00
Michael Paquier
83f4e80a74 Always return an error in case of incorrect backup mode
Some code paths allowed an invalid backup mode to be passed, something
rather crazy as they directly depended on that...
2013-12-16 00:50:36 +09:00
Michael Paquier
9ecd5acb97 Update comment in pg\rman.h about new file status.c 2013-12-16 00:36:50 +09:00
Michael Paquier
0938c645bb Update regression output after latest commit
Missed that actually...
2013-12-16 00:35:14 +09:00
Michael Paquier
05ce188607 Simplify code related to HAVE_DATABASE, HAVE_ARCLOG, TOTAL_READ_SIZE
Those macros were mainly used in code paths where they didn't make that
much sense, complicating heavily the code. Correct at the same time some
code comments.
2013-12-16 00:30:49 +09:00
Michael Paquier
96cfb3eb13 Simplify code for recovery target identification
Some unnecessary comments are removed and cleaned as well at the same
time.
2013-12-15 23:50:04 +09:00
Michael Paquier
f77d141b7c Simplify beginning of database backup
It was unclear what was being errored out at the beginning of the
process. But it happens that it is just necessary to check if the
backup running is only an archive or not, then return a NULL file
list before continuing process. This should be part of some safety
checks though.
2013-12-15 23:41:42 +09:00
Michael Paquier
4b0f88e4d5 Remove standby-site option
The documentation found on internet is rather unclear about the role
and the goal of this feature, which looks more like a kludge to cover
the fact that most of the system XLOG functions do not work on standby
nodes. Now that this restriction has been removed by using the control
file to look for the current timestamp, this feature is not needed.
2013-12-13 04:14:29 +09:00
Michael Paquier
308d00b80c Obtain timeline ID with control file and not XLOG system function
The system function used up to now was pg_xlogfile_name_offset, which
cannot be used on a node in recovery, and it was the only way present
to fetch the timeline ID of a backup, either incremental or full. So
instead scan the control file of server and fetch the timeline from
that. This also removes the restriction on which a backup could not
be taken on a standby node. The next step being to have the possibility
to take backups from streams.
2013-12-13 03:55:39 +09:00
Michael Paquier
a31fdbd260 Remove outdated versions of PageHeaderData
This code was dead and maintained ony for multi-versioning.
2013-12-13 01:07:43 +09:00
Michael Paquier
9acc962fd7 Remove outdated functions in pgut 2013-12-13 01:02:43 +09:00
Michael Paquier
9e35dd0d47 Adapt output of regressions with new options and "show" output
Because of that two regression tests were failing:
- option
- show_validate
2013-12-13 00:57:54 +09:00
Michael Paquier
fd8bde8e10 Merge "show timeline" and "show" as a single command
It is just troublesome to have to type a subcommands for something that
could be merged into a single table. The output could be made in a
smarter way though...
2013-12-13 00:54:27 +09:00
Michael Paquier
ef44c4f347 Add missing --verbose/-v option in --help 2013-12-13 00:41:53 +09:00
Michael Paquier
1de877d38f Fix server status not correctly fetched
This error has been introduced by ebe2166 because of some incorrect
refactoring.
2013-12-13 00:29:25 +09:00
Michael Paquier
10ea7426e6 Remove SPECS for RPM packaging 2013-12-13 00:21:10 +09:00
Michael Paquier
b92d722bdb Clean up the snapshot related stuff
This is not really part of the core of pg_rman, rather better to
focus on incremental backup or stuff like that.
2013-12-13 00:20:20 +09:00
Michael Paquier
ebe2166379 Refactor code in pgsql_src for server monitoring
Most of those things are taken from pg_ctl.c, but were somewhat not
really in a place corresponding to their role.
2013-12-12 23:54:52 +09:00
Michael Paquier
5f3823c3c4 Remove reference to pg_crc.h
It was simply not used, and could be fetched from core if necessary.
2013-12-12 23:35:49 +09:00
Michael Paquier
30430a3729 Remove dead code
Those files were simply not used, remnants of a far greater past
perhaps.
2013-12-12 23:28:44 +09:00
Michael Paquier
2a23a50743 Simplify LSN calculation from result of pg_stop_backup
New behavior relies on XLogFromFileName instead of having a custom sscanf
doing exactly the same thing.
2013-12-12 22:56:35 +09:00