Skip to main content
LakeQuery examplesFlowGatewayPricingConsole

PostgreSQL consumers

Flow currently exposes specialized PostgreSQL consumers, not a generic postgres consumer. Pick the consumer that matches the processor output type.

Available PostgreSQL consumers

Consumer IDUse with processor IDsDescription
account_data_postgresaccount_dataStore Stellar account data in a specialized PostgreSQL schema
contract_invocations_postgrescontract_invocation, contract_filterStore Soroban contract invocations in a specialized PostgreSQL schema
contract_events_postgrescontract_event, contract_filterStore Soroban contract events in a specialized PostgreSQL schema
soroswap_postgressoroswapStore SwapService events in a specialized PostgreSQL schema
contract_data_postgrescontract_dataSave contract data to PostgreSQL with configurable schema
extracted_contract_invocations_postgrescontract_invocation, contract_filter, extracted_contract_invocationSave extracted contract invocation business data to PostgreSQL with optimized schema
event_payment_postgresevent_payment_extractorSaves event payment data to PostgreSQL with accounts tracking

Connection-field based consumers

Most specialized PostgreSQL consumers use separate connection fields:

consumers:
- type: contract_events_postgres
config:
host: postgres.example.com
port: 5432
database: defaultdb
username: postgres
password: ${POSTGRES_PASSWORD}
sslmode: require
max_open_conns: 10
max_idle_conns: 5

These consumers use that shape:

  • account_data_postgres
  • contract_invocations_postgres
  • contract_events_postgres
  • soroswap_postgres
  • extracted_contract_invocations_postgres

Connection-string consumers

Some consumers use a single connection string instead:

consumers:
- type: contract_data_postgres
config:
database_url: postgres://user:${POSTGRES_PASSWORD}@postgres.example.com:5432/defaultdb?sslmode=require
table_name: contract_data

Connection-string consumers:

  • contract_data_postgres uses database_url
  • event_payment_postgres uses connectionString

For the complete field list, see Consumers Reference.