Re: Background worker/idle sessions and caching

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Background worker/idle sessions and caching
Date: 2018-07-19 04:40:44
Message-ID: CAMsr+YGyjeRUJpbbANLuXG6zpmYT_0ZTRkxPKLxTCyrMhzNgVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19 July 2018 at 04:30, Jeremy Finzel <finzelj(at)gmail(dot)com> wrote:

My use case is similar to the example of worker_spi. A plpgsql function
> runs every 1 minute and processes records in audit tables in order to
> update fact tables with records that have changed. I noticed for example
> renaming a column in the function was not picked up, and I had to restart
> the workers to reset the cache.
>

relation_openrv and relation_openrv_extended
call AcceptInvalidationMessages when the lockmode is not NoLock.

Don't we use those when doing SPI queries? No time to check right now, try
setting some breakpoints or tracing through.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-07-19 04:42:05 Re: Possible bug in logical replication.
Previous Message Alvaro Herrera 2018-07-19 04:38:53 Re: Possible bug in logical replication.