public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: ht@inf.ed.ac.uk (Henry S. Thompson)
To: cygwin@cygwin.com
Subject: Re: Attention PostgreSQL maintainer
Date: Sun, 29 Oct 2017 20:38:00 -0000	[thread overview]
Message-ID: <f5b7evd8zaq.fsf@troutbeck.inf.ed.ac.uk> (raw)
In-Reply-To: <f5befpl938f.fsf@troutbeck.inf.ed.ac.uk> (Henry S. Thompson's message of "Sun\, 29 Oct 2017 19\:13\:36 +0000")

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

OK, here's and attempt at a set of install instructions for
  Windows 10 Professional Ver 10.0 Build 14393
  Cygwin DLL version: 2.9.0-3
  Postgresql: 9.6.5-2

I got slightly muddled with the cygserver and postgress
install-as-service steps, so the attached may not quite be right in that
regard, I won't be in a position to do another clean install until next
week to confirm, so happy to hear from someone else who can do so
sooner...

Maintainer: Please note what I believe to be a bug in the current
release which is described/fixed in the second step below.

ht


[-- Attachment #2: Postgresql install notes for Cygwin --]
[-- Type: text/plain, Size: 2911 bytes --]

I was eventually able to follow a modified version of
"For the impatient: install as service (hard)" from
/usr/share/doc/Cygwin/postgresql.README, as follows:

* Dump your old database, if you had a previous installation

* !!!! IMPORTANT!!!: edit /etc/rc.d/init.d/postgresql
   to fix what I believe is a bug as shipped:
   On line 32 or thereabouts, change
    DAEMON="$progdir/$prog.exe"
   --->
    DAEMON="$progdir/$prog"

* Adjust any other (e.g. PATH) settings in /etc/rc.d/init.d/postgresql

* If you had an old installation, move the data directory
  (e.g. /usr/share/postgresql/data) elsewhere, or at least save
  .../data/postgresql.conf somewhere before you delete .../data

* If you don't already have cygserver running as a service:
    > /usr/bin/cygserver-config
    > cygrunsrv --start cygserver

* Initialise Postgresql
    > /etc/rc.d/init.d/postgresql initdb # in an elevated shell
     The files belonging to this database system will be owned by user "[you]".
     This user must also own the server process.

     The database cluster will be initialized with locale "C".
     The default text search configuration will be set to "english".

     Data page checksums are disabled.

     creating directory /usr/share/postgresql/data ... ok
     creating subdirectories ... ok
     selecting default max_connections ... 30
     selecting default shared_buffers ... 128MB
     selecting dynamic shared memory implementation ... posix
     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:

	 /usr/sbin/pg_ctl -D /usr/share/postgresql/data -l logfile start # ignore this!]

     done.

* If you had a previous install, do a diff between your saved
  postgresql.conf and the new .../data/postgresql.conf and copy over
  any substantive changes you had made and wish to keep

* Install as a service
  > /etc/rc.d/init.d/postgresql install
   - cygserver OK - Installing PostgreSQL daemon: done.
  > /etc/rc.d/init.d/postgresql start

* Cleanup up the initial odd role situation
  > psql -U SYSTEM postgres
   postgres=# ALTER ROLE "SYSTEM" WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION;
   postgres=# CREATE ROLE [yourCygwinLogin];
   postgres=# ALTER ROLE [yourCygwinLogin] WITH SUPERUSER INHERIT NOCREATEROLE CREATEDB LOGIN NOREPLICATION;
   postgres=# \q

* Create a database for yourself
  > psql -U [yourCygwinLogin] postgres
   postgres=# CREATE DATABASE xyzzy WITH TEMPLATE=template0 OWNER=[yourCygwinLogin] ENCODING=....;
   postgres=# \q
  > psql -U [yourCygwinLogin] xyzzy
   [off you go]

[-- Attachment #3: Type: text/plain, Size: 354 bytes --]

-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]


[-- Attachment #4: Type: text/plain, Size: 219 bytes --]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2017-10-29 20:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 22:38 Keith Christian
2017-10-29  9:39 ` Marco Atzeri
2017-10-29 19:13 ` Henry S. Thompson
2017-10-29 20:38   ` Henry S. Thompson [this message]
2017-10-30 22:45     ` Keith Christian
2017-10-30 22:47       ` Keith Christian
2017-11-18  7:34       ` Marco Atzeri
2017-11-18 14:31         ` Keith Christian
2017-11-21  1:54           ` Keith Christian
2017-11-21  8:28             ` Henry S. Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5b7evd8zaq.fsf@troutbeck.inf.ed.ac.uk \
    --to=ht@inf.ed.ac.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).