Re: Issue with pg_dump Including Ownership Metadata for pg_trgm Extension in PostgreSQL 17

From: AKASH <akashbhujbal7051(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Issue with pg_dump Including Ownership Metadata for pg_trgm Extension in PostgreSQL 17
Date: 2024-12-04 09:43:04
Message-ID: CABaoBc6yzdpUr7YkTHSGne0qPMeuQckd4_0NFD6Q=CoXDO6OrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 4, 2024 at 3:12 PM AKASH <akashbhujbal7051(at)gmail(dot)com> wrote:

> Dear PostgreSQL Bug Team,
>
> I am encountering an issue in PostgreSQL 17 with pg_dump when working
> with the pg_trgm extension. Specifically, when using pg_dump to back up a
> database containing the pg_trgm extension, ownership metadata for
> extension member objects is included in the dump, even when the --no-owner
> flag is used.
>
> This leads to conflicts during restores in environments where ownership
> constraints differ, disrupting migrations and automated workflows. It is
> particularly problematic when ownership has been changed after the
> extension was initially created (via CREATE EXTENSION).
>
> Steps to reproduce:
>
> 1.
>
> Install the pg_trgm extension.
> 2.
>
> Change the ownership of the objects created by the extension.
> 3.
>
> Run pg_dump with the --no-owner flag.
> 4.
>
> Restore the dump in a different environment where ownership
> constraints differ.
>
> Expected behavior: Ownership metadata should not be included in the dump
> when the --no-owner flag is specified, especially for objects created by
> the pg_trgm extension.
>
> Actual behavior: Ownership metadata is still included in the dump,
> causing issues when restoring to different environments.
>
> This issue has been persistent across multiple versions of PostgreSQL and
> significantly impacts automated deployment and migration workflows.
>
> I would appreciate any assistance in resolving this issue, or any guidance
> on how to work around this limitation in the meantime.
>
> Thank you for your attention to this matter.
> Best regards,
> Akash Bhujbal
>

Attachment Content-Type Size
pg_trmp_bug.png image/png 82.5 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-12-04 16:37:38 Re: Issue with pg_dump Including Ownership Metadata for pg_trgm Extension in PostgreSQL 17
Previous Message AKASH 2024-12-04 09:42:21 Issue with pg_dump Including Ownership Metadata for pg_trgm Extension in PostgreSQL 17