public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v3 3/3] Fix timeline-tracking failure while sending a historic timeline
3+ messages / 3 participants
[nested] [flat]

* [PATCH v3 3/3] Fix timeline-tracking failure while sending a historic timeline
@ 2020-12-09 08:22 Kyotaro Horiguchi <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Kyotaro Horiguchi @ 2020-12-09 08:22 UTC (permalink / raw)

Walsender should track timeline switches while sending a historic
timeline. Regain that behavior, which was broken in PG13, by a thinko
of 709d003fbd.
---
 src/backend/replication/walsender.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index fe0d368a35..8545c6c423 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2491,7 +2491,7 @@ WalSndSegmentOpen(XLogReaderState *state, XLogSegNo nextSegNo,
 		XLogSegNo	endSegNo;
 
 		XLByteToSeg(sendTimeLineValidUpto, endSegNo, state->segcxt.ws_segsize);
-		if (state->seg.ws_segno == endSegNo)
+		if (nextSegNo == endSegNo)
 			*tli_p = sendTimeLineNextTLI;
 	}
 
-- 
2.27.0


----Next_Part(Tue_Jan__5_17_26_02_2021_224)----





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

* Re: convert libpq uri-regress tests to tap test
@ 2022-02-23 21:46 Alvaro Herrera <[email protected]>
  2022-02-23 22:03 ` Re: convert libpq uri-regress tests to tap test Tom Lane <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2022-02-23 21:46 UTC (permalink / raw)
  To: Andres Freund <[email protected]>; +Cc: Tom Lane <[email protected]>; Andrew Dunstan <[email protected]>; pgsql-hackers

On 2022-Feb-23, Andres Freund wrote:

> Separately: I don't really understand why we do the whole if USE_PGXS dance in
> src/test/modules?

Yeah, it seems a bit silly.  I'm not opposed to making these makefiles
unconditionally do the PGXS thing -- or the non-PGXS thing, if that
makes it easier to build multiple binaries.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/
"La grandeza es una experiencia transitoria.  Nunca es consistente.
Depende en gran parte de la imaginación humana creadora de mitos"
(Irulan)






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

* Re: convert libpq uri-regress tests to tap test
  2022-02-23 21:46 Re: convert libpq uri-regress tests to tap test Alvaro Herrera <[email protected]>
@ 2022-02-23 22:03 ` Tom Lane <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2022-02-23 22:03 UTC (permalink / raw)
  To: Alvaro Herrera <[email protected]>; +Cc: Andres Freund <[email protected]>; Andrew Dunstan <[email protected]>; pgsql-hackers

Alvaro Herrera <[email protected]> writes:
> On 2022-Feb-23, Andres Freund wrote:
>> Separately: I don't really understand why we do the whole if USE_PGXS dance in
>> src/test/modules?

> Yeah, it seems a bit silly.  I'm not opposed to making these makefiles
> unconditionally do the PGXS thing -- or the non-PGXS thing, if that
> makes it easier to build multiple binaries.

Agreed, we could easily lose that.  I think we only do it in contrib
to serve as an example of how to use PGXS ... although considering
we're not *testing* that build mode, one wonders how much that proves.
In any case, src/test/modules doesn't have to do it.

			regards, tom lane






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


end of thread, other threads:[~2022-02-23 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 08:22 [PATCH v3 3/3] Fix timeline-tracking failure while sending a historic timeline Kyotaro Horiguchi <[email protected]>
2022-02-23 21:46 Re: convert libpq uri-regress tests to tap test Alvaro Herrera <[email protected]>
2022-02-23 22:03 ` Re: convert libpq uri-regress tests to tap test Tom Lane <[email protected]>

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