--
You received this message because you are subscribed to the Google Groups "PsiTurk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psiturk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/fbb4c4e2-8070-4856-90b3-ca391b400d00n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/a26e648b-1915-4958-bd88-0133c7eb4510n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/69d91823-51a2-40a9-a410-cb4a6dc8a092n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/27631dbc-79fb-4a25-8e81-5aaef9ef2d20n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/527d1d5b-d093-4670-9e50-60c1b7a353a9n%40googlegroups.com.
This installation file is written for postgres for Psiturk without using Heroku.
Operating System Being UsedThis installation was done on an Ubuntu version of Windows SubSystem for Linux.
The following commands are listed in the order I installed them.
NOTES: You can probably combine them into single install statements, but making it clear which ones were done. Also, some of these might not need to be done but I can't guarantee which ones could be omitted.
These should be all you need for installation of postgres for psiturk.
Using postgresYou now should successfully have postgres installed on your Ubuntu system.
After installing, if you try running psql, you should get an error about "could not connect to server". Which is the same thing that happened when making this tutorial.
To solve this, follow the steps below to get the database and users needed.
The first thing that needs to happen is the service for postgres needs to start.
The following command is to start the service:
Once starting the server, you will get a different error message. This error message will correspond to not having a user for that in postgres. To interact with postgres, run the following command to get to the "postgres" user.
NOTE: this is not the user for the config.txt file. This is for accessing postgres interactively on your Linux system
Once you type in your computer password, you will be in the postgres userspace.
You will need to create a user for the database, this is the one that you can use (you of course can create more). Type the following into the terminal :
This will create an interactive prompt in the terminal.
Resources for creating a user:
You will now need to alter the permissions for the user to create a database.
Once you have that, in the terminal (through Linux, not psql) you type the following:
Where partdb is the database you want to create and use in psiturk.
Resources for this section:
Changing Permissions for a UserYou need to grant permission so that psiturk can create tables and connect to the database.
The command (in psql):
Resources for this section:
Setting up config.txt for DATABASE_URLIn this postgres documentation, it describes how to do the URL for connecting to the database.
This is what you use for config.txt.
Below is an example:
database_url = postgres://psiturkuser:psiturkpass@localhost:5432/partdb
Explaining the parts:
If you want to see the list of databases available (lowercase L):
If you want to connect to a certain database, to do queries through the command line:
Once you are in a certain database, you can do the following command to see all the available tables: