1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-14 12:00:13 +02:00
Commit Graph

366 Commits

Author SHA1 Message Date
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
t.katsumata1122
6e39da4660 add specfile for PostgreSQL9.1
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@49 182aca00-e38e-11de-a668-6fd11605f5ce
2011-11-28 04:25:39 +00:00
t.katsumata1122
78eed96f63 revised for pg_rman1.2.2
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@48 182aca00-e38e-11de-a668-6fd11605f5ce
2011-11-28 04:22:05 +00:00
t.katsumata1122
ae6c0e0c55 revise for 1.2.1.
about ... keep-arclog-xxx and keep-srvlog-xxx.

git-svn-id: http://pg-rman.googlecode.com/svn/trunk@44 182aca00-e38e-11de-a668-6fd11605f5ce
2011-06-21 05:47:18 +00:00
katsumata.tomonari@oss.ntt.co.jp
566c47a6fc release pg_rman-1.2.0.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@38 182aca00-e38e-11de-a668-6fd11605f5ce
2011-02-07 01:57:11 +00:00
itagaki.takahiro
686a5b0cf2 Remove dependency to libsml2 and libxslt.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@36 182aca00-e38e-11de-a668-6fd11605f5ce
2010-06-01 07:10:49 +00:00
itagaki.takahiro
9df43a0ad2 Yet another fixes for DST.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@35 182aca00-e38e-11de-a668-6fd11605f5ce
2010-06-01 06:48:21 +00:00
itagaki.takahiro
5933d52f54 Determine whether Daylight Saving Time is in effect when parse time.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@34 182aca00-e38e-11de-a668-6fd11605f5ce
2010-06-01 06:39:16 +00:00
itagaki.takahiro
397c9ebaad Fix a bug in extracting filename from archive_command.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@33 182aca00-e38e-11de-a668-6fd11605f5ce
2010-03-03 05:05:56 +00:00
itagaki.takahiro
7889cafbe3 Don't write invalid fields to ini files.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@31 182aca00-e38e-11de-a668-6fd11605f5ce
2010-01-29 09:10:14 +00:00