fixing more format truncation issues

2018-02-28 Thread Peter Eisentraut
In 6275f5d28a1577563f53f2171689d4f890a46881, we fixed warnings from the options -Wformat-overflow and -Wformat-truncation, which are part of -Wall in gcc 7. Here, I propose to dial this up a bit by adding -Wformat-overflow=2 -Wformat-truncation=2, which use some more worst-case approaches for esti

Re: [HACKERS] SERIALIZABLE with parallel query

2018-02-28 Thread Thomas Munro
On Mon, Feb 26, 2018 at 6:37 PM, Thomas Munro wrote: > I've now broken it into two patches. Rebased. -- Thomas Munro http://www.enterprisedb.com 0001-Enable-parallel-query-with-SERIALIZABLE-isolatio-v13.patch Description: Binary data 0002-Enable-the-read-only-SERIALIZABLE-optimization-f-v13

CALL optional in PL/pgSQL

2018-02-28 Thread Peter Eisentraut
This seems to be a popular issue when porting from PL/SQL, so I'll throw it out here for discussion. Apparently, in PL/SQL you can call another procedure without the CALL keyword. Here is a patch that attempts to implement that in PL/pgSQL as well. It's not very pretty. I seem to recall that th

Re: [HACKERS] path toward faster partition pruning

2018-02-28 Thread Ashutosh Bapat
On Thu, Mar 1, 2018 at 6:57 AM, Amit Langote wrote: > On 2018/02/28 19:14, Ashutosh Bapat wrote: >> On Wed, Feb 28, 2018 at 6:42 AM, Amit Langote wrote: >>> BTW, should there be a relevant test in partition_join.sql? If yes, >>> attached a patch (partitionwise-join-collation-test-1.patch) to add

RE: [bug fix] Produce a crash dump before main() on Windows

2018-02-28 Thread Tsunakawa, Takayuki
From: Tsunakawa, Takayuki [mailto:tsunakawa.ta...@jp.fujitsu.com] > Another idea to add to the current patch is to move the call to SetErrorMode() > to the below function, which is called first in main(). How about this? > > void > pgwin32_install_crashdump_handler(void) > { > SetUnhandledE

Why chain of snapshots is used in ReorderBufferCommit?

2018-02-28 Thread Arseny Sher
Hello, While prowling through snapbuild & reorderbuffer code, I wondered: why a queue of snapshots is used for replaying each transaction instead of just picking up snapshot from snapbuilder once when COMMIT record is read? I am not aware of any DDL/DML mix which would make this invalid: e.g. we c

Re: CALL optional in PL/pgSQL

2018-02-28 Thread David G. Johnston
On Wednesday, February 28, 2018, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > > > I seem to recall that there were past discussions about this, with > respect to the PERFORM command, but I couldn't find them anymore. > I'm thinking you are thinking of this one. https://www.postgr

Re: Online enabling of checksums

2018-02-28 Thread Andrey Borodin
> 28 февр. 2018 г., в 22:06, Robert Haas написал(а): > > On Sun, Feb 25, 2018 at 9:54 AM, Magnus Hagander wrote: >> Also if that wasn't clear -- we only do the full page write if there isn't >> already a checksum on the page and that checksum is correct. > > Hmm. > > Suppose that on the mast

Re: Why chain of snapshots is used in ReorderBufferCommit?

2018-02-28 Thread Andres Freund
Hi, On 2018-03-01 08:17:33 +0300, Arseny Sher wrote: > While prowling through snapbuild & reorderbuffer code, I wondered: why a queue > of snapshots is used for replaying each transaction instead of just picking up > snapshot from snapbuilder once when COMMIT record is read? I am not aware of > a

Re: PATCH: Unlogged tables re-initialization tests

2018-02-28 Thread Thomas Munro
On Thu, Mar 1, 2018 at 9:24 AM, David Steele wrote: > These tests were originally included in the exclude unlogged tables > patch [1] to provide coverage for the refactoring of reinit.c. Hi David, +# The following tests test symlinks. Windows doesn't have symlinks, so +# skip on Windows. Could

Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-02-28 Thread Arseny Sher
Hello, In LogicalConfirmReceivedLocation two fields (data.catalog_xmin and effective_catalog_xmin) of ReplicationSlot structure are used for advancing xmin of the slot. This allows to avoid hole when tuples might already have been vacuumed, but slot's state was not yet flushed to the disk: if we c

Re: 2018-03 Commitfest starts tomorrow

2018-02-28 Thread Tom Lane
David Steele writes: > I'll be starting the Commitfest at midnight AoE (07:00 ET, 13:00 CET) so > please get your patches in before then. > Please remember that if you drop a new and large (or invasive patch) > into this CF it may be moved to the next CF. > This last CF for PG11 should generally b

Re: Synchronous replay take III

2018-02-28 Thread Thomas Munro
On Thu, Mar 1, 2018 at 2:39 PM, Thomas Munro wrote: > I was pinged off-list by a fellow -hackers denizen interested in the > synchronous replay feature and wanting a rebased patch to test. Here > it goes, just in time for a Commitfest. Please skip to the bottom of > this message for testing note

Re: CALL optional in PL/pgSQL

2018-02-28 Thread Pavel Stehule
2018-03-01 5:51 GMT+01:00 Peter Eisentraut : > This seems to be a popular issue when porting from PL/SQL, so I'll throw > it out here for discussion. Apparently, in PL/SQL you can call another > procedure without the CALL keyword. Here is a patch that attempts to > implement that in PL/pgSQL as

Re: server crash in nodeAppend.c

2018-02-28 Thread Rajkumar Raghuwanshi
On Wed, Feb 28, 2018 at 9:29 PM, Robert Haas wrote: > Nice test case. I pushed commit > ce1663cdcdbd9bf15c81570277f70571b3727dd3, including your test case, to > fix this. Thanks Robert for fix and commit. I have reverified commit, this is working fine now. Thanks & Regards, Rajkumar Raghuwans

Re: [HACKERS] pgbench randomness initialization

2018-02-28 Thread Fabien COELHO
Hello Tom, Fabien COELHO writes: This is a simple patch that does what it says on the tin. I ran into trouble with the pgbench TAP test *even before applying the patch*, but only because I was doing a VPATH build as a user without 'write' on the source tree (001_pgbench_with_server.pl tried t

Re: Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-02-28 Thread Craig Ringer
On 1 March 2018 at 13:39, Arseny Sher wrote: > Hello, > > In LogicalConfirmReceivedLocation two fields (data.catalog_xmin and > effective_catalog_xmin) of ReplicationSlot structure are used for > advancing xmin of the slot. This allows to avoid hole when tuples might > already have been vacuumed,

RE: [bug fix] pg_rewind creates corrupt WAL files, and the standby cannot catch up the primary

2018-02-28 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:mich...@paquier.xyz] > Yes, it should not copy those WAL files. Most of the time they are going > to be meaningless. See this recent thread: > https://www.postgresql.org/message-id/20180126023609.GH17847%40paquier > .xyz > So I would rather go this way instead of hav

Re: Contention preventing locking

2018-02-28 Thread Konstantin Knizhnik
On 28.02.2018 16:32, Amit Kapila wrote: On Mon, Feb 26, 2018 at 8:26 PM, Konstantin Knizhnik wrote: On 26.02.2018 17:20, Amit Kapila wrote: Can you please explain, how it can be done easily without extra tuple locks? I have tried to read your patch but due to lack of comments, it is not cle

Re: Online enabling of checksums

2018-02-28 Thread Andrey Borodin
> 28 февр. 2018 г., в 6:22, Daniel Gustafsson написал(а): > >> Is there any way we could provide this functionality for previous versions >> (9.6,10)? Like implement utility for offline checksum enabling, without >> WAL-logging, surely. > > While outside the scope of the patch in question (s

<    1   2