I have tried to change session_replication_role to 'replica' with TablePlus but I get permission denied when I try to do it.
Is there any other way to do this with Heroku Postgres? I am trying to do a database migration but for some reason I don't have permissions to change this value.
Thanks!
Related
Based on this solution I would like to change the idle_in_transaction_session_timeout in Heroku Postgres, however I do not have the rights as a superuser (see Heroku default permissions). Are there any alternatives to this?
You can change it for your own user:
alter user current_user set idle_in_transaction_session_timeout = '5min';
I accidentally restored another database as the default postgres database, how do I correct this?
postgres v10 on ubuntu.
To be specific. Log into a database other then postgres.
Then:
DROP DATABASE postgres;
CREATE DATABASE postgres; --You don't need to specify template1 it is the default.
Then do your restore. If you are using pg_restore make sure you use -C to have the database CREATEd properly.
I am trying to create a migration. this is the output
MIX_ENV=prod DATABASE_URL="URL" mix ecto.migrate
[info] execute "CREATE EXTENSION citext;"
** (Postgrex.Error) ERROR 42501 (insufficient_privilege): permission denied to create extension "citext"
however until now it has been working in dev mode.
I did try
ALTER USER user WITH SUPERUSER
and installed postgresql-contrib package
but nothing works.
I had a similar issue and doing:
psql -d postgres, ALTER USER my_user_name WITH SUPERUSER and
setting the username in the Repo config to my_user_name
has resolved the issue.
So I think that the answer to the question might be doing 2. so making sure the DB user used by our application is the one that has SUPERUSER. Obviously you could also figure out without doing 2. what DB user name is used by default and then do 1. for that user.
I am using a postgresql on Ubuntu. It already has my username testuser that I have checked using the following command:
\du
But whenever I create a database, it says that the owner is postgres:
create database tempdb;
I want the user of tempdb to be tempuser rather than postgres. Could you tell me how can I do that?
try:
CREATE DATABASE tempdb OWNER testuser;
as per docs
Are you using psql? If so, the --username flag will allow you to connect as testuser.
I am very new to pgAdmin. I added a postgres instance running on Amazon redshift. After entering all the details, I get the error
permission denied to set parameter"client_min_messages" to "notice"
both Redshift or RDS postgres give us very limited permission. i dont think you able to change client_min_messages