Postgres database setup in vmware windows virtual machine

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Re: Postgres database setup in vmware windows virtual machine

Postby JeyBurns » Fri May 02, 2008 4:15 am

APerfect10 wrote:Change those lines to:

Code: Select all
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all         192.168.0.0/16        md5
# IPv6 local connections:
host    all         all         ::1/128               md5



Thanks, Derek. At least I made some progress with these hints. I changed the lines and now I'm able to connect via the pgadmin3 interface from vmware to the linux postgresql database.

What still doesn't work is the connection via pokertracker. Whenever I try to convert my existing database to postgresql, I get the following error message:

Code: Select all
error connecting to the default postgresql database.
101 - sqlstate = 08001
FATAL: passwort authentication for user "postgres" has failed
This could be because you have
1. entered the wrong username/password/server name/port.
2. Not started the postgresql database server
3. Not installed the postgresql ODBC driver


1. My userdata should be correct as I entered the same data as I entered in the pgadmin3 interface, which connected succesfully.
2. The server is definetely running
3. I installed this ODBC driver. http://www.pokertracker3.com/products/P ... bc_new.exe
Maybe it's not the right one?

What do you think causes this problem?
JeyBurns
 
Posts: 20
Joined: Fri Jan 25, 2008 10:23 am

Re: Postgres database setup in vmware windows virtual machine

Postby JeyBurns » Fri May 02, 2008 4:37 am

Edit:
I used the values "trust" instead of "md5" and now I finally got the connection! I'm happy.

Is there any security concern using these settings? Why would the password work for pgadmin3 and not for pokertracker?
JeyBurns
 
Posts: 20
Joined: Fri Jan 25, 2008 10:23 am

Re: Postgres database setup in vmware windows virtual machine

Postby JeyBurns » Fri May 02, 2008 5:50 am

Now I've already encountered the next issue:

How can I import my postgresql databases which I correctly backed up under my regular windows XP installation?

I already copied the *.backup files to the vmware. Then I tried to import the DBs via the Pokertracker import. I pointed to the pg_restore.exe in the pgadmin3 menu.
Nothing happened. A DOS prompt opened for 1/2 a second and quickly disappeared.
JeyBurns
 
Posts: 20
Joined: Fri Jan 25, 2008 10:23 am

Re: Postgres database setup in vmware windows virtual machine

Postby APerfect10 » Fri May 02, 2008 2:26 pm

Use the command line utility pg_restore.

-Derek
APerfect10
Site Admin
 
Posts: 4465
Joined: Sat Dec 08, 2007 6:03 pm

Re: Postgres database setup in vmware windows virtual machine

Postby JeyBurns » Fri May 02, 2008 2:52 pm

APerfect10 wrote:Use the command line utility pg_restore.

-Derek


Derek, thanks for the great support.

I got the backup working by clicking twice on the restore option in Pokertracker. First, the DOS prompt disappeared. When I tried it again right afterwards, it told me that I had to open the database after the import and assign a name. This seemed to work for me.

However, one issue was solved, a second one appeared.

First, I got an error message from PAH. Then, when I tried to import my recently played hands to my existing database (which is a new one and wasn't restored), I got the following error message:

Code: Select all
*********************************
PT Version: 2.17.01g
Error Date: 05/02/2008   19:16
Database Error: 7
Error Text: SQLSTATE = 53100
Error: couldn't extend relation 1663/16384/16429: No space left on device;
Error while executing the query

No changes made to database.

INSERT INTO game ( game_id, game_number, site_id, date_played, game_level_id, flop_1, flop_2, flop_3, turn, river, pot, rake, player_id, import_date, table_name, winning_hand, real_player_id, players_saw_flop, number_of_players, ub_game_number, ub_kill_game ) VALUES ( 5093, 5093, 8, {ts '2008-05-02 19:12:07'}, 1, 'Td', '7d', '4d', '5d', '9d', 20.0000, 1.0000, 0, {ts '2008-05-02 19:16:06'}, 'TEACHHER', '[--Split--]', 0, 2, 6, '6972028584', 0 )
DataObject: d_game
Syntax In Error: INSERT INTO game ( game_id, game_number, site_id, date_played, game_level_id, flop_1, flop_2, flop_3, turn, river, pot, rake, player_id, import_date, table_name, winning_hand, real_player_id, players_saw_flop, number_of_players, ub_game_number, ub_kill_game ) VALUES ( 5093, 5093, 8, {ts '2008-05-02 19:12:07'}, 1, 'Td', '7d', '4d', '5d', '9d', 20.0000, 1.0000, 0, {ts '2008-05-02 19:16:06'}, 'TEACHHER', '[--Split--]', 0, 2, 6, '6972028584', 0 )
*********************************


This obviously means, that I have insufficent space on my drive. The data is stored in /var . Can I change this to another folder (e.g. /home), or do I have resize my var partition?
JeyBurns
 
Posts: 20
Joined: Fri Jan 25, 2008 10:23 am

Re: Postgres database setup in vmware windows virtual machine

Postby APerfect10 » Fri May 02, 2008 3:41 pm

It will probably be easiest to create a tablespace on a different partition/drive.

See _dave_'s post for step-by-step instructions.

Best regards,

Derek
APerfect10
Site Admin
 
Posts: 4465
Joined: Sat Dec 08, 2007 6:03 pm

Re: Postgres database setup in vmware windows virtual machine

Postby JeyBurns » Fri May 02, 2008 5:17 pm

APerfect10 wrote:It will probably be easiest to create a tablespace on a different partition/drive.

See _dave_'s post


Does this also apply to Linux?
I mean, I use LVM with encryption - isn´t there a way to resize the specific partition?
JeyBurns
 
Posts: 20
Joined: Fri Jan 25, 2008 10:23 am

Re: Postgres database setup in vmware windows virtual machine

Postby APerfect10 » Sat May 03, 2008 12:22 am

JeyBurns wrote:
APerfect10 wrote:It will probably be easiest to create a tablespace on a different partition/drive.

See _dave_'s post


Does this also apply to Linux?
I mean, I use LVM with encryption - isn´t there a way to resize the specific partition?


That should work on any platform...

My Linux administration knowledge is not very good so I'm not sure about resizing the partition. Typically, from my experience, the only way to resize the partition is to wipe it and create a new/larger partition but I could easily be wrong.

Best regards,

Derek
APerfect10
Site Admin
 
Posts: 4465
Joined: Sat Dec 08, 2007 6:03 pm

Re: Postgres database setup in vmware windows virtual machine

Postby JeyBurns » Mon May 05, 2008 12:06 pm

Derek,

I tried to solve my problem by copiing the virtual machine to a whole new disk with sufficient space. So far, everything is okay.
The IP of the virtual machine has changed to something like 192.168.101.128 and I get the connection error again:

Code: Select all
Error #: 1
Unable to connect to PostgreSQL (Port #: 5432) to get the list of databases. The error was:
101 - SQLSTATE = 08001
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "192.168.xxx.xx" and accepting TCP/IP connections on port 5432?


Has the hba.conf to be changed?
JeyBurns
 
Posts: 20
Joined: Fri Jan 25, 2008 10:23 am

Re: Postgres database setup in vmware windows virtual machine

Postby APerfect10 » Mon May 05, 2008 1:27 pm

No, your pg_hba.conf file should be good and accept connections from the new IP.

What do your PostgreSQL log files say?

-Derek
APerfect10
Site Admin
 
Posts: 4465
Joined: Sat Dec 08, 2007 6:03 pm

PreviousNext

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 34 guests

cron