1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-01 09:51:43 +02:00
Commit Graph

2875 Commits

Author SHA1 Message Date
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
Michael Paquier
cf6ca26ba9 Remove notion of Xlog ID/offset and use XLogRecPtr instead
This simplifies algorithm and APIs a bit, and removes a duplication
function used to generate a file name...
2013-12-12 22:45:57 +09:00
Michael Paquier
5bc716415a Begin cleanup of version-related code
Due to changes in XlogRecPtr in 9.3, older version of pg_rman are
already incompatible either way, and it is a pain to maintain code
duplicated from past versions of Postgres, so rely a maximum on the
core structures.
2013-12-12 22:20:08 +09:00
Michael Paquier
83462de39b Remove some internal variables in xlog_internal.h
It serves nothing to replicate such things.
2013-12-12 21:39:40 +09:00
Michael Paquier
200d1fde63 Remove multi-versioning of XLOG_PAGE_MAGIC
This is a pain to maintain, and simplifies the code a bit.
2013-12-12 21:28:33 +09:00
Michael Paquier
8a34a18ea1 Fix regression tests
Postgres 9.3 has introduced the previous timeline ID at last checkpoint
in pg_controldata, conflicting with the regression script used here...
2013-12-10 18:11:32 +09:00
Michael Paquier
26b97fbcee Simplify regression test script for restore
The same condition was checked twice...
2013-12-10 17:50:28 +09:00
Michael Paquier
8aa6b84b98 Fix history file parsing when fetched from archive
History file format has changed from 9.2 to 9.3 to indicate the WAL record
when timeline branched off. In 9.2, the complete WAL file name was used
while in 9.3 the WAL record is used (like 1/4000090). pg_rman contains a
copy of a function of postgres core code to parse the history file that
was not anymore compatible, leading to errors related to timelines.
2013-12-10 17:27:51 +09:00
Michael Paquier
71d019ce56 Avoid regression diffs generated by custom .psqlrc
This is done by using psql with --no-psqlrc mode in related test script.
2013-12-10 09:28:05 +09:00
Michael Paquier
bd75d08ef3 Rename XLogFileName to XLogFileNameLong
This is a lazy solution to avoid a conflict with the existing API in
xlog_internal.h, and should be corrected to use the one in core.
2013-12-10 03:29:47 +09:00
Michael Paquier
4d7bf5373c Fix uint64 cast forgotten by latest commit 2013-12-10 03:24:01 +09:00
Michael Paquier
1bc0f9baff Support pg_rman for PG_VERSION_NUM >= 9.3
In Postgres 9.3, XLogRecPtr has been changed to a unique uint64, making
the old structure based on two uint32 obsolete. Note that this makes
pg_rman incompatible with PG <= 9.2.
2013-12-10 03:21:07 +09:00
Michael Paquier
44e8da5f2c Add .gitignore for project 2013-12-10 02:32:17 +09:00
otsuka.knj@gmail.com
0144cc4fd9 - Fix possible broken backup which is getting from standby.
Use --standby-host and --standby-port, if backup is getting from standby.
- Add --hard-copy restore option.
  The option can be used to copy archive WAL to archive directory instead of symlink.



git-svn-id: http://pg-rman.googlecode.com/svn/trunk@77 182aca00-e38e-11de-a668-6fd11605f5ce
2013-09-09 09:00:13 +00:00
otsuka.knj@gmail.com
40fb3560e5 Fix some regression test issues.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@76 182aca00-e38e-11de-a668-6fd11605f5ce
2013-06-09 12:47:37 +00:00
otsuka.knj@gmail.com
068280f4a3 Supporting PostgreSQL 9.2.
Fix a bug about --recovery-target-time.
Fix SPEC files for using normal user. (Reported by Nagayasu-san)
Fix a compiling bug on no LZLib environment.
Add restriction about Incremental backup.


git-svn-id: http://pg-rman.googlecode.com/svn/trunk@71 182aca00-e38e-11de-a668-6fd11605f5ce
2013-01-24 06:49:34 +00:00
otsuka.knj@gmail.com
98b6bac4b9 Convert newline characters from CRLF to LF.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@70 182aca00-e38e-11de-a668-6fd11605f5ce
2013-01-24 06:35:48 +00:00
t.katsumata1122@gmail.com
dfecc77c5e update for pg_rman 1.2.4 (support standby backup)
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@57 182aca00-e38e-11de-a668-6fd11605f5ce
2012-05-18 08:54:36 +00:00
t.katsumata1122
8d97d65324 update for pg_rman 1.2.3 (support RHEL6)
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@52 182aca00-e38e-11de-a668-6fd11605f5ce
2011-12-26 14:21:58 +00:00