Re: reindex concurrently and two toast indexes

2020-02-21 Thread Julien Rouhaud
On Tue, Feb 18, 2020 at 07:39:49AM +0100, Julien Rouhaud wrote: > On Tue, Feb 18, 2020 at 7:19 AM Michael Paquier wrote: > > > > On Tue, Feb 18, 2020 at 07:06:25AM +0100, Julien Rouhaud wrote: > > > On Tue, Feb 18, 2020 at 6:30 AM Michael Paquier > > > wrote: > > >> Hmm. There could be an argum

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2020-02-21 Thread Masahiko Sawada
On Tue, 18 Feb 2020 at 00:40, Muhammad Usama wrote: > > Hi Sawada San, > > I have a couple of comments on > "v27-0002-Support-atomic-commit-among-multiple-foreign-ser.patch" > > 1- As part of the XLogReadRecord refactoring commit the signature of > XLogReadRecord was changed, > so the function

Re: Make java client lib accept same connection strings as psql

2020-02-21 Thread David G. Johnston
On Fri, Feb 21, 2020 at 6:21 PM Michael Leonhard wrote: > How about making the Java client library accept the same connection > strings as psql and other command-line tools? That would make > PostgreSQL easier to use and increase its popularity. > That falls outside the scope of this list/proje

Re: POC: rational number type (fractions)

2020-02-21 Thread Joe Nelson
Joe Nelson wrote: > where the denominator is made positive whenever possible (not possible > when it's -INT_MAX). (I meant INT_MIN rather than -INT_MAX.) Another more-than-one-way-to-do-it task is converting a float to a fraction. I translated John Kennedy's method [0] to C, but Github user adeg

Re: POC: rational number type (fractions)

2020-02-21 Thread Joe Nelson
Jeff Davis wrote: > The decision between an extension and a core type is a tricky one. To > put an extension in core, usually it's good to show either that it > satisfies something in the SQL standard, or that there is some > specific technical advantage (like integration with the syntax or the > t

Make java client lib accept same connection strings as psql

2020-02-21 Thread Michael Leonhard
Hi PostgreSQL Hackers, I've run into something confusing. The psql command accepts connection strings of the form: postgresql://user1:pass1@localhost:5432/db1?sslmode=require But passing this string to the java client library (with a "jdbc:" prefix) fails. See the exception and stack trace belo

Re: Parallel copy

2020-02-21 Thread Tomas Vondra
On Fri, Feb 21, 2020 at 02:54:31PM +0200, Ants Aasma wrote: On Thu, 20 Feb 2020 at 18:43, David Fetter wrote:> On Thu, Feb 20, 2020 at 02:36:02PM +0100, Tomas Vondra wrote: > I think the wc2 is showing that maybe instead of parallelizing the > parsing, we might instead try using a different tok

Re: SPI Concurrency Precautions? Problems with Parallel Execution of Multiple CREATE TABLE statements

2020-02-21 Thread Tom Mercha
On 17/02/2020 21:24, Tom Mercha wrote: Dear Hackers I've been working on an extension and using SPI to execute some queries. I am in a situation where I have the option to issue multiple queries concurrently, ideally under same snapshot and transaction. In short, I am achieving this by creati

Re: Do we ever edit release notes after release to add warnings about incompatibilities?

2020-02-21 Thread Magnus Hagander
On Fri, Feb 21, 2020 at 10:15 PM Greg Stark wrote: > > So last year in 10.5, 9.6.10, 9.5.9, 9.4.19, and 9.3.24 we had a > binary ABI break that caused pglogical and other logical decoding > plugins to break: > > https://github.com/2ndQuadrant/pglogical/issues/183#issuecomment-417558313 > > This wa

Do we ever edit release notes after release to add warnings about incompatibilities?

2020-02-21 Thread Greg Stark
So last year in 10.5, 9.6.10, 9.5.9, 9.4.19, and 9.3.24 we had a binary ABI break that caused pglogical and other logical decoding plugins to break: https://github.com/2ndQuadrant/pglogical/issues/183#issuecomment-417558313 This wasn't discovered until after the release so the release notes don't

Re: allow running parts of src/tools/msvc/ under not Windows

2020-02-21 Thread Peter Eisentraut
On 2020-02-21 21:25, Tom Lane wrote: Peter Eisentraut writes: committed crake says that this doesn't pass perlcritic. OK, fixed. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: allow running parts of src/tools/msvc/ under not Windows

2020-02-21 Thread Tom Lane
Peter Eisentraut writes: > committed crake says that this doesn't pass perlcritic. regards, tom lane

Re: Memory-Bounded Hash Aggregation

2020-02-21 Thread Andres Freund
Hi, On 2020-02-19 20:16:36 +0100, Tomas Vondra wrote: > 3) I wonder if we need to invent new opcodes? Wouldn't it be simpler to > just add a new flag to the agg_* structs instead? I haven't tried hacking > this, so maybe it's a silly idea. New opcodes don't really cost that much - it's a jump tab

Re: allow running parts of src/tools/msvc/ under not Windows

2020-02-21 Thread Peter Eisentraut
On 2020-02-21 05:00, Michael Paquier wrote: On Thu, Feb 20, 2020 at 09:31:32AM -0500, Tom Lane wrote: Peter Eisentraut writes: The main benefit is that if you make "blind" edits in the Perl files, you can verify them easily, first by seeing that the Perl code runs, second, depending on the cir

Re: Removing obsolete configure checks

2020-02-21 Thread Tom Lane
Peter Eisentraut writes: > On 2020-02-20 19:00, Tom Lane wrote: >> I believe that we can also get rid of these tests: >> flexible array members >> cbrt >> intptr_t >> uintptr_t >> as these features are likewise required by C99. Solution.pm thinks that >> MSVC does not have the above, but I suspec

Re: Removing obsolete configure checks

2020-02-21 Thread Peter Eisentraut
On 2020-02-20 19:00, Tom Lane wrote: I think we can just remove these tests, and the corresponding src/port/ files where there is one: fseeko isinf memmove rint signed types utime utime.h wchar.h makes sense I believe that we can also get rid of these tests: flexible array members cbrt intp

Re: [PATCH] Replica sends an incorrect epoch in its hot standby feedback to the Master

2020-02-21 Thread Palamadai, Eka
Thanks a lot for the feedback. Please let me know if you have any further comments. Meanwhile, I have also added this patch to "Commitfest 2020-03" at https://commitfest.postgresql.org/27/2464. Thanks, Eka Palamadai Amazon Web Services On 2/11/20, 11:28 PM, "Thomas Munro" wrote: On Fri,

Re: Fix compiler warnings on 64-bit Windows

2020-02-21 Thread Peter Eisentraut
On 2020-02-20 17:24, Tom Lane wrote: =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= writes: On Mon, Feb 17, 2020 at 4:52 PM Tom Lane wrote: Anyway, I'll have a go at updating gaur to use 4.5.x. There is a sane-looking stdint.h on my second-oldest dinosaur, prairiedog. Don't know about th

Re: Yet another vectorized engine

2020-02-21 Thread Konstantin Knizhnik
On 12.02.2020 13:12, Hubert Zhang wrote: On Tue, Feb 11, 2020 at 1:20 AM Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: So looks like PG-13 provides significant advantages in OLAP queries comparing with 9.6! Definitely it doesn't mean that vectorized executor is no

Re: [Patch] Make pg_checksums skip foreign tablespace directories

2020-02-21 Thread David Steele
On 2/21/20 1:36 AM, Michael Paquier wrote: > On Thu, Feb 20, 2020 at 05:38:15PM +0100, Bernd Helmle wrote: >> So i propose a different approach like the attached patch tries to >> implement: instead of just blindly iterating over directory contents >> and filter them out, reference the tablespace

Re: [Patch] Make pg_checksums skip foreign tablespace directories

2020-02-21 Thread David Steele
Hi Michael, On 2/20/20 11:07 PM, Michael Paquier wrote: > On Thu, Feb 20, 2020 at 07:37:15AM -0600, David Steele wrote: >> But since the name includes the backend's pid you would need to get lucky >> and have a new backend with the same pid create the file after a restart. I >> tried it and

Re: False failure during repeated windows build.

2020-02-21 Thread Juan José Santamaría Flecha
On Tue, Feb 18, 2020 at 8:06 AM Kyotaro Horiguchi wrote: > > The attached fixes that. After commit 9573384 this patch no longer applies, but with a trivial rebase it fixes the issue. Regards, Juan José Santamaría Flecha

Re: Parallel copy

2020-02-21 Thread Ants Aasma
On Thu, 20 Feb 2020 at 18:43, David Fetter wrote:> > On Thu, Feb 20, 2020 at 02:36:02PM +0100, Tomas Vondra wrote: > > I think the wc2 is showing that maybe instead of parallelizing the > > parsing, we might instead try using a different tokenizer/parser and > > make the implementation more effici

Re: Minor improvement to partition_bounds_copy()

2020-02-21 Thread Etsuro Fujita
On Thu, Feb 20, 2020 at 10:52 PM Julien Rouhaud wrote: > On Thu, Feb 20, 2020 at 09:38:26PM +0900, Amit Langote wrote: > > On Thu, Feb 20, 2020 at 8:36 PM Etsuro Fujita > > wrote: > > > partition_bounds_copy() sets the hash_part and natts variable in each > > > iteration of a loop to copy the da

Re: backend type in log_line_prefix?

2020-02-21 Thread Peter Eisentraut
On 2020-02-13 09:56, Peter Eisentraut wrote: Attached is a demo patch that adds a placeholder %b for log_line_prefix (not in the default setting) that contains the backend type, the same that you see in pg_stat_activity and in the ps status. I would have found this occasionally useful when analy

Re: custom postgres launcher for tests

2020-02-21 Thread Ivan N. Taranov
On Fri, Feb 21, 2020 at 4:49 AM Craig Ringer wrote: > I thought I saw a related patch to this that proposed to add a pg_ctl > argument. Was that you too? I can't find it at the moment. This very simple two-line patch for src/test/perl/PostgresNode.pm code, it set `pg_ctl -p ` argument, and one-

Re: Portal->commandTag as an enum

2020-02-21 Thread John Naylor
Thinking about this some more, would it be possible to treat these like we do parser/kwlist.h? Something like this: commandtag_list.h: PG_COMMANDTAG(ALTER_ACCESS_METHOD, "ALTER ACCESS METHOD", true, false, false, false) ... then, just: #define PG_COMMANDTAG(taglabel, tagname, event_trigger, tabl

Re: [Patch] Make pg_checksums skip foreign tablespace directories

2020-02-21 Thread Kyotaro Horiguchi
Thank you David for decrypting my previous mail.., and your translation was correct. At Fri, 21 Feb 2020 15:07:12 +0900, Michael Paquier wrote in > On Thu, Feb 20, 2020 at 07:37:15AM -0600, David Steele wrote: > > But since the name includes the backend's pid you would need to get lucky > > an

Re: Autovacuum on partitioned table

2020-02-21 Thread Amit Langote
On Fri, Feb 21, 2020 at 4:47 PM Masahiko Sawada wrote: > Thank you for updating the patch. I tested v4 patch. > > After analyze or autoanalyze on partitioned table n_live_tup and > n_dead_tup are updated. However, TRUNCATE and VACUUM on the > partitioned table don't change these values until invok

Re: pg_regress cleans up tablespace twice.

2020-02-21 Thread Kyotaro Horiguchi
At Thu, 20 Feb 2020 14:23:22 +0900, Michael Paquier wrote in > On Wed, Feb 19, 2020 at 04:06:33PM -0500, Tom Lane wrote: > > I think the existing coding dates from before we had a Perl driver for > > this, or else we had it but there were other less-functional ways to > > replace "make check" on