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

Some minor fixes#397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gsmolk merged 3 commits intomasterfrommkulagin-proposals
Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionsrc/data.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1516,7 +1516,7 @@ validate_one_page(Page page, BlockNumber absolute_blkno,
}

/*
*Valiate pages of datafile in PGDATA one by one.
*Validate pages of datafile in PGDATA one by one.
*
* returns true if the file is valid
* also returns true if the file was not found
Expand Down
2 changes: 0 additions & 2 deletionssrc/pg_probackup.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1071,8 +1071,6 @@ extern PageState *get_checksum_map(const char *fullpath, uint32 checksum_version
int n_blocks, XLogRecPtr dest_stop_lsn, BlockNumber segmentno);
extern datapagemap_t *get_lsn_map(const char *fullpath, uint32 checksum_version,
int n_blocks, XLogRecPtr shift_lsn, BlockNumber segmentno);
extern pid_t check_postmaster(const char *pgdata);

extern bool validate_file_pages(pgFile *file, const char *fullpath, XLogRecPtr stop_lsn,
uint32 checksum_version, uint32 backup_version, HeaderMap *hdr_map);

Expand Down
48 changes: 0 additions & 48 deletionssrc/util.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -556,51 +556,3 @@ datapagemap_print_debug(datapagemap_t *map)

pg_free(iter);
}

/*
* Return pid of postmaster process running in given pgdata.
* Return 0 if there is none.
* Return 1 if postmaster.pid is mangled.
*/
pid_t
check_postmaster(const char *pgdata)
{
FILE *fp;
pid_t pid;
char pid_file[MAXPGPATH];

join_path_components(pid_file, pgdata, "postmaster.pid");

fp = fopen(pid_file, "r");
if (fp == NULL)
{
/* No pid file, acceptable*/
if (errno == ENOENT)
return 0;
else
elog(ERROR, "Cannot open file \"%s\": %s",
pid_file, strerror(errno));
}

if (fscanf(fp, "%i", &pid) != 1)
{
/* something is wrong with the file content */
pid = 1;
}

if (pid > 1)
{
if (kill(pid, 0) != 0)
{
/* process no longer exists */
if (errno == ESRCH)
pid = 0;
else
elog(ERROR, "Failed to send signal 0 to a process %d: %s",
pid, strerror(errno));
}
}

fclose(fp);
return pid;
}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp