pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_basebackup: Fix a couple of recently-introduced bugs.
5+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2022-01-27 8ee940843d  Avoid referencing Z_DEFAULT_COMPRESSION outside HAVE_LIBZ.
* pgsql: pg_basebackup: Fix a couple of recently-introduced bugs.
@ 2022-01-27 16:15  Robert Haas <rhaas@postgresql.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Robert Haas @ 2022-01-27 16:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_basebackup: Fix a couple of recently-introduced bugs.

The server expects the compression level to be between 1 and 9, but
Z_DEFAULT_COMPRESSION is -1, so we must not try to send that value
to the server.

Because pg_basebackup's -R option is implemented on the client side,
it can't be used in combination with a backup target. Error out if
someone tries that, instead of silently ignoring the option.

Both issues were reported by Tushar Ahuja; patch by me.

Discussion: http://postgr.es/m/CA+TgmoaMwgdx8HxBjF8hmbohVvPL_0H5LqNrSq0uU+7BKp_Q2A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dabf63bc9a5b71f61c2c8712c85d33fdc06efa8c

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: pg_basebackup: Fix a couple of recently-introduced bugs.
@ 2022-01-27 17:45  Justin Pryzby <pryzby@telsasoft.com>
  parent: Robert Haas <rhaas@postgresql.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Justin Pryzby @ 2022-01-27 17:45 UTC (permalink / raw)
  To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On Thu, Jan 27, 2022 at 04:15:45PM +0000, Robert Haas wrote:
> pg_basebackup: Fix a couple of recently-introduced bugs.
> 
> The server expects the compression level to be between 1 and 9, but
> Z_DEFAULT_COMPRESSION is -1, so we must not try to send that value
> to the server.

If I'm not wrong, this is causing failures on cfbot.
https://cirrus-ci.com/task/6312181619752960?logs=build#L2056

[17:24:48.348] c:\cirrus\src\backend\replication\basebackup_gzip.c(90): warning C4715: 'bbsink_gzip_new': not all control paths return a value [c:\cirrus\postgres.vcxproj]
[17:24:48.348] c:\cirrus\src\bin\pg_basebackup\pg_basebackup.c(1922,67): error C2065: 'Z_DEFAULT_COMPRESSION': undeclared identifier [c:\cirrus\pg_basebackup.vcxproj]

The warning seems to be what's fixed by David's patch here.
https://www.postgresql.org/message-id/CA%2BTgmobSeRFM84pwa5HfZCGRx%3DQ-iFfPFZfq-4%3Dt1p04yxg_Og%40ma...

-- 
Justin





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: pg_basebackup: Fix a couple of recently-introduced bugs.
@ 2022-01-27 19:19  Robert Haas <robertmhaas@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Robert Haas @ 2022-01-27 19:19 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Thu, Jan 27, 2022 at 12:45 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> If I'm not wrong, this is causing failures on cfbot.
> https://cirrus-ci.com/task/6312181619752960?logs=build#L2056
>
> [17:24:48.348] c:\cirrus\src\backend\replication\basebackup_gzip.c(90): warning C4715: 'bbsink_gzip_new': not all control paths return a value [c:\cirrus\postgres.vcxproj]
> [17:24:48.348] c:\cirrus\src\bin\pg_basebackup\pg_basebackup.c(1922,67): error C2065: 'Z_DEFAULT_COMPRESSION': undeclared identifier [c:\cirrus\pg_basebackup.vcxproj]
>
> The warning seems to be what's fixed by David's patch here.
> https://www.postgresql.org/message-id/CA%2BTgmobSeRFM84pwa5HfZCGRx%3DQ-iFfPFZfq-4%3Dt1p04yxg_Og%40ma...

I can commit that patch (though so could David) but I don't understand
why you think it's connected to this commit particularly.

-- 
Robert Haas
EDB: http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: pg_basebackup: Fix a couple of recently-introduced bugs.
@ 2022-01-27 19:22  Justin Pryzby <pryzby@telsasoft.com>
  parent: Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Justin Pryzby @ 2022-01-27 19:22 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-committers@lists.postgresql.org

On Thu, Jan 27, 2022 at 02:19:30PM -0500, Robert Haas wrote:
> On Thu, Jan 27, 2022 at 12:45 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > If I'm not wrong, this is causing failures on cfbot.
> > https://cirrus-ci.com/task/6312181619752960?logs=build#L2056
> >
> > [17:24:48.348] c:\cirrus\src\backend\replication\basebackup_gzip.c(90): warning C4715: 'bbsink_gzip_new': not all control paths return a value [c:\cirrus\postgres.vcxproj]
> > [17:24:48.348] c:\cirrus\src\bin\pg_basebackup\pg_basebackup.c(1922,67): error C2065: 'Z_DEFAULT_COMPRESSION': undeclared identifier [c:\cirrus\pg_basebackup.vcxproj]
> >
> > The warning seems to be what's fixed by David's patch here.
> > https://www.postgresql.org/message-id/CA%2BTgmobSeRFM84pwa5HfZCGRx%3DQ-iFfPFZfq-4%3Dt1p04yxg_Og%40ma...
> 
> I can commit that patch (though so could David) but I don't understand
> why you think it's connected to this commit particularly.

The C2065: is connected to this commit, right ?

I included the warning since it's 1 line away and evidences that the warning is
easily visible , and not due to some obscure combination of windows settings.

-- 
Justin





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgsql: pg_basebackup: Fix a couple of recently-introduced bugs.
@ 2022-01-27 20:00  Robert Haas <robertmhaas@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Robert Haas @ 2022-01-27 20:00 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Thu, Jan 27, 2022 at 2:22 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> On Thu, Jan 27, 2022 at 02:19:30PM -0500, Robert Haas wrote:
> > On Thu, Jan 27, 2022 at 12:45 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > > If I'm not wrong, this is causing failures on cfbot.
> > > https://cirrus-ci.com/task/6312181619752960?logs=build#L2056
> > >
> > > [17:24:48.348] c:\cirrus\src\backend\replication\basebackup_gzip.c(90): warning C4715: 'bbsink_gzip_new': not all control paths return a value [c:\cirrus\postgres.vcxproj]
> > > [17:24:48.348] c:\cirrus\src\bin\pg_basebackup\pg_basebackup.c(1922,67): error C2065: 'Z_DEFAULT_COMPRESSION': undeclared identifier [c:\cirrus\pg_basebackup.vcxproj]
> > >
> > > The warning seems to be what's fixed by David's patch here.
> > > https://www.postgresql.org/message-id/CA%2BTgmobSeRFM84pwa5HfZCGRx%3DQ-iFfPFZfq-4%3Dt1p04yxg_Og%40ma...
> >
> > I can commit that patch (though so could David) but I don't understand
> > why you think it's connected to this commit particularly.
>
> The C2065: is connected to this commit, right ?
>
> I included the warning since it's 1 line away and evidences that the warning is
> easily visible , and not due to some obscure combination of windows settings.

Oh ... I see, I misread your email.  Yeah, this commit introduced
Z_DEFAULT_COMPRESSION outside of a HAVE_LIBZ block. Whoops.

-- 
Robert Haas
EDB: http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2022-01-27 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 16:15 pgsql: pg_basebackup: Fix a couple of recently-introduced bugs. Robert Haas <rhaas@postgresql.org>
2022-01-27 17:45 ` Justin Pryzby <pryzby@telsasoft.com>
2022-01-27 19:19   ` Robert Haas <robertmhaas@gmail.com>
2022-01-27 19:22     ` Justin Pryzby <pryzby@telsasoft.com>
2022-01-27 20:00       ` Robert Haas <robertmhaas@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox