Re: refactoring basebackup.c

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Subject: Re: refactoring basebackup.c
Date: 2021-07-21 16:11:49
Message-ID: 6300965F-E30F-41F4-9785-A49EA725ECD8@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Jul 21, 2021, at 8:09 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> A callback where?

If you were going to support lots of formats, not just tar, you might want the streamer class for each format to have a callback which sets up the injector, rather than having CreateBackupStreamer do it directly. Even then, having now studied CreateBackupStreamer a bit more, the idea seems less appealing than it did initially. I don't think it makes things any cleaner when only supporting tar, and maybe not even when supporting multiple formats, so I'll withdraw the suggestion.


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Sitnikov 2021-07-21 16:13:07 Re: speed up verifying UTF-8
Previous Message Jacob Champion 2021-07-21 16:05:11 Re: badly calculated width of emoji in psql