Wednesday, April 7, 2021

Using pg_ctl command Start and Stop Postgres database in Linux






[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$ pg_ctl -D /pgdatabase/data/ -l /pglog/db_logs/start.log status

pg_ctl: no server running

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$ pg_ctl -D /pgdatabase/data/ -l /pglog/db_logs/start.log start

pg_ctl: another server might be running; trying to start server anyway

waiting for server to start.... done

server started

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$


[postgres@pgsql ~]$

[postgres@pgsql ~]$ pg_ctl -D /pgdatabase/data/ -l /pglog/db_logs/start.log status

pg_ctl: server is running (PID: 4119)

/opt/PostgreSQL_10/bin/postgres "-D" "/pgdatabase/data"

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$ ps -ef | grep -i pg

avahi      770     1  0 15:28 ?        00:00:00 avahi-daemon: running [pgsql.local]

postgres  4119     1  0 16:45 ?        00:00:00 /opt/PostgreSQL_10/bin/postgres -D /pgdatabase/data

postgres  4129  3900  0 16:46 pts/1    00:00:00 grep --color=auto -i pg

[postgres@pgsql ~]$ ps -ef | grep -i pgsql

avahi      770     1  0 15:28 ?        00:00:00 avahi-daemon: running [pgsql.local]

postgres  4139  3900  0 16:46 pts/1    00:00:00 grep --color=auto -i pgsql

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$ psql

psql (12.6)

Type "help" for help.


postgres=# 

postgres'#

postgres'#

postgres'#




[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$ pg_ctl -D /pgdatabase/data/ -l /pglog/db_logs/start.log stop

waiting for server to shut down.... done

server stopped

[postgres@pgsql ~]$

[postgres@pgsql ~]$


[postgres@pgsql ~]$

[postgres@pgsql ~]$ pg_ctl -D /pgdatabase/data/ -l /pglog/db_logs/start.log stop -m fast

waiting for server to shut down.... done

server stopped

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$

[postgres@pgsql ~]$ pg_ctl -D /pgdatabase/data/ -l /pglog/db_logs/start.log status

pg_ctl: no server running

[postgres@pgsql ~]$

[postgres@pgsql ~]$



Friday, April 2, 2021

How to Fix : Existing lock /var/run/yum.pid: another copy is running as pid 12813 error on Linux

Existing lock /var/run/yum.pid: another copy is running as pid 12813.

Another app is currently holding the yum lock; waiting for it to exit... 



[root@pgsql ~]#

[root@pgsql ~]# yum update -y

Loaded plugins: langpacks, ulninfo

Existing lock /var/run/yum.pid: another copy is running as pid 12813.

Another app is currently holding the yum lock; waiting for it to exit...

  The other application is: PackageKit

    Memory : 220 M RSS (651 MB VSZ)

    Started: Fri Apr  2 20:38:00 2021 - 04:54 ago

    State  : Sleeping, pid: 12813

Another app is currently holding the yum lock; waiting for it to exit...

  The other application is: PackageKit

    Memory : 220 M RSS (651 MB VSZ)

    Started: Fri Apr  2 20:38:00 2021 - 04:56 ago

    State  : Sleeping, pid: 12813

^C


Exiting on user cancel.

[root@pgsql ~]#

[root@pgsql ~]#



[root@pgsql run]#

[root@pgsql run]# systemctl -l|grep package

packagekit.service                                                                       loaded active running   PackageKit Daemon

[root@pgsql run]#

[root@pgsql run]#



[root@pgsql run]#

[root@pgsql run]#

[root@pgsql run]# systemctl disable packagekit.service

[root@pgsql run]#

[root@pgsql run]# systemctl stop packagekit.service

[root@pgsql run]#

[root@pgsql run]#


Wednesday, March 24, 2021

Enable root login from remote in Solaris 10



For enabling remote root user login need to change below parameter in sshd_config file 


PermitRootLogin yes


























Complex Oracle 19c to PostgreSQL 15 Database Migration

Production-oriented migration approach for a complex Oracle 19c to PostgreSQL 15 workload , covering assessment, schema and code conversion,...