Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3bdd555

Browse files
committed
add src/fu_util
1 parent4ee8592 commit3bdd555

27 files changed

+5348
-36
lines changed

‎Makefile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ PROGRAM := pg_probackup
3737
# pg_probackup sources
3838
OBJS := src/utils/configuration.o src/utils/json.o src/utils/logger.o\
3939
src/utils/parray.o src/utils/pgut.o src/utils/thread.o src/utils/remote.o src/utils/file.o
40+
OBJS += src/fu_util/impl/ft_impl.o src/fu_util/impl/fo_impl.o
4041
OBJS += src/archive.o src/backup.o src/catalog.o src/checkdb.o src/configure.o src/data.o\
4142
src/delete.o src/dir.o src/fetch.o src/help.o src/init.o src/merge.o\
4243
src/parsexlog.o src/ptrack.o src/pg_probackup.o src/restore.o src/show.o src/stream.o\
@@ -87,12 +88,15 @@ endif
8788
undefinePG_MAJORVER
8889

8990
#
90-
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS} -I$(top_pbk_srcdir)/src -I$(BORROW_DIR)
91+
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS} -I$(top_pbk_srcdir)src -I$(BORROW_DIR)
92+
PG_CPPFLAGS += -I$(top_pbk_srcdir)src/fu_util
9193
ifdefVPATH
9294
PG_CPPFLAGS += -Isrc
9395
endif
9496
overrideCPPFLAGS := -DFRONTEND$(CPPFLAGS)$(PG_CPPFLAGS)
9597
PG_LIBS_INTERNAL =$(libpq_pgport) ${PTHREAD_CFLAGS}
98+
CFLAGS += -fms-extensions
99+
96100

97101
# additional dependencies on borrowed files
98102
src/archive.o:$(BORROW_DIR)/instr_time.h

‎src/archive.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ do_archive_push(InstanceState *instanceState, InstanceConfig *instance, char *pg
228228
arg->ret=1;
229229
}
230230

231+
fobj_freeze();
232+
231233
/* Run threads */
232234
INSTR_TIME_SET_CURRENT(start_time);
233235
for (i=0;i<num_threads;i++)

‎src/backup.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
255255
wait_wal_lsn(instanceState->instance_wal_subdir_path,current.start_lsn, true,current.tli, false, true,ERROR, false);
256256
}
257257

258+
fobj_freeze();
259+
258260
/* start stream replication */
259261
if (current.stream)
260262
{
@@ -458,6 +460,8 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
458460
arg->ret=1;
459461
}
460462

463+
fobj_freeze();
464+
461465
/* Run threads */
462466
thread_interrupted= false;
463467
elog(INFO,"Start transferring data files");

‎src/catchup.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ catchup_multithreaded_copy(int num_threads,
489489
ssize_ttransfered_bytes_result=0;
490490
inti;
491491

492+
fobj_freeze();
493+
492494
/* init thread args */
493495
threads_args= (catchup_thread_runner_arg*)palloc(sizeof(catchup_thread_runner_arg)*num_threads);
494496
for (i=0;i<num_threads;i++)
@@ -711,6 +713,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
711713

712714
/* Start stream replication */
713715
join_path_components(dest_xlog_path,dest_pgdata,PG_XLOG_DIR);
716+
fobj_freeze();
714717
if (!dry_run)
715718
{
716719
fio_mkdir(FIO_LOCAL_HOST,dest_xlog_path,DIR_PERMISSION, false);

‎src/checkdb.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ do_block_validation(char *pgdata, uint32 checksum_version)
252252
arg->ret=1;
253253
}
254254

255+
fobj_freeze();
256+
255257
elog(INFO,"Start checking data files");
256258

257259
/* Run threads */
@@ -628,6 +630,8 @@ do_amcheck(ConnectionOptions conn_opt, PGconn *conn)
628630

629631
n_databases=PQntuples(res_db);
630632

633+
fobj_freeze();
634+
631635
/* For each database check indexes. In parallel. */
632636
for(i=0;i<n_databases;i++)
633637
{

‎src/fu_util/LICENSE‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2022-2022 Postgres Professional
4+
Copyright (c) 2022-2022 Yura Sokolov
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp