test_tblspace.out

text/plain

Filename: test_tblspace.out
Type: text/plain
Part: 2
Message: Re: Index build temp files
 current_user 
--------------
 sfrost
(1 row)

 role 
------
 none
(1 row)

 temp_tablespaces 
------------------
 rn_temp_01
(1 row)

                                        List of tablespaces
    Name    | Owner  |                 Location                  | Access privileges | Description 
------------+--------+-------------------------------------------+-------------------+-------------
 rn_temp_01 | sfrost | /var/lib/postgresql/rn_tblspcs/rn_temp_01 |                   | 
(1 row)

create temporary table test1 (a int);
CREATE TABLE

select relname,reltablespace from pg_class where relname = test1;
 relname | reltablespace 
---------+---------------
 test1   |         36578
(1 row)

drop role if exists test_role;
DROP ROLE
create role test_role;
CREATE ROLE
set role test_role;
SET
create temporary table test3 (a int);
ERROR:  permission denied for tablespace rn_temp_01