pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Refactor pg_rewind code and make it work against a standby
Date: Thu, 12 Nov 2020 14:58:02 +0200
Message-ID: <95c2ad04-eb6b-7c2e-b751-c65acccd81df@iki.fi> (raw)
In-Reply-To: <da768d3a-dddc-fd3f-4b64-e951a1926bfa@iki.fi>
References: <0c5b3783-af52-3ee5-f8fa-6e794061f70d@iki.fi>
	<20200820.173224.2258034742176021277.horikyota.ntt@gmail.com>
	<f155aab5-1323-8d0c-9e3b-32703124bf00@iki.fi>
	<20200918.164150.1688011206252014871.horikyota.ntt@gmail.com>
	<CAE-ML+-uLy_DiS4VSkbsjMEY9ZBob5LqBXPc31_dQ-EsSesgEw@mail.gmail.com>
	<4744063e-1a60-1b24-e1b7-7ace5e65f0d2@iki.fi>
	<CAE-ML+9NG=HnLq8P_sHM=9UFUPnWbQDSRnmZrMPXONERVJS+zQ@mail.gmail.com>
	<da768d3a-dddc-fd3f-4b64-e951a1926bfa@iki.fi>

On 04/11/2020 11:23, Heikki Linnakangas wrote:
> I read through the patches one more time, fixed a bunch of typos and
> such, and pushed patches 1-4. I'm going to spend some more time on
> testing the last patch. It allows using a standby server as the source,
> and we don't have any tests for that yet. Thanks for the review!

Did some more testing, fixed one bug, and pushed.

To test this, I set up a cluster with one primary, a standby, and a 
cascaded standby. I launched a test workload against the primary that 
creates tables, inserts rows, and drops tables continuously. In another 
shell, I promoted the cascaded standby, run some updates on the promoted 
server, and finally, run pg_rewind pointed at the standby, and start it 
again as a cascaded standby. Repeat.

Attached are the scripts I used. I edited them between test runs to test 
slightly different scenarios. I don't expect them to be very useful to 
anyone else, but the Internet is my backup.

I did find one bug in the patch with that, so the time was well spent: 
the code in process_queued_fetch_requests() got confused and errored 
out, if a file was removed in the source system while pg_rewind was 
running. There was code to deal with that, but it was broken. Fixed that.

- Heikki

Attachments:

  rewind-cascading-test.tar.gz (application/gzip, 2.0K) download

view thread (18+ messages)  latest in thread

Message-ID: <95c2ad04-eb6b-7c2e-b751-c65acccd81df@iki.fi>
Permalink:  ../95c2ad04-eb6b-7c2e-b751-c65acccd81df@iki.fi/
Also on:    postgresql.org/message-id/95c2ad04-eb6b-7c2e-b751-c65acccd81df@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hlinnaka@iki.fi, soumyadeep2007@gmail.com, horikyota.ntt@gmail.com
  Subject: Re: Refactor pg_rewind code and make it work against a standby
  In-Reply-To: <95c2ad04-eb6b-7c2e-b751-c65acccd81df@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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