Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 25117a7

Browse files
committed
Revert "PGPRO-1059: Add PG version into show output"
This reverts commit a7826d0.
1 parent a7826d0 commit 25117a7

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

src/show.c

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,15 @@ show_backup_list(FILE *out, parray *backup_list)
226226

227227
/* if you add new fields here, fix the header */
228228
/* show header */
229-
fputs("============================================================================================================================================\n", out);
230-
fputs(" Instance Version ID Recovery time Mode WAL Current/Parent TLI Time Data Start LSN Stop LSN Status \n", out);
231-
fputs("============================================================================================================================================\n", out);
229+
fputs("==================================================================================================================================\n", out);
230+
fputs(" Instance ID Recovery time Mode WAL Current/Parent TLI Time Data Start LSN Stop LSN Status\n", out);
231+
fputs("==================================================================================================================================\n", out);
232232

233233
for (i = 0; i < parray_num(backup_list); i++)
234234
{
235235
pgBackup *backup = parray_get(backup_list, i);
236236
TimeLineID parent_tli;
237-
FILE *fp;
238237
char *backup_id;
239-
char pg_version_path[MAXPGPATH];
240-
char pg_version[100] = "---";
241238
char timestamp[100] = "----";
242239
char duration[20] = "----";
243240
char data_bytes_str[10] = "----";
@@ -260,27 +257,8 @@ show_backup_list(FILE *out, parray *backup_list)
260257
parent_tli = get_parent_tli(backup->tli);
261258
backup_id = base36enc(backup->start_time);
262259

263-
/* Read PG_VERSION file to show backup version */
264-
pgBackupGetPath2(backup, pg_version_path, lengthof(pg_version_path),
265-
DATABASE_DIR, "PG_VERSION");
266-
fp = pgut_fopen(pg_version_path, "rt", true);
267-
if (fp)
268-
{
269-
if (fgets(pg_version, lengthof(pg_version), fp))
270-
{
271-
int len = strlen(pg_version);
272-
273-
/* Remove trailing new line */
274-
if (len > 0 && pg_version[len - 1] == '\n')
275-
pg_version[len - 1] = '\0';
276-
}
277-
fclose(fp);
278-
}
279-
280-
fprintf(out, " %-11s %-8s %-6s %-19s %-6s %-7s %3d / %-3d %5s %6s %2X/%-8X %2X/%-8X %-8s\n",
281-
instance_name,
282-
pg_version,
283-
backup_id,
260+
fprintf(out, " %-11s %-6s %-19s %-6s %-7s %3d / %-3d %5s %6s %2X/%-8X %2X/%-8X %-8s\n",
261+
instance_name, backup_id,
284262
timestamp,
285263
pgBackupGetBackupMode(backup),
286264
backup->stream ? "STREAM": "ARCHIVE",

0 commit comments

Comments
 (0)