planetscale / planetscale/migration-scripts

A bunch of errors show up with postgres-direct/stat-logical-repl.sh script

Open
#26 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
32
Forks
9
Avg merge
3d 3h
Merged PRs (30d)
1

Description

here's some:

SELECT
    active, inactive_since, invalidation_reason, wal_status,
    confirmed_flush_lsn, pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn)
    FROM pg_replication_slots WHERE slot_name = '_planetscale_import';
ERROR:  column "inactive_since" does not exist
LINE 2:     active, inactive_since, invalidation_reason, wal_status,
                    ^
###############
# TEST RECORD #
###############

++ date +%s
+ TS=1758815025
+ psql $PRIMARY -c 'INSERT INTO _planetscale_import VALUES (1758815025, '\''testing'\'');'
INSERT 0 1
+ sleep 1
+ psql '$REPLICA' -c 'SELECT * FROM _planetscale_import WHERE ts >= 1758815025;'
ERROR:  relation "_planetscale_import" does not exist
LINE 1: SELECT * FROM _planetscale_import WHERE ts >= 1758815025;
# script exits

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with postgres-direct/stat-logical-repl.sh and reproduce the two reported PostgreSQL errors: the missing replication-slot column and the missing _planetscale_import relation on the replica. Trace the script's setup and test-record steps; done means the script completes without those errors and the inserted record is visible on the replica.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, shell
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.