Part way there, how do I complete it
I have just installed pgsql on a Windows XP from my administrator
account 'rj'. I had created a power user account postgres but I did
not see where to invoke this. It seems to be running under this admin
account but maybe that is because this is a corporate machine and the
admin account isn't realy an admin.
When I opened pgAdminIII, the Object browser window showed 'Servers
(0)'. Nothing happened when I right
clicked - I could not add or change. When I used the menu item to add
or change connection to a server or
when I tried to add a server, the process failed with an error of
'connection failed'. So, after reading the manual and following the
steps, I got something. The sequence is shown below. But it leaves
me with some questions:
1) The encoding is win1252, I wanted to make it unicode but I missed
where to make that happen. Can I change it for those things already
built and for things in the future? The only things I have built are
tests so I don't care about them. Can I change it somewhere else and
use that as a template for future dbs?
2) I don't know what the ramification are of "WARNING: enabling
"trust" authentication". Should I change something?
3) I created a db called test. I saw no difference in the pgAdminIII
so I performed the command again (as seen below) and it showed that
'test' already existed. Why could I not see that in pgAdminIII?
4) Up to this point, there has been no change in the look or behavior
of pgAdminIII. So I went to File|Add server. I added test01. Now I
do not like what I see in the object browser. Can I change it? It
looks like:
Servers(1)
test01(localhost:5432)
Databases (2)
postgres
test
Tablespaces . . .
Postgres and test dbs only showed up after I defined test01. I do not
want the top level server to be test01. Is there a convension as to
how to name this? I expect to use pgsl for 4 different applications.
I don't know if I can or should make these different servers or
different databases. And how do I change it? What are the
considerations?
Command line capture:
C:\Program Files\PostgreSQL\8.3\bin>initdb -D C:\Program Files
\PostgreSQL\8.3\data
The files belonging to this database system will be owned by user
"rj".
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".
creating directory Files/PostgreSQL/8.3/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in Files/PostgreSQL/8.3/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
Success. You can now start the database server using:
"postgres" -D "Files/PostgreSQL/8.3/data"
or
"pg_ctl" -D "Files/PostgreSQL/8.3/data" -l logfile start
C:\Program Files\PostgreSQL\8.3\bin>"pg_ctl" -D "Files/PostgreSQL/8.3/
data" -l logfile start
server starting
C:\Program Files\PostgreSQL\8.3\bin>createdb test
C:\Program Files\PostgreSQL\8.3\bin>createdb test
createdb: database creation failed: ERROR: database "test" already
exists
C:\Program Files\PostgreSQL\8.3\bin>psql test
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
Warning: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
End of post.
Thanks,
Ray
On Apr 15, 3:15 pm, ray <Ray.Jos...@CDICorp.com> wrote:
I have just installed pgsql on a Windows XP from my administrator
<snip>
1) The encoding is win1252, I wanted to make it unicode but I missed
where to make that happen. Can I change it for those things already
built and for things in the future?
I found that I can change this through the properties tab for the
existing db.
4) Up to this point, there has been no change in the look or behavior
of pgAdminIII. So I went to File|Add server. I added test01. Now I
do not like what I see in the object browser. Can I change it? It
looks like:
Servers(1)
test01(localhost:5432)
Databases (2)
postgres
test
Tablespaces . . .Postgres and test dbs only showed up after I defined test01. I do not
want the top level server to be test01. Is there a convension as to
how to name this? I expect to use pgsl for 4 different applications.
I don't know if I can or should make these different servers or
different databases. And how do I change it? What are the
considerations?
I have found that I can change this by 'dropping' the test01 and
creating a new one. I would still like to know what naming
convensions are and how to choose a new server or db.
Thank,
Ray
On Apr 15, 4:17 pm, ray <Ray.Jos...@CDICorp.com> wrote:
On Apr 15, 3:15 pm, ray <Ray.Jos...@CDICorp.com> wrote:
I have just installed pgsql on a Windows XP from my administrator
<snip>
I closed down everything and tried to start back up and failed. From
pgAdmin, there is a red 'x' in the icon for my new server. When I try
to connect to the server I get an error message entitled "Server
doesn't listen". In a command window, I have this interaction:
C:\Program Files\PostgreSQL\8.3\bin>"pg_ctl" -D "Files/PostgreSQL/8.3/
data" -l logfile start
server starting
C:\Program Files\PostgreSQL\8.3\bin>pg_ctl stop -m fast
pg_ctl: PID file "C:/Program Files/PostgreSQL/8.3/data/postmaster.pid"
does not exist
Is server running?
The Properties tab shows:
Connected? No
So it looks like neither method works now. The log file contains:
postgres cannot access the server configuration file "C:/Program Files/
PostgreSQL/8.3/bin/Files/PostgreSQL/8.3/ data/postgresql.conf": No
such file or directory
It looks like there are two problems here:
1) The part of the string /8.3/ data/ has a space in it before
'data'. The actual path does not. I don't know how to get it pointed
to the right location.
2) There seems to be redundant locations. I also have that same conf
file in: C:\Program Files\PostgreSQL\8.3\data
I think this later location is correct. Should I try to point it in
the right direction (how?) or should I attempt to reinstall the whole
thing?
I would appreciate any comments.
Thanks,
Ray
On Apr 15, 5:50 pm, ray <Ray.Jos...@CDICorp.com> wrote:
On Apr 15, 4:17 pm, ray <Ray.Jos...@CDICorp.com> wrote:
I am trying to re-installed PostgreSQL. I have chosen a different
process. I am installing it as a service. After much time at the
'Starting Services' window, it says that I have insufficient
previleges to start services. I am an administrator on the machine
and I start and stop services.
Any ideas what may be going wrong and what I might do to get them
working?
Ray
On Apr 16, 1:35 pm, ray <Ray.Jos...@CDICorp.com> wrote:
On Apr 15, 5:50 pm, ray <Ray.Jos...@CDICorp.com> wrote:> On Apr 15, 4:17 pm, ray <Ray.Jos...@CDICorp.com> wrote:
I am trying to re-installed PostgreSQL. I have chosen a different
process. I am installing it as a service. After much time at the
'Starting Services' window, it says that I have insufficient
previleges to start services. I am an administrator on the machine
and I start and stop services.Any ideas what may be going wrong and what I might do to get them
working?Ray
The method I used to resolve this was to:
1) Use Control Panel to Remove the previous installation. It left
behind the 'data' folder.
2) Install with the msi file choosing not to install as a service.
3) After installation was complete, the log stated:
MSI (c) (38:10) [07:57:45:317]: Product: PostgreSQL 8.3 --
Installation completed successfully.
4) I set the environment variable 'LD_LIBRARY_PATH' to 'C:\pgHome
\8.3\lib'.
5) Set the environment variable PGDATA to 'C:\pgHome\8.3\data'.
6) Renamed the old 'data' folder to 'data_old'.
7) From the command prompt, I executed 'initdb' with no parameters
allowing PGDATA to drive the location, which responded with:
Success. You can now start the database server using: . . .
8) Executed: 'pg_ctl -l firstlogfile.txt start' which produced a
logfile in the bin folder (from where the command was issued).
9) Executed 'createdb' to produce a new database under my logon name.
10) From pgAdmin3, the new server was visible.
11) From pgAdmin3, I set 3 more connections which established 3
servers.
12) From pgAdmin3, I dropped the original server setup from the
command line.
13) Each server has 2 databases: postgres and myname.
Now, if I can just find out if these are persistant and useful . . .
Ray