input: from typing import List
  
  def refresh_table(table_name: str, database_config: dict) -> None:
      """
      Refreshes a given table of data in a PostgreSQL database every 5 minutes.
      >>> refresh_table("TableName", {"host": "localhost", "database": "db", "user": "user", "password": "password"})
      (Runs indefinitely, refreshing the table every 5 minutes)
      """
output:     
      import psycopg2
      import time
  
      def refresh_table(table_name: str, database_config: dict) -> None:
          """
          Refreshes a given table of data in a PostgreSQL database every 5 minutes.
          >>> refresh_table("TableName", {"host": "localhost", "database": "db", "user": "user", "password": "password"})
          (Runs indefinitely, refreshing the table every 5 minutes)
          """
          while True:
              try:
                  conn = psycopg2.connect(**database_config)
                  cursor = conn.cursor()
                  cursor.execute(f"REFRESH MATERIALIZED VIEW {table_name};")
                  conn.commit()
                  cursor.close()
                  conn.close()
              except Exception as e:
                  print(f"Error refreshing table: {e}")
              time.sleep(300)
  