While the data volume issue can be handled by using the right options with PostgreSQL's built-in tools, the code rewrite and data transformation will require other tools. For moving data from Oracle to PostgreSQL, ora2pg (http://ora2pg.darold.net/), a Perl utility, offers different options (such as moving only specific tables or all tables, triggers, procedures and packages, selective migration of data with WHERE clauses, and so on). While the code does get converted to some extent, use of another utility, orafce (https://github.com/orafce/orafce), may be necessary to mimic the functionality of Oracle packages such as DBMS_OUTPUT.