Unable to replicate Postgres tables using logical replication in RDS

Tables in the destination database are empty even after subscription is successful. I am extremely new to logical replication within Postgres. I am trying to replicate three tables from the source database to the destination database. These two databases are running on difference RDS instances

I followed the steps laid out on this link https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.Logical.html

I have enabled replication across both the database instances by changing the parameter rds.logical_replication to 1 (enabled). The parameter groups are in sync after the restart.

On the source database, I created a publication

create publication master_data_publication for table tbl1, tbl2, tbl3;

On the destination I created a table with the same name and same columns and then created a subscription

create subscription master_data_sub CONNECTION 'host=sourcedbhost.some-code.some-region.rds.amazonaws.com port=5432 dbname=sourcedb user=sourceuser password=userpassword' publication master_data_publication;

if i run select * from pg_catalog.pg_stat_subscription;, it shows the following. enter image description here With this, we would assume that the replication should be working.

But the tables are shown to be completely empty.

On Source

select count(*) from tbl_1;  count -------      332 

On Destination

select count(*) from tbl_1;  count -------      0 

I am now stuck on how to proceed from here.

Recovery with Postgresql logical replication

I’m using Postgresql 13 on Debian 10.6 and learning about logical replication.

I’ve set up logical replication with one publisher and one subscriber of one table. I’m wondering what my options are for recovering data (or rolling back) when, for example, someone accidentally does something on the publisher side like updating all the data in the table with the wrong value, or even deleting everything from a table. With logical replication these unintentional changes will of course be applied to the subscriber.

I’ve relentlessly searched online but have had no luck finding out what my options are. I read about PITR but I’m thinking that’s suited more for physical replication, whereas I want to test rolling back changes on a specific database on a server.

Requesting review of my logical data model

I am working on a personal project and I want to make sure that my data model is correct and following the best practices. Receiving feedback on my data model is important in improving my ability and knowledge of databases.

I am designing a stock market program of sorts. My model for it is pretty simple.

The workflow of my project:

  • A user creates a user account and enters their address
  • A user then can create an account for a specific stock at a share and USD amount

My plan is to make the account table a type two table. Valid from will be set to the date the account was created and valid to will be initially null. Valid to will be set to current date once the account is closed.

enter image description here

If the all ports are filtered or closed as result of nmap scan, what would be the next logical step to take?

Is that mean I would need to get a physical access to the device? or is there any other ways to get information, I’m trying to scan my own smartphone and all the ports are closed, and I did the same with my laptop and all the ports were filtered, so, I’m kind of stuck. On the other hand, all the information I found on Internet is relying on getting more results with differents nmap scans, so I guess my real question here is , Is there any other software, teqnique or anything to do that’s not involving nmap? `

(This is not a question about what does mean filtered or closed)

`

What are the logical steps taken to perform ssh key authentication?

I understand the logical steps of asymmetric key cryptography as it relates to TLS, however, I’ve started using Git and in a bid to avoid having to use a password for authentication, I’ve set up ssh keys for passwordless authentication. I understand that these ssh keys are complements of each other but I do not understand how the actual authentication is taking place. I’ve copied the public key to Git and stored the private key locally. As such, I am able to do what I set out to do (passwordless authentication) but I do not know the underlying steps as to why the authentication is successful. I’ve tried searching the web but every answer I’ve found thus far has been too high level in that they did not specify the steps. For example, were I looking for the TLS steps, I’d expect something along the lines of: Check cert of https page (server) – Grab public key and encrypt secret with it – Securely send secret to server which should be the only entity with the corresponding private key to decrypt – Server and client now switch over to encrypted communications using the, now, shared secret.

Does anyone know the answer the following questions on converting logical – physical addresses

Due to the unforeseen pandemic, I am unable to speak to my tutor about the following question. I have emailed him, but I have not had an answer for weeks. Can someone please enlighten me.

Image and question to be answered below. Please provide an explanation, as I am struggling to find an answer:

enter image description here

Creating logical circut from 4 inputs wtih 1 final output

So I have set truth table:

| x y z t | f ------------- | 0 0 0 0 | 1 | 0 0 0 1 | 1 | 0 0 1 0 | 0 | 0 0 1 1 | 1 ------------- | 0 1 0 0 | 0 | 0 1 0 1 | 0 | 0 1 1 0 | 1 | 0 1 1 1 | 1 ------------- | 1 0 0 0 | 1 | 1 0 0 1 | 0 | 1 0 1 0 | 1 | 1 0 1 1 | 1 ------------- | 1 1 0 0 | 1 | 1 1 0 1 | 1 | 1 1 1 0 | 1 | 1 1 1 1 | 1 

the function is random.

Then I have done the state indexes (just for better orientation).

Σ(x,y,z,t) = (0,1,3,6,7,8,10,11,12,13,14,15) Π(x,y,z,t) = (2,4,5,9) 

Then I used Karnaugh maps

    00  01  10  11    ----------------- 00 | 1 | 1 | 1 | 0 |    ----------------- 01 | 0 | 0 | 1 | 1 |    ----------------- 10 | 1 | 1 | 1 | 1 |    ----------------- 11 | 1 | 0 | 1 | 1 |    ----------------- 

And got minimalized function

              ___    _         _   __ f(x,y,z,t) =  xzt + xy + xz + zt + xyz 

And now I have to draw the schematic of this logical function using only INV, AND, OR gates. After this, I have to draw the schematic using only NAND gates.

I think, that the next step is to use the De Morghan laws and laws of double negation, but im not 100% sure.

Can someone please help me do the circuit realization (only on paper)? Our teacher didn´t had time to explain it to us how to do it, because of the COVID-19 and now we have to learn it at our own. I would appreciate any help.

find logical address

  1. If an ALP has 6 instructions with the lengths in bytes are 2, 1, 2, 2, 3 and 1; Given that the CS register has value 3007H and the offset address is B007H, Calculate the physical address of the first and last instructions.

postgresql logical replication — subscriber size discrepancy

I have a postgres 11 database in Amazon RDS with a little over 2 TB data in it whose tables have incrementing integer ids that are nearing exhaustion. I’ve been vetting using logical replication to have the existing db synch data to a new db with a schema modified to have bigint ids. Everything looks ok with a lot of due diligence and I am about ready to make the cutover.

One thing I have noticed is that the subscriber database being a smaller overall size, even though many of its columns and indexes have been switched to using bigint ids vs ints. Does anyone have any idea why this might be the case? This is the one question I have not been able to discover a confirmation for vs my guesses (fragmentation, etc…).

Using the queries described here, I have the following usage:

  • total: 2.171 TB in publisher, 2.020 TB in subscriber
  • indexes: 0.737 TB in publisher, 0.581 TB in subscriber
  • toast: 0.212 TB in publisher, 0.215 TB in subscriber
  • tables: 1.223 TB in publisher,1.223 TB in subscriber