Re: Control your disk usage in PG: Introduction to Disk Quota Extension

From: Xing Guo <higuoxing(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Haozhou Wang <hawang(at)pivotal(dot)io>, David Steele <david(at)pgmasters(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Hubert Zhang <hzhang(at)pivotal(dot)io>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)pivotal(dot)io>
Subject: Re: Control your disk usage in PG: Introduction to Disk Quota Extension
Date: 2024-02-26 11:42:18
Message-ID: CACpMh+CqkzNx3QTkgfK12PAqCU8X5Dg7mjeOu+w5k3sLPhnJVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 26, 2024 at 7:27 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 1 Jul 2020, at 10:36, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> >
> >> On 27 Mar 2020, at 11:22, Haozhou Wang <hawang(at)pivotal(dot)io> wrote:
> >
> >> We rebased this patch with the newest master.
> >
> > This patch now fails to build according to Travis:
> >
> > smgr.c: In function ‘smgrtruncate’:
> > smgr.c:578:47: error: passing argument 4 of ‘smgrtruncate_hook’ makes integer from pointer without a cast [-Werror=int-conversion]
> > (*smgrtruncate_hook)(reln, forknum, nforks, nblocks);
> > ^
> > smgr.c:578:47: note: expected ‘BlockNumber {aka unsigned int}’ but argument is of type ‘BlockNumber * {aka unsigned int *}’
> >
> >
> > The warning is also present in the Windows build:
> >
> > src/backend/storage/smgr/smgr.c(578): warning C4047: 'function' : 'BlockNumber' differs in levels of indirection from 'BlockNumber *' [C:\projects\postgresql\postgres.vcxproj]
> > src/backend/storage/smgr/smgr.c(578): warning C4024: 'smgrtruncate_hook' : different types for formal and actual parameter 4 [C:\projects\postgresql\postgres.vcxproj]
> > 2 Warning(s)
> >
> > Marking the patch as Waiting for Author.
>
> As the thread has stalled and the above compilation issue hasn't been
> addressed, I'm marking this entry Returned with Feedback. Feel free to open a
> new entry when there is a fixed patch.

Hi,

Looks that many hackers are happy with the original patch except that
the original patch needs a simple rebase, though it has been 3 years.
Shall we push forward this patch so that it can benefit extensions not
only diskquota?

The attachment is a rebased version of the original patch.

>
> cheers ./daniel
>
>
>

Attachment Content-Type Size
v8-0001-Add-smgr-hooks-to-extend-the-logic-of-storage-man.patch text/x-patch 3.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2024-02-26 11:46:39 Regardign RecentFlushPtr in WalSndWaitForWal()
Previous Message Richard Guo 2024-02-26 11:34:33 Re: "type with xxxx does not exist" when doing ExecMemoize()