From version 11 and up we have Procedures it supports commit and rollback transaction inside a PROCEDURE and must be called with CALL, there are no savepoints or transaction naming support...
There are work around this problem using PlPython, or FDW to callback to postgresql creating a new session to create independent Transactions..