Ddb.skipInstaller=true
is used.<AppManager_home>/working/pgsql/share/postgresql.conf.sample
Original Configuration | Updated Configuration | Description |
#unix_socket_directories = '/tmp' | unix_socket_directories = '.' | Changed the Unix socket directory to the current directory. |
include_dir = '../ext_conf' | include_dir = '../../ext_conf' | Adjusted path to external config directory. |
#include_if_exists = '...' | include_if_exists = 'postgres_ext.conf' | Included a specific config file if it exists. |
#log_min_duration_statement = -1 | log_min_duration_statement = 60000 | Enabled slow query logging (queries taking >60s). |
#max_locks_per_transaction = 64 | max_locks_per_transaction = 10000 | Increased max locks per transaction. |
#shared_buffers = 32MB | shared_buffers = 32MB | Uncommented without changing value (enabled explicitly). |
<AppManager_home>/working/pgsql/share/pg_hba.conf.sample
Original Configuration | Updated Configuration | Description | |
#host all all ::1/128 @authmethodhost@ | host all all ::1/128 @authmethodhost@ | Enabled local IPv6 connections for all users using specified auth method. | |
#host replication all 127.0.0.1/32 @authmethodhost@ | host replication all 127.0.0.1/32 @authmethodhost@ | Enabled replication access over IPv4 localhost using specified auth method. | |
#host replication all ::1/128 @authmethodhost@ | host replication all ::1/128 @authmethodhost@ |
|
<AppManager_home>/working/pgsql/share/postgresql/postgresql.conf.sample
<AppManager_home>/working/pgsql/share/postgresql/pg_hba.conf.sample
<AppManager_home>/working/pgsql/ext_conf/00framework_ext.conf
Original Configuration | Updated Configuration | Description |
unix_socket_directories = '/tmp,../tmp/' | unix_socket_directories = '.' | Changed the socket directory to the current directory for simplicity or isolation. |
postgres
User<AppManager_home>/bin.
DBConfiguration.bat -u postgres echo %PGPASSWORD%
For base builds below v16670:set PGPASSWORD=appmanager echo %PGPASSWORD%
<AppManager_home>/bin
. ./DBConfiguration.sh -u postgres echo $PGPASSWORD
For base builds below v16670:export PGPASSWORD=appmanager echo $PGPASSWORD
<AppManager_home>/working/pgsql/data/amdb/base
already existspassword.txt
in <AppManager_home>/working/bin
cd <AppManager_home>/working/bin
initPGSQL.bat
postgres_ext.conf
from:<AppManager_home>/working/pgsql_11/data/amdb
→ <AppManager_home>/working/pgsql/data/amdb
.bat
, run:
cd <AppManager_home>/working
./bin/initPGSQLDB.sh
<AppManager_home>/working/pgsql_11/data/amdb/postgres_ext.conf
to use port 15433
cd <AppManager_home>/working/pgsql/bin
./pg_ctl -w -D ../data/amdb -o -p15432 stop -s -m fast
cd <AppManager_home>/working/pgsql_11/bin
./pg_ctl -w -D ../data/amdb -o -p15433 stop -s -m fast
su - postgres -c
with full pathsstop
with start
.
cd <AppManager_home>/working/pgsql/bin
psql -U postgres -p 15432 -h localhost
psql.exe
on Windows)amdb
Database
DROP DATABASE IF EXISTS amdb;
CREATE DATABASE amdb;
GRANT CONNECT ON DATABASE amdb TO public;
dbuser
:PGPASSWORD
for dbuser
.
CREATE USER dbuser WITH CREATEDB NOCREATEROLE LOGIN REPLICATION ENCRYPTED PASSWORD '<PGPASSWORD>';
amdb
and run:
\c amdbGRANT ALL ON SCHEMA public TO dbuser;SET search_path=public;CREATE EXTENSION "pgcrypto";CREATE EXTENSION CITEXT;CREATE EXTENSION pg_stat_statements;CREATE EXTENSION amcheck;CREATE TABLE AM_Postgres15MigrationStatus (ID BIGSERIAL NOT NULL,TABLENAME VARCHAR(255) NOT NULL,STATUS INTEGER DEFAULT 2 NOT NULL,TIME BIGINT,COMMENTS TEXT,PRIMARY KEY(TABLENAME) );
\q
.
cd <AppManager_home>\working\pgsql_11\bin
pg_dump.exe -U postgres -p 15433 -h localhost -c -v -f <AppManager_home>\dump11.sql amdb
cd <AppManager_home>\working\pgsql\bin
psql.exe -U postgres -p 15432 -h localhost -d amdb -c -v -f <AppManager_home>\dump11.sql
cd <AppManager_home>/working/pgsql_11/bin
./pg_dump -U postgres -p 15433 -h localhost -c -v -f <AppManager_home>/dump11.sql amdb
cd <AppManager_home>/working/pgsql/bin
./psql -U postgres -p 15432 -h localhost -d amdb -c -v -f <AppManager_home>/dump11.sql
su - postgres -c "<AppManager_home>/working/pgsql_11/bin/pg_dump -U postgres -p 15433 -h localhost -c -v -f <AppManager_home>/dump11.sql amdb"
su - postgres -c "<AppManager_home>/working/pgsql/bin/psql -U postgres -p 15432 -h localhost -d amdb -c -v -f <AppManager_home>/dump11.sql"
SELECT TYPE,
COUNT(CASE WHEN DCSTARTED = 2 THEN DCSTARTED ELSE NULL END) AS CONFIGURED,
COUNT(CASE WHEN DCSTARTED != 2 THEN DCSTARTED ELSE NULL END) AS UNCONFIGURED,
COUNT(DCSTARTED) AS TOTAL
FROM AM_ManagedObject, AM_ManagedResourceType
WHERE AM_ManagedObject.TYPE = AM_ManagedResourceType.RESOURCETYPE
AND TYPE != 'Network'
AND TYPE NOT IN ('Ping Monitor','DNSMonitor','MAIL-server','LDAP Server','RBM','Telnet (EUM)')
GROUP BY TYPE
ORDER BY TYPE;