-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install postgresql issue #61
Comments
I had the same error yesterday. It appears that writing on some folders or creating symlinks are problematic in WSL right now. |
Has anyone found a workaround for this? |
Seems like there's no proper System V shared memory support at the moment. |
No workouronds yet? |
Same issue here with build 14352.rs1_release.160522-1930. Any fixes on this yet? It's the final piece of the puzzle for my workflow! Output below: rob@DESKTOP-NQ3AL5E:~$ sudo apt-get install postgresql postgresql-common
[sudo] password for rob:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libossp-uuid16 libxslt1.1 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
postgresql-9.3 postgresql-client-9.3 postgresql-client-common
Suggested packages:
oidentd ident-server locales-all postgresql-doc-9.3
The following NEW packages will be installed:
postgresql postgresql-9.3 postgresql-client-9.3 postgresql-client-common
postgresql-common
0 upgraded, 5 newly installed, 0 to remove and 40 not upgraded.
Need to get 0 B/3,603 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Preconfiguring packages .../n] y
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Selecting previously unselected package postgresql-client-common.
(Reading database ... 32749 files and directories currently installed.)
Preparing to unpack .../postgresql-client-common_154ubuntu1_all.deb ...
Unpacking postgresql-client-common (154ubuntu1) ...
Selecting previously unselected package postgresql-client-9.3.
Preparing to unpack .../postgresql-client-9.3_9.3.13-0ubuntu0.14.04_amd64.deb ...
Unpacking postgresql-client-9.3 (9.3.13-0ubuntu0.14.04) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../postgresql-common_154ubuntu1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (154ubuntu1) ...
Selecting previously unselected package postgresql-9.3.
Preparing to unpack .../postgresql-9.3_9.3.13-0ubuntu0.14.04_amd64.deb ...
Unpacking postgresql-9.3 (9.3.13-0ubuntu0.14.04) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../postgresql_9.3+154ubuntu1_all.deb ...
Unpacking postgresql (9.3+154ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up postgresql-client-common (154ubuntu1) ...
Setting up postgresql-client-9.3 (9.3.13-0ubuntu0.14.04) ...
update-alternatives: using /usr/share/postgresql/9.3/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up postgresql-common (154ubuntu1) ...
Creating config file /etc/logrotate.d/postgresql-common with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up postgresql-9.3 (9.3.13-0ubuntu0.14.04) ...
Creating new cluster 9.3/main ...
config /etc/postgresql/9.3/main
data /var/lib/postgresql/9.3/main
locale C
FATAL: could not create shared memory segment: Function not implemented
DETAIL: Failed system call was shmget(key=1, size=48, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.3/main"
Error: initdb failed
Error: could not create default cluster. Please create it manually with
pg_createcluster 9.3 main --start
or a similar command (see 'man pg_createcluster').
update-alternatives: using /usr/share/postgresql/9.3/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up postgresql (9.3+154ubuntu1) ...
rob@DESKTOP-NQ3AL5E:~$ sudo pg_createcluster 9.3 main --start
Creating new cluster 9.3/main ...
config /etc/postgresql/9.3/main
data /var/lib/postgresql/9.3/main
locale en_US.UTF-8
FATAL: could not create shared memory segment: Function not implemented
DETAIL: Failed system call was shmget(key=1, size=48, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/9.3/main"
Error: initdb failed |
Still waiting on this. |
One of the things holding me from developing on windows with Ruby. |
So you don't get an error while installing postgres on WSL? Which version of postgres are you using? Or do you mean the combination of postgres on Windows and Ruby on WSL works great? |
Thanks, didn't think of it that way. Op vr 17 jun. 2016 23:05 schreef SRGOM [email protected]:
M 06-51 800 419 |
I got the same error on a new release - build 14367.rs1_release.160613-1700. Can anyone find a solution? |
Someone has to implement that call to the kernel. |
Hi! Can someone please describe how to connect to postgres on the host, like @SRGOM mentioned? Thanks! |
I am successfully connecting my Rails app running in WSL to Postgres on Windows. I don't recall doing anything special to make that happen. |
@SRGOM Thanks! Just tried it and it works perfectly. |
@SRGOM Thank you. When installing Postgres on Windows normally. You can consider this alternative, until they make proper implementation in bash.
|
For records, I'm receiving the same issue on Build 14372.rs1_release.160620-2343, trying to create cluster after installation of postgresql 9.4 $ sudo pg_createcluster 9.4 main |
I have the same error of @pavelbulanov (in italian):
|
Still unable to install postgres with build 14393.10:
|
I can think of at least a couple of reasons I don't want Postgres running on Windows and one involves just not wanting the service constantly running in the background when it can be turned on/off by starting/stopping Bash; having to actually open up the services applet to shut it off/turn it on is kind of inconvenient when I'm only using it for the purpose of development. Two, I read that developers were talking about ending support for the Windows port on a mailing list because it's difficult to maintain. Until this is fixed, I'm sticking with my virtual machine. |
I think that, for me, it's just a matter of convenience. Right now, I unpause my VM and go. If I wanted to start using Bash I'd have to start the Postgres service and then start Bash because I would prefer not to have the service running in the background. Call me paranoid. |
I have Ubuntu 14.04 and Windows 10 on the same machine, and frankly my stack is waaaayyyyy slower in Windows 10 with the server code running in the shell and postgres installed on Windows. I'm not sure yet what could be the cause of this:
But I sure as hell would like to compare, because the difference is extremely noticeable. |
@dbo-odoo, it's unlikely related with postgres, unfortunately - it more looks like overall slowdown in some kind of operations inside bash if possible, try doing kind of hack for your app to not use db (use static stubs instead) and measure for me, starting rails server (which doesn't do any postgresql queries) takes like 5-7 secs, comparing to 1-2 secs inside Ubuntu virtual machine (on the same hardware and with lack of resources for VM) |
@dbo-odoo -- curious, can you quantify "extremely noticeable"? For you, is that like 20% slower? 100x slower? |
@pavelbulanov yeah that's not something I'm gonna be able to do easily, but if I do have time i'll test it @aseering I'd say along the lines of 2-4x slower (as a gross estimation) If I do some benchmark I'll post them here. |
I'm also experiencing significantly slower start up times for rails server. The report below shows benchmark results for bash on Windows, and apparently File IO performance can be over 6 times slower than on Ubuntu! http://www.techrepublic.com/article/windows-10-how-well-does-it-run-ubuntu-bash/ |
@alexssung yep, I believe @russalex said that the file i/o is the main bottleneck in his //build/ conference presentation |
I experienced the same issue, trying to install PostgreSQL 9.5 for my django. There was no error reported when installing, but something went wrong when creating database superuser and templates. |
@FqPc, do you know if i/o slowdown is relevant to bash working with both file systems, VolFs and Windows f/s via mnt? |
@pavelbulanov the best place to ask would probably be in a new thread and ping russalex in it |
Happy to answer this one here. The file system performance hit happens on both VolFs and DrvFs. VolFs may actually be slightly faster in some situations simply due to the amount of caching we do there, but in most cases the perf will be very similar between the two. Throwing a quick shout out to @SvenGroot's excellent file system blog post here. It does help explain a lot. |
You probably don't want to run Postgres inside BashOnWindows anyways because of IO performance. It's just plain simpler to run https://github.com/garethflowers/postgresql-portable on Windows side and connect via TCP on linux side |
@colinrubbert This worked great for me, thanks. Very minor edit - I think you meant "postgresql-client" not "postgres-client" |
thanks @olinbg I will fix it. Must've just been speed typing 😄 |
Came to this issue, found the workaround, works great 👍 |
With build 15007 postgres works. The shared memory works. What doesn't seem to work is the UNIX socket. It starts and you can connect to it using TCP. To log in you first need to edit pg_hba.conf and enable 'trust' for 127.0.0.1 |
This bug isn't assigned to anyone, but can be closed per the above comment.
|
Is there a separate issue for the UNIX socket not working? |
@arjennienhuis - Thanks for the validation and the post. Can you provide more specifics with what is not working with UNIX sockets? Targeted repro steps are very useful. |
Which is insecure because it disables all password checking |
and in Linux:
The source says:
|
@arjennienhuis - Thanks for collecting the trace and dissecting it out. Makes the analysis very easy. Good news is that the support for |
#1354 mentioned that. Thanks! |
This doesn't work with 15014. Any idea when the fix will be released? |
Support for |
Same issue here with PostgreSQL |
I'm still "Initializing updates"... 😞 |
everything seems to work on 15025 |
postgres@localhost:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data |
pg_createcluster 9.5 main --start
sysctl -w kernel.shmmax=1
sysctl: cannot stat /proc/sys/kernel/shmmax: No such file or directory
The text was updated successfully, but these errors were encountered: