These directions assume postgres is installed locally with a user—preferably not a superuser—with the same name as your OS username.
From the shell:
curl -OL https://github.com/devrimgunduz/pagila/archive/refs/tags/pagila-v3.1.0.tar.gz
tar -xvf pagila-pagila-v3.1.0.tar
cd pagila-pagila-v3.1.0
psql -U postgres # connect as postgres
Then, from psql:
create database pagila;
\c pagila
\i pagila-schema.sql
\i pagila-data.sql
create role pagila_dba;
grant all on database pagila to pagila_dba;
grant all on schema public to pagila_dba;
grant all on all tables in schema public to pagila_dba;
grant all on all sequences in schema public to pagila_dba;
-- change "stan" to your OS user name:
grant pagila_dba to stan;
\q
Now from the shell, connect with dba privileges by simply specifying the database name:
psql pagila # connect as OS user