Re: range_agg

2020-03-07 Thread Isaac Morland
On Sat, 7 Mar 2020 at 16:27, Pavel Stehule wrote: > > so 7. 3. 2020 v 22:20 odesílatel Tom Lane napsal: > >> I wrote: >> > Actually ... have you given any thought to just deciding that ranges and >> > multiranges are the same type? That is, any range can now potentially >> > contain multiple se

Re: Index Skip Scan

2020-03-07 Thread David Rowley
On Sat, 7 Mar 2020 at 03:49, Tomas Vondra wrote: > > On Wed, Mar 04, 2020 at 11:32:00AM +1300, David Rowley wrote: > >The reason it must be done this way is that when the RelOptInfo that > >we're performing the DISTINCT on is a joinrel, then we're not going to > >see any IndexPaths in the RelOptIn

Re: Some problems of recovery conflict wait events

2020-03-07 Thread Masahiko Sawada
On Thu, 5 Mar 2020 at 20:16, Fujii Masao wrote: > > > > On 2020/03/05 16:58, Masahiko Sawada wrote: > > On Wed, 4 Mar 2020 at 15:21, Fujii Masao > > wrote: > >> > >> > >> > >> On 2020/03/04 14:31, Masahiko Sawada wrote: > >>> On Wed, 4 Mar 2020 at 13:48, Fujii Masao > >>> wrote: > >

Re: Add an optional timeout clause to isolationtester step.

2020-03-07 Thread Michael Paquier
On Sat, Mar 07, 2020 at 04:23:58PM -0500, Tom Lane wrote: > Hmm, seems like a pretty arbitrary (and slow) way to test that. I'd > envision testing that by setting up a case with an expression index > where the expression is designed to fail at some point partway through > the build -- say, with a

Re: More tests to stress directly checksum_impl.h

2020-03-07 Thread Michael Paquier
On Sat, Mar 07, 2020 at 01:46:43PM -0500, David Steele wrote: > Nice! Looks like I was wrong about the checksums being the same on le/be > systems for repeated byte values. On closer inspection it looks like >> 17 > at least ensures this will not be true. Thanks for the computations with big-endia

Re: Identifying user-created objects

2020-03-07 Thread Masahiko Sawada
On Thu, 5 Mar 2020 at 18:39, Kyotaro Horiguchi wrote: > > At Thu, 5 Mar 2020 18:06:26 +0900, Masahiko Sawada > wrote in > > On Thu, 5 Mar 2020 at 16:36, Kyotaro Horiguchi > > wrote: > > > > > > At Thu, 5 Mar 2020 15:21:49 +0900, Masahiko Sawada > > > wrote in > > > > > > I don't come up with

Re: Allow to_date() and to_timestamp() to accept localized names

2020-03-07 Thread Tom Lane
James Coleman writes: > On Sat, Mar 7, 2020 at 9:31 PM Tom Lane wrote: >> Looks like you may not have Turkish locale installed? Try >> locale -a | grep tr_TR > Hmm, when I grep the locales I see `tr_TR.utf8` in the output. I assume the > utf8 version is acceptable? Or is there a non-utf8 varian

Re: range_agg

2020-03-07 Thread David Fetter
On Sat, Mar 07, 2020 at 06:45:44PM -0500, Tom Lane wrote: > David Fetter writes: > > There's another use case not yet covered here that could make this > > even more complex, we should probably plan for it: multi-ranges > > with weights. > > I'm inclined to reject that as completely out of scope.

Re: Allow to_date() and to_timestamp() to accept localized names

2020-03-07 Thread James Coleman
On Sat, Mar 7, 2020 at 9:31 PM Tom Lane wrote: > James Coleman writes: > > On master with a clean build (and configure re-run) and a fresh init-db, > > I'm seeing the collate.linux.utf8 test fail with the attached diff. > > -- to_char > SET lc_time TO 'tr_TR'; > +ERROR: invalid value for para

Re: Allow to_date() and to_timestamp() to accept localized names

2020-03-07 Thread Tom Lane
James Coleman writes: > On master with a clean build (and configure re-run) and a fresh init-db, > I'm seeing the collate.linux.utf8 test fail with the attached diff. -- to_char SET lc_time TO 'tr_TR'; +ERROR: invalid value for parameter "lc_time": "tr_TR" SELECT to_char(date '2010-02-01', 'D

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-07 Thread Masahiko Sawada
On Mon, 24 Feb 2020 at 19:08, Amit Kapila wrote: > > On Thu, Feb 20, 2020 at 8:06 AM Andres Freund wrote: > > > > Hi, > > > > On 2020-02-19 11:12:18 +0530, Amit Kapila wrote: > > > I think till we know the real need for changing group locking, going > > > in the direction of what Tom suggested to

Re: Allow to_date() and to_timestamp() to accept localized names

2020-03-07 Thread James Coleman
On Tue, Mar 3, 2020 at 11:09 AM Tom Lane wrote: > =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= < > juanjo.santama...@gmail.com> writes: > > On Sun, Mar 1, 2020 at 11:25 PM Tom Lane wrote: > >> Going once, going twice ... > > > You have moved this to better place, so none from me, and thank

Re: range_agg

2020-03-07 Thread Tom Lane
David Fetter writes: > There's another use case not yet covered here that could make this > even more complex, we should probably plan for it: multi-ranges with > weights. I'm inclined to reject that as completely out of scope. The core argument for unifying multiranges with ranges, if you ask m

Re: Bug in pg_restore with EventTrigger in parallel mode

2020-03-07 Thread Tom Lane
vignesh C writes: > I'm not sure if we can add a test for this, can you have a thought > about this to check if we can add a test. Yeah, I'm not quite sure if a test is worth the trouble or not. We clearly do need to restore event triggers later than we do now, even without considering parallel

Re: What's difference among insert/write/flush lsn?

2020-03-07 Thread Bruce Momjian
On Sat, Feb 1, 2020 at 11:18:42AM +0800, Jinhua Luo wrote: > Hi, > > pg_current_wal_flush_lsn()pg_lsnGet current write-ahead log flush location > pg_current_wal_insert_lsn()pg_lsnGet current write-ahead log insert location > pg_current_wal_lsn()pg_lsnGet current write-ahead log write location >

Re: Binary support for pgoutput plugin

2020-03-07 Thread Dave Cramer
On Fri, 6 Mar 2020 at 08:54, Petr Jelinek wrote: > Hi Dave, > > On 29/02/2020 18:44, Dave Cramer wrote: > > > > > > rebased and removed the catversion bump. > > Looked into this and it generally seems okay, but I do have one gripe here: > > > + tuple->values[i]

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-03-07 Thread James Coleman
On Thu, Mar 5, 2020 at 6:45 PM Tom Lane wrote: > James Coleman writes: > > That's what I figured, but as I mentioned I've having trouble figuring > out > > how the fact that an analyze is in flight is determined. I assume it's > > something that lives of the EState or similar, but I'm not seeing

Re: range_agg

2020-03-07 Thread David Fetter
On Sat, Mar 07, 2020 at 04:06:32PM -0500, Tom Lane wrote: > I wrote: > > However, what I'm on about right at the moment is that I don't think > > there should be any delta in that test at all. As far as I can see, > > the design idea here is that multiranges will be automatically created > > over

Re: ALTER TEXT SEARCH DICTIONARY tab completion

2020-03-07 Thread Tom Lane
Georgios Kokolatos writes: > One minor nitpick I feel I should add is that for completeness and > balance the equivalent `CREATE TEXT SEARCH DICTIONARY` should > get the same treatment. > Maybe something along the lines of: > - else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION",

Re: Refactor compile-time assertion checks for C/C++

2020-03-07 Thread Tom Lane
Michael Paquier writes: > As of [1], I have been playing with the compile time assertions that > we have for expressions, declarations and statements. And it happens > that it is visibly possible to consolidate the fallback > implementations for C and C++. Attached is the result of what I am > g

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2020-03-07 Thread Justin Pryzby
On Sat, Mar 07, 2020 at 03:14:37PM +0100, Fabien COELHO wrote: > The documentation sentences could probably be improved "for for", "used ... > used". Maybe: > ISTM that several instances of: "pg_ls_dir_files(..., true, false);" should > be "pg_ls_dir_files(..., true, DIR_HIDE);". > Alas, ISTM tha

Re: range_agg

2020-03-07 Thread Pavel Stehule
so 7. 3. 2020 v 22:20 odesílatel Tom Lane napsal: > I wrote: > > Actually ... have you given any thought to just deciding that ranges and > > multiranges are the same type? That is, any range can now potentially > > contain multiple segments? That would eliminate a whole lot of the > > tedious

Re: Add an optional timeout clause to isolationtester step.

2020-03-07 Thread Tom Lane
Julien Rouhaud writes: > On Sat, Mar 07, 2020 at 04:09:31PM -0500, Tom Lane wrote: >> Julien Rouhaud writes: >>> On Sat, Mar 07, 2020 at 10:46:34AM -0500, Tom Lane wrote: What's the actual need that you're trying to deal with? >>> Testing the correct behavior of non trivial commands, such a

Re: range_agg

2020-03-07 Thread Tom Lane
I wrote: > Actually ... have you given any thought to just deciding that ranges and > multiranges are the same type? That is, any range can now potentially > contain multiple segments? That would eliminate a whole lot of the > tedious infrastructure hacking involved in this patch, and let you foc

Re: Add an optional timeout clause to isolationtester step.

2020-03-07 Thread Julien Rouhaud
On Sat, Mar 07, 2020 at 04:09:31PM -0500, Tom Lane wrote: > Julien Rouhaud writes: > > On Sat, Mar 07, 2020 at 10:46:34AM -0500, Tom Lane wrote: > >> What's the actual need that you're trying to deal with? > > > Testing the correct behavior of non trivial commands, such as CIC/reindex > > concurre

Re: proposal: schema variables

2020-03-07 Thread Pavel Stehule
Hi I fixed the some ugly parts of this patch - now the LET x = DEFAULT, LET x = NULL is processed by more usual way. Statement LET is doesn't switch between STMT_UTILITY and STMT_PLAN_UTILITY like before. It is only STMT_PLAN_UTILITY statement. Regards Pavel schema-variables-20200307.pat

Re: Add an optional timeout clause to isolationtester step.

2020-03-07 Thread Tom Lane
Julien Rouhaud writes: > On Sat, Mar 07, 2020 at 10:46:34AM -0500, Tom Lane wrote: >> What's the actual need that you're trying to deal with? > Testing the correct behavior of non trivial commands, such as CIC/reindex > concurrently, that fails during the execution. Hmm ... don't see how a timeo

Re: range_agg

2020-03-07 Thread Tom Lane
I wrote: > However, what I'm on about right at the moment is that I don't think > there should be any delta in that test at all. As far as I can see, > the design idea here is that multiranges will be automatically created > over range types, and the user doesn't need to do that. To my mind, > th

Re: Add LogicalTapeSetExtend() to logtape.c

2020-03-07 Thread Jeff Davis
On Wed, 2020-03-04 at 12:06 -0800, Jeff Davis wrote: > I tracked the problem down. Because of the name _FORTIFY_SOURCE, I got somewhat concerned that this change (logtape-20200303) was somehow interfering with a safety mechanism in the compiler. There's a mechanism in GCC called object size track

Re: Add an optional timeout clause to isolationtester step.

2020-03-07 Thread Julien Rouhaud
On Sat, Mar 07, 2020 at 10:46:34AM -0500, Tom Lane wrote: > Julien Rouhaud writes: > > On Sat, Mar 07, 2020 at 10:41:42AM +0900, Michael Paquier wrote: > >> On Fri, Mar 06, 2020 at 02:15:47PM +0100, Julien Rouhaud wrote: > >>> Here's a patch to add an optional "timeout val" clause to > >>> isolat

Re: range_agg

2020-03-07 Thread Tom Lane
Alvaro Herrera writes: > [ v11 patches ] The cfbot isn't too happy with this; it's getting differently-ordered results than you apparently did for the list of owned objects in dependency.out's DROP OWNED BY test. Not sure why that should be --- it seems like af6550d34 should have ensured that th

Re: Proposal: PqSendBuffer removal

2020-03-07 Thread Tom Lane
Andres Freund writes: > What I'm thinking is that we'd have pg_beginmessage() (potentially a > different named version) initialize the relevant StringInfo basically as > (StringInfoData){ > .data = PqSendPointer, > .len = 0, > .alloc_offset = PqSendBuffer - PqSendBuffer > } This seem

Re: More tests to stress directly checksum_impl.h

2020-03-07 Thread David Steele
On 3/7/20 1:22 PM, Tom Lane wrote: Michael Paquier writes: Another way would be variant output files, which could be a sane solution if we put this in its own test script. I think this way could work; see attached. I'm not sure if it's actually worth providing the variants for non-8K block

Re: ccache is required by postgresql12-devel RPM

2020-03-07 Thread Tom Lane
Bruce Momjian writes: > On Thu, Jan 30, 2020 at 08:36:17PM +0900, Kyotaro Horiguchi wrote: >> I notieced that the official PG12-devel RPM pacakge for RHEL8 mandates >> ccache being installed on building of an extension. >> >> $ grep ccache /usr/pgsql-12/lib/pgxs/src/Makefile.global >> CLANG = /u

Re: Proposal: PqSendBuffer removal

2020-03-07 Thread Andres Freund
Hi, On 2020-03-06 11:09:23 -0800, Aleksei Ivanov wrote: > *>Then we could get a StringInfo pointing directly to the current insertion > point in the send buffer. To support growing it, enlargeStringInfo would > first subtract the offset to the start of the allocation, and then > reallocate that*.

Re: More tests to stress directly checksum_impl.h

2020-03-07 Thread Tom Lane
Michael Paquier writes: > On Fri, Mar 06, 2020 at 03:04:27PM -0500, Tom Lane wrote: >> Between that and the BLCKSZ dependency, it's not clear that we can >> test this with just a plain old expected-file test case. Might >> need to fall back to a TAP test. > Perhaps the dependency of page.sql on

Re: ccache is required by postgresql12-devel RPM

2020-03-07 Thread Bruce Momjian
On Thu, Jan 30, 2020 at 08:36:17PM +0900, Kyotaro Horiguchi wrote: > Hello. > > # I'm not sure -hakcers is the place for this, though.. > > I notieced that the official PG12-devel RPM pacakge for RHEL8 mandates > ccache being installed on building of an extension. > > $ grep ccache /usr/pgsql-12

Re: pg_ls_tmpdir to show directories and shared filesets

2020-03-07 Thread Fabien COELHO
It seems that lists are used as FIFO structures by appending, fetching & deleting last, all of which are O(n). ISTM it would be better to use the head of the list by inserting, getting and deleting first, which are O(1). I think you're referring to linked lists, but pglists are now arrays, O

Re: pg_ls_tmpdir to show directories and shared filesets

2020-03-07 Thread Justin Pryzby
On Sat, Mar 07, 2020 at 03:14:37PM +0100, Fabien COELHO wrote: > Some feedback about the v7 patch set. Thanks for looking again > About v7.1, seems ok. > > About v7.2 & v7.3 seems ok, altought the two could be merged. These are separate since I proprose that one should be backpatched to v12 and

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-07 Thread Dilip Kumar
On Sat, Mar 7, 2020 at 8:53 PM Tom Lane wrote: > > Dilip Kumar writes: > > I think instead of the flag we need to keep the counter because we can > > acquire the same relation extension lock multiple times. > > Uh ... what? How would that not be broken usage on its face? Basically, if we can e

Re: Add an optional timeout clause to isolationtester step.

2020-03-07 Thread Tom Lane
Julien Rouhaud writes: > On Sat, Mar 07, 2020 at 10:41:42AM +0900, Michael Paquier wrote: >> On Fri, Mar 06, 2020 at 02:15:47PM +0100, Julien Rouhaud wrote: >>> Here's a patch to add an optional "timeout val" clause to isolationtester's >>> step definition. When used, isolationtester will activel

Re: Re[6]: bool_plperl transform

2020-03-07 Thread Tom Lane
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= writes: > Do you think the jsonb transform is worth explicit mentioning at the PL/Perl > documentation page, or not? Right now it's documented under the json data types, which seems sufficient to me. regards, tom lane

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-07 Thread Tom Lane
Dilip Kumar writes: > I think instead of the flag we need to keep the counter because we can > acquire the same relation extension lock multiple times. Uh ... what? How would that not be broken usage on its face? I continue to think that we'd be better off getting all of this out of the heavywe

Re: backend type in log_line_prefix?

2020-03-07 Thread Peter Eisentraut
Updated patch set because of conflicts. On 2020-02-21 10:09, Peter Eisentraut wrote: After positive initial feedback, here is a more ambitious patch set. In particular, I wanted to avoid having to specify the backend type (at least) twice, once for the ps display and once for this new facility.

Re[6]: bool_plperl transform

2020-03-07 Thread Ivan Panchenko
Tom,   >Суббота, 7 марта 2020, 1:15 +03:00 от Tom Lane : >  >=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= < w...@mail.ru > writes: >> [ bool_plperl_transform_v3.patch ] >I reviewed this, fixed some minor problems (mostly cosmetic, but not >entirely), and pushed it. Thanks for the commit and for your work im

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-07 Thread Dilip Kumar
On Sat, Mar 7, 2020 at 3:26 PM Amit Kapila wrote: > > On Sat, Mar 7, 2020 at 11:14 AM Amit Kapila wrote: >> >> On Sat, Mar 7, 2020 at 9:57 AM Dilip Kumar wrote: >>> >>> On Fri, Mar 6, 2020 at 9:47 AM Amit Kapila wrote: >>> > >>> > On Thu, Mar 5, 2020 at 1:54 PM Dilip Kumar wrote: >>> > > >>> >

Re: pg_ls_tmpdir to show directories and shared filesets

2020-03-07 Thread Fabien COELHO
Hello Justin, Some feedback about the v7 patch set. About v7.1, seems ok. About v7.2 & v7.3 seems ok, altought the two could be merged. About v7.4: The documentation sentences could probably be improved "for for", "used ... used". Maybe: For the temporary directory for tablespace, ...

Re: [PATCH] Finally split StdRdOptions into HeapOptions and ToastOptions

2020-03-07 Thread Nikolay Shaplov
В письме от суббота, 7 марта 2020 г. 10:03:40 MSK пользователь Michael Paquier написал: > On Wed, Mar 04, 2020 at 10:58:31PM +0300, Nikolay Shaplov wrote: > > But the truth is that my goal is to move all code that defines all option > > names, min/max values etc, move it inside am code. To move da

Re: effective_io_concurrency's steampunk spindle maths

2020-03-07 Thread Evgeniy Shishkin
> On Mar 7, 2020, at 00:33, Thomas Munro wrote: > > That is indeed what led me to start thinking about what a good new > name would be. MySQL has a term io_capacity. https://dev.mysql.com/doc/refman/8.0/en/innodb-configuring-io-capacity.html > The innodb_io_capacity variable defines the ov

SQL/MDA added to docs

2020-03-07 Thread Peter Eisentraut
I have added mention of the new SQL standard part SQL/MDA (multi-dimensional arrays) to the documentation. This is not the same thing as the existing support for multidimensional arrays in PostgreSQL. SQL/MDA targets huge arrays, aggregation over slices, export as images, for applications in

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-07 Thread Amit Kapila
On Sat, Mar 7, 2020 at 11:14 AM Amit Kapila wrote: > On Sat, Mar 7, 2020 at 9:57 AM Dilip Kumar wrote: > >> On Fri, Mar 6, 2020 at 9:47 AM Amit Kapila >> wrote: >> > >> > On Thu, Mar 5, 2020 at 1:54 PM Dilip Kumar >> wrote: >> > > >> > > On Thu, Mar 5, 2020 at 12:15 PM Amit Kapila >> wrote: >

Re: Questions about the CI process and proposal

2020-03-07 Thread Vladimir Sitnikov
Andy>1). The test cases may succeed locally but Andy> may be failed Andy> in CI for some reasons Peter> This is not a problem I would disagree. A patch might easily make the database incompatible with clients like JDBC. Do current PostgreSQL tests catch that? I don't think so. However, that can

Re: Question: Select messages using binary format

2020-03-07 Thread Pavel Stehule
Hi so 7. 3. 2020 v 8:38 odesílatel Aleksei Ivanov napsal: > Dear hackers, > > I know that it is possible to receive packets in binary format using > declare binary cursor and than fetching the result. > > But is it possible just using ordinary select from simple query to specify > that I want to

Re: pgbench: option delaying queries till connections establishment?

2020-03-07 Thread Fabien COELHO
Hallo Andres, Slight aside: Have you ever looked at moving pgbench to non-blocking connection establishment? It seems weird to use non-blocking everywhere but connection establishment. Attached an attempt at doing that, mostly done for fun. It seems to be a little slower on a local socket.

Re: pgbench: option delaying queries till connections establishment?

2020-03-07 Thread Fabien COELHO
Hello Andres, I've changed the performance calculations depending on -C or not. Ramp-up effects are smoothed. I've merged all time-related stuff (time_t, instr_time, int64) to use a unique type (pg_time_usec_t) and set of functions/macros, which simplifies the code somehow. Hm. I'm not co