After an interview I created a simple example of Python code for Google Colab to connect with PostgreSQL and write 1 million rows (not a practical case but for illustration): https://github.com/skupriienko/Python-Tools/blob/master/Colab_PostgreSQL_Python.ipynb