Re: [GENERAL] Fwd: Mail to be posted in PostgreSQL community

2016-11-15 Thread Adrian Klaver

On 11/15/2016 03:23 AM, kaustubh kelkar wrote:

Hi Venkata,

Thanks for prompt reply.
OS user is administrator user. So, I don't know why there are issues.
Can anyone suggest me steps to do the same?


Because you installed as the user 'administrator' not as the OS user 
running as Administrator.


Have you taken a look at?:

https://www.bigsql.org/postgresql/installers.jsp
https://www.bigsql.org/package-manager.jsp
https://www.bigsql.org/docs/pgcli/pgcli.jsp



On 15-Nov-2016 2:26 pm, "Venkata B Nagothi" mailto:nag1...@gmail.com>> wrote:


On Tue, Nov 15, 2016 at 4:15 PM, kaustubh kelkar
mailto:ksquar...@gmail.com>> wrote:


Hi,



Trying to create multiple database instances of PostgreSQL 9.6
In this case , trying to create 2^nd instance with port 5434/5435.



_1^st attempt:_



*Create new database cluster :
*

C:\Program Files\PostgreSQL\9.6\installer\server>initcluster.vbs
postgres postgr

es 12345 "C:\Program Files\PostgreSQL\9.6" "C:\Program
Files\PostgreSQL\9.6\data

5434" 5433 DEFAULT



*Register as Windows Service: *

C:\Program Files\PostgreSQL\9.6\installer\server>startupcfg.vbs
9.6 postgres 123

45 "C:\Program Files\PostgreSQL\9.6" "C:\Program
Files\PostgreSQL\9.6\data5434"

postgresql-x64-9.6-5434



But after this step, new service is supposed to be found in
services.msc which is not successful.

(Reference

http://stackoverflow.com/questions/6241793/are-independent-instances-of-postgresql-possible


)



_2^nd attempt :_

__



*Create new database cluster : *

C:\Program Files\PostgreSQL\9.6\bin>initdb
C:\PostgreSQL\9.6\data5435

The files belonging to this database system will be owned by
user "Administrator

".

This user must also own the server process.



The database cluster will be initialized with locale
"English_United States.1252

".

The default database encoding has accordingly been set to "WIN1252".

The default text search configuration will be set to "english".



Data page checksums are disabled.



creating directory C:/PostgreSQL/9.6/data5435 ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting dynamic shared memory implementation ... windows

creating configuration files ... ok

running bootstrap script ... ok

performing post-bootstrap initialization ... ok

syncing data to disk ... ok



WARNING: enabling "trust" authentication for local connections

You can change this by editing pg_hba.conf or using the option
-A, or

--auth-local and --auth-host, the next time you run initdb.



Success. You can now start the database server using:



"pg_ctl" -D "C:\PostgreSQL\9.6\data5435" -l logfile start


*Register as Windows Service: *



C:\Program Files\PostgreSQL\9.6\bin>pg_ctl register -N
pgsql-9.6-5435 -U administrator -P test@123 -D
"C:\PostgreSQL\9.6\data5435" -o "-p 5435"



C:\Program Files\PostgreSQL\9.6\bin>net start pgsql-9.6-5435

The pgsql-9.6-5435 service is starting.

The pgsql-9.6-5435 service was started successfully.



(Reference:

http://www.dbforums.com/showthread.php?1669767-How-to-create-two-different-postgresql-services-for-configure-database


 )



*After trying to login through SQL shell*

Server [localhost]:

Database [postgres]:

Port [5433]: 5435

Username [postgres]:

psql: FATAL:  role "postgres" does not exist


As which user (OS user account) you have created the postgresql
instance ? which means, you need to login as "Administrator" user.

Regards,

Venkata B N
Database Consultant

Fujitsu Australia




--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Fwd: Mail to be posted in PostgreSQL community

2016-11-15 Thread Adrian Klaver

On 11/14/2016 09:15 PM, kaustubh kelkar wrote:


Hi,



Trying to create multiple database instances of PostgreSQL 9.6
In this case , trying to create 2^nd instance with port 5434/5435.



_1^st attempt:_



*Create new database cluster :
*

C:\Program Files\PostgreSQL\9.6\installer\server>initcluster.vbs
postgres postgr

es 12345 "C:\Program Files\PostgreSQL\9.6" "C:\Program
Files\PostgreSQL\9.6\data

5434" 5433 DEFAULT



*Register as Windows Service: *

C:\Program Files\PostgreSQL\9.6\installer\server>startupcfg.vbs 9.6
postgres 123

45 "C:\Program Files\PostgreSQL\9.6" "C:\Program
Files\PostgreSQL\9.6\data5434"

postgresql-x64-9.6-5434



But after this step, new service is supposed to be found in services.msc
which is not successful.

(Reference
http://stackoverflow.com/questions/6241793/are-independent-instances-of-postgresql-possible



Did you read the comments to the first answer?:

" perfect add true in the end of script in step 3. That's ACL check 
added in newer postgres version. – Sachin Verma Nov 10 '14 at 12:19

2   

After step 4 it doesn't show up for me in services list – Valentin Kuzub 
Sep 2 '15 at 13:18



@ValentinKuzub: I had to use "NT Authority\NetworkService" as user name 
(with empty password) in step 4, then the new instance did show up in 
the list of services. – Martijn Jun 17 at 9:19

"


)






--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Fwd: Mail to be posted in PostgreSQL community

2016-11-15 Thread kaustubh kelkar
Hi Venkata,

Thanks for prompt reply.
OS user is administrator user. So, I don't know why there are issues. Can
anyone suggest me steps to do the same?
On 15-Nov-2016 2:26 pm, "Venkata B Nagothi"  wrote:

>
> On Tue, Nov 15, 2016 at 4:15 PM, kaustubh kelkar 
> wrote:
>
>>
>> Hi,
>>
>>
>>
>> Trying to create multiple database instances of PostgreSQL 9.6
>> In this case , trying to create 2nd instance with port 5434/5435.
>>
>>
>>
>> *1st attempt:*
>>
>>
>>
>>
>> *Create new database cluster : *
>>
>> C:\Program Files\PostgreSQL\9.6\installer\server>initcluster.vbs
>> postgres postgr
>>
>> es 12345 "C:\Program Files\PostgreSQL\9.6" "C:\Program
>> Files\PostgreSQL\9.6\data
>>
>> 5434" 5433 DEFAULT
>>
>>
>>
>> *Register as Windows Service: *
>>
>> C:\Program Files\PostgreSQL\9.6\installer\server>startupcfg.vbs 9.6
>> postgres 123
>>
>> 45 "C:\Program Files\PostgreSQL\9.6" "C:\Program
>> Files\PostgreSQL\9.6\data5434"
>>
>> postgresql-x64-9.6-5434
>>
>>
>>
>> But after this step, new service is supposed to be found in services.msc
>> which is not successful.
>>
>> (Reference http://stackoverflow.com/questions/6241793/are-independent-i
>> nstances-of-postgresql-possible )
>>
>>
>>
>> *2nd attempt :*
>>
>>
>>
>> *Create new database cluster : *
>>
>> C:\Program Files\PostgreSQL\9.6\bin>initdb C:\PostgreSQL\9.6\data5435
>>
>> The files belonging to this database system will be owned by user
>> "Administrator
>>
>> ".
>>
>> This user must also own the server process.
>>
>>
>>
>> The database cluster will be initialized with locale "English_United
>> States.1252
>>
>> ".
>>
>> The default database encoding has accordingly been set to "WIN1252".
>>
>> The default text search configuration will be set to "english".
>>
>>
>>
>> Data page checksums are disabled.
>>
>>
>>
>> creating directory C:/PostgreSQL/9.6/data5435 ... ok
>>
>> creating subdirectories ... ok
>>
>> selecting default max_connections ... 100
>>
>> selecting default shared_buffers ... 128MB
>>
>> selecting dynamic shared memory implementation ... windows
>>
>> creating configuration files ... ok
>>
>> running bootstrap script ... ok
>>
>> performing post-bootstrap initialization ... ok
>>
>> syncing data to disk ... ok
>>
>>
>>
>> WARNING: enabling "trust" authentication for local connections
>>
>> You can change this by editing pg_hba.conf or using the option -A, or
>>
>> --auth-local and --auth-host, the next time you run initdb.
>>
>>
>>
>> Success. You can now start the database server using:
>>
>>
>>
>> "pg_ctl" -D "C:\PostgreSQL\9.6\data5435" -l logfile start
>>
>>
>> *Register as Windows Service: *
>>
>>
>> C:\Program Files\PostgreSQL\9.6\bin>pg_ctl register -N pgsql-9.6-5435 -U
>> administrator -P test@123 -D "C:\PostgreSQL\9.6\data5435" -o "-p 5435"
>>
>>
>>
>> C:\Program Files\PostgreSQL\9.6\bin>net start pgsql-9.6-5435
>>
>> The pgsql-9.6-5435 service is starting.
>>
>> The pgsql-9.6-5435 service was started successfully.
>>
>>
>>
>> (Reference: http://www.dbforums.com/showthread.php?1669767-How-to-create
>> -two-different-postgresql-services-for-configure-database  )
>>
>>
>>
>> *After trying to login through SQL shell*
>>
>> Server [localhost]:
>>
>> Database [postgres]:
>>
>> Port [5433]: 5435
>>
>> Username [postgres]:
>>
>> psql: FATAL:  role "postgres" does not exist
>>
>
> As which user (OS user account) you have created the postgresql instance ?
> which means, you need to login as "Administrator" user.
>
> Regards,
>
> Venkata B N
> Database Consultant
>
> Fujitsu Australia
>
>


Re: [GENERAL] Fwd: Mail to be posted in PostgreSQL community

2016-11-15 Thread Venkata B Nagothi
On Tue, Nov 15, 2016 at 4:15 PM, kaustubh kelkar 
wrote:

>
> Hi,
>
>
>
> Trying to create multiple database instances of PostgreSQL 9.6
> In this case , trying to create 2nd instance with port 5434/5435.
>
>
>
> *1st attempt:*
>
>
>
>
> *Create new database cluster : *
>
> C:\Program Files\PostgreSQL\9.6\installer\server>initcluster.vbs postgres
> postgr
>
> es 12345 "C:\Program Files\PostgreSQL\9.6" "C:\Program
> Files\PostgreSQL\9.6\data
>
> 5434" 5433 DEFAULT
>
>
>
> *Register as Windows Service: *
>
> C:\Program Files\PostgreSQL\9.6\installer\server>startupcfg.vbs 9.6
> postgres 123
>
> 45 "C:\Program Files\PostgreSQL\9.6" "C:\Program
> Files\PostgreSQL\9.6\data5434"
>
> postgresql-x64-9.6-5434
>
>
>
> But after this step, new service is supposed to be found in services.msc
> which is not successful.
>
> (Reference http://stackoverflow.com/questions/6241793/are-independent-
> instances-of-postgresql-possible )
>
>
>
> *2nd attempt :*
>
>
>
> *Create new database cluster : *
>
> C:\Program Files\PostgreSQL\9.6\bin>initdb C:\PostgreSQL\9.6\data5435
>
> The files belonging to this database system will be owned by user
> "Administrator
>
> ".
>
> This user must also own the server process.
>
>
>
> The database cluster will be initialized with locale "English_United
> States.1252
>
> ".
>
> The default database encoding has accordingly been set to "WIN1252".
>
> The default text search configuration will be set to "english".
>
>
>
> Data page checksums are disabled.
>
>
>
> creating directory C:/PostgreSQL/9.6/data5435 ... ok
>
> creating subdirectories ... ok
>
> selecting default max_connections ... 100
>
> selecting default shared_buffers ... 128MB
>
> selecting dynamic shared memory implementation ... windows
>
> creating configuration files ... ok
>
> running bootstrap script ... ok
>
> performing post-bootstrap initialization ... ok
>
> syncing data to disk ... ok
>
>
>
> WARNING: enabling "trust" authentication for local connections
>
> You can change this by editing pg_hba.conf or using the option -A, or
>
> --auth-local and --auth-host, the next time you run initdb.
>
>
>
> Success. You can now start the database server using:
>
>
>
> "pg_ctl" -D "C:\PostgreSQL\9.6\data5435" -l logfile start
>
>
> *Register as Windows Service: *
>
>
> C:\Program Files\PostgreSQL\9.6\bin>pg_ctl register -N pgsql-9.6-5435 -U
> administrator -P test@123 -D "C:\PostgreSQL\9.6\data5435" -o "-p 5435"
>
>
>
> C:\Program Files\PostgreSQL\9.6\bin>net start pgsql-9.6-5435
>
> The pgsql-9.6-5435 service is starting.
>
> The pgsql-9.6-5435 service was started successfully.
>
>
>
> (Reference: http://www.dbforums.com/showthread.php?1669767-How-to-create
> -two-different-postgresql-services-for-configure-database  )
>
>
>
> *After trying to login through SQL shell*
>
> Server [localhost]:
>
> Database [postgres]:
>
> Port [5433]: 5435
>
> Username [postgres]:
>
> psql: FATAL:  role "postgres" does not exist
>

As which user (OS user account) you have created the postgresql instance ?
which means, you need to login as "Administrator" user.

Regards,

Venkata B N
Database Consultant

Fujitsu Australia


[GENERAL] Fwd: Mail to be posted in PostgreSQL community

2016-11-14 Thread kaustubh kelkar
Hi,



Trying to create multiple database instances of PostgreSQL 9.6
In this case , trying to create 2nd instance with port 5434/5435.



*1st attempt:*




*Create new database cluster : *

C:\Program Files\PostgreSQL\9.6\installer\server>initcluster.vbs postgres
postgr

es 12345 "C:\Program Files\PostgreSQL\9.6" "C:\Program
Files\PostgreSQL\9.6\data

5434" 5433 DEFAULT



*Register as Windows Service: *

C:\Program Files\PostgreSQL\9.6\installer\server>startupcfg.vbs 9.6
postgres 123

45 "C:\Program Files\PostgreSQL\9.6" "C:\Program
Files\PostgreSQL\9.6\data5434"

postgresql-x64-9.6-5434



But after this step, new service is supposed to be found in services.msc
which is not successful.

(Reference http://stackoverflow.com/questions/6241793/are-
independent-instances-of-postgresql-possible )



*2nd attempt :*



*Create new database cluster : *

C:\Program Files\PostgreSQL\9.6\bin>initdb C:\PostgreSQL\9.6\data5435

The files belonging to this database system will be owned by user
"Administrator

".

This user must also own the server process.



The database cluster will be initialized with locale "English_United
States.1252

".

The default database encoding has accordingly been set to "WIN1252".

The default text search configuration will be set to "english".



Data page checksums are disabled.



creating directory C:/PostgreSQL/9.6/data5435 ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting dynamic shared memory implementation ... windows

creating configuration files ... ok

running bootstrap script ... ok

performing post-bootstrap initialization ... ok

syncing data to disk ... ok



WARNING: enabling "trust" authentication for local connections

You can change this by editing pg_hba.conf or using the option -A, or

--auth-local and --auth-host, the next time you run initdb.



Success. You can now start the database server using:



"pg_ctl" -D "C:\PostgreSQL\9.6\data5435" -l logfile start


*Register as Windows Service: *


C:\Program Files\PostgreSQL\9.6\bin>pg_ctl register -N pgsql-9.6-5435 -U
administrator -P test@123 -D "C:\PostgreSQL\9.6\data5435" -o "-p 5435"



C:\Program Files\PostgreSQL\9.6\bin>net start pgsql-9.6-5435

The pgsql-9.6-5435 service is starting.

The pgsql-9.6-5435 service was started successfully.



(Reference: http://www.dbforums.com/showthread.php?1669767-How-to-
create-two-different-postgresql-services-for-configure-database  )



*After trying to login through SQL shell*

Server [localhost]:

Database [postgres]:

Port [5433]: 5435

Username [postgres]:

psql: FATAL:  role "postgres" does not exist

Press any key to continue . . .

 * *

Kaus2bh Kelkar