Problem/Case
When using typical physical streaming, pg_wal size grows very fast and unexpectedly on DR (Disaster)/Backup/Standby node
Check inactive replication slots on DR node. If it exists, drop them
We're all on the same page!
Problem/Case
When using typical physical streaming, pg_wal size grows very fast and unexpectedly on DR (Disaster)/Backup/Standby node
-- show the connection info
# \conninfo
-- show IP address connected by the postgres client
# select inet_server_addr();
-- enable timing
# \timing
Timing is on.
-- enable expanded display
# \x
Expanded display is on.
-- run linux command inside psql command line
# \! date
Fri Sep 1 11:50:28 AM +03 2023
-- show the command history
# \s
-- prepare/set custom prompt:
# \set PROMPT1 '%M:%> user:%n database:%/ %l %x%# '
# \set PROMPT1 '%M:%> U:%n d:%/ %l %x%# '
PROMPT1 -> normal prompt
PROMPT2 -> if need to give more than one input command (extra prompt)
PROMPT3 -> if need to use "SQL COPY FROM STDIN" (extra prompt)
Ref: https://www.postgresql.org/docs/13/app-psql.html#APP-PSQL-PROMPTING
For example, you have only a root user for the super-user activities, but you wanted to use a custom user for some specific purposes. To make this, you might use "wheel" user group which is a special one for the "sudo" operations.
Check and Determine the Option:
$ sudo cat /etc/sudoers
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
$ cat /etc/group | grep wheel
wheel:x:10:root,alperadm
Test
$ cat /etc/sudoers
cat: /etc/sudoers: Permission denied
Action
$ ansible-playbook -i /etc/ansible/hosts /etc/ansible/example.yml -v
Error
'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'stdout'
Error
Attempting to decrypt but no vault secrets found
el (enterprise linux) e.g. centos, rocky linux, alma linux
rhel (red hat enterprise linux)
The main difference is that Red Hat provides technical support to the company/project if needs on RHEL. Also, there are various subscription options for being able to use RHEL for the companies at a cost.
e.g. an example with basic git commands
source: develop branch
target: private branch (not exist on the git local/remote repository at the begin)
1st step:
$ git clone http://blabla --branch develop
-- cloning develop branch data on the local machine
2nd step:
$ git branch private
-- defining a new branch as "private" on the local repository
3rd step:
$ git checkout private
-- switching the active/using branch to "private" on the local repository
4th step:
make your changes on the files/folders
5th step:
$ git status
-- see the summary that what you changed on the local repository
6th step:
$ git diff
-- see the differences between local repo and remote repo
7th step:
$ git add --all
-- add all modified files from (local) working directory to git staging area
8th step:
$ git commit -m "my latest changes applied on the code"
-- save your changes to the local repository to be ready for git push
9th step:
$ git push --set-upstream origin private
-- push all changes to the (remote) git repository by defining a new remote branch as the same local branch name; origin private
That's all!
Difficulty level: Low