Re: User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread Tom Lane
Pavel Stehule writes: > st 29. 6. 2022 v 6:28 odesílatel Bryn Llewellyn napsal: >> Moreover, this "hermetic" property of a to-be-immutable function can be >> established only by human analysis of the function's source code. > Our immutable functions are more tolerant than they should be - for

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread David G. Johnston
On Tuesday, June 28, 2022, Bryn Llewellyn wrote: > > DISCARD PLANS is unsafe in a multi-user concurrent scenario. The doc says > explicitly that its scope is just the single session. And it's easy to show > the danger by using my testcase manually, step by appropriate step, with > two concurrent

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread Pavel Stehule
st 29. 6. 2022 v 6:28 odesílatel Bryn Llewellyn napsal: > *david.g.johns...@gmail.com wrote:* > > > *x...@thebuild.com wrote:* > > b...@yugabyte.com wrote: > > Should I simply understand that when I have such a dynamic dependency > chain of "immutable" functions, and should I drop and

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > >> x...@thebuild.com wrote: >> >>> b...@yugabyte.com wrote: >>> >>> Should I simply understand that when I have such a dynamic dependency chain >>> of "immutable" functions, and should I drop and re-create the function at >>> the start of the chain, then

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread David G. Johnston
On Tue, Jun 28, 2022 at 7:03 PM Christophe Pettus wrote: > > > > On Jun 28, 2022, at 18:41, Bryn Llewellyn wrote: > > Should I simply understand that when I have such a dynamic dependency > chain of "immutable" functions, and should I drop and re-create the > function at the start of the chain,

Re: User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread Christophe Pettus
> On Jun 28, 2022, at 18:41, Bryn Llewellyn wrote: > Should I simply understand that when I have such a dynamic dependency chain > of "immutable" functions, and should I drop and re-create the function at the > start of the chain, then all bets are off until I drop and re-create every >

User's responsibility when using a chain of "immutable" functions?

2022-06-28 Thread Bryn Llewellyn
I’ve copied my self-contained testcase at the end. I create three functions, marking each of them "immutable". "f1()" simply returns the manifest constant 'dog'. So it seems perfectly honest to mark it as I did. "f2()" simply returns "f1()"—so, here too, it seems that I'm being honest. But I

Re: Unique index prohibits partial aggregates

2022-06-28 Thread David Rowley
On Wed, 29 Jun 2022 at 00:45, Bos, Fred wrote: > Finally, is there a way to force postgres to do the partial hash aggregate, > either by changing a setting or by influencing the expected amount of output > groups for each query? You could do something like: ALTER TABLE bhload_nohyp_noin ALTER

Re: Libpq question related to allocated resources

2022-06-28 Thread Karl Denninger
On 6/27/2022 23:22, Tom Lane wrote: Karl Denninger writes: But -- I still have a /lot /of memory out on the heap according to jemalloc stats that is not being deallocated, and what's worse is that if I rig the code to call PQfinish and then PQconnect once again I get /even more /imbalanced

GIN index operator ?(jsonb,text) not working?

2022-06-28 Thread jian he
Hi, dbfiddle: https://dbfiddle.uk/?rdbms=postgres_14=060af497bbb75ecddad9fd2744f8022b --- create table test101 ( doc_id bigserial, document jsonb); insert into test101(document) values ('{"user_removed" :false}') returning *; insert into test101(document) select '{"user_removed"

Re: help for pg_wal issue

2022-06-28 Thread Kyotaro Horiguchi
At Tue, 28 Jun 2022 16:28:31 +0900 (JST), Kyotaro Horiguchi wrote in > At Mon, 27 Jun 2022 12:28:18 +0200, Laurenz Albe > wrote in > > You forgot to tell us how exactly you are performing that backup. > > Yeah, but Google told me that Veritas may complain with that > message. Anywhat the

Re: help for pg_wal issue

2022-06-28 Thread Kyotaro Horiguchi
At Mon, 27 Jun 2022 12:28:18 +0200, Laurenz Albe wrote in > You forgot to tell us how exactly you are performing that backup. Yeah, but Google told me that Veritas may complain with that message. Anywhat the tools is, it seems like that the tool could not continue after it found that a file