Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY

2019-11-07 Thread Michael Paquier
On Mon, Oct 28, 2019 at 05:17:52AM +, imai.yoshik...@fujitsu.com wrote: > According to the commit 3c8404649 [1], transactional update in > pg_index is not safe in non-MVCC catalog scans before PG9.4. > But it seems to me that we can use transactional update in pg_index > after the commit 813fb0

Re: Collation versioning

2019-11-07 Thread Michael Paquier
On Fri, Nov 08, 2019 at 02:23:54PM +1300, Thomas Munro wrote: > Right, so this is basically a policy decision: do we assume that all > pre-13 indexes that depend on collations are potentially corrupted, or > assume that they are not? The "correct" thing to do would be to > assume they are potentia

Re: Collation versioning

2019-11-07 Thread Thomas Munro
On Thu, Nov 7, 2019 at 1:27 AM Peter Eisentraut wrote: > As I was working on that lately, I came to the conclusion that we should > get *this* patch done first. Cool. Let's aim to get this into 13! > > * Some have expressed doubt that pg_depend is the right place for > > this; let's see if any

Re: Collation versioning

2019-11-07 Thread Thomas Munro
On Fri, Nov 8, 2019 at 2:37 PM Michael Paquier wrote: > On Fri, Nov 08, 2019 at 02:23:54PM +1300, Thomas Munro wrote: > > Right, so this is basically a policy decision: do we assume that all > > pre-13 indexes that depend on collations are potentially corrupted, or > > assume that they are not? T

Re: define bool in pgtypeslib_extern.h

2019-11-07 Thread Amit Kapila
On Fri, Nov 8, 2019 at 2:17 AM Tom Lane wrote: > > I wrote: > > I'm inclined to think that we need to make ecpglib.h's bool-related > > definitions exactly match c.h, which will mean that it has to pull in > > on most platforms, which will mean adding a control symbol > > for that to ecpg_config.

Re: Parallel leader process info in EXPLAIN

2019-11-07 Thread Thomas Munro
On Thu, Nov 7, 2019 at 11:37 PM Rafia Sabih wrote: > I was reviewing this patch and here are a few comments, Hi Rafia, Thanks! > +static void > +ExplainNodePerProcess(ExplainState *es, bool *opened_group, > + int worker_number, Instrumentation *instrument) > +{ > > A small description about th

Re: cost based vacuum (parallel)

2019-11-07 Thread Masahiko Sawada
On Wed, 6 Nov 2019 at 15:45, Amit Kapila wrote: > > On Tue, Nov 5, 2019 at 11:28 AM Amit Kapila wrote: > > > > On Mon, Nov 4, 2019 at 11:42 PM Andres Freund wrote: > > > > > > > > > > The two approaches to solve this problem being discussed in that > > > > thread [1] are as follows: > > > > (a)

Re: cost based vacuum (parallel)

2019-11-07 Thread Amit Kapila
On Fri, Nov 8, 2019 at 8:18 AM Masahiko Sawada wrote: > > On Wed, 6 Nov 2019 at 15:45, Amit Kapila wrote: > > > > On Tue, Nov 5, 2019 at 11:28 AM Amit Kapila wrote: > > > > > > On Mon, Nov 4, 2019 at 11:42 PM Andres Freund wrote: > > > > > > > > > > > > > The two approaches to solve this proble

Re: pg_waldump and PREPARE

2019-11-07 Thread Andrey Lepikhov
On 08/11/2019 05:53, Fujii Masao wrote: On Fri, Nov 8, 2019 at 9:41 AM Michael Paquier wrote: On Tue, Sep 03, 2019 at 10:00:08AM +0900, Fujii Masao wrote: Sorry for the long delay... Yes, I will update the patch if necessary. Fujii-san, are you planning to update this patch then? I have

Re: [proposal] recovery_target "latest"

2019-11-07 Thread Grigory Smolkin
On 11/7/19 4:36 PM, Grigory Smolkin wrote: On 11/7/19 12:56 PM, Kyotaro Horiguchi wrote: At Thu, 7 Nov 2019 12:22:28 +0300, Grigory Smolkin wrote in On 11/7/19 8:36 AM, Kyotaro Horiguchi wrote: At Thu, 7 Nov 2019 02:28:39 +0300, Grigory Smolkin wrote in On 11/6/19 1:55 PM, Grigory Smolkin

Re: cost based vacuum (parallel)

2019-11-07 Thread Dilip Kumar
On Fri, Nov 8, 2019 at 8:37 AM Amit Kapila wrote: >> On Fri, Nov 8, 2019 at 8:18 AM Masahiko Sawada > wrote: > > > > On Wed, 6 Nov 2019 at 15:45, Amit Kapila wrote: > > > > > > On Tue, Nov 5, 2019 at 11:28 AM Amit Kapila > > > wrote: > > > > > > > > On Mon, Nov 4, 2019 at 11:42 PM Andres Freun

Re: pg_waldump and PREPARE

2019-11-07 Thread Kyotaro Horiguchi
At Fri, 8 Nov 2019 09:53:07 +0900, Fujii Masao wrote in > On Fri, Nov 8, 2019 at 9:41 AM Michael Paquier wrote: > > > > On Tue, Sep 03, 2019 at 10:00:08AM +0900, Fujii Masao wrote: > > > Sorry for the long delay... Yes, I will update the patch if necessary. > > > > Fujii-san, are you planning to

Re: pg_waldump and PREPARE

2019-11-07 Thread Kyotaro Horiguchi
Hello. At Fri, 8 Nov 2019 08:23:41 +0500, Andrey Lepikhov wrote in > > Can I switch the status back to "Needs review"? > > Regards, > > > > One issue is that your patch provides small information. WAL errors > Investigation often requires information on xid, subxacts, > delete-on-abort/commit

Re: adding partitioned tables to publications

2019-11-07 Thread Amit Langote
Sorry about the delay. On Mon, Nov 4, 2019 at 8:00 PM Peter Eisentraut wrote: > This patch seems excessively complicated to me. Why don't you just add > the actual partitioned table to pg_publication_rel and then expand the > partition hierarchy in pgoutput (get_rel_sync_entry() or > GetRelation

Re: pg_waldump and PREPARE

2019-11-07 Thread Andrey Lepikhov
On 08/11/2019 09:26, Kyotaro Horiguchi wrote: Hello. At Fri, 8 Nov 2019 08:23:41 +0500, Andrey Lepikhov wrote in Can I switch the status back to "Needs review"? Regards, One issue is that your patch provides small information. WAL errors Investigation often requires information on xid,

RE: Planning counters in pg_stat_statements (using pgss_store)

2019-11-07 Thread imai.yoshik...@fujitsu.com
On Tue, Sept 10, 2019 at 11:27 PM, Julien Rouhaud wrote: > > [0002 patch] > > In pgss_planner_hook: > > > > + /* calc differences of buffer counters. */ > > + bufusage = compute_buffer_counters(bufusage_start, > > pgBufferUsage); > > + > > + /* > > +

Re: Reorderbuffer crash during recovery

2019-11-07 Thread vignesh C
On Thu, Nov 7, 2019 at 10:01 PM Andres Freund wrote: > > Hi, > > On 2019-11-07 17:03:44 +0530, Amit Kapila wrote: > > On Thu, Nov 7, 2019 at 4:48 PM Tomas Vondra > > wrote: > > > > > > I'm a bit confused - does this happen only with the logical_work_mem > > > patches, or with clean master too? >

Re: Collation versioning

2019-11-07 Thread Laurenz Albe
On Fri, 2019-11-08 at 15:04 +1300, Thomas Munro wrote: > So we have three proposals: > > 1. Assume that pre-13 indexes that depend on collations are > potentially corrupted and complain until they are reindexed. This > could be done by having pg_upgrade run ALTER INDEX ... DEPENDS ON > COLLATION

Re: Remove HeapTuple and Buffer dependency for predicate locking functions

2019-11-07 Thread Thomas Munro
On Thu, Aug 8, 2019 at 6:53 AM Ashwin Agrawal wrote: >>> - I wonder if CheckForSerializableConflictOutNeeded() shouldn't have a >>> portion of it's code as a static inline. In particular, it's a shame >>> that we currently perform external function calls at quite the >>> frequency when seria

Re: Minimal logical decoding on standbys

2019-11-07 Thread Amit Khandekar
On Thu, 7 Nov 2019 at 14:02, Rahila Syed wrote: > > Hi Amit, > > I am reading about this feature and reviewing it. > To start with, I reviewed the patch: > 0005-Doc-changes-describing-details-about-logical-decodin.patch. Thanks for picking up the patch review. Your reply somehow spawned a new m

Re: adding partitioned tables to publications

2019-11-07 Thread Amit Langote
Hello Rafia, On Tue, Nov 5, 2019 at 12:41 AM Rafia Sabih wrote: > On Fri, 11 Oct 2019 at 08:06, Amit Langote wrote: >> Thanks for sharing this case. I hadn't considered it, but you're >> right that it should be handled sensibly. I have fixed table sync >> code to handle this case properly. Co

Re: dropdb --force

2019-11-07 Thread Amit Kapila
On Thu, Nov 7, 2019 at 11:29 AM Pavel Stehule wrote: > čt 7. 11. 2019 v 6:56 odesílatel Amit Kapila napsal: >> >> Okay, no problem. I will pick the previous version and do this. I >> will post the patch in a day or so for your review. > > > Thank you very much > Did you get a chance to look at

Re: dropdb --force

2019-11-07 Thread Pavel Stehule
pá 8. 11. 2019 v 6:39 odesílatel Amit Kapila napsal: > On Thu, Nov 7, 2019 at 11:29 AM Pavel Stehule > wrote: > > čt 7. 11. 2019 v 6:56 odesílatel Amit Kapila > napsal: > >> > >> Okay, no problem. I will pick the previous version and do this. I > >> will post the patch in a day or so for your

Re: [Patch proposal] libpq portal support

2019-11-07 Thread Craig Ringer
On Thu, 7 Nov 2019 at 17:43, Sergei Fedorov wrote: > Hello everybody, > > Yes, we will be happy to put our patch under the PostgreSQL License. > > Patch is attached to this email, master was rebased to head prior to > creating the patch. > > We are using a C++ wrapper on top of libpq for using da

Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )

2019-11-07 Thread Yuya Watari
Hello Tom, Thank you for your comments. On Fri, Nov 8, 2019 at 1:30 AM Tom Lane wrote: > failure: not only did you fail to add any commentary about the new macros, > but you removed most of the commentary that had been in-line in the > existing usages. I apologize for the insufficient comments.

Re: [Patch proposal] libpq portal support

2019-11-07 Thread Craig Ringer
On Thu, 7 Nov 2019 at 17:43, Sergei Fedorov wrote: > Hello everybody, > > Yes, we will be happy to put our patch under the PostgreSQL License. > > Patch is attached to this email, master was rebased to head prior to > creating the patch. > > We are using a C++ wrapper on top of libpq for using da

Re: TestLib::command_fails_like enhancement

2019-11-07 Thread Craig Ringer
On Fri, 8 Nov 2019 at 06:28, Mark Dilger wrote: > > > On 10/31/19 10:02 AM, Andrew Dunstan wrote: > > > > This small patch authored by my colleague Craig Ringer enhances > > Testlib's command_fails_like by allowing the passing of extra keyword > > type arguments. The keyword initially recognized

Re: cost based vacuum (parallel)

2019-11-07 Thread Amit Kapila
On Fri, Nov 8, 2019 at 9:39 AM Dilip Kumar wrote: > > I have done some experiments on this line. I have first produced a > case where we can show the problem with the existing shared costing > patch (worker which is doing less I/O might pay the penalty on behalf > of the worker who is doing more

Handy describe_pg_lock function

2019-11-07 Thread Craig Ringer
Hi all I recently found the need to pretty-print the contents of pg_locks. So here's a little helper to do it, for anyone else who happens to have that need. pg_identify_object is far from adequate for the purpose. Reckon I should turn it into C and submit? CREATE FUNCTION describe_pg_lock(IN l

Re: SPI refactoring

2019-11-07 Thread Pavel Stehule
pá 8. 11. 2019 v 0:39 odesílatel Mark Dilger napsal: > Hackers, > > As discussed with Tom in [1] and again with Pavel and Alvaro in [2], > here is a partial WIP refactoring of the SPI interface. The goal is to > remove as many of the SPI_ERROR_xxx codes as possible from the > interface, replacin

Re: Refactor parse analysis of EXECUTE command

2019-11-07 Thread Pavel Stehule
út 5. 11. 2019 v 11:28 odesílatel Kyotaro Horiguchi napsal: > Hello. > > At Mon, 4 Nov 2019 08:53:18 +0100, Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote in > > On 2019-11-02 16:00, Tom Lane wrote: > > > Peter Eisentraut writes: > > >> This patch moves the parse analysis component

Re: Exposure related to GUC value of ssl_passphrase_command

2019-11-07 Thread Amit Langote
Hello. On Tue, Nov 5, 2019 at 5:15 PM Moon, Insung wrote: > Deal Hackers. > > The value of ssl_passphrase_command is set so that an external command > is called when the passphrase for decrypting an SSL file such as a > private key is obtained. > Therefore, easily set to work with echo "passphras

Re: Refactor parse analysis of EXECUTE command

2019-11-07 Thread Pavel Stehule
po 4. 11. 2019 v 8:53 odesílatel Peter Eisentraut < peter.eisentr...@2ndquadrant.com> napsal: > On 2019-11-02 16:00, Tom Lane wrote: > > Peter Eisentraut writes: > >> This patch moves the parse analysis component of ExecuteQuery() and > >> EvaluateParams() into a new transformExecuteStmt() that i

Re: Refactor parse analysis of EXECUTE command

2019-11-07 Thread Peter Eisentraut
On 2019-11-08 08:13, Pavel Stehule wrote: I dug into repository and found that transformExecuteStmt existed at the time of implementing PREPARE-EXECUTE statements(28e82066a1) and removed by the commit b9527e9840 which is related to plan-invalidation. git show -s --format=%B b

Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.

2019-11-07 Thread Gilles Darold
Le 07/11/2019 à 11:52, Etsuro Fujita a écrit : > Horiguchi-san, > > On Thu, Nov 7, 2019 at 5:31 PM Kyotaro Horiguchi > wrote: >> I forgot to mention that the comment in XACT_EVENT_PRE_PREPARE >> contains the same mistake and needs more or less the same fix. > Good catch! How about rewriting "We d

<    1   2