Re: Statistics Import and Export - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Statistics Import and Export
Date
Msg-id CADkLM=daBsKfo3CO1gP0HQ17wFzDKW+gha=2z_fSaa9Fs5csTA@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Statistics Import and Export
List pgsql-hackers
No, we should be keeping the lock until the end of the transaction
(which in this case would be just the one statement, but it would be the
whole statement and all of the calls in it).  See analyze.c:268 or
so, where we call relation_close(onerel, NoLock); meaning we're closing
the relation but we're *not* releasing the lock on it- it'll get
released at the end of the transaction.


If that's the case, then changing the two table_close() statements to NoLock should resolve any remaining concern.
 

pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: type cache cleanup improvements
Next
From: Bharath Rupireddy
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation