sqlalchemy / sqlalchemy/alembic

Q: custom driver level execute()?

Open
#638 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cookbook requested
Dominant language
Python
Stars
4.4k
Forks
375
PR merge metrics
No merged PRs in 30d

Description

  1. in a scenario when using multi-master cluster with pglogical
    https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/

  2. ddl should be issued on a single node and then replicated by pglogical to all other nodes:
    https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/#usage-additional-functions

        SELECT pglogical.replicate_ddl_command(
            command := '{command}',
            replication_sets := ARRAY['default']
        );
  1. by looking at the docs and sources:
    https://alembic.sqlalchemy.org/en/latest/search.html?q=execute
    https://github.com/sqlalchemy/alembic/search?l=Python&q=execute
    there seems to be no clear way to inject custom driver level execute(command)?

Contributor guide

Open the contributing guide

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 Alembic's execute documentation and the linked source search, then trace how commands reach the database driver. Determine whether a custom driver-level execute path can be exposed for pglogical DDL replication; done means the supported approach and its usage are documented or the required feature is clearly scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python, sqlalchemy
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.