I use a VirtualBox for my day to day work. The whole purpose is to move it to a new laptop and start using it with all the tools, configuration files and keys. But I don’t want to open the VirtualBox with a window. So I found a way to launch the virtual machine using the command line without the ...
I use a VirtualBox for my day to day work. The whole purpose is to move it to a new laptop and start using it with all the tools, configuration files and keys. But I don't want to open the VirtualBox with a windowSo I found a way to launch the virtual machine using the command line without the window. My virtual machine is called "dev". Use below command.VBoxManage startvm "dev" --type headless
pgloader is a helpful tool if you want to migrate tables from MySQL/MariaDB to Postgres. This works with AWS RDS instances too.Let's say we need to migrate the user table from MySQL to PostgreSQL. Your pgloader file would look like below. You can use the below command to start the migrationpgload user.load
pgloader is a helpful tool if you want to migrate tables from MySQL/MariaDB to Postgres. This works with AWS RDS instances too. Let’s say we need to migrate the user table from MySQL to PostgreSQL. Your pgloader file would look like below. You can use the below command to start the migration $ pgload user.load
pgloader is a helpful tool if you want to migrate tables from MySQL/MariaDB to Postgres. This works with AWS RDS instances too.Let's say we need to migrate the user table from MySQL to PostgreSQL. Your pgloader file would look like below. You can use the below command to start the migrationpgload user.load
I wanted to find out how many rows were modified by the current transaction. Seems like MariaDB doesn’t have a straight forward way to retrieve the transaction ID. To narrow down transactions I used the current connection as the thread ID. You can run the below command to check the information about the transaction. SELECT * FROM information_schema.innodb_trx WHERE trx_mysql_thread_id ...
I wanted to find out how many rows were modified by the current transaction. Seems like MariaDB doesn't have a straight forward way to retrieve the transaction ID. To narrow down transactions I used the current connection as the thread ID. You can run the below command to check the information about the transaction. Here is an example:
I wanted to find out how many rows were modified by the current transaction. Seems like MariaDB doesn't have a straight forward way to retrieve the transaction ID. To narrow down transactions I used the current connection as the thread ID. You can run the below command to check the information about the transaction. Here is an example:
If you have Terraform state locks. Sometimes cancelling terraform commands ungracefully might leave the state file locked. This is the error you would usually see if the lock is not released.Acquiring state lock. This may take a few moments...Error: Error locking state: Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed status code: 400, request id: L2CH7KK3QCAEHSC1TJ1VLBMNBRVV4CQNSO5AEMVJY66Q9ASUAAJNLock Info: ID: ...
If you have Terraform state locks. Sometimes cancelling terraform commands ungracefully might leave the state file locked. This is the error you would usually see if the lock is not released. If you want to release this lock. You should run below command. Then type “yes” and hit enter. $ terraform force-unlock <LOCK ID> For example: $ terraform force-unlock 21e2b2bb-c123-2383-eece-7a5eaab4f645 ...
If you have Terraform state locks. Sometimes cancelling terraform commands ungracefully might leave the state file locked. This is the error you would usually see if the lock is not released. If you want to release this lock. You should run below command. Then type "yes" and hit enter.terraform force-unlock <LOCK ID>For example: terraform force-unlock 21e2b2bb-c123-2383-eece-7a5eaab4f645Please don't release this lock, ...
I am writing this post as a note to myself. Every time I want to find slow running queries, I search and open this medium post. It is a well written short post which helps me every day. But I wanted to improve that query. As mentioned these are pretty helpful too.SELECT pg_cancel_backend(pid); SELECT pg_terminate_backend(pid);
I am writing this post as a note to myself. Every time I want to find slow running queries, I search and open this medium post. It is a well written short post which helps me every day. But I wanted to improve that query. As mentioned these are pretty helpful too. SELECT pg_cancel_backend(pid); SELECT pg_terminate_backend(pid);
I am writing this post as a note to myself. Every time I want to find slow running queries, I search and open this medium post. It is a well written short post which helps me every day. But I wanted to improve that query. As mentioned these are pretty helpful too.SELECT pg_cancel_backend(pid); SELECT pg_terminate_backend(pid);
I wanted to know how to run a command after creating an RDS instance with Terraform. This was the answer I got from AWS. Even though, Terraform shouldn't be used like this.
I wanted to know how to run a command after creating an RDS instance with Terraform. This was the answer I got from AWS. Even though, Terraform shouldn’t be used like this.
I wanted to know how to run a command after creating an RDS instance with Terraform. This was the answer I got from AWS. Even though, Terraform shouldn't be used like this.
I couldn't write anything down for a while. I had to move a table from one schema to another in Postgres. I had to do this on RDS. pg_dump and pg_restore tools doesn't allow you to change schema when you dump and restore.The easiest way is running below command:ALTER TABLE old_schema.table_you_want_to_move SET SCHEMA new_schema;
I couldn’t write anything down for a while. I had to move a table from one schema to another in PostgresSQL. I had to do this on RDS. pg_dump and pg_restore tools doesn’t allow you to change schema when you dump and restore. The easiest way is running below command: ALTER TABLE old_schema.table_you_want_to_move SET SCHEMA new_schema;
I couldn't write anything down for a while. I had to move a table from one schema to another in Postgres. I had to do this on RDS. pg_dump and pg_restore tools doesn't allow you to change schema when you dump and restore.The easiest way is running below command:ALTER TABLE old_schema.table_you_want_to_move SET SCHEMA new_schema;