OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Paul Smedley on January 01, 2018, 08:26:19 am
-
Hi All,
Inspired by Greg Pringle and Jan-Erik Larka, I updated Postgresql to 9.3.x:
http://smedley.id.au/tmp/postgresql-9.3.17-os2-20171231.zip
I also just built 9.4.x:
http://smedley.id.au/tmp/postgresql-9.4.15-os2-20180101.zip
Feedback appreciated!
Cheers,
Paul
-
While I was at it, I built 9.6.6:
http://smedley.id.au/tmp/postgresql-9.6.6-os2-20180101.zip
Note that sometimes when running the database initialisation, I got an error like:
running bootstrap script ... FATAL: could not get shared memory segment: Invalid argument
running initdb a 2nd time seemed to address this.
Cheers,
Paul
-
VIRTUALADDRESSLIMIT=2048 seems to be the best setting here to not get the above error during initdb.
Too small (1536) and it randomly fails, too big (2560) and it fails 100% with a semget() error.
-
initdb in the 9.4 and 9.6 build doesn't behave like they do in 9.3:
selecting dynamic shared memory implementation ... sysv
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... postgres: could not look up effecti
ve user ID 0: No such file or directory
child process exited with exit code 1
initdb: removing data directory "D:/NLSTeam"
-
initdb in the 9.4 and 9.6 build doesn't behave like they do in 9.3:
performing post-bootstrap initialization ... postgres: could not look up effective user ID 0: No such file or directory
child process exited with exit code 1
initdb: removing data directory "D:/NLSTeam"
Needless to say, I don't see that here, but I'll try investigate soon!
Cheers
Paul.
-
initdb in the 9.4 and 9.6 build doesn't behave like they do in 9.3:
performing post-bootstrap initialization ... postgres: could not look up effective user ID 0: No such file or directory
child process exited with exit code 1
initdb: removing data directory "D:/NLSTeam"
Needless to say, I don't see that here, but I'll try investigate soon!
Hopefully https://www.dropbox.com/s/8hkit4gq4b8kedt/postgresql-9.6.6-os2-20180103.zip?dl=0 should help
Cheers,
Paul
-
Hello,
I've tried the packages 9.3.17 and 9.6.6, but have problems.
9.6.6 seem not to allow one to connect nor add user, and especially superusers, while 9.3.17 allow one to use it with phpPGAdmin (create tables and add data) until it close unexpectedly... unable/unwilling to recover/rebuild the database.9.3.7 seem to have potential to work with OpenOffice through jdbc, was able to get a message "FATAL: the database system is starting up" from it. :)
PANIC: could not write to log file 000000010000000000000001 at offset 7471104, length 8192: Invalid argument
STATEMENT: commit
Killed by SIGABRT
pid=0x016a ppid=0x0102 tid=0x0001 slot=0x009c pri=0x0200 mc=0x0001 ps=0x0010
D:\PROGRAMS\PGSQL\BIN\POSTGRES.EXE
Creating 016A_01.TRP
Moved 016a_01.TRP to C:\var\log\app\6434819e-016a_01-POSTGRES-exceptq.txt
LOG: server process (PID 362) was terminated by signal 6: Abort trap
DETAIL: Failed process was running: commit
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
LOG: all server processes terminated; reinitializing
LOG: could not fork startup process: Invalid argument
LOG: database system was interrupted; last known up at 2023-04-10 21:06:51 CEST
LOG: database system was not properly shut down; automatic recovery in progress
LOG: redo starts at 0/16E8C90
FATAL: the database system is starting up
FATAL: the database system is starting up
-
Unfortunately, there has been so little interest in this that I'm unlikely to spend time/effort investigating the problems.
-
Ahh, ok.
In desperation I tried:
[D:\PROGRAMS\PGSQL\BIN]pg_resetxlog -f D:\...
Transaction log reset
And it worked! :)
-
Cool! I think you are literally the only person to have provided feedback on the builds - literally ever....
-
I had been using the older port but the current one will not start on my system. Looks like there is a path issue which I could not figure out. I use postgresql extensively in linux. The current version is very good. With well designed tables, indexes and queries it can approach DB2 speeds.
-
Hey Greg,
I had been using the older port but the current one will not start on my system. Looks like there is a path issue which I could not figure out. I use postgresql extensively in linux. The current version is very good. With well designed tables, indexes and queries it can approach DB2 speeds.
Apologies - you and Jan-Erik are basically the only two to provide feedback.
Cheers,
Paul
-
I was hopeful when I saw the thread that there was an update :-)
-
Uhm,
Ok, I'll write some even though there may not surface any updates.
9.3.17: Forcing the log worked, it started after that, but the other problems remain.
8.0.x contained a lot of goodies, but it's not possible to install it ( 9.1 and earlier ) as there are problems with \ (back slash) and libc?
9.3.17 and onward
(1. initdb) Define -U MyNewUser during initialization of the db folder and skip (3. createuser) allow one to connect to the server as MyNewUser.
(3. createuser) Fail as one add a superuser, (2. start server) then abort and doesn't end recovery during the next start to accept connections.
(4. create database) fail.
Created tables dissappear, as one use
pg_resetxlog -f D:\Path2\DBFolder
if the server abort, or else the database is unreachable.
9.6.6 output a lot of problems with poll() as well
Steps I've used in the past within a rexx script to fully initialize and install PostgreSQL database for use:
initdb -U postgres -D D:\Path2\DBFolder --encoding=UTF8 --locale=sv_SE.UTF8 /* 1. To initialize and prepare path for databases */
pg_ctl -D D:\Path2\DBFolder -l logfile start /* 2. To start the server with that path */
createuser -U postgres -a -d -E -P MyNewUser /* 3. Only the superuser "postgres" exists from start, one has to add to use MyNewUser */
createdb -O MyNewUser -U MyNewUser MyNewDB /* 4. Create the actual database as the Owner and User of the new db. */
pgsql -U MyNewUser MyNewDB < D:\Path2\db_init.sql /* 5. Run SQL script to add tables, views, data etc. */
vacuumdb -U MyNewUser -a -z /* 6. To shrink, analyze and find possible optimizations */
createlang plpgsql MyNewDB -U MyNewUser /* 7. To add programming language PL/pgSQL to database */
pg_ctl -D D:\Path2\DBFolder stop /* 8. To close the server gracefully */
Step 5 and 7 may be skipped, while the others are crutial to verify that the database engine and additions work as expected.
-
Hey Greg,
Apologies - you and Jan-Erik are basically the only two to provide feedback.
Cheers,
Paul
That is alright, It has been a long time since I commented on PostgresQl. Every now and then I revisit the subject.
-
Here is the result of creating a DB with 9.4.15 with libcx 0.7.2-1
[K:\postgres\pgsql\bin]initdb -D K:\postgres\data -E LATIN1
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.IBM-850".
could not determine encoding for locale "en_US.IBM-850": codeset is "IBM-850"
could not determine encoding for locale "en_US.IBM-850": codeset is "IBM-850"
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory K:/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... sysv
creating configuration files ... ok
creating template1 database in K:/postgres/data/base/1 ... FATAL: could not cre
ate semaphores: Error 0
DETAIL: Failed system call was semget(1, 17, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "K:/postgres/data"
Looked good before the semaphores. I did not try and fix the language issue.
greg