1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-28 09:33:54 +02:00
Commit Graph

60 Commits

Author SHA1 Message Date
Arthur Zakirov
a100094bd4 Remove wrong semicolon 2017-04-18 19:42:23 +03:00
Anastasia
f833ca624b Code cleanup: backup, restore. Still WIP. Something can be broken. 2017-04-18 11:41:02 +03:00
Anastasia
612070c48d Code cleanup. remove unused check option 2017-04-12 17:39:20 +03:00
Artur Zakirov
b67dd1e2ea Update copyright 2017-03-01 16:50:07 +03:00
Anastasia
23abfcb5ce change WARNING message to LOG in verbose mode 2017-02-15 18:49:46 +03:00
Artur Zakirov
4c1dde8cd9 Merge branch 'ptrack' of git.postgrespro.ru:pgpro-dev/pg_probackup into ptrack 2017-02-15 18:28:38 +03:00
Artur Zakirov
eb531bc490 WAL delete fixes 2017-02-15 18:28:34 +03:00
Anastasia
62246e4c4e remove debug message 2017-02-15 18:12:12 +03:00
Anastasia
1e2b238689 don't try to check header of zeroed page 2017-02-15 18:10:43 +03:00
Anastasia
f4fa1cd454 fix zeroed page handling. Skip checksum computing and just save the page 2017-02-15 14:12:04 +03:00
Anastasia
547470abb8 check size of the file if block reading has failed 2017-02-14 16:25:30 +03:00
Anastasia
be18e8d39e add debug message 2017-02-14 11:27:15 +03:00
Anastasia
96fe569f6f Add nblocks into error message 2017-02-13 18:27:50 +03:00
Anastasia
42369f4cfd It's ok if file grows during backup 2017-02-13 18:24:15 +03:00
Anastasia
a39511bf88 don't handle possible hole cut at restore 2017-02-13 17:34:29 +03:00
Anastasia
cd6dd02245 fix a typo in file->size check 2017-02-13 17:33:05 +03:00
Anastasia
78370729c5 refactor backup_data_file(), don't cut the hole 2017-02-13 17:06:53 +03:00
Anastasia
946e1e24f0 Disable page hole cut in backup_data_file() 2017-02-13 11:49:47 +03:00
Anastasia
2ec6bc67f4 Implement incremental backup of compressed files, both page and ptrack do the same. Adds two columns to the list of files. 2017-02-13 11:44:53 +03:00
stalkerg
188bbdd593 Rename project to pg_probackup. 2016-11-16 20:34:21 +03:00
stalkerg
ff61fcc341 Show empty page warning only in verbose mode. 2016-11-16 15:20:54 +03:00
stalkerg
cd9a119020 Hide some log message for non-verbose mode. 2016-10-18 12:31:11 +03:00
stalkerg
c67832583e Add backup_label to file_database.txt for all checks. 2016-09-29 19:44:59 +03:00
stalkerg
fb4ae4a235 Fix recalc checksums during restore for segno > 0. 2016-09-13 19:50:59 +03:00
stalkerg
9d273330d3 Add usleep for checksum cycle. 2016-09-08 12:35:28 +03:00
stalkerg
8cfc6bee84 Use one fwrite+memcpy insted three fwrite. 2016-09-06 19:22:43 +03:00
stalkerg
f69e780d37 Fix checksums for segno > 0 2016-09-06 16:30:54 +03:00
stalkerg
0fa7e2fdbd Change fallback logic and checks page header. 2016-08-30 15:53:38 +03:00
stalkerg
a34152b4aa Try get page again when checksum is fail. 2016-07-12 21:26:00 +03:00
stalkerg
356ebd3728 Add checksums database support. 2016-07-07 18:38:56 +03:00
stalkerg
9471875b15 Add stream mode for save WAL during backup process. 2016-05-26 15:56:32 +03:00
stalkerg
091fe0ada2 Fix backup many segments of relation (big relations) with ptrack.
Add fail test for show problem in lost pages in backup process.
2016-05-01 22:05:18 +03:00
stalkerg
e713477425 Fix overwrite files by zero lenght files. 2016-04-26 23:00:00 +03:00
Zhuravlev Uriy aka stalkerg
375d915647 Try fix size. 2016-03-02 16:16:50 +03:00
Zhuravlev Uriy aka stalkerg
07d4b8a030 Add threads for restore. 2016-02-29 21:49:53 +03:00
Zhuravlev Uriy aka stalkerg
9c475eccbf First version of ptrack support. 2016-02-27 21:07:55 +03: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
04834e73c7 Page-level backup using block tracking in WAL records
This commit improves the performance of page-level, or differential
backup, by not having to scan anymore all the pages of a relation file,
something that can be very long on large data sets, but by scanning the
list of blocks changed by WAL records since the last full or differential
backup.

As a restriction and to avoid potential data corruption should hint-bit
updates occur on a page, backups can only be taken from a server that has
wal_log_hints or data checksums enabled.

Base patch by Yury Zhuravlev, heavily modified by me.
2016-01-15 23:47:38 +09:00
Michael Paquier
47d0b60ebd Fix some code indentation 2016-01-15 15:56:56 +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
25ebddb02b Update CRC32 algorithm to CRC32C
This is to be compatible with Postgres >= 9.5 that switched to a more
performant algorithm.

Per reminder from Zhuravlev Uriy.
2015-12-07 21:44:33 +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
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
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
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
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
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