Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tR8gS-007Xgi-NQ for pgsql-general@arkaria.postgresql.org; Fri, 27 Dec 2024 11:39:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tR8gR-009ORq-Fw for pgsql-general@arkaria.postgresql.org; Fri, 27 Dec 2024 11:39:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tR8gR-009ORi-2a for pgsql-general@lists.postgresql.org; Fri, 27 Dec 2024 11:39:10 +0000 Received: from mout02.posteo.de ([185.67.36.66]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tR8gN-001rcv-Dy for pgsql-general@lists.postgresql.org; Fri, 27 Dec 2024 11:39:09 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1F0B7240101 for ; Fri, 27 Dec 2024 12:39:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735299545; bh=UgPduiZcTzk22lp030J/32/7JV4RMLxD/wTVr0WfgZs=; h=Message-ID:Date:MIME-Version:From:Subject:To:Content-Type: Content-Transfer-Encoding:From; b=aFlmDL2jhYDooAc/AlSqLi4o6CHq1appk4q+f1uhCNPTkk1NLWAeI4n6ILT+rpWAf JJxtMYXfHe4aQS3GY2AfDOdUYRhZLMn3fxkxeMi94CezCYTPF9/vw0wLIsXE9zWW8w Qdw+7Pjdfa4bOu/fPL6S83/k7lzP0OSyt7Zz1khB3RlJu1XLWyrMfJiHs92K5oaYbT dkHhn9UYciB+VCuwez8xD5S7Zk/gIqQt1e1ac0b6XyFDoHxDvfPi1dhC4kWnrCAEOk 3WwLJjZwM0Lt0MIdltMn0zVYe18lIRIzIFejcI2kP2+qK8BRWDfbYxxU7AYb4oyiIW E05yirVhJDJjQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YKNn40wgrz9rxG for ; Fri, 27 Dec 2024 12:39:03 +0100 (CET) Message-ID: Date: Fri, 27 Dec 2024 11:39:02 +0000 MIME-Version: 1.0 From: Alexander Uvizhev Subject: Starting logical replication at arbitrary point that's available in WAL To: pgsql-general@lists.postgresql.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I'm doing a logical replication using streaming replication protocol and I'm trying to start a stream from a certain arbitrary point that's available in WAL. However, both CREATE_REPLICATION_SLOT and pg_create_logical_replication_slot() create slot with nearly last LSN/XID. Is it possible to create a replication slot with arbitrary LSN/XID values? Also pg_create_logical_replication_slot() for some reason gives different result than CREATE_REPLICATION_SLOT: new slot's `catalog_xmin` is set to the smallest `catalog_xmin` among already existing slots. Looks like a bug. I'm using PostgreSQL 16.6. -- AU ||