pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Euler Taveira <euler@eulerto.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: kuroda.hayato@fujitsu.com <kuroda.hayato@fujitsu.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Fabrízio de Royes Mello <fabriziomello@gmail.com>
Subject: Re: speed up a logical replica setup
Date: Mon, 19 Feb 2024 22:28:17 -0300
Message-ID: <79088f3e-7b9d-4059-9b36-e5ee0bc3889b@app.fastmail.com> (raw)
In-Reply-To: <CANhcyEXiC7=BsuA4zeXF5K0ugiAG5JU3ad5m3_G+fojJjqJ49Q@mail.gmail.com>
References: <9a9c7e65-c47b-4400-a63e-ac6169c0860e@app.fastmail.com>
	<CAFcNs+qAMdzd_73gwo3UE_25h+E-sHiV2paxfDgz=xw2y7hogw@mail.gmail.com>
	<TY3PR01MB9889D0FF89D502539340EA03F5432@TY3PR01MB9889.jpnprd01.prod.outlook.com>
	<TY3PR01MB9889F3C46DC76CE77B91FB58F5432@TY3PR01MB9889.jpnprd01.prod.outlook.com>
	<TY3PR01MB98894646568B37FE11E9CC0DF5432@TY3PR01MB9889.jpnprd01.prod.outlook.com>
	<8d8d9960-8130-4216-b0e4-adf36b8b1c43@app.fastmail.com>
	<TY3PR01MB98896B904BB259B559622773F5422@TY3PR01MB9889.jpnprd01.prod.outlook.com>
	<370673e8-e2da-4249-8f07-cb67e9d9c20e@app.fastmail.com>
	<TYCPR01MB120779A0CC2083C1DA8534BA7F5452@TYCPR01MB12077.jpnprd01.prod.outlook.com>
	<34075bd4-c85d-4654-a782-0cd6713b2c89@app.fastmail.com>
	<TYCPR01MB12077835F614EF829BB035120F5442@TYCPR01MB12077.jpnprd01.prod.outlook.com>
	<2edde173-5ff9-45fd-b881-cd04eb13049f@app.fastmail.com>
	<TYCPR01MB120777DED2C72F897EF6E57D1F54E2@TYCPR01MB12077.jpnprd01.prod.outlook.com>
	<TYCPR01MB12077646F91423005D657FF20F54D2@TYCPR01MB12077.jpnprd01.prod.outlook.com>
	<2231a04b-f2d4-4a4e-b5cd-56be8b002427@app.fastmail.com>
	<CANhcyEXiC7=BsuA4zeXF5K0ugiAG5JU3ad5m3_G+fojJjqJ49Q@mail.gmail.com>

On Mon, Feb 19, 2024, at 7:22 AM, Shlok Kyal wrote:
> I have reviewed the v21 patch. And found an issue.
> 
> Initially I started the standby server with a new postgresql.conf file
> (not the default postgresql.conf that is present in the instance).
> pg_ctl -D ../standby start -o "-c config_file=/new_path/postgresql.conf"
> 
> And I have made 'max_replication_slots = 1' in new postgresql.conf and
> made  'max_replication_slots = 0' in the default postgresql.conf file.
> Now when we run pg_createsubscriber on standby we get error:
> pg_createsubscriber: error: could not set replication progress for the
> subscription "pg_createsubscriber_5_242843": ERROR:  cannot query or
> manipulate replication origin when max_replication_slots = 0

That's by design. See [1]. The max_replication_slots parameter is used as the
maximum number of subscriptions on the server.

> NOTICE:  dropped replication slot "pg_createsubscriber_5_242843" on publisher
> pg_createsubscriber: error: could not drop publication
> "pg_createsubscriber_5" on database "postgres": ERROR:  publication
> "pg_createsubscriber_5" does not exist
> pg_createsubscriber: error: could not drop replication slot
> "pg_createsubscriber_5_242843" on database "postgres": ERROR:
> replication slot "pg_createsubscriber_5_242843" does not exist

That's a bug and should be fixed.

[1] https://www.postgresql.org/docs/current/runtime-config-replication.html#RUNTIME-CONFIG-REPLICATION-S...


--
Euler Taveira
EDB   https://www.enterprisedb.com/

view thread (320+ messages)  latest in thread

Message-ID: <79088f3e-7b9d-4059-9b36-e5ee0bc3889b@app.fastmail.com>
Permalink:  ../79088f3e-7b9d-4059-9b36-e5ee0bc3889b@app.fastmail.com/
Also on:    postgresql.org/message-id/79088f3e-7b9d-4059-9b36-e5ee0bc3889b@app.fastmail.com

 · 

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: euler@eulerto.com, shlok.kyal.oss@gmail.com, kuroda.hayato@fujitsu.com, pgsql-hackers@lists.postgresql.org, vignesh21@gmail.com, michael@paquier.xyz, peter@eisentraut.org, andres@anarazel.de, ashutosh.bapat.oss@gmail.com, amit.kapila16@gmail.com, fabriziomello@gmail.com
  Subject: Re: speed up a logical replica setup
  In-Reply-To: <79088f3e-7b9d-4059-9b36-e5ee0bc3889b@app.fastmail.com>

* 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