Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PostgreSQL v16 #255

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on:
push:
branches:
- master
- REL_16_STABLE
- REL_15_STABLE
- REL_14_STABLE
- REL_13_STABLE
- REL_12_STABLE
- REL_11_STABLE
pull_request:
branches:
- master
- REL_16_STABLE
- REL_15_STABLE
- REL_14_STABLE
- REL_13_STABLE
- REL_12_STABLE
- REL_11_STABLE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you release pg_rman for v11 in Janually?
I think it's better to remove the line after that.

Additionally you need remove line:49.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. I will remove after pg16 support.

schedule:
- cron: "0 1 * * SUN" # only master

Expand All @@ -41,11 +41,11 @@ jobs:
shell: bash -xe {0}
run: |
declare -A versions=(
["master"]="15.1"
["REL_15_STABLE"]="15.1"
["REL_14_STABLE"]="14.6"
["REL_13_STABLE"]="13.9"
["REL_12_STABLE"]="12.13"
["master"]="16.1"
["REL_15_STABLE"]="15.5"
["REL_14_STABLE"]="14.10"
["REL_13_STABLE"]="13.13"
["REL_12_STABLE"]="12.17"
["REL_11_STABLE"]="11.18"
)
[ -z "${versions[${{ env.BRANCH }}]}" ] && exit 1 # check if the key exists
Expand Down
22 changes: 11 additions & 11 deletions data.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ parse_page(int blkno,
*/
*lsn = PageXLogRecPtrGet(header->pd_lsn);

if (PageGetPageSize(header) == BLCKSZ &&
PageGetPageLayoutVersion(header) == PG_PAGE_LAYOUT_VERSION &&
if (PageGetPageSize(pagedata) == BLCKSZ &&
PageGetPageLayoutVersion(pagedata) == PG_PAGE_LAYOUT_VERSION &&
(header->pd_flags & ~PD_VALID_FLAG_BITS) == 0 &&
header->pd_lower >= SizeOfPageHeaderData &&
header->pd_lower <= header->pd_upper &&
Expand Down Expand Up @@ -270,7 +270,7 @@ backup_data_file(const char *from_root,
BlockNumber blknum;
BlockNumber segno;
size_t read_len;
int errno_tmp;
int errno_tmp = 0;
mikecaat marked this conversation as resolved.
Show resolved Hide resolved
pg_crc32c crc;
#ifdef HAVE_LIBZ
z_stream z;
Expand Down Expand Up @@ -308,7 +308,7 @@ backup_data_file(const char *from_root,
out = fopen(to_path, "w");
if (out == NULL)
{
int errno_tmp = errno;
errno_tmp = errno;
fclose(in);
ereport(ERROR,
(errcode(ERROR_SYSTEM),
Expand Down Expand Up @@ -417,7 +417,7 @@ backup_data_file(const char *from_root,
fwrite(page.data, 1, header.hole_offset, out) != header.hole_offset ||
fwrite(page.data + upper_offset, 1, upper_length, out) != upper_length)
{
int errno_tmp = errno;
errno_tmp = errno;
/* oops */
fclose(in);
fclose(out);
Expand Down Expand Up @@ -474,7 +474,7 @@ backup_data_file(const char *from_root,
{
if (fwrite(&header, 1, sizeof(header), out) != sizeof(header))
{
int errno_tmp = errno;
errno_tmp = errno;
/* oops */
fclose(in);
fclose(out);
Expand All @@ -498,7 +498,7 @@ backup_data_file(const char *from_root,
{
if (fwrite(page.data, 1, read_len, out) != read_len)
{
int errno_tmp = errno;
errno_tmp = errno;
/* oops */
fclose(in);
fclose(out);
Expand Down Expand Up @@ -539,7 +539,7 @@ backup_data_file(const char *from_root,
{
if (fwrite(&header, 1, sizeof(header), out) != sizeof(header))
{
int errno_tmp = errno;
errno_tmp = errno;
/* oops */
fclose(in);
fclose(out);
Expand Down Expand Up @@ -588,7 +588,7 @@ backup_data_file(const char *from_root,
*/
if (!check && chmod(to_path, FILE_PERMISSION) == -1)
{
int errno_tmp = errno;
errno_tmp = errno;

fclose(in);
fclose(out);
Expand Down Expand Up @@ -879,7 +879,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file,
FILE *in;
FILE *out;
size_t read_len = 0;
int errno_tmp;
int errno_tmp = 0;
char buf[8192];
struct stat st;
pg_crc32c crc;
Expand Down Expand Up @@ -921,7 +921,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file,
out = fopen(to_path, "w");
if (out == NULL)
{
int errno_tmp = errno;
errno_tmp = errno;
fclose(in);
ereport(ERROR,
(errcode(ERROR_SYSTEM),
Expand Down
7 changes: 3 additions & 4 deletions restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ do_restore(const char *target_time,
*/
if (!check)
{
int i;
int x;

if (verbose)
printf(_("----------------------------------------\n"));
Expand All @@ -280,7 +280,7 @@ do_restore(const char *target_time,
dir_list_file(files, pgdata, NULL, false, false);
parray_qsort(files, pgFileComparePathDesc); /* delete from leaf */

for (i = 0; i < parray_num(files); i++)
for (x = 0; x < parray_num(files); x++)
{
pgFile *file = (pgFile *) parray_get(files, i);
pgFileDelete(file);
Expand Down Expand Up @@ -1230,9 +1230,8 @@ readTimeLineHistory(TimeLineID targetTLI)
elog(DEBUG, "the calculated branch history is as below;");
for (i = 0; i < parray_num(result); i++)
{
pgTimeLine *timeline = parray_get(result, i);
elog(DEBUG, "stage %d: timeline ID = %d",
(int)parray_num(result) - i, timeline->tli);
(int)parray_num(result) - i, ((pgTimeLine *)(parray_get(result,i)))->tli);
}

return result;
Expand Down
Loading