while (buf->cursor < buf->len)
{ char *s = &buf->data[buf->cursor]; int eo = get_eol_offset(buf); char *e = &buf->data[eo]; char *c;
if (line_starts_with(s, e, "START WAL LOCATION: ", &s))
{ if (!parse_lsn(s, e, start_lsn, &c))
pg_fatal("%s: could not parse %s",
filename, "START WAL LOCATION"); if (c >= e || *c != ' ')
pg_fatal("%s: improper terminator for %s",
filename, "START WAL LOCATION");
found |= 1;
} elseif (line_starts_with(s, e, "START TIMELINE: ", &s))
{ if (!parse_tli(s, e, start_tli))
pg_fatal("%s: could not parse TLI for %s",
filename, "START TIMELINE"); if (*start_tli == 0)
pg_fatal("%s: invalid TLI", filename);
found |= 2;
} elseif (line_starts_with(s, e, "INCREMENTAL FROM LSN: ", &s))
{ if (!parse_lsn(s, e, previous_lsn, &c))
pg_fatal("%s: could not parse %s",
filename, "INCREMENTAL FROM LSN"); if (c >= e || *c != '\n')
pg_fatal("%s: improper terminator for %s",
filename, "INCREMENTAL FROM LSN");
found |= 4;
} elseif (line_starts_with(s, e, "INCREMENTAL FROM TLI: ", &s))
{ if (!parse_tli(s, e, previous_tli))
pg_fatal("%s: could not parse %s",
filename, "INCREMENTAL FROM TLI"); if (*previous_tli == 0)
pg_fatal("%s: invalid TLI", filename);
found |= 8;
}
buf->cursor = eo;
}
if ((found & 1) == 0)
pg_fatal("%s: could not find %s", filename, "START WAL LOCATION"); if ((found & 2) == 0)
pg_fatal("%s: could not find %s", filename, "START TIMELINE"); if ((found & 4) != 0 && (found & 8) == 0)
pg_fatal("%s: %s requires %s", filename, "INCREMENTAL FROM LSN", "INCREMENTAL FROM TLI"); if ((found & 8) != 0 && (found & 4) == 0)
pg_fatal("%s: %s requires %s", filename, "INCREMENTAL FROM TLI", "INCREMENTAL FROM LSN");
}
if ((output_fd = open(output_filename,
O_WRONLY | O_CREAT | O_EXCL | PG_BINARY,
pg_file_create_mode)) < 0)
pg_fatal("could not open file \"%s\": %m", output_filename);
while (buf->cursor < buf->len)
{ char *s = &buf->data[buf->cursor]; int eo = get_eol_offset(buf); char *e = &buf->data[eo];
if (!line_starts_with(s, e, "INCREMENTAL FROM LSN: ", NULL) &&
!line_starts_with(s, e, "INCREMENTAL FROM TLI: ", NULL))
{
ssize_t wb;
wb = write(output_fd, s, e - s); if (wb != e - s)
{ if (wb < 0)
pg_fatal("could not write file \"%s\": %m", output_filename); else
pg_fatal("could not write file \"%s\": wrote %d of %d",
output_filename, (int) wb, (int) (e - s));
} if (pg_checksum_update(&checksum_ctx, (uint8 *) s, e - s) < 0)
pg_fatal("could not update checksum of file \"%s\"",
output_filename);
}
buf->cursor = eo;
}
if (close(output_fd) != 0)
pg_fatal("could not close file \"%s\": %m", output_filename);
if (success && s[nchars] != '\n')
success = false;
return success;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(vorverarbeitet am 2026-08-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.