Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-02-10 Thread Julien Rouhaud
On Tue, Feb 11, 2020 at 10:57:26AM +0800, Andy Fan wrote: > On Tue, Feb 11, 2020 at 12:22 AM Ashutosh Bapat < > ashutosh.bapat@gmail.com> wrote: > > > I forgot to mention this in the last round of comments. Your patch was > > actually removing distictClause from the Query structure. Please

Add PostgreSQL home page to --help output

2020-02-10 Thread Peter Eisentraut
Example: initdb --help ... Report bugs to . PostgreSQL home page: I think this is useful. You see this nowadays in other packages as well. See also for a reference. Autoconf already has a

[PATCH] Sanity check BackgroundWorker's function entry

2020-02-10 Thread Adam Lee
Hi, I get the error `can not find file ""` when I hack the bgworkers, the root case is a zero initialized bgworker was registered. It's not interesting, but I'd like to refine the error message a bit. Thanks. -- Adam Lee >From 5f78d92b2c2b9ed0b3cbfdfe09e1461fbe05196d Mon Sep 17 00:00:00 2001

Re: Getting rid of some more lseek() calls

2020-02-10 Thread Thomas Munro
On Fri, Feb 7, 2020 at 1:37 PM Andres Freund wrote: > Hm. This still leaves us with one source of SLRU_SEEK_FAILED. And that's > really just for getting the file size. Should we rename that? > > Perhaps we should just replace lseek(SEEK_END) with fstat()? Or at least > one wrapper function for

Improve heavyweight locks instead of building new lock managers?

2020-02-10 Thread Andres Freund
Hi, I started this as a reply to https://www.postgresql.org/message-id/CAA4eK1JMgUfiTdAgr9k3nA4cdKvvruousKBg7FWTDNzQgBpOZA%40mail.gmail.com but the email seemed to morph into distinct topic that I thought it best to separate out. We've had a number of cases where heavyweight locks turned out to

Re: Transactions involving multiple postgres foreign servers, take 2

2020-02-10 Thread amul sul
On Fri, Jan 24, 2020 at 11:31 AM Masahiko Sawada < masahiko.saw...@2ndquadrant.com> wrote: > On Fri, 6 Dec 2019 at 17:33, Kyotaro Horiguchi > wrote: > > > > Hello. > > > > This is the reased (and a bit fixed) version of the patch. This > > applies on the master HEAD and passes all provided

Re: POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Craig Ringer
On Tue, 11 Feb 2020 at 03:07, Alexander Korotkov wrote: > > Hi! > > In Postgres Pro we have complaints about too large core dumps. The > possible way to reduce code dump size is to skip some information. > Frequently shared buffers is most long memory segment in core dump. > For sure, contents

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-02-10 Thread Andy Fan
On Tue, Feb 11, 2020 at 12:22 AM Ashutosh Bapat < ashutosh.bapat@gmail.com> wrote: > > >> >> [PATCH] Erase the distinctClause if the result is unique by >> definition >> > > I forgot to mention this in the last round of comments. Your patch was > actually removing distictClause from the

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

2020-02-10 Thread Amit Kapila
On Wed, Feb 5, 2020 at 12:07 PM Masahiko Sawada wrote: > > > Unfortunately the environment I used for performance verification is > no longer available. > > I agree to run this test in a different environment. I've attached the > rebased version patch. I'm measuring the performance with/without >

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

2020-02-10 Thread Amit Kapila
On Mon, Feb 10, 2020 at 10:28 PM Mahendra Singh Thalor wrote: > > On Sat, 8 Feb 2020 at 00:27, Mahendra Singh Thalor wrote: > > > > On Thu, 6 Feb 2020 at 09:44, Amit Kapila wrote: > > > > > > > > > The number at 56 and 74 client count seem slightly suspicious. Can > > > you please repeat

Re: Internal key management system

2020-02-10 Thread Andres Freund
Hi, On 2020-02-08 12:07:57 -0500, Tom Lane wrote: > For the same reason, I don't think that an "internal key management" > feature in the core code is ever going to be acceptable. It has to > be an extension. (But, as long as it's an extension, whether it's > bringing its own crypto or relying

Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-10 Thread Ranier Vilela
Em seg., 10 de fev. de 2020 às 10:53, Craig Ringer escreveu: > On Mon, 10 Feb 2020 at 20:14, Ranier Vilela wrote: > > > > "adminpack.obj : error LNK2019: sφmbolo externo indefinido > _Int64GetDatum referenciado na funτπo _pg_file_write > [C:\dll\postgres\adminpack.vcxproj] > >

Re: Restore replication settings when modifying a field type

2020-02-10 Thread Quan Zongliang
On 2020/1/15 08:30, Quan Zongliang wrote: On 2020/1/3 17:14, Peter Eisentraut wrote: On 2019-11-01 04:39, Euler Taveira wrote: ATExecAlterColumnType records everything that depends on the column and for indexes it saves the definition (via pg_get_indexdef_string). Definition is not sufficient

Re: subplan resets wrong hashtable

2020-02-10 Thread Tom Lane
Justin Pryzby writes: > On Sun, Feb 09, 2020 at 08:01:26PM -0800, Andres Freund wrote: >> Ugh, that indeed looks wrong. Did you check whether it can actively >> cause wrong query results? If so, did you do theoretically, or got to a >> query returning wrong results? > Actually .. I can

Re: pgsql: walreceiver uses a temporary replication slot by default

2020-02-10 Thread Andres Freund
Hi, On 2020-02-10 16:46:04 +0100, Peter Eisentraut wrote: > On 2020-01-22 06:55, Michael Paquier wrote: > > In the thread about switching primary_conninfo to be reloadable, we > > have argued at great lengths that we should never have the WAL > > receiver fetch by itself the GUC parameters used

Re: POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Andres Freund
Hi, On 2020-02-10 18:21:30 -0300, Alvaro Herrera wrote: > On 2020-Feb-10, Andres Freund wrote: > > > Hi, > > > > On 2020-02-10 17:31:47 -0300, Alvaro Herrera wrote: > > > Yeah. Maybe we should file bug reports against downstream packages to > > > include a corefilter tweak. > > > > Hm, I'm

Re: Print physical file path when checksum check fails

2020-02-10 Thread Andres Freund
HHi, On 2020-02-10 16:04:21 +0800, Hubert Zhang wrote: > Currently we only print block number and relation path when checksum check > fails. See example below: > > ERROR: invalid page in block 333571 of relation base/65959/656195 > DBA complains that she needs additional work to calculate which

Re: POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Alvaro Herrera
On 2020-Feb-10, Andres Freund wrote: > Hi, > > On 2020-02-10 17:31:47 -0300, Alvaro Herrera wrote: > > Yeah. Maybe we should file bug reports against downstream packages to > > include a corefilter tweak. > > Hm, I'm not sure that's a reasonable way to scale things. Nor am I > really sure

Re: POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Andres Freund
Hi, On 2020-02-10 17:31:47 -0300, Alvaro Herrera wrote: > Yeah. Maybe we should file bug reports against downstream packages to > include a corefilter tweak. Hm, I'm not sure that's a reasonable way to scale things. Nor am I really sure that's the right granularity. > My development helper

Re: POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Alvaro Herrera
On 2020-Feb-10, Andres Freund wrote: > Have you considered postmaster (or even just the GUC processing in each > process) adjusting /proc/self/coredump_filter instead? > > From the man page: > >The value in the file is a bit mask of memory mapping types (see > mmap(2)). If a bit is

Re: POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Andres Freund
Hi, On 2020-02-10 22:07:13 +0300, Alexander Korotkov wrote: > In Postgres Pro we have complaints about too large core dumps. I've seen those too, and I've had them myself. It's pretty frustrating if a core dump makes the machine unusable for half an hour while said coredump is being written

Re: Index Skip Scan

2020-02-10 Thread Dmitry Dolgov
> On Sat, Feb 08, 2020 at 01:31:02PM -0500, James Coleman wrote: > On Sat, Feb 8, 2020 at 10:24 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > > > On Sat, Feb 08, 2020 at 03:22:17PM +0100, Tomas Vondra wrote: > > > So in this case the skip scan is ~15x slower than the usual plan (index > >

POC: GUC option for skipping shared buffers in core dumps

2020-02-10 Thread Alexander Korotkov
Hi! In Postgres Pro we have complaints about too large core dumps. The possible way to reduce code dump size is to skip some information. Frequently shared buffers is most long memory segment in core dump. For sure, contents of shared buffers is required for discovering many of bugs. But short

Re: proposal: schema variables

2020-02-10 Thread Pavel Stehule
pá 7. 2. 2020 v 17:09 odesílatel Pavel Stehule napsal: > Hi > > rebase > > Regards > > Pavel > Hi another rebase, fix \dV statement (for 0001 patch) Regards Pavel 0002-transactional-variables-20200210.patch.gz Description: application/gzip 0001-schema-var

Re: Simplify passing of configure arguments to pg_config

2020-02-10 Thread Peter Eisentraut
On 2019-12-22 14:56, Peter Eisentraut wrote: There is also the weird difference with how the MSVC build system handles it. It appends VAL_CONFIGURE to pg_config.h instead of passing it on the command line. Here is an updated version of the patch after the removal of pg_config.h.win32. It's

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Luís Roberto Weck
Em 10/02/2020 13:46, Jonathan S. Katz escreveu: Hi, Attached is a draft for the 2020-02-13 press release. I would appreciate any review for accuracy, notable omissions, and the inevitable typos I tend to have on drafts (even though I do run it through a spell checker). There were over 75 fixes,

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Jonathan S. Katz
On 2/10/20 12:23 PM, Alvaro Herrera wrote: > On 2020-Feb-10, Jonathan S. Katz wrote: > >> * Several figures for GSSAPI support, including having libpq accept all >> GSS-related connection parameters even if the GSSAPI code is not compiled in. > > "figures"? "figures" I have a typo ;) Fixed to

Re: Yet another vectorized engine

2020-02-10 Thread Pavel Stehule
po 10. 2. 2020 v 18:20 odesílatel Konstantin Knizhnik < k.knizh...@postgrespro.ru> napsal: > I have done some performance comparisons. > First of all I failed to run vectorized version of Q1 with master branch > of your repository and > PG9_6_STABLE branch of Postgres: > > NOTICE: query can't be

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-02-10 Thread Tom Lane
Ashutosh Bapat writes: >> On Sat, Feb 8, 2020 at 12:53 PM Andy Fan wrote: >> Do you mean adding some information into PlannerInfo, and when we create >> a node for Unique/HashAggregate/Group, we can just create a dummy node? > Not so much as PlannerInfo but something on lines of PathKey. See

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Alvaro Herrera
On 2020-Feb-10, Jonathan S. Katz wrote: > * Several figures for GSSAPI support, including having libpq accept all > GSS-related connection parameters even if the GSSAPI code is not compiled in. "figures"? > If you had previously executed `TRUNCATE .. CASCADE` on a sub-partition of a >

Re: Yet another vectorized engine

2020-02-10 Thread Konstantin Knizhnik
I have done some performance comparisons. First of all I failed to run vectorized version of Q1 with master branch of your repository and PG9_6_STABLE branch of Postgres: NOTICE:  query can't be vectorized DETAIL:  Non plain agg is not supported I have to switch to pg96 branch. Results

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Jonathan S. Katz
On 2/10/20 12:03 PM, Sehrope Sarkuni wrote: > Typo in 9.4 retirement message: > > s/is it time to retire/it is time to retire/ Heh, we definitely don't want that to be a question :) Fixed on my local copy, thanks! Jonathan signature.asc Description: OpenPGP digital signature

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Jonathan S. Katz
On 2/10/20 11:55 AM, Erik Rijkers wrote: > On 2020-02-10 17:46, Jonathan S. Katz wrote: >> Hi, >> >> Attached is a draft for the 2020-02-13 press release. I would appreciate > > A small typo: > > 'many of which have receive improvements'   should be > 'many of which have received improvements'

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Sehrope Sarkuni
Typo in 9.4 retirement message: s/is it time to retire/it is time to retire/ Regards, -- Sehrope Sarkuni Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

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

2020-02-10 Thread Mahendra Singh Thalor
On Sat, 8 Feb 2020 at 00:27, Mahendra Singh Thalor wrote: > > On Thu, 6 Feb 2020 at 09:44, Amit Kapila wrote: > > > > On Thu, Feb 6, 2020 at 1:57 AM Mahendra Singh Thalor wrote: > > > > > > On Wed, 5 Feb 2020 at 12:07, Masahiko Sawada wrote: > > > > > > > > On Mon, Feb 3, 2020 at 8:03 PM Amit

Re: 2020-02-13 Press Release Draft

2020-02-10 Thread Erik Rijkers
On 2020-02-10 17:46, Jonathan S. Katz wrote: Hi, Attached is a draft for the 2020-02-13 press release. I would appreciate A small typo: 'many of which have receive improvements' should be 'many of which have received improvements'

Re: Global temporary tables

2020-02-10 Thread Konstantin Knizhnik
Sorry, small typo in the last patch. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/contrib/pg_prewarm/pg_prewarm.c b/contrib/pg_prewarm/pg_prewarm.c index 33e2d28..93059ef 100644 --- a/contrib/pg_prewarm/pg_prewarm.c +++

2020-02-13 Press Release Draft

2020-02-10 Thread Jonathan S. Katz
Hi, Attached is a draft for the 2020-02-13 press release. I would appreciate any review for accuracy, notable omissions, and the inevitable typos I tend to have on drafts (even though I do run it through a spell checker). There were over 75 fixes, so paring the list down was a bit tricky, and I

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-02-10 Thread Ashutosh Bapat
On Sat, Feb 8, 2020 at 12:53 PM Andy Fan wrote: > Hi Ashutosh: >Thanks for your time. > > On Fri, Feb 7, 2020 at 11:54 PM Ashutosh Bapat < > ashutosh.bapat@gmail.com> wrote: > >> Hi Andy, >> What might help is to add more description to your email message like >> giving examples to

Re: Is it memory leak or not?

2020-02-10 Thread Dmitry Igrishin
On Mon, 10 Feb 2020, 18:59 Tom Lane, wrote: > Dmitry Igrishin writes: > > Maybe I'm wrong, but anychar_typmodin() of > > src/backend/utils/adt/varchar.c of PostgreSQL 12.1 does not pfree()s > > the memory allocated by ArrayGetIntegerTypmods(). Probably, I'm > > missing something. Could anybody

Re: Is it memory leak or not?

2020-02-10 Thread Tom Lane
Dmitry Igrishin writes: > Maybe I'm wrong, but anychar_typmodin() of > src/backend/utils/adt/varchar.c of PostgreSQL 12.1 does not pfree()s > the memory allocated by ArrayGetIntegerTypmods(). Probably, I'm > missing something. Could anybody please clarify on that? It is a leak, in the sense that

Re: pgsql: walreceiver uses a temporary replication slot by default

2020-02-10 Thread Peter Eisentraut
On 2020-01-22 06:55, Michael Paquier wrote: In the thread about switching primary_conninfo to be reloadable, we have argued at great lengths that we should never have the WAL receiver fetch by itself the GUC parameters used for the connection with its primary. Here is the main area of the

Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf

2020-02-10 Thread Alvaro Herrera
On 2020-Feb-10, Fujii Masao wrote: > > > On 2020/02/10 17:23, Sergei Kornilov wrote: > > Hello > > > > Seems bug was introduced in caba97a9d9f4d4fa2531985fd12d3cd823da06f3 - in > > HEAD only > > > > In REL_12_STABLE we have: > > > > boolis_recovery_guc_supported = true; > >

Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf

2020-02-10 Thread Alvaro Herrera
On 2020-Feb-10, Alvaro Herrera wrote: > On 2020-Feb-10, Fujii Masao wrote: > > Yes! Thanks for pointing out that! > > So the patch needs to be applied only in master. > > Yikes, thanks. Pushing in a minute. Actually, if you want to push it, be my guest. -- Álvaro Herrera

Is it memory leak or not?

2020-02-10 Thread Dmitry Igrishin
Hello, Maybe I'm wrong, but anychar_typmodin() of src/backend/utils/adt/varchar.c of PostgreSQL 12.1 does not pfree()s the memory allocated by ArrayGetIntegerTypmods(). Probably, I'm missing something. Could anybody please clarify on that? Thanks!

Re: logical copy_replication_slot issues

2020-02-10 Thread Arseny Sher
Masahiko Sawada writes: > I've attached the draft patch fixing this issue but I'll continue > investigating it more deeply. There also should be a check that source slot itself has consistent snapshot (valid confirmed_flush) -- otherwise it might be possible to create not initialized slot

Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-10 Thread Craig Ringer
On Mon, 10 Feb 2020 at 20:14, Ranier Vilela wrote: > > "adminpack.obj : error LNK2019: sφmbolo externo indefinido _Int64GetDatum > referenciado na funτπo _pg_file_write [C:\dll\postgres\adminpack.vcxproj] > .\Release\adminpack\adminpack.dll : fatal error LNK1120: 1 externo nπo > resolvidos

Re: WIP/PoC for parallel backup

2020-02-10 Thread Jeevan Chalke
Hi Asif, On Thu, Jan 30, 2020 at 7:10 PM Asif Rehman wrote: > > Here are the the updated patches, taking care of the issues pointed > earlier. This patch adds the following commands (with specified option): > > START_BACKUP [LABEL ''] [FAST] > STOP_BACKUP [NOWAIT] > LIST_TABLESPACES [PROGRESS]

Re: Is custom MemoryContext prohibited?

2020-02-10 Thread Craig Ringer
On Mon, 10 Feb 2020 at 21:19, Kohei KaiGai wrote: > > 2020年2月10日(月) 13:53 Craig Ringer : > > > > On Thu, 6 Feb 2020 at 11:09, Andres Freund wrote: > > > > > I wasn't advocating for making plannodes.h etc frontend usable. I think > > > that's a fairly different discussion than making enum

Re: Is custom MemoryContext prohibited?

2020-02-10 Thread Kohei KaiGai
2020年2月10日(月) 13:53 Craig Ringer : > > On Thu, 6 Feb 2020 at 11:09, Andres Freund wrote: > > > I wasn't advocating for making plannodes.h etc frontend usable. I think > > that's a fairly different discussion than making enum NodeTag, > > pg_list.h, memutils.h available. I don't see them having

Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf

2020-02-10 Thread Magnus Hagander
On Mon, Feb 10, 2020 at 9:41 AM Fujii Masao wrote: > > > > On 2020/02/10 17:23, Sergei Kornilov wrote: > > Hello > > > > Seems bug was introduced in caba97a9d9f4d4fa2531985fd12d3cd823da06f3 - in > > HEAD only > > > > In REL_12_STABLE we have: > > > > bool

Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-10 Thread Ranier Vilela
Hi guys, thank you for the answers. Em seg., 10 de fev. de 2020 às 03:38, Michael Paquier escreveu: > On Mon, Feb 10, 2020 at 11:55:09AM +0800, Craig Ringer wrote: > > I don't see any other members building for 32-bit. But it should work > > and as you say, nothing's been discussed about

Re: Just for fun: Postgres 20?

2020-02-10 Thread Wolfgang Wilhelm
And nobody is asking about all the "missing" versions like in a big red superstitious database. Am Montag, 10. Februar 2020, 00:45:02 MEZ hat tsunakawa.ta...@fujitsu.com Folgendes geschrieben: From: Jose Luis Tallon >      Musing some other date-related things I stumbled upon the

[PATCH] Comments related to "Take fewer snapshots" and "Revert patch for taking fewer snapshots"

2020-02-10 Thread Michail Nikolaev
Hello, hackers. Yesterday I have noticed that in simple protocol mode snapshot is taken twice - first time for parsing/analyze and later for execution. I was thinking it is a great idea to reuse the same snapshot. After some time (not short) I was able to find this thread from 2011 with exactly

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-02-10 Thread Dilip Kumar
On Mon, Feb 10, 2020 at 1:52 PM Amit Kapila wrote: > > On Fri, Feb 7, 2020 at 4:18 PM Dilip Kumar wrote: > > > > On Wed, Feb 5, 2020 at 4:05 PM Amit Kapila wrote: > > > > > > On Wed, Feb 5, 2020 at 9:46 AM Dilip Kumar wrote: > > > > > > > > Fixed in the latest version sent upthread. > > > > >

RE: [PoC] Non-volatile WAL buffer

2020-02-10 Thread Takashi Menjo
Dear hackers, I made another WIP patchset to mmap WAL segments as WAL buffers. Note that this is not a non-volatile WAL buffer patchset but its competitor. I am measuring and analyzing the performance of this patchset to compare with my N.V.WAL buffer. Please wait for a several more days

RE: Delaying/avoiding BTreeTupleGetNAtts() call within _bt_compare()

2020-02-10 Thread Floris Van Nee
> > The interesting thing now is the role of the "negative infinity test" > patch (the 0003-* patch) in all of this. I suspect that it may not be helping > us > much here. I wonder, could you test the following configurations to settle > this question? > > * with 30 clients (i.e. repeat the

Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf

2020-02-10 Thread Fujii Masao
On 2020/02/10 17:23, Sergei Kornilov wrote: Hello Seems bug was introduced in caba97a9d9f4d4fa2531985fd12d3cd823da06f3 - in HEAD only In REL_12_STABLE we have: boolis_recovery_guc_supported = true; if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_RECOVERY_GUC)

Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf

2020-02-10 Thread Sergei Kornilov
Hello Seems bug was introduced in caba97a9d9f4d4fa2531985fd12d3cd823da06f3 - in HEAD only In REL_12_STABLE we have: boolis_recovery_guc_supported = true; if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_RECOVERY_GUC) is_recovery_guc_supported =

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-02-10 Thread Amit Kapila
On Fri, Feb 7, 2020 at 4:18 PM Dilip Kumar wrote: > > On Wed, Feb 5, 2020 at 4:05 PM Amit Kapila wrote: > > > > On Wed, Feb 5, 2020 at 9:46 AM Dilip Kumar wrote: > > > > > > Fixed in the latest version sent upthread. > > > > > > > Okay, thanks. I haven't looked at the latest version of patch

Print physical file path when checksum check fails

2020-02-10 Thread Hubert Zhang
Hi hacker, Currently we only print block number and relation path when checksum check fails. See example below: ERROR: invalid page in block 333571 of relation base/65959/656195 DBA complains that she needs additional work to calculate which physical file is broken, since one physical file can