On Fri, Mar 9, 2018 at 12:34 AM, Michael Paquier
wrote:
> On Thu, Mar 08, 2018 at 11:04:20PM -0600, Jeremy Finzel wrote:
> > Since you mention, can anyone elaborate further on the memory leak danger
> > here?
> >
> > Line 193 in src/test/modules/worker_spi/worker_spi.c read:
> > # Note some memor
On Thu, Mar 08, 2018 at 11:04:20PM -0600, Jeremy Finzel wrote:
> Since you mention, can anyone elaborate further on the memory leak danger
> here?
>
> Line 193 in src/test/modules/worker_spi/worker_spi.c read:
> # Note some memory might be leaked here.
>
> Is this any reason *not *to use this pat
>
> If you look at the code of worker_spi.c closely the answer shows up by
> itself:
>
> appendStringInfo(&buf,
> "CREATE SCHEMA \"%s\" "
> "CREATE TABLE \"%s\" ("
> " type text CHECK (type IN ('total',
> 'delta')), "
>
On Thu, Mar 08, 2018 at 03:29:52PM -0600, Jeremy Finzel wrote:
> However, this raises many questions for me:
>
>- Insert a value into what table? I see the process referring to an
>object that doesn't exist in my database - schema1.counted
>- What is "total" type? I don't see any typ
Hello - I have compiled and installed the extension worker_spi. I also
launched the process via SELECT worker_spi_launch(1);
I see this in pg_stat_activity:
WITH deleted AS (DELETE FROM schema1.counted WHERE type = 'delta' RETURNING
value), total AS (SELECT coalesce(sum(value), 0) as sum FROM del