1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-24 08:52:38 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
stalkerg
356ebd3728 Add checksums database support. 2016-07-07 18:38:56 +03:00
Zhuravlev Uriy aka stalkerg
9c475eccbf First version of ptrack support. 2016-02-27 21:07:55 +03:00
Michael Paquier
b84334b8f3 Remove unportable code of IsDir
IsDir was somewhat optimized on systems where DT_DIR (dirent.d_type
being not part of the POSIX spec) is present on some systems leading
to more complex logic depending on the file system used, particularly
on XFS this routine was actually broken. Having a call to stat()
should not be that expensive to check if a path is a directory or
not and this is proving to be far more stable coding, so just rely
on that, that's more portable anyway and will avoid future surprises.

Report by Yury Zhuravlev, though I did not use his patch.
2016-01-19 20:51:38 +09:00
Michael Paquier
5c37daca69 Sanitize error checks
All the ERROR_* fields are removed in favor of a more simple layer
made of ERROR, FATAL, PANIC. The two last ones are not actually used
yet, thought there should be some code paths that would need more
polishing on this matter.

The error message emitted before leaving should be fine to let the
user know what is happening.
2016-01-19 12:41:30 +09:00
Michael Paquier
f94c5ab447 Sanitize logging facility
--debug and --verbose had actually the same meaning as they were aimed
at giving to the user information regarding how the process is running,
hence both options are merged into --verbose and use elog(LOG) to decide
if a given message should be printed out depending on the verbosity of
the call. This makes a couple of routines more readable as they do not
depend on any boolean checks.

The "_()" have been removed from the code, those are aimed at being used
for translation but having them mandatorily in each log message is just
useless noise. If needed, pgut.c should be updated in consequence to
have a more portable facility.

At the same time this commit takes care of putting into correct shape
some code paths more in-line with PostgreSQL policy. There are surely
more of this kind of ugly stuff but at this stage things are more simple
and more manageable.
2016-01-14 16:36:39 +09:00
Michael Paquier
3ac6d13329 Remove --compress-data/-Z
Performance of compression is quite questionable on many objects like
that and makes the routines aimed at managing file copy, backup and restore
more complicated than they should be.

This commit results in a largely simplified code in data.c, which will
be helpful when integrating differential backup using WAL file lookup.
2016-01-14 15:19:38 +09:00
Michael Paquier
db249c800e Replace incremental backup by page-level differential backup
This will allow the introduction of file-level differential backup.
2014-01-30 15:58:55 +09:00
Michael Paquier
c8ebcc9c41 Rename project to pg_arman
This is officially a fork!
2014-01-27 12:02:56 +09:00
Michael Paquier
820485d225 Strip off archive backup mode
This mode is not actually necessary if we consider that the core of
pg_rman is the obtention of differential and full backups, the server
being afterwards in charge to recover necessary WAL segments from the
archive.

Regression tests and documentation are updated in accordance to the
changes.
2014-01-24 22:37:55 +09:00
Michael Paquier
5988e6bd10 Remove server backup feature
In order to keep only the core of pg_rman for incremental/differential
backup, this looks necessary and makes the code more simple. Including
server log files in a backup could be subject to discussion as well,
as for example a Postgres base backup does not include them, just
because in this case server instance is not aware of the log files.
2014-01-24 20:37:13 +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
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
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
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
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
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
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
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
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
itagaki.takahiro
4df4b1644f Sync the latest pgut and update copyrights.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@28 182aca00-e38e-11de-a668-6fd11605f5ce
2010-01-06 02:25:21 +00:00
itagaki.takahiro
e3b9fd4e16 Use join_path_components() if possible.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@27 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-27 07:30:55 +00:00
itagaki.takahiro
59d0911fa7 Fix a critical bug that pg_rman cannot restore database from incremental backup. Backup itself worked correctly, but restore command broke database files.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@25 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-22 07:36:31 +00:00
itagaki.takahiro
bc5717b1e0 Add a portable implementation for IsDir().
dirent.d_type is not in POSIX and does not exist at least on Solaris.

git-svn-id: http://pg-rman.googlecode.com/svn/trunk@23 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-18 02:44:35 +00:00
itagaki.takahiro
8863b7944b Adjust to be able to build on 8.3 or older versions.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@22 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-18 02:26:19 +00:00
itagaki.takahiro
f0d7a1254e Add missing headers and portable flock() implemented with fcntl() for Solaris.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@19 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-17 02:38:48 +00:00
itagaki.takahiro
08063f31f9 Fix typo in comments.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@13 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-10 13:16:08 +00:00
itagaki.takahiro
7fbb857d03 First import.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@2 182aca00-e38e-11de-a668-6fd11605f5ce
2009-12-08 00:21:28 +00:00