
Security News
GitHub to Block pull_request_target Workflows by Default Starting December 2
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.
@mastra/pg
Advanced tools
PostgreSQL implementation for Mastra, providing both vector similarity search (using pgvector) and general storage capabilities with connection pooling and transaction support.
npm install @mastra/pg
PgVector supports multiple connection methods:
1. Connection String (Recommended)
import { PgVector } from '@mastra/pg';
const vectorStore = new PgVector({
connectionString: 'postgresql://user:pass@localhost:5432/db',
});
See the package changelog for version history and release notes.
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.
The standard Node.js PostgreSQL driver. It provides lower-level database connections and SQL queries, whereas @mastra/pg supplies Mastra-oriented storage and vector-store abstractions.
A Node.js client for PostgreSQL’s pgvector extension, including vector-related helpers. It is more focused on pgvector itself; @mastra/pg packages vector operations into Mastra’s vector-store interface and also offers Mastra storage.
A TypeScript ORM and query builder that supports PostgreSQL. It is suited to defining application schemas and issuing general-purpose queries, while @mastra/pg focuses on persistence and vector functionality for Mastra applications.
A community package of LangChain integrations, including PostgreSQL-related vector-store integrations. It offers similar retrieval building blocks for LangChain applications; @mastra/pg is designed to integrate with Mastra’s storage and vector-store APIs.
FAQs
Postgres provider for Mastra - includes both vector and db storage capabilities
The npm package @mastra/pg receives a total of 1,205,151 weekly downloads. As such, @mastra/pg popularity was classified as popular.
We found that @mastra/pg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.

Security News
/Application Security
A practical guide to securing GitHub Actions against supply chain attacks, covering malicious pull requests, credential theft, dependency risks, and release pipelines.

Security News
Composer 2.11 adds dependency cooldowns, joining package managers that delay new releases to reduce supply chain risks while allowing urgent security updates.