Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ8mw-0007qF-0T for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Mar 2022 14:20:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nQ8mu-0005mx-UO for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Mar 2022 14:20:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ8mu-0005mo-Jl for pgsql-hackers@lists.postgresql.org; Fri, 04 Mar 2022 14:20:08 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nQ8ms-0006rj-9I for pgsql-hackers@lists.postgresql.org; Fri, 04 Mar 2022 14:20:07 +0000 Received: by mail-lf1-x12c.google.com with SMTP id i11so14448228lfu.3 for ; Fri, 04 Mar 2022 06:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=hyUM9VxFCnlDemFjgU3g6kvCA4BzAYTG9lYNtfhkptc=; b=TtcfEdN/88N/DvNYNOv+sG0sn2aZOFGCFrtYSEacMCOTu4C7PTwSy0MIVnZKIAbZJH mbXUuOP12UnPOtjyNel1yImxMaSEGdHbXsXc4l/Qw6pDy4xEqllUy6nFsGxaP73M41Kx bvV9WcWMiNoUpAJCm9dJ27jfrUfOFnsMHdMvbt4HJXuCIR9tjhtzU5SACSVD3OsMoHCg HI9zLAbviT5tMaTPgAqiUtb97ikgiT03XpGQInC1OA5pxoF+IiSvfFT7p+ePg9Q+XIxp 46zuRiF7Vw5g35ucsqd/bNoiYIWyomtgOGpE5+u9E4t+QCBDMAykYJVIVZhWSHQIpUfG JvAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hyUM9VxFCnlDemFjgU3g6kvCA4BzAYTG9lYNtfhkptc=; b=c4MCkli+DMjor0si+vhxJ2y6tsY8CBPu7EGEeqQE88i2GMwHgNqk6wYJveMUeEqfa0 AQWtvZGSAKrLxy5YtsmuJpxD36/vRdM+i/duAepifeSYFw7r5nA9Fe4zjXwjtxc5WYjS mYIkS6AnUdxb946TtsVWVKkMzP6NNcw2YYrmGWr6SQnjuS60c9tkprdt+WP1eOmf4kZt HhFW4y24+Nnhxxi5BDno1PejegPUhv/q0aEumypGCAgVGvQ3o9Bj5Tw+3yWkVHGeErd1 9bphVDZaR/bDwIbJjX0AFdq4jBQwMnw3v9X+/hQfWnxBcbLmPDsMI/f+CS9+Xm/KmFzN 8Ggg== X-Gm-Message-State: AOAM533E17O/7dNZcPoW61adnPDJx1RBt8ak6ssBUvQIBHW+9PgYzaR1 2rwzRR2mxxJE3gAr7+hhcAfNcSbpCmF3ZVS3WztzORWfcTo= X-Google-Smtp-Source: ABdhPJxsy0NGhCvqKSZ9onu3WSUJ1TumDIgkCrw0LRi9EoAXcc8ynhYqhKKx/bsmWAIJSs8v9PNVp3/1EIs+mAhPSc4= X-Received: by 2002:a05:6512:6ce:b0:441:da6e:3fba with SMTP id u14-20020a05651206ce00b00441da6e3fbamr25084265lff.509.1646403603158; Fri, 04 Mar 2022 06:20:03 -0800 (PST) MIME-Version: 1.0 From: RKN Sai Krishna Date: Fri, 4 Mar 2022 19:49:51 +0530 Message-ID: Subject: pg_rewind enhancements To: pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000ec592505d9653533" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ec592505d9653533 Content-Type: text/plain; charset="UTF-8" Hi, While using pg_rewind, I found that it is a bit difficult to use pg_rewind as it seems to copy even the configuration files and also remove some of the files created on the old primary which may not be present on the new primary. Similarly it copies files under the data directory of the new primary which may not be needed or which possibly could be junk files. I would propose to have a couple of new command line arguments to pg_rewind. One, a comma separated list of files which should be preserved on the old primary, in other words which shouldn't be overwritten from the new primary. Second, a comma separated list of files which should be excluded while copying files from the new primary onto the old primary. Would like to invite more thoughts from the hackers. Regards, RKN --000000000000ec592505d9653533 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

While using pg_rewind, I found that it is a bit= difficult to use pg_rewind as it seems to copy even the configuration file= s and also remove some of the files created on the old primary which may no= t be present on the new primary. Similarly it copies files under the data d= irectory of the new primary which may not be needed or which possibly could= be junk files.

I would propose to have a couple of new command line= arguments to pg_rewind. One, a comma separated list of files which should = be preserved on the old primary, in other words which shouldn't be over= written from the new primary. Second, a comma separated list of files which= should be excluded while copying files from the new primary onto the old p= rimary.

Would like to invite more thoughts from the hackers.

= Regards,
RKN
--000000000000ec592505d9653533--