Author Topic: Updated Postgresql/2 builds  (Read 11355 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Updated Postgresql/2 builds
« 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

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #1 on: January 01, 2018, 09:57:31 am »
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

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #2 on: January 01, 2018, 10:02:57 am »
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.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #3 on: January 01, 2018, 07:27:32 pm »
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"

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #4 on: January 01, 2018, 09:29:02 pm »
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.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #5 on: January 03, 2018, 08:46:56 am »
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

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #6 on: April 10, 2023, 10:32:58 pm »
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.  :)

Code: [Select]
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

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #7 on: April 10, 2023, 11:02:39 pm »
Unfortunately, there has been so little interest in this that I'm unlikely to spend time/effort investigating the problems.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #8 on: April 11, 2023, 05:24:49 am »
Ahh, ok.

In desperation I tried:
[D:\PROGRAMS\PGSQL\BIN]pg_resetxlog -f D:\...
Transaction log reset

And it worked! :)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #9 on: April 11, 2023, 07:38:53 am »
Cool! I think you are literally the only person to have provided feedback on the builds - literally ever....

Greg Pringle

  • Full Member
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #10 on: April 11, 2023, 11:02:40 pm »
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.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #11 on: April 12, 2023, 02:28:25 am »
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

Andy Willis

  • Sr. Member
  • ****
  • Posts: 292
  • Karma: +7/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #12 on: April 12, 2023, 02:43:11 am »
I was hopeful when I saw the thread that there was an update :-)

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #13 on: April 13, 2023, 11:51:19 pm »
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
Code: [Select]
pg_resetxlog -f D:\Path2\DBFolderif 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:
Code: [Select]
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.

Greg Pringle

  • Full Member
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Updated Postgresql/2 builds
« Reply #14 on: April 14, 2023, 03:02:00 pm »
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.