From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, "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-09-13 11:19:25 |
Message-ID: | CAFiTN-u8FGWedkSoyTOCZ96ZBWL8EJ-SfO4MYdQ_p6uY8Fc02A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 10, 2021 at 5:25 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Sep 8, 2021 at 3:39 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > The way the gzip APIs I used work, you tell it how big the output
> > buffer is and it writes until it fills that buffer, or until the input
> > buffer is empty, whichever happens first. But this seems to be the
> > other way around: you tell it how much input you have, and it tells
> > you how big a buffer it needs. To handle that elegantly, I think I
> > need to make some changes to the design of the bbsink stuff. What I'm
> > thinking is that each bbsink somehow tells the next bbsink how big to
> > make the buffer.
>
> Here's a new patch set with that design change (and a bug fix for 0001).
Seems like nothing has been done about the issue reported in [1]
This one line change shall fix the issue,
--- a/src/backend/replication/basebackup_gzip.c
+++ b/src/backend/replication/basebackup_gzip.c
@@ -264,6 +264,8 @@ bbsink_gzip_end_archive(bbsink *sink)
bbsink_archive_contents(sink->bbs_next, mysink->bytes_written);
mysink->bytes_written = 0;
}
+
+ bbsink_forward_end_archive(sink);
}
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2021-09-13 11:32:29 | Re: [PATCH] Allow multiple recursive self-references |
Previous Message | Rajkumar Raghuwanshi | 2021-09-13 10:17:36 | Re: Multi-Column List Partitioning |