Skip to content

Commit 5bf17cc

Browse files
author
Grigory Smolkin
committed
Merge branch 'master' into release_2_5
2 parents 75c8a8f + d9f95db commit 5bf17cc

34 files changed

+1972
-542
lines changed

doc/pgprobackup.xml

+13
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,14 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
18801880
<literal>template1</literal> databases are always restored.
18811881
</para>
18821882
</note>
1883+
<note>
1884+
<para>
1885+
Due to how recovery works in PostgreSQL < 12 it is advisable to
1886+
disable <option>hot_standby</option> option, when running partial
1887+
restore of PostgreSQL cluster of version less than <option>12</option>.
1888+
Otherwise recovery may fail.
1889+
</para>
1890+
</note>
18831891
</refsect3>
18841892
</refsect2>
18851893
<refsect2 id="pbk-performing-point-in-time-pitr-recovery">
@@ -4411,6 +4419,10 @@ pg_probackup archive-get -B <replaceable>backup_dir</replaceable> --instance <re
44114419
<listitem>
44124420
<para>
44134421
Specifies the timestamp up to which recovery will proceed.
4422+
If timezone offset is not specified, local timezone is used.
4423+
</para>
4424+
<para>
4425+
Example: <literal>--recovery-target-time='2020-01-01 00:00:00+03'</literal>
44144426
</para>
44154427
</listitem>
44164428
</varlistentry>
@@ -4597,6 +4609,7 @@ pg_probackup archive-get -B <replaceable>backup_dir</replaceable> --instance <re
45974609
<para>
45984610
Specifies the timestamp up to which the backup will stay
45994611
pinned. Must be an ISO-8601 complaint timestamp.
4612+
If timezone offset is not specified, local timezone is used.
46004613
</para>
46014614
<para>
46024615
Example: <literal>--expire-time='2020-01-01 00:00:00+03'</literal>

gen_probackup_project.pl

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ sub build_pgprobackup
167167
'pg_probackup.c',
168168
'restore.c',
169169
'show.c',
170+
'stream.c',
170171
'util.c',
171172
'validate.c',
172173
'checkdb.c',

src/backup.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
133133
pg_ptrack_clear(backup_conn, nodeInfo->ptrack_version_num);
134134

135135
/* notify start of backup to PostgreSQL server */
136-
time2iso(label, lengthof(label), current.start_time);
136+
time2iso(label, lengthof(label), current.start_time, false);
137137
strncat(label, " with pg_probackup", lengthof(label) -
138138
strlen(" with pg_probackup"));
139139

@@ -572,7 +572,6 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
572572
* NOTHING TO DO HERE
573573
*/
574574

575-
576575
/* write database map to file and add it to control file */
577576
if (database_map)
578577
{
@@ -765,7 +764,7 @@ do_backup(time_t start_time, pgSetBackupParams *set_backup_params,
765764
/* Create backup directory and BACKUP_CONTROL_FILE */
766765
if (pgBackupCreateDir(&current))
767766
elog(ERROR, "Cannot create backup directory");
768-
if (!lock_backup(&current, true))
767+
if (!lock_backup(&current, true, true))
769768
elog(ERROR, "Cannot lock backup %s directory",
770769
base36enc(current.start_time));
771770
write_backup(&current, true);
@@ -1383,7 +1382,7 @@ wait_wal_lsn(XLogRecPtr target_lsn, bool is_start_lsn, TimeLineID tli,
13831382
XLogRecPtr res;
13841383

13851384
res = get_prior_record_lsn(wal_segment_dir, current.start_lsn, target_lsn, tli,
1386-
in_prev_segment, instance_config.xlog_seg_size);
1385+
in_prev_segment, instance_config.xlog_seg_size);
13871386

13881387
if (!XLogRecPtrIsInvalid(res))
13891388
{

0 commit comments

Comments
 (0)