If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: pglite.dev/docs/sync - Sync using Electric | PGlite.

site address: pglite.dev/docs/sync

site title: Sync using Electric PGlite

Our opinion (on Wednesday 08 July 2026 11:36:01 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:



Meta tags:
description=Lightweight WASM Postgres;

Headings (most frequently used words):

sync, api, using, table, electric, about, docs, extensions, reference, the, plugin, alpha, electricsync, syncshapetotable, syncshapestotables, limitations, framework, hooks, pglite, tools, single, multi,

Text of the page (most frequently used words):
the (104), sync (39), shape (36), table (27), electric (20), data (16), error (16), #pglite (15), for (14), that (14), insert (14), from (13), string (12), when (12), and (11), into (11), postgres (11), use (11), api (11), shapes (10), this (10), initial (10), csv (10), using (9), can (8), void (8), stream (8), defaults (8), row (8), json (8), syncing (7), will (7), shapestream (7), callback (7), single (7), you (7), options (7), are (6), not (6), boolean (6), object (6), transaction (6), multi (6), state (6), todo (6), synced (5), unsubscribe (5), provided (5), optional (5), key (5), null (5), primarykey (5), mapping (5), schema (5), name (5), tables (5), syncshapetotable (5), query (4), consistency (4), create (4), multiple (4), all (4), main (4), must (4), subscription (4), onerror (4), command (4), passed (4), copy (4), initialinsertmethod (4), array (4), with (4), method (4), persisted (4), mapcolumns (4), syncshapestotables (4), enable (4), plugin (4), electricsync (4), await (4), page (3), transactional (3), more (3), than (3), stop (3), names (3), whether (3), caught (3), message (3), required (3), there (3), clear (3), underlying (3), fetcherror (3), complete (3), oninitialsync (3), process (3), false (3), allow (3), primary (3), column (3), configuration (3), takes (3), following (3), does (3), local (3), done (3), console (3), users (3), params (3), http (3), localhost (3), 3000 (3), url (3), const (3), extensions (3), sql (3), support (3), socket (2), orms (2), builders (2), order (2), memory (2), working (2), same (2), being (2), but (2), version (2), streams (2), their (2), record (2), isuptodate (2), returned (2), refetched (2), after (2), sends (2), control (2), bypass (2), per (2), lock (2), perform (2), cleanup (2), rows (2), before (2), inserted (2), scratch (2), ideal (2), separation (2), such (2), date (2), ranges (2), refetch (2), onmustrefetch (2), promise (2), invoked (2), encounters (2), may (2), faster (2), inserting (2), combines (2), inserts (2), deprecated (2), instead (2), usecopy (2), file (2), provide (2), performance (2), boost (2), during (2), identifier (2), resuming (2), between (2), sessions (2), public (2), specification (2), shapestreamoptions (2), simultaneously (2), instance (2), see (2), details (2), has (2), shapeid (2), shapekey (2), updates (2), your (2), either (2), replication (2), localcolumnname (2), part (2), debug (2), github (2), need (2), any (2), install (2), npm (2), first (2), package (2), alpha (2), way (2), extension (2), framework (2), database (2), repl (2), docs (2), about (2), navigation (2), dual, licensed, under, postgresql, license, apache, next, previous, pager, maintain, aggregated, until, guarantee, its, which, might, lot, usage, very, large, resolving, issue, only, problem, currently, possible, subscriptions, require, able, drop, start, over, fix, case, current, throw, once, limitations, access, individual, have, provides, fires, columns, target, each, includes, shapeoptions, allows, while, maintaining, note, been, indicate, subscribe, err, server, side, indicates, had, call, methods, called, along, form, used, deletes, indicating, values, simple, function, returns, newvalue, shapecolumnname, described, relatively, thin, wrapper, around, designed, minimal, logging, metadata, metadataschema, given, some, customization, full, example, run, locally, repository, log, todos, ensures, across, happened, within, task, text, serial, exists, exec, import, then, add, needed, don, yet, writes, out, conflict, resolution, actively, exploring, best, layered, extendable, accompany, developing, synchronise, remote, building, engine, realtime, partial, other, datastore, javascript, store, webapp, edge, embedded, mobile, application, debugging, benchmarks, examples, reference, development, catalog, upgrade, path, locale, prepopulated, pgdump, tools, component, tab, worker, bundler, vue, react, hooks, filesystems, live, queries, getting, started, videos, what, sidebar, return, top, menu, home, search, skip, content,


Text of the page (random words):
sync using electric pglite skip to content search k main navigation home about docs repl electric github npm menu return to top sidebar navigation about what is pglite videos docs getting started pglite api live queries filesystems framework hooks react vue bundler support multi tab worker repl component orms query builders sync using postgres sync pglite socket pglite tools package pgdump prepopulated fs locale support upgrade path extensions extensions catalog extension development reference examples benchmarks debugging on this page sync using electric at electric we are building a sync engine to enable realtime partial replication from postgres to any other datastore be it a javascript framework state store in a webapp a database at the edge or an embedded database in the mobile application to accompany electric we are developing a sync extension for pglite that will enable you to synchronise a remote postgres with pglite the first alpha version of the sync plugin can sync a shape from electric into a table in your pglite we don t yet support local writes being synced out or conflict resolution but we are actively exploring the best way to enable this in a layered and extendable way using the sync plugin alpha to use the sync plugin first install the electric sql pglite sync package sh npm install electric sql pglite sync then add it to you pglite instance and create any local tables needed ts import electricsync from electric sql pglite sync const pg await pglite create extensions electric electricsync await pg exec create table if not exists todo id serial primary key task text done boolean you can sync data from electric using either the single table or multi table api single table sync use the syncshapetotable method to sync a single table from electric ts const shape await pg electric syncshapetotable shape url http localhost 3000 v1 shape params table todo table todo primarykey id shapekey todo or null if the shape state does not need to be persisted onerror error console error shape sync error error stop syncing when done shape unsubscribe multi table sync the multi table api ensures transactional consistency across tables by syncing updates that happened in a single transaction in postgres within a single transaction in pglite use the syncshapestotables method to sync multiple tables simultaneously ts const sync await pg electric syncshapestotables shapes todos shape url http localhost 3000 v1 shape params table todo table todo primarykey id users shape url http localhost 3000 v1 shape params table users table users primarykey id key my sync or null if the sync state does not need to be persisted oninitialsync console log initial sync complete onerror error console error sync error error stop syncing when done sync unsubscribe there is a full example you can run locally in the github repository electricsync api the electricsync plugin can be given some configuration options to allow customization of the sync process metadataschema string the name of the postgres schema that the shape metadata tables will be part of defaults to electric debug boolean enable debug logging defaults to false syncshapetotable api the syncshapetotable is a relatively thin wrapper around the electric shapestream api designed to do the minimal required to sync a shape into a table it takes the following options as an object shape shapestreamoptions the shape stream specification to sync described by the electric shapestream api options see the shapestream api for more details table string the name of the table to sync into schema string the name of the postgres schema that the table to sync into is part of defaults to public mapcolumns mapcolumns an object indicating the mapping of the shape column values to your local table this can be either a simple object of localcolumnname shapecolumnname mapping or a function that takes a replication message and returns a mapping of localcolumnname newvalue primarykey string an array of column names that form the primary key of the table you are syncing into used for updates and deletes shapekey string null identifier for the shape subscription if not null stream state will be persisted along with the data in order to allow resuming the stream between sessions initialinsertmethod insert csv json the method to use for the initial sync defaults to insert the csv and json options provide a performance boost during the initial sync insert insert the data row by row csv insert the data using the copy from command with a csv file json insert the data using a query that is passed the data as a json array usecopy boolean deprecated use initialinsertmethod instead whether to use the copy from command to insert the initial data defaults to false this process may be faster than inserting row by row as it combines the inserts into a csv to be passed to postgres oninitialsync void a callback that is called when the initial sync is complete onerror error fetcherror error void optional callback invoked when the underlying shape stream encounters an error onmustrefetch tx transaction promise void a callback for when the shape must be refetched after electric sends the must refetch control message when provided the subscription will bypass the single shape per table lock and you can use the provided transaction to perform the required cleanup of synced rows before the shape data is re inserted from scratch this is ideal when there is clear separation of shapes such as date ranges the returned shape object from the syncshapetotable call has the following methods isuptodate boolean indicates that the stream had caught up to the main postgres shapeid string the server side shapeid subscribe cb void error err fetcherror error void a callback to indicate that the shape caught up to the main postgres unsubscribe unsubscribe from the shape note that this does not clear the state that has been synced into the table stream shapestream the underlying shapestream instance see the shapestream api for more details syncshapestotables api the syncshapestotables api allows syncing multiple shapes into multiple tables simultaneously while maintaining transactional consistency it takes the following options shapes record string shapeoptions an object mapping shape names to their configuration options each shape configuration includes shape shapestreamoptions the shape stream specification table string the target table name schema string optional schema name defaults to public mapcolumns mapcolumns optional column mapping primarykey string array of primary key columns key string null identifier for the multi shape subscription if provided sync state will be persisted to allow resuming between sessions initialinsertmethod insert csv json the method to use for the initial sync defaults to insert the csv and json options provide a performance boost during the initial sync insert insert the data row by row csv insert the data using the copy from command with a csv file json insert the data using a query that is passed the data as a json array usecopy boolean deprecated use initialinsertmethod instead whether to use the copy from command to insert the initial data defaults to false this process may be faster than inserting row by row as it combines the inserts into a csv to be passed to postgres oninitialsync void optional callback that fires when initial sync is complete for all shapes onerror error fetcherror error void optional callback invoked when the underlying multi shape stream encounters an error onmustrefetch tx transaction promise void a callback for when the shape must be refetched after electric sends the must refetch control message when provided the subscription will bypass the single shape per table lock and you can use the provided transaction to perform the required cleanup of synced rows before the shape data is re inserted from scratch this is ideal when there is clear separation of shapes such as date ranges the returned sync object provides isuptodate boolean whether all shapes have caught up to the main postgres streams record string shapestream access to individual shape streams by their names unsubscribe stop syncing all shapes limitations it is currently not possible to sync multiple shapes into the same table as shape subscriptions require being able to drop all data and start over we are working on a fix for this case but the current version will throw if a shape is synced into the same table more than once in order to maintain transactional consistency data is aggregated in memory until we can guarantee its consistency which might create a lot of memory usage for very large shapes we are working on resolving this issue and it is only a problem for initial syncing pager previous page orms query builders next page pglite socket dual licensed under apache 2 0 and the postgresql license electric
Images from subpage: "pglite.dev/docs/about" Verify
Images from subpage: "pglite.dev/docs/" Verify
Images from subpage: "pglite.dev/repl/" Verify
Images from subpage: "pglite.dev/docs/videos" Verify
Images from subpage: "pglite.dev/docs/api" Verify

Verified site has: 23 subpage(s). Do you want to verify them? Verify pages:

1-5 6-10 11-15 16-20 21-23


Top 50 hastags from of all verified websites.

Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

Header

HTTP/2 200
accept-ranges bytes
age 24539
cache-control public,max-age=0,must-revalidate
cache-status Netlify Edge ; hit
content-encoding gzip
content-type text/html; charset=UTF-8
date Wed, 08 Jul 2026 11:36:01 GMT
etag a7763251cf7c603c9163d7e9c2f86d57-ssl-df
server Netlify
strict-transport-security max-age=31536000
vary Accept-Encoding
x-nf-request-id 01KX0R6WGNDCRRS0YNW975JKVV
content-length 8854

Meta Tags

title="Sync using Electric | PGlite"
charset="utf-8"
name="viewport" content="width=device-width,initial-scale=1"
name="description" content="Lightweight WASM Postgres"
name="generator" content="VitePress v1.4.0"
property="og:image" content="/img/brand/og-image.png"

Load Info

page size8854
load time (s)0.213548
redirect count0
speed download41568
server IP 75.2.60.5
* all occurrences of the string "http://" have been changed to "htt???/"