| From: | Danil Anisimow <anisimow(dot)d(at)gmail(dot)com> |
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Comments on Custom RMGRs |
| Date: | 2024-03-21 12:47:10 |
| Message-ID: | CABm2Ma6avU5hkk7dd+G2oRNJZJtLOT=Yzeq6fb0v2rf7_YYp7g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Mar 1, 2024 at 2:06 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> Added to March CF.
>
> I don't have an immediate use case in mind for this, so please drive
> that part of the discussion. I can't promise this for 17, but if the
> patch is simple enough and a quick consensus develops, then it's
> possible.
[pgss_001.v1.patch] adds a custom resource manager to the
pg_stat_statements extension. The proposed patch is not a complete solution
for pgss and may not work correctly with replication.
The 020_crash.pl test demonstrates server interruption by killing a
backend. Without rm_checkpoint hook, the server restores pgss stats only
after last CHECKPOINT. Data added to WAL before the checkpoint is not
restored.
The rm_checkpoint hook allows saving shared memory data to disk at each
checkpoint. However, for pg_stat_statements, it matters when the checkpoint
occurred. When the server shuts down, pgss deletes the temporary file of
query texts. In other cases, this is unacceptable.
To provide this capability, a flags parameter was added to the
rm_checkpoint hook. The changes are presented in [rmgr_003.v2.patch].
--
Regards,
Daniil Anisimov
Postgres Professional: http://postgrespro.com
| Attachment | Content-Type | Size |
|---|---|---|
| rmgr_003.v2.patch | text/x-patch | 9.0 KB |
| pgss_001.v1.patch | text/x-patch | 17.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2024-03-21 12:49:09 | Re: NLS for extension |
| Previous Message | Robert Haas | 2024-03-21 12:42:04 | Re: Possibility to disable `ALTER SYSTEM` |