A newer version of this documentation is available. Click here to view the most up-to-date release of the Greenplum 4.x documentation.
The file:// protocol requires that the external data file(s) reside on a segment host in a location accessible by the Greenplum superuser (gpadmin). The number of URIs that you specify corresponds to the number of segment instances that will work in parallel to access the external table. For example, if you have a Greenplum Database system with 8 primary segments and you specify 2 external files, only 2 of the 8 segments will access the external table in parallel at query time. The number of external files per segment host cannot exceed the number of primary segment instances on that host. For example, if your array has 4 primary segment instances per segment host, you can place 4 external files on each segment host. The host name used in the URI must match the segment host name as registered in the gp_segment_configuration system catalog table. Tables based on the file:// protocol can only be readable tables.
The system view pg_max_external_files shows how many external table files are permitted per external table. This view lists the available file slots per segment host when using the file:// protocol. The view is only applicable for the file:// protocol. For example:
SELECT * FROM pg_max_external_files;