Re: Weird special case in jsonb_concat()

2020-12-19 Thread Joel Jacobson
On Sat, Dec 19, 2020, at 21:35, Tom Lane wrote: >Here is a proposed patch for that. I've tested the patch and "All 202 tests passed". In addition, I've tested it on a json intensive project, which passes all its own tests. I haven't studied the jsonfuncs.c code in detail, but the new code looks

Re: pg_preadv() and pg_pwritev()

2020-12-19 Thread Tom Lane
Thomas Munro writes: > OK, here's a patch to zero-fill fresh WAL segments with pwritev(). > I'm drawing a blank on trivial candidate uses for preadv(), without > infrastructure from later patches. This looks OK to me. I tried it on prairiedog (has writev and pwrite but not pwritev) as well as ga

Re: On login trigger: take three

2020-12-19 Thread Pavel Stehule
čt 17. 12. 2020 v 19:30 odesílatel Pavel Stehule napsal: > > > čt 17. 12. 2020 v 14:04 odesílatel Konstantin Knizhnik < > k.knizh...@postgrespro.ru> napsal: > >> >> >> On 17.12.2020 9:31, Pavel Stehule wrote: >> >> >> >> st 16. 12. 2020 v 20:38 odesílatel Pavel Stehule >> napsal: >> >>> Attached

Re: Weird special case in jsonb_concat()

2020-12-19 Thread Pavel Stehule
so 19. 12. 2020 v 21:35 odesílatel Tom Lane napsal: > I wrote: > > However, further experimentation found a case that fails: > > regression=# select '3'::jsonb || '{}'::jsonb; > > ERROR: invalid concatenation of jsonb objects > > I wonder what is the point of this weird exception, and whether >

Re: [PATCH] Logical decoding of TRUNCATE

2020-12-19 Thread Noah Misch
On Sat, Apr 07, 2018 at 07:40:11PM -0400, Peter Eisentraut wrote: > Committed with those changes. Since commit 039eb6e added logical replication support for TRUNCATE, logical apply of the TRUNCATE fails if it chooses a parallel index build: cat >/tmp/most_parallel.conf <

Re: pg_preadv() and pg_pwritev()

2020-12-19 Thread Thomas Munro
On Sun, Dec 20, 2020 at 12:34 PM Tom Lane wrote: > Thomas Munro writes: > > I want to be able to do synchronous vectored file I/O, so I made > > wrapper macros for preadv() and pwritev() with fallbacks for systems > > that don't have them. Following the precedent of the pg_pread() and > > pg_pwr

Re: Deleting older versions in unique indexes to avoid page splits

2020-12-19 Thread Peter Geoghegan
On Wed, Dec 9, 2020 at 5:12 PM Peter Geoghegan wrote: > Most of the real changes in v11 (compared to v10) are in heapam.c. > I've completely replaced the table_compute_xid_horizon_for_tuples() > interface with a new interface that supports all existing requirements > (from index deletions that sup

Re: pg_preadv() and pg_pwritev()

2020-12-19 Thread Tom Lane
Thomas Munro writes: > I want to be able to do synchronous vectored file I/O, so I made > wrapper macros for preadv() and pwritev() with fallbacks for systems > that don't have them. Following the precedent of the pg_pread() and > pg_pwrite() macros, the "pg_" prefix reflects a subtle contract >

pg_preadv() and pg_pwritev()

2020-12-19 Thread Thomas Munro
Hello hackers, I want to be able to do synchronous vectored file I/O, so I made wrapper macros for preadv() and pwritev() with fallbacks for systems that don't have them. Following the precedent of the pg_pread() and pg_pwrite() macros, the "pg_" prefix reflects a subtle contract change: the fall

Re: v10 release notes for extended stats

2020-12-19 Thread Tom Lane
Bruce Momjian writes: > On Sat, Dec 19, 2020 at 01:39:27PM -0600, Justin Pryzby wrote: >> So I propose: > Uh, at the time, that was the best text we could come up with. We don't > usually go back to update them unless there is a very good reason, and I > am not seeing that above. Yeah, it's a c

Re: Weird special case in jsonb_concat()

2020-12-19 Thread Tom Lane
I wrote: > However, further experimentation found a case that fails: > regression=# select '3'::jsonb || '{}'::jsonb; > ERROR: invalid concatenation of jsonb objects > I wonder what is the point of this weird exception, and whether > whoever devised it can provide a concise explanation of what > t

Re: Proposed patch for key managment

2020-12-19 Thread Bruce Momjian
On Sat, Dec 19, 2020 at 11:58:37AM -0500, Bruce Momjian wrote: > My final point is that we can find ways to do what you are suggesting as > an addition to what we are adding now. What we need is clear > justification of why these additional features are needed. Requiring > the use of a true rando

Re: v10 release notes for extended stats

2020-12-19 Thread Bruce Momjian
On Sat, Dec 19, 2020 at 01:39:27PM -0600, Justin Pryzby wrote: > 2017-03-24 [7b504eb28] Implement multivariate n-distinct coefficients > 2017-04-05 [2686ee1b7] Collect and use multi-column dependency stats > 2017-05-12 [bc085205c] Change CREATE STATISTICS syntax > > The existing notes say: > |Add

v10 release notes for extended stats

2020-12-19 Thread Justin Pryzby
2017-03-24 [7b504eb28] Implement multivariate n-distinct coefficients 2017-04-05 [2686ee1b7] Collect and use multi-column dependency stats 2017-05-12 [bc085205c] Change CREATE STATISTICS syntax The existing notes say: |Add multi-column optimizer statistics to compute the correlation ratio and num

RE: libpq @windows : leaked singlethread_lock makes AppVerifier unhappy

2020-12-19 Thread Першин Юрий Петрович
Hi Here is my workaround (from unit_tests.dll DLL_PROCESS_DETACH): //3. Destroy LIBPQ!static pthread_mutex_t singlethread_lock - 327 HMODULE hLeakedLibPQ = ::GetModuleHandleA("libpq.dll"); //libpq.dll v13.0.1.20323 (https://ftp.postgre

Re: Proposed patch for key managment

2020-12-19 Thread Bruce Momjian
On Sat, Dec 19, 2020 at 11:45:15AM +, Alastair Turner wrote: > Sorry, I have waved Desirability through under the headings of ease of > adoption or not raising barriers to adoption, without detailing what > barriers I see or how to avoid them. I also realise that "don't scare > the users" is so

Re: multi-install PostgresNode

2020-12-19 Thread Andrew Dunstan
On 12/17/20 7:55 PM, Michael Paquier wrote: > On Thu, Dec 17, 2020 at 04:37:54PM -0500, Andrew Dunstan wrote: >> The proposed module would look something like this: >> >> [...] >> >> use parent PostgresNode; >> >> sub get_new_node >> { >>     my $installpath= shift; >>     my $

Re: Double partition lock in bufmgr

2020-12-19 Thread Konstantin Knizhnik
On 19.12.2020 10:53, Zhihong Yu wrote: Hi, w.r.t. the code in BufferAlloc(), the pointers are compared. Should we instead compare the tranche Id of the two LWLock ? Cheers As far as LWlocks are stored in the array, comparing indexes in this array (tranche Id) is equivalent to comparing ele

Re: Proposed patch for key managment

2020-12-19 Thread Alastair Turner
Hi Bruce On Sat, 19 Dec 2020 at 02:38, Bruce Momjian wrote: > > I am not going be as kind. Our workflow is: > > Desirability -> Design -> Implement -> Test -> Review -> Commit > https://wiki.postgresql.org/wiki/Todo#Development_Process > > I have already asked about the first ite

Re: Proposed patch for key managment

2020-12-19 Thread Alastair Turner
Hi Stephen On Fri, 18 Dec 2020 at 21:36, Stephen Frost wrote: > > Greetings Alastair, > > * Alastair Turner (min...@decodable.me) wrote: > > On Wed, 16 Dec 2020 at 22:43, Stephen Frost wrote: ... > > passphrase key wrapper, the secret store and the cloud/HW KMS. > > > > Since the examples expand

Re: Asynchronous Append on postgres_fdw nodes.

2020-12-19 Thread Etsuro Fujita
On Mon, Dec 14, 2020 at 5:56 PM Kyotaro Horiguchi wrote: > At Sat, 12 Dec 2020 19:06:51 +0900, Etsuro Fujita > wrote in > > On Fri, Nov 20, 2020 at 8:16 PM Kyotaro Horiguchi > > wrote: > > > + /* wait or poll async events */ > > > + if (!bms_is_empty(node->as_asyncp

Re: Asynchronous Append on postgres_fdw nodes.

2020-12-19 Thread Etsuro Fujita
On Mon, Dec 14, 2020 at 4:01 PM Kyotaro Horiguchi wrote: > At Sat, 12 Dec 2020 18:25:57 +0900, Etsuro Fujita > wrote in > > On Fri, Nov 20, 2020 at 3:51 PM Kyotaro Horiguchi > > wrote: > > > The reason for > > > the early fetching is letting fdw send the next request as early as > > > possible.