import { LogContext } from '@rocicorp/logger';
import type { PublishedTableSpec } from '../../../db/specs.ts';
import { type LexiVersion } from '../../../types/lexi-version.ts';
import { type ShardConfig } from '../../../types/shards.ts';
import type { Sink } from '../../../types/streams.ts';
import type { ChangeSource } from '../../change-streamer/change-streamer-service.ts';
import { type SubscriptionState } from '../../replicator/schema/replication-state.ts';
import { type InitialSyncOptions } from './initial-sync.ts';
import type { MessageRelation as PostgresRelation } from './logical-replication/pgoutput.types.ts';
/**
 * Initializes a Postgres change source, including the initial sync of the
 * replica, before streaming changes from the corresponding logical replication
 * stream.
 */
export declare function initializePostgresChangeSource(lc: LogContext, upstreamURI: string, shard: ShardConfig, replicaDbFile: string, syncOptions: InitialSyncOptions): Promise<{
    subscriptionState: SubscriptionState;
    changeSource: ChangeSource;
}>;
export declare class Acker {
    #private;
    constructor(acks: Sink<bigint>);
    keepalive(): void;
    ack(watermark: LexiVersion): void;
}
export declare function relationDifferent(a: PublishedTableSpec, b: PostgresRelation): boolean;
//# sourceMappingURL=change-source.d.ts.map