You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/24 08:50:57 UTC

[GitHub] [shardingsphere] sandynz commented on pull request #11981: Fix Issue#11977 : Scaling increment task of PostgreSQL WalEventConverter ignore correct RowEvent

sandynz commented on pull request #11981:
URL: https://github.com/apache/shardingsphere/pull/11981#issuecomment-904452109


   1, `slot_name` is unique globally. Verification:
   `sharding_scaling` slot on `scaling1` already exists, create another `sharding_scaling` on `scaling21` failed.
   ```
   scaling21=# SELECT * FROM pg_replication_slots;
       slot_name     |    plugin     | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size
   ------------------+---------------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------
    sharding_scaling | test_decoding | logical   |  16387 | scaling1 | f         | f      |            |      |          511 | 0/1687DD0   | 0/1687E08           | reserved   |
   (1 row)
   
   scaling21=# SELECT * FROM pg_create_logical_replication_slot('sharding_scaling', 'test_decoding');
   ERROR:  replication slot "sharding_scaling" already exists
   ```
   
   2, When creating `PGReplicationStream` in `LogicalReplication`, `slotName` is defined:
   ```
       public PGReplicationStream createReplicationStream(final Connection pgConnection, final String slotName, final LogSequenceNumber startPosition) throws SQLException {
           return pgConnection.unwrap(PGConnection.class).getReplicationAPI()
                   .replicationStream()
                   .logical()
                   .withStartPosition(startPosition)
                   .withSlotName(slotName)
                   .withSlotOption("include-xids", true)
                   .withSlotOption("skip-empty-xacts", true)
                   .start();
       }
   ```
   
   3, On real test, DB operation on `scaling21` won't be notified to `scaling1` slot.
   
   4, It's not necessary to filter schemaName.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org