Hi,

I was trying to do bulk upload via postgres using it's copy command.

While doing so, i received message :

airflow/hooks/postgres_hook.py", line 58, in bulk_load

    cur.execute("COPY %s FROM '%s'" % (table, tmp_file))

psycopg2.ProgrammingError: must be superuser to COPY to or from a file

HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also
works for anyone.

While browsing, i got to know that i can use alter user command, to assign
superuser status to the current user.

While trying to execute that, i am receiving following error :

cur.execute("alter user smrt_repl_rt superuser;")

psycopg2.ProgrammingError: must be superuser to alter superusers


Is there a way, i can connect to database as super user via some other
arguments?


Regards,

Twinkle

Reply via email to