This post discusses different ways of dealing with application state when writing business logic in serverless functions. It primarily uses Postgres as the database and often employs Hasura as a solution to connect serverless functions with Postgres. The four approaches discussed are: 1) Connecting directly to Postgres from your serverless function, 2) Using Backend-as-a-Service (BaaS) APIs from your serverless function, 3) Triggering serverless functions on Postgres events with rich event payloads, and 4) Combining the above approaches and using Postgres to orchestrate a workflow with serverless functions driving state transitions. The post also provides best practices for connecting to Postgres directly from a serverless function and highlights the use of BaaS services like S3 APIs, Hasura GraphQL APIs, and Algolia.