pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_rewind: Allow writing recovery configuration
4+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2019-09-30 5daf682cfc  Fix pg_rewind link order issue introduced in 927474ce1a2.
* pgsql: pg_rewind: Allow writing recovery configuration
@ 2019-09-30 17:11  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Alvaro Herrera @ 2019-09-30 17:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_rewind: Allow writing recovery configuration

This is provided with a new switch --write-recovery-conf and reuses the
pg_basebackup code.

Author: Paul Guo, Jimmy Yih, Ashwin Agrawal
Reviewed-by: Alexey Kondratov, Michaël Paquier, Álvaro Herrera
Discussion: https://postgr.es/m/CAEET0ZEffUkXc48pg2iqARQgGRYDiiVxDu+yYek_bTwJF+q=Uw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/927474ce1a2498ddb617c6113a88ca61fbba161d

Modified Files
--------------
doc/src/sgml/ref/pg_rewind.sgml | 13 +++++++++++++
src/bin/pg_rewind/Makefile      |  2 +-
src/bin/pg_rewind/libpq_fetch.c |  3 +--
src/bin/pg_rewind/pg_rewind.c   | 35 ++++++++++++++++++++++++++++++++++-
src/bin/pg_rewind/pg_rewind.h   |  9 +++++++--
5 files changed, 56 insertions(+), 6 deletions(-)



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

* Re: pgsql: pg_rewind: Allow writing recovery configuration
@ 2019-09-30 19:20  Andres Freund <andres@anarazel.de>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Andres Freund @ 2019-09-30 19:20 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

Hi,

On 2019-09-30 17:11:09 +0000, Alvaro Herrera wrote:
> pg_rewind: Allow writing recovery configuration
> 
> This is provided with a new switch --write-recovery-conf and reuses the
> pg_basebackup code.
> 
> Author: Paul Guo, Jimmy Yih, Ashwin Agrawal
> Reviewed-by: Alexey Kondratov, Michaël Paquier, Álvaro Herrera
> Discussion: https://postgr.es/m/CAEET0ZEffUkXc48pg2iqARQgGRYDiiVxDu+yYek_bTwJF+q=Uw@mail.gmail.com

This currently fails on windows under mingw:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2019-09-30%2018%3A00%3A36

Sep 30 14:11:02 ccache x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -O2 pg_rewind.o parsexlog.o xlogreader.o datapagemap.o timeline.o fetch.o file_ops.o copy_fetch.o libpq_fetch.o filemap.o win32ver.o -L../../../src/port -L../../../src/common -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/fe_utils -lpgfeutils  -Wl,--allow-multiple-definition -Wl,--disable-auto-import -L/c/prog/3p64/lib  -L/c/prog/3p64/lib -L/c/prog/3p64/openssl-win64/lib/VC -Wl,--as-needed   -lpgcommon -lpgport -lintl -lxslt -lxml2 -lz -lws2_32 -lm  -lws2_32 -o pg_rewind.exe
Sep 30 14:11:02 ../../../src/fe_utils/libpgfeutils.a(recovery_gen.o): In function `GenerateRecoveryConfig':
Sep 30 14:11:02 c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/fe_utils/recovery_gen.c:33: undefined reference to `createPQExpBuffer'
Sep 30 14:11:02 c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/fe_utils/recovery_gen.c:44: undefined reference to `PQserverVersion'

I assume the issue is that the specified link order is:
LDFLAGS_INTERNAL += $(libpq_pgport) -L$(top_builddir)/src/fe_utils -lpgfeutils
but pgfeutils introduces a dependency on symbols from libpq that weren't
needed at the time libpq was linked. Therefore they aren't included
inthe resulting library.

I'll reorder them.

Greetings,

Andres Freund





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

* Re: pgsql: pg_rewind: Allow writing recovery configuration
@ 2019-09-30 19:27  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 4+ messages in thread

From: Alvaro Herrera @ 2019-09-30 19:27 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers@lists.postgresql.org

On 2019-Sep-30, Andres Freund wrote:

> This currently fails on windows under mingw:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2019-09-30%2018%3A00%3A36
> 
> Sep 30 14:11:02 ccache x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -O2 pg_rewind.o parsexlog.o xlogreader.o datapagemap.o timeline.o fetch.o file_ops.o copy_fetch.o libpq_fetch.o filemap.o win32ver.o -L../../../src/port -L../../../src/common -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/fe_utils -lpgfeutils  -Wl,--allow-multiple-definition -Wl,--disable-auto-import -L/c/prog/3p64/lib  -L/c/prog/3p64/lib -L/c/prog/3p64/openssl-win64/lib/VC -Wl,--as-needed   -lpgcommon -lpgport -lintl -lxslt -lxml2 -lz -lws2_32 -lm  -lws2_32 -o pg_rewind.exe
> Sep 30 14:11:02 ../../../src/fe_utils/libpgfeutils.a(recovery_gen.o): In function `GenerateRecoveryConfig':
> Sep 30 14:11:02 c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/fe_utils/recovery_gen.c:33: undefined reference to `createPQExpBuffer'
> Sep 30 14:11:02 c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/fe_utils/recovery_gen.c:44: undefined reference to `PQserverVersion'
> 
> I assume the issue is that the specified link order is:
> LDFLAGS_INTERNAL += $(libpq_pgport) -L$(top_builddir)/src/fe_utils -lpgfeutils
> but pgfeutils introduces a dependency on symbols from libpq that weren't
> needed at the time libpq was linked. Therefore they aren't included
> inthe resulting library.

Hmm, that's weird but understandable.  Thanks for researching.

> I'll reorder them.

Thanks.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





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

* Re: pgsql: pg_rewind: Allow writing recovery configuration
@ 2019-09-30 21:51  Andres Freund <andres@anarazel.de>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Andres Freund @ 2019-09-30 21:51 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-committers@lists.postgresql.org

Hi,

On 2019-09-30 16:27:27 -0300, Alvaro Herrera wrote:
> On 2019-Sep-30, Andres Freund wrote:
> > I'll reorder them.

Pushed.

Greetings,

Andres Freund





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


end of thread, other threads:[~2019-09-30 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-30 17:11 pgsql: pg_rewind: Allow writing recovery configuration Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-09-30 19:20 ` Andres Freund <andres@anarazel.de>
2019-09-30 19:27   ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-09-30 21:51     ` Andres Freund <andres@anarazel.de>

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