Skip to content

upgrade script pglogical--2.2.2--2.3.1.sql is not correct #502

@1yin

Description

@1yin

pglogical_create_subscription has 7 args in 2.* and 8 args in 3.*, but the upgrade script does not change the function.

btw the following is the gemini auto-generated script

-- Upgrade script for pglogical from version 2.2.2 to 2.3.1

-- 1. Add the 'sub_force_text_transfer' column to the 'pglogical.subscription' table.
-- This column is new in version 2.3.1 and controls whether to use text or binary transfer.
ALTER TABLE pglogical.subscription
ADD COLUMN sub_force_text_transfer boolean NOT NULL DEFAULT 'f';

-- 2. Update the 'create_subscription' function to include the new 'force_text_transfer' parameter.
-- To do this, we must first drop the old function from version 2.2.2 because the
-- function signature has changed.
DROP FUNCTION pglogical.create_subscription(subscription_name name, provider_dsn text,
    replication_sets text[], synchronize_structure boolean,
    synchronize_data boolean, forward_origins text[], apply_delay interval);

-- Now, create the new 'create_subscription' function with the added
-- 'force_text_transfer' parameter, as defined in version 2.3.1.
CREATE FUNCTION pglogical.create_subscription(subscription_name name, provider_dsn text,
    replication_sets text[] = '{default,default_insert_only,ddl_sql}', synchronize_structure boolean = false,
    synchronize_data boolean = true, forward_origins text[] = '{all}', apply_delay interval DEFAULT '0',
    force_text_transfer boolean = false)
RETURNS oid STRICT VOLATILE LANGUAGE c AS 'MODULE_PATHNAME', 'pglogical_create_subscription';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions