Skip to content

Question about internals and source of problem #515

@depesz

Description

@depesz

Hi,
this is not bug report, and I don't need any changes, but I'd like to get some information.

We have pglogical 2.4.2 installed, but not configured for anything (as far as I know) on pg14 (yes, i know, old).

it was installed and will be configured, but I found interesting issue.

Normal user can create tables, but on drop it gets error:

2026-01-30 16:01:31.758 UTC,"depesz-ro","the_db",1856224,"127.0.0.1:58796",697cd353.1c52e0,105,"DROP TABLE",2026-01-30 15:50:43 UTC,20/2204546768,2247568051,ERROR,42501,"permission denied for schema pglogical",,,,,,"drop table depesz_test;",,"aclcheck_error, aclchk.c:3447","psql","client backend",,8606171572289188089

Of course I can grant the privilege, and make the error go away. BUT why does it error out? What is the code path that leads to this?

There are no pglogical-related event triggers. There is nothing in any pglogical.* table, so there was no configuration. Settings that I see are:

=> select name, setting from pg_settings  where name ~ 'pglogical' order by 1;
                name                │   setting
════════════════════════════════════╪══════════════
 pglogical.batch_inserts            │ on
 pglogical.conflict_log_level       │ log
 pglogical.conflict_resolution      │ apply_remote
 pglogical.extra_connection_options │
 pglogical.synchronous_commit       │ off
 pglogical.temp_directory           │
 pglogical.use_spi                  │ off
(7 rows)

My hypothesis now is that drop is caught by some hook to delete dropped table, if it is in pglogical.replication_set_table - but my C skills are not up to par to understand how exactly it happens, what is the path of things running.

Could you explain what is the situation there?

Best regards,

depesz

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