Re: tablespace_map code cleanup

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: tablespace_map code cleanup
Date: 2020-05-07 16:14:24
Message-ID: CA+TgmoaABG5_BmocBEuFbtmi1xk9Bw0sW_wO3V-v3KKZfAp8gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 6, 2020 at 11:15 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Oh, good point. v2 attached.

Here's v3, with one more small cleanup. I noticed tblspc_map_file is
initialized to NULL and then unconditionally reset to the return value
of makeStringInfo(), and then later tested to see whether it is NULL.
It can't be, because makeStringInfo() doesn't return NULL. So the
attached version deletes the superfluous initialization and the
superfluous test.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
v3-0001-Don-t-export-basebackup.c-s-sendTablespace.patch application/octet-stream 6.8 KB
v3-0002-Minor-code-cleanup-for-perform_base_backup.patch application/octet-stream 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-05-07 16:18:52 Re: Should smgrdounlink() be removed?
Previous Message Amit Langote 2020-05-07 15:32:16 Re: PG 13 release notes, first draft