From: | Ankush Chawla <ankushchawla03(at)gmail(dot)com> |
---|---|
To: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, postgann2020 s <postgann2020(at)gmail(dot)com> |
Subject: | priviliges issues |
Date: | 2020-04-15 18:04:55 |
Message-ID: | CAOY8JhCzLCCM8hSwsK0soCEnRMSV-Ov53LG5btNbHAH7w=AgOg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
hi Pgsql-Admin,
I am new to Postgres and naive in understanding
I tried to create a table in a schema and then given privilege to some
other user, still he is not able to access. Below are the things I tried:
postgres=# alter schema s1 owner to user1;
ALTER SCHEMA
postgres=# \c postgres user1
You are now connected to database "postgres" as user "user1".
postgres=# create table s1.new (a integer);
CREATE TABLE
postgres=# grant select on s1.new to user2
postgres-# ;
GRANT
postgres=# \c postgres user2
You are now connected to database "postgres" as user "user2".
postgres=> select * from s1.new;
ERROR: permission denied for schema s1
LINE 1: select * from s1.new;
^
Regards
Ankush
On Tue, Apr 14, 2020 at 12:36 PM postadmin2020 S <postgadm2020(at)gmail(dot)com>
wrote:
> Thanks To all of you.
>
> On Mon, Apr 13, 2020, 10:54 PM Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>
>> On Sun, Apr 12, 2020 at 8:37 AM postgann2020 s <postgann2020(at)gmail(dot)com>
>> wrote:
>>
>>> Hi All,
>>>
>>> Good Evening.
>>>
>>> Could someone please suggest the process to resolve the issue.
>>>
>>> Issue : proc state as "Idle_in_transaction"
>>>
>>> Env: Postgres 9.5.15
>>> Job Schedulers : Tomcat ( For running procs).
>>>
>>> We are using tomcat as scheduler for running few jobs.we are observing
>>> one of the proc state as "Idle_in_transaction" and due to this remaining
>>> other dependent procs get stucked and causing waiting for ever.
>>>
>>> If we ran same proc from psql and pgadmin we could able to run
>>> successfully and able to get response and no "Idle_in_transaction" state.
>>>
>>> proc: select msg,rescode from schema.proc_name('arg1','arg2');
>>>
>>
>> If you run just this in psql, you will be in autocommit mode. The
>> statement will run in its own transaction which commit as soon as the
>> statement finishes.
>>
>> The problem is not with the line you show, it is in what happens before
>> (a transaction is opened) and after (it is not committed) that line.
>>
>> Cheers,
>>
>> Jeff
>>
>
--
Best Regards,
Ankush Chawla
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Serrano | 2020-04-15 18:10:35 | user with autentication windows |
Previous Message | Brandon Hsu | 2020-04-15 07:37:42 | pgAdmin4 dependency package "python3-psycopg2" should be place in "pgdg-common" repo. |