On Mon, Jun 22, 2026 at 8:52 PM Dilip Kumar <[email protected]> wrote:
>
> >
> I have merged Amit's patch and Nisha's tap test patch and tested all
> the cases discussed, and those are working fine.
>
Thanks Dilip, few initial comments on 001+002:
1)
+ if (IsConflictLogTableNamespace(relnamespace))
+ ereport(ERROR,
+ (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("permission denied to create \"%s\"",
+ get_qualified_objname(relnamespace, relname)),
+ errdetail("Conflict schema modifications are
currently disallowed.")));
Unable to reproduce the error. Perhaps this change is not needed after
the change made in pg_namespace_aclmask_ext() in 002? create table,
create view inside pg_conflict errors out in
RangeVarGetAndCheckCreationNamespace itself doing schema-permission
check.
2)
Same with this:
+
+ /* similarly for conflict schema */
+ if (nspOid == PG_CONFLICT_NAMESPACE || oldNspOid == PG_CONFLICT_NAMESPACE)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot move objects into or out of the conflict schema")));
I get these errors:
postgres=# alter table tab2 set schema conf;
ERROR: 42501: permission denied for schema conf
LOCATION: aclcheck_error, aclchk.c:2813
3)
create_conflict_log_table()
+
+ /*
+ * Check for an existing table with the same name in the
pg_conflict namespace.
+ * A collision should not occur under normal operation, but we
must handle cases
+ * where a table has been created manually when allow_system_tables_mods is
+ * ON.
+ */
+ if (OidIsValid(get_relname_relid(relname, PG_CONFLICT_NAMESPACE)))
+ ereport(ERROR,
+ (errcode(ERRCODE_DUPLICATE_TABLE),
+ errmsg("conflict log table pg_conflict.\"%s\"
already exists", relname),
+ errhint("To proceed, drop the existing table and retry.")));
Should we replace this with 'Assert' since we can no longer create
tables inside the 'pg_conflict' schema, even with
'allow_system_table_mods=ON'?
thanks
Shveta