Listing Thumbnail

    PgCache - Smart Read Replica

     Info
    Sold by: PgCache 
    Deployed on AWS
    Free Trial
    PgCache is a smart read replica for PostgreSQL that caches the hot data driving most of your traffic. Stop paying to replicate cold data. Try it for free on a small workload, then scale as you grow. Change one connection string. Never serves stale data.

    Overview

    Open image

    PgCache - Smart Read Replica for PostgreSQL

    Stop Over-Provisioning

    If you're using traditional read replicas to scale PostgreSQL, you may be paying to duplicate far more data than your workload actually needs. That means more always-on compute, more storage, more transfer cost, and more operational overhead. PgCache takes a simpler approach.

    The Pareto Advantage

    PgCache acts as a demand-driven proxy in front of PostgreSQL. It automatically caches the queries and data that are used most often, so you can get the benefits of a read replica without duplicating your full database footprint. The result is faster reads and lower infrastructure waste.

    Drop-In Deployment

    PgCache is a wire-compatible PostgreSQL proxy. Just update your connection string. No application code changes, no Redis layer, and no separate cache invalidation logic. Uncacheable queries pass through transparently to your origin database.

    Always Fresh

    PgCache uses PostgreSQL logical replication to keep cached data synchronized with the source database. Writes continue to go directly to your origin database, while reads are served from cache when possible. That means you can reduce stale-cache risk without adding complexity to your application.

    Works With Your Existing Stack

    PgCache works with PostgreSQL 16, 17, and 18, and supports any ORM or driver that speaks the PostgreSQL wire protocol. It handles parameterized queries, JOINs, aggregations, GROUP BY, DISTINCT, and window functions. If your app runs on Postgres, PgCache can fit into your existing stack.

    Pricing That Scales With You

    Start with a free small instance or 30-day free trial to test PgCache on a real workload before committing. After that, PgCache uses a flat monthly software fee per instance, making costs predictable and easy to budget.

    For larger deployments or private enterprise offers, contact aws-team@pgcache.com 

    Highlights

    • Cache the 20%, Offload the 80%: Automatically identifies and caches hot query data using demand-driven logic. Stop brute-force scaling and paying to replicate 100% of your cold data.
    • Always Fresh, Never Stale: PostgreSQL Logical Replication (CDC) keeps cached data perfectly in sync in real time. No TTL guesses, no stale reads, no cache invalidation logic in your application.
    • Test for Free on a Small Workload, then enjoy Simple Flat Monthly Pricing. No per-query charges, no surprise bills. Running at scale? Contact us for a private offer.

    Details

    Sold by

    Delivery method

    Delivery option
    64-bit (Arm) Amazon Machine Image (AMI)

    Latest version

    Operating system
    AmazonLinux 2023.10.20260302.1-kernel-6.1-arm64

    Deployed on AWS
    New

    Introducing multi-product solutions

    You can now purchase comprehensive solutions tailored to use cases and industries.

    Multi-product solutions

    Features and programs

    Financing for AWS Marketplace purchases

    AWS Marketplace now accepts line of credit payments through the PNC Vendor Finance program. This program is available to select AWS customers in the US, excluding NV, NC, ND, TN, & VT.
    Financing for AWS Marketplace purchases

    Pricing

    Free trial

    Try this product free for 30 days according to the free trial terms set by the vendor. Usage-based pricing is in effect for usage beyond the free trial terms. Your free trial gets automatically converted to a paid subscription when the trial ends, but may be canceled any time before that.

    PgCache - Smart Read Replica

     Info
    Pricing is based on actual usage, with charges varying according to how much you consume. Subscriptions have no end date and may be canceled any time.
    Additional AWS infrastructure costs may apply. Use the AWS Pricing Calculator  to estimate your infrastructure costs.

    Usage costs (6)

     Info
    Dimension
    Cost/hour
    m6g.large
    Recommended
    $0.137
    m6g.medium
    $0.0681
    m6g.4xlarge
    $0.959
    m6g.xlarge
    $0.274
    m6g.2xlarge
    $0.548
    t4g.small
    $0.00

    Vendor refund policy

    How can we make this page better?

    Tell us how we can improve this page, or report an issue with this product.
    Tell us how we can improve this page, or report an issue with this product.

    Legal

    Vendor terms and conditions

    Upon subscribing to this product, you must acknowledge and agree to the terms and conditions outlined in the vendor's End User License Agreement (EULA) .

    Content disclaimer

    Vendors are responsible for their product descriptions and other product content. AWS does not warrant that vendors' product descriptions or other product content are accurate, complete, reliable, current, or error-free.

    Usage information

     Info

    Delivery details

    64-bit (Arm) Amazon Machine Image (AMI)

    Amazon Machine Image (AMI)

    An AMI is a virtual image that provides the information required to launch an instance. Amazon EC2 (Elastic Compute Cloud) instances are virtual servers on which you can run your applications and workloads, offering varying combinations of CPU, memory, storage, and networking resources. You can launch as many instances from as many different AMIs as you need.

    Version release notes

    0.4.9 - 2026-04-24

    Materialized query results - for queries that reduce a large input to a small output (aggregates, window functions, GROUP BY, DISTINCT), pgcache now maintains a second tier of cache that stores the result rather than recomputing it from source rows.

    Pre-PG18 search_path change tracking - PostgreSQL 16 and 17 now support session-level search_path changes.

    Default admission_threshold changed from 2 to 1 - queries are now cached on first occurrence by default.

    New mv_size_ratio setting (default 10) - controls the materialization size gate for shape-eligible queries. Adjustable at runtime via the HTTP admin API.

    Additional details

    Usage instructions

    PgCache AMI Usage

    PgCache is a transparent caching proxy for PostgreSQL. This AMI includes PgCache and an embedded PostgreSQL 18 cache database, managed as systemd services. On first boot, a bootstrap script fetches your database credentials from AWS SSM Parameter Store and starts the proxy.

    Prerequisites

    Origin PostgreSQL database with wal_level = logical enabled Database user with REPLICATION role attribute or superuser IAM role attached to the instance with ssm:GetParameter permission

    Quick Start

    1. Store your database URL in SSM

    aws ssm put-parameter --name "/pgcache/prod/upstream-url" \ --type SecureString \ --value "postgres://user:password@host:5432/dbname?sslmode=require"

    1. Launch with user-data

    Pass a script that calls the bootstrap with your SSM prefix: #!/bin/bash /opt/pgcache/bootstrap.sh --ssm-prefix /pgcache/prod

    1. Connect your application

    Use the instance's private IP on port 5432.

    Use the same database credentials that you stored in SSM.

    SSM parameters (under your prefix)

    All parameter names below are relative to your SSM prefix (for example, /pgcache/prod).

    upstream-url (Required): Origin database connection URL. Example name: /pgcache/prod/upstream-url

    replication-url (Optional): Separate connection URL for CDC replication. Example name: /pgcache/prod/replication-url

    tls-cert (Optional): PEM-encoded TLS certificate for client connections. Example name: /pgcache/prod/tls-cert

    tls-key (Optional): PEM-encoded TLS private key for client connections. Example name: /pgcache/prod/tls-key

    Bootstrap options

    Non-secret settings can be passed as flags in user-data along with your SSM prefix:

    /opt/pgcache/bootstrap.sh --ssm-prefix /pgcache/prod --workers 4 --cache-size 4294967296 --allowed-tables users,orders

    Common flags:

    --workers (default: half of vCPUs): Number of PgCache worker threads.

    --cache-size (default: unlimited): Maximum cache size in bytes; enables eviction when set.

    --cache-policy (default: clock): Eviction policy, one of "clock" or "fifo".

    --admission-threshold (default: 2): Number of times a query must be seen before it is cached.

    --allowed-tables (default: all): Comma-separated list of tables that may be cached.

    --pinned-tables (default: none): Comma-separated list of tables that are always kept in cache.

    --pinned-queries (default: none): Semicolon-separated list of queries that are always kept in cache.

    Managing the service

    Check status: sudo systemctl status pgcache

    View logs: sudo journalctl -u pgcache -f

    Edit config: sudo vi /etc/pgcache/config.toml

    Restart after config changes: sudo systemctl restart pgcache

    Metrics

    Prometheus metrics endpoint: http://<instance>:9090/metrics

    Ports

    5432: PgCache proxy (configure access via security groups).

    9090: Prometheus metrics (optional; restrict as needed).

    5433: Embedded PostgreSQL (listens on localhost only, not externally accessible).

    Security

    Database credentials are stored in SSM SecureString parameters and fetched at boot, not passed in user-data.

    The PgCache configuration file is readable only by root and the postgres user.

    Restrict access to port 5432 to your application VPC or specific security group sources.

    Further documentation

    Full documentation, including advanced configuration, troubleshooting, and architecture details, is available at:

    https://www.pgcache.com/docs 

    Support

    Vendor support

    AWS infrastructure support

    AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.

    Similar products

    Customer reviews

    Ratings and reviews

     Info
    0 ratings
    5 star
    4 star
    3 star
    2 star
    1 star
    0%
    0%
    0%
    0%
    0%
    0 reviews
    No customer reviews yet
    Be the first to review this product . We've partnered with PeerSpot to gather customer feedback. You can share your experience by writing or recording a review, or scheduling a call with a PeerSpot analyst.