{
    "name": "postgresql-server",
    "description": "Postgresql server",
    "json_class": "Chef::Role",
    "run_list": [
        "postgresql::server"
    ],
    "override_attributes": null,
    "default_attributes": {
        "postgresql": {
            "enable_pgdg_apt": true,
            "version": "9.4",
            "server": {
                "service_name": "postgresql"
            },
            "config": {
                "ssl": true,
                "listen_addresses": "127.0.0.1"
            }
        }
    }
}

{
    "name": "postgresql-server",
    "description": "Postgresql server",
    "json_class": "Chef::Role",
    "run_list": [
        "postgresql::server"
    ],
    "override_attributes": null,
    "default_attributes": {
        "apt": {
            "compile_time_update": true
        },
        "build-essential": {
            "compile_time": true
        },
        "postgresql": {
            "enable_pgdg_apt": true,
            "version": "9.4",
            "server": {
                "service_name": "postgresql"
            },
            "config": {
                "ssl": true,
                "listen_addresses": "127.0.0.1"
            }
        }
    }
}

Enable Compile time for apt & build-essential in pgsql server role
Enable Compile time for apt & build-essential in pgsql server role
