On Mon, Sep 25, 2017 at 6:26 PM, chenhj <chjis...@163.com> wrote: > On 2017-09-23 01:59:0, "Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > On Fri, Sep 22, 2017 at 7:16 PM, chenhj <chjis...@163.com> wrote: > >> This is the new pacth with TAP test and use Macro XLOGDIR. >> > > Good. I took a quick look over the patch. > Why do you need master_query(), standby_query() and run_query() in > RewindTest.pm? > You can do just $node_master->safe_psql() and $node_slave->safe_psql() > instead. > > > Ooh, i did not notice that function.Thank you for your advice! >
Great. I tried this patch. It applies cleanly, but doesn't compile. pg_rewind.c:310:36: error: too few arguments provided to function-like > macro invocation > XLByteToSeg(divergerec, startsegno); > ^ > ../../../src/include/access/xlog_internal.h:118:9: note: macro > 'XLByteToSeg' defined here > #define XLByteToSeg(xlrp, logSegNo, wal_segsz_bytes) \ > ^ > pg_rewind.c:310:2: error: use of undeclared identifier 'XLByteToSeg' > XLByteToSeg(divergerec, startsegno); > ^ > pg_rewind.c:311:89: error: too few arguments provided to function-like > macro invocation > XLogFileName(divergence_wal_filename, > targetHistory[lastcommontliIndex].tli, startsegno); > > ^ > ../../../src/include/access/xlog_internal.h:155:9: note: macro > 'XLogFileName' defined here > #define XLogFileName(fname, tli, logSegNo, wal_segsz_bytes) \ > ^ > pg_rewind.c:311:2: error: use of undeclared identifier 'XLogFileName' > XLogFileName(divergence_wal_filename, > targetHistory[lastcommontliIndex].tli, startsegno); > ^ > pg_rewind.c:312:34: error: too few arguments provided to function-like > macro invocation > XLByteToPrevSeg(endrec, endsegno); > ^ > ../../../src/include/access/xlog_internal.h:121:9: note: macro > 'XLByteToPrevSeg' defined here > #define XLByteToPrevSeg(xlrp, logSegNo, wal_segsz_bytes) \ > ^ > pg_rewind.c:312:2: error: use of undeclared identifier 'XLByteToPrevSeg' > XLByteToPrevSeg(endrec, endsegno); > ^ > pg_rewind.c:313:57: error: too few arguments provided to function-like > macro invocation > XLogFileName(last_source_wal_filename, endtli, endsegno); > ^ > ../../../src/include/access/xlog_internal.h:155:9: note: macro > 'XLogFileName' defined here > #define XLogFileName(fname, tli, logSegNo, wal_segsz_bytes) \ > ^ > pg_rewind.c:313:2: error: use of undeclared identifier 'XLogFileName' > XLogFileName(last_source_wal_filename, endtli, endsegno); > ^ > 8 errors generated. It appears that your patch conflicts with fc49e24f. Please, rebase it. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company