Re: TRUNCATE on foreign tables

2020-01-05 Thread Michael Paquier
On Thu, Jan 02, 2020 at 09:46:44AM -0500, Stephen Frost wrote: > I agree that the FDW callback should support multiple tables in the > TRUNCATE, but I think it also should include CASCADE as an option and > have that be passed on to the FDW to handle. As much as RESTRICT, ONLY and the INDENTITY

Re: Patch to document base64 encoding

2020-01-05 Thread Karl O. Pinc
Hello Fabien, On Sun, 5 Jan 2020 12:48:59 +0100 (CET) Fabien COELHO wrote: > I'm in favor of moving and reorganizing these function descriptions, > as they are somehow scattered with a unclear logic when you are > looking for them. I assume by this you mean you are happy with the organization

Re: error context for vacuum to include block number (atomic progress update)

2020-01-05 Thread Michael Paquier
On Sun, Dec 29, 2019 at 02:17:47PM -0600, Justin Pryzby wrote: > The behavior is different from before, but I think that's ok: the number of > scans is accurate, and the PHASE is accurate, even though it'll change a > moment > later. pgstat_progress_update_multi_param() is useful when it comes

Re: color by default

2020-01-05 Thread Gavin Flower
On 06/01/2020 18:38, Michael Paquier wrote: On Fri, Jan 03, 2020 at 01:10:30PM -0500, Robert Haas wrote: On Thu, Jan 2, 2020 at 6:38 PM Gavin Flower wrote: I find coloured output very difficult to read, as the colours seem to be chosen on the basis everyone uses white as the background colour

Re: Add pg_file_sync() to adminpack

2020-01-05 Thread Michael Paquier
On Mon, Jan 06, 2020 at 03:20:13PM +0900, Arthur Zakirov wrote: > It isn't case if a file doesn't exist. But if there are no permissions on > the file: > > PANIC: could not open file "testfile": Permissions denied > server closed the connection unexpectedly > > It could be fixed by implementing

Re: remove some STATUS_* symbols

2020-01-05 Thread Michael Paquier
On Sun, Dec 29, 2019 at 11:33:34AM +0100, Peter Eisentraut wrote: > Attached are two patches to remove these two symbols. STATUS_FOUND can be > replaced by a simple bool. STATUS_WAITING is replaced by a separate enum. Patch 0001 looks good to me, but I got to wonder why the check after waitMask

Re: parallel vacuum options/syntax

2020-01-05 Thread Masahiko Sawada
On Sun, 5 Jan 2020 at 23:28, Amit Kapila wrote: > > On Sun, Jan 5, 2020 at 7:38 PM Masahiko Sawada > wrote: > > > > On Sun, 5 Jan 2020 at 22:39, Tomas Vondra > > wrote: > > > > > > > > > So if we think we need an option to determine vacuum parallel degree, we > > > should have an option to

Re: Add pg_file_sync() to adminpack

2020-01-05 Thread Arthur Zakirov
Hello, On 2019/12/25 23:12, Julien Rouhaud wrote: On Wed, Dec 25, 2019 at 2:01 PM Fujii Masao wrote: Hi, I'd like to propose to add pg_file_sync() function into contrib/adminpack. This function fsyncs the specified file or directory named by its argument. IMO this is useful, for example,

Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes

2020-01-05 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> I haven't found an explanation in this thread why it does always quote >> now. That seems a bit unusual. Is there a reason for this? Can we do >> without it? > The core problem we're trying to solve is stated in the thread title: > ... > It'd be

Re: Setting min/max TLS protocol in clientside libpq

2020-01-05 Thread Michael Paquier
On Thu, Jan 02, 2020 at 09:46:44PM +, cary huang wrote: > I agree with Arthur that it makes sense to check the validity of > "conn->sslmaxprotocolversion" first before checking if it is larger > than "conn->sslminprotocolversion" Here I don't agree. Why not just let OpenSSL handle things

Re: color by default

2020-01-05 Thread Michael Paquier
On Fri, Jan 03, 2020 at 01:10:30PM -0500, Robert Haas wrote: > On Thu, Jan 2, 2020 at 6:38 PM Gavin Flower > wrote: >> I find coloured output very difficult to read, as the colours seem to be >> chosen on the basis everyone uses white as the background colour for >> terminals -- whereas I use

Re: [Proposal] Global temporary tables

2020-01-05 Thread 曾文旌(义从)
In the previous communication 1 we agreed on the general direction 1.1 gtt use local (private) buffer 1.2 no replica access in first version 2 We feel that gtt needs to maintain statistics, but there is no agreement on what it will be done. 3 Still no one commented on GTT's transaction

Re: doc: alter table references bogus table-specific planner parameters

2020-01-05 Thread Simon Riggs
On Mon, 6 Jan 2020 at 04:13, Justin Pryzby wrote: > > > I agree with the sentiment of the third doc change, but your patch > removes > > the mention of n_distinct, which isn't appropriate. > > I think it's correct to remove n_distinct there, as it's documented > previously, > since e5550d5f.

Re: doc: alter table references bogus table-specific planner parameters

2020-01-05 Thread Justin Pryzby
On Mon, Jan 06, 2020 at 03:48:52AM +, Simon Riggs wrote: > On Mon, 6 Jan 2020 at 02:56, Justin Pryzby wrote: > > > commit 6f3a13ff058f15d565a30c16c0c2cb14cc994e42 Enhance docs for ALTER > > TABLE lock levels of storage parms > > Author: Simon Riggs > > Date: Mon Mar 6 16:48:12 2017 +0530

Re: [PATCH] Increase the maximum value track_activity_query_size

2020-01-05 Thread Michael Paquier
On Fri, Jan 03, 2020 at 01:48:56PM -0500, Tom Lane wrote: > Robert Haas writes: >> I vote for not trying to make this more complicated and just accepting >> the original proposal. It's about a factor of ten increase over the >> limit we have right now, which doesn't seem like enough to cause any

Re:could not access status of transaction

2020-01-05 Thread chenhj
Hi, This database has not had the same failure again 2019/09/16(reported at 2019/09/29), so this is a very low probability failure, but it is uncertain whether it will happen again in the future. Now add some information for incident at 2019/09/16, may be useful for analyze the cause of this

Re: Removal of support for OpenSSL 0.9.8 and 1.0.0

2020-01-05 Thread Michael Paquier
On Fri, Jan 03, 2020 at 10:57:54PM +0100, Daniel Gustafsson wrote: > LGTM, switching to ready for committer. Thanks Daniel. I have looked at that stuff again, and committed the patch. -- Michael signature.asc Description: PGP signature

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

2020-01-05 Thread Dilip Kumar
On Sat, Jan 4, 2020 at 4:07 PM Amit Kapila wrote: > > On Mon, Dec 30, 2019 at 3:11 PM Dilip Kumar wrote: > > > > On Thu, Dec 12, 2019 at 9:44 AM Dilip Kumar wrote: > > > > > Yesterday, Tomas has posted the latest version of the patch set which > > contain the fix for schema send part.

Re: doc: alter table references bogus table-specific planner parameters

2020-01-05 Thread Simon Riggs
On Mon, 6 Jan 2020 at 02:56, Justin Pryzby wrote: > commit 6f3a13ff058f15d565a30c16c0c2cb14cc994e42 Enhance docs for ALTER > TABLE lock levels of storage parms > Author: Simon Riggs > Date: Mon Mar 6 16:48:12 2017 +0530 > > > SET ( class="PARAMETER">storage_parameter =

doc: alter table references bogus table-specific planner parameters

2020-01-05 Thread Justin Pryzby
commit 6f3a13ff058f15d565a30c16c0c2cb14cc994e42 Enhance docs for ALTER TABLE lock levels of storage parms Author: Simon Riggs Date: Mon Mar 6 16:48:12 2017 +0530 SET ( storage_parameter = value [, ... ] ) ... - Changing fillfactor and autovacuum storage parameters acquires a

Re: Removal of support for OpenSSL 0.9.8 and 1.0.0

2020-01-05 Thread Michael Paquier
On Thu, Jan 02, 2020 at 09:22:47AM -0500, Tom Lane wrote: > FWIW, I'm not sure I see why there's a connection between moving up > the minimum Python version and minimum OpenSSL version. Nobody is > installing bleeding-edge Postgres on RHEL5, not even me ;-), so I > don't especially buy Peter's

Re: Commit fest manager for 2020-01

2020-01-05 Thread Michael Paquier
On Sun, Jan 05, 2020 at 04:55:18AM +0100, Tomas Vondra wrote: > On Sat, Jan 04, 2020 at 06:19:33PM -0500, Tom Lane wrote: >> I'd say you're it, since you volunteered first; > > OK Sounds like a plan then. > I'm not against doing that, but I don't know how to split the work. You could also be

Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema

2020-01-05 Thread Michael Paquier
On Sun, Dec 29, 2019 at 07:37:15AM -0500, Robert Haas wrote: > I think this was a bad idea and that it should be reverted. It seems > to me that the problem here is that you introduced a feature which had > a bug, namely that it couldn't tolerate concurrency, and when somebody > discovered the

RE: Libpq support to connect to standby server as priority

2020-01-05 Thread tsunakawa.ta...@fujitsu.com
From: Alvaro Herrera > So, we can know whether server is primary/standby by checking > in_recovery, as opposed to knowing whether read-write which is done by > checking transaction_read_only. So we can keep read-write as a synonym > for "primary", and check in_recovery when used in servers that

Re: Removing pg_pltemplate and creating "trustable" extensions

2020-01-05 Thread Tom Lane
I wrote: > The cfbot noticed that a couple of patches committed this week > created (trivial) conflicts with this patchset. Here's a v3 > rebased up to HEAD; no interesting changes. The 2020 copyright update broke this patchset again. Here's a rebase. No changes except for some minor

Re: [Proposal] Global temporary tables

2020-01-05 Thread Tomas Vondra
Hi, I think we need to do something with having two patches aiming to add global temporary tables: [1] https://commitfest.postgresql.org/26/2349/ [2] https://commitfest.postgresql.org/26/2233/ As a reviewer I have no idea which of the threads to look at - certainly not without reading both

Re: WIP: System Versioned Temporal Table

2020-01-05 Thread legrand legrand
Vik Fearing-4 wrote > On 05/01/2020 16:01, legrand legrand wrote: > > > No, that is incorrect.  The standard syntax is: > > >     FROM tablename FOR SYSTEM_TIME AS OF '...' > >     FROM tablename FOR SYSTEM_TIME BETWEEN '...' AND '...' > >     FROM tablename FOR SYSTEM_TIME FROM '...' TO

Re: Rethinking opclass member checks and dependency strength

2020-01-05 Thread Tomas Vondra
On Sun, Jan 05, 2020 at 12:33:10PM -0500, Tom Lane wrote: Tomas Vondra writes: The latest version of this patch (from 2019/09/14) no longer applies, although maybe it's some issue with patch format (applying it using patch works fine, git am fails with "Patch format detection failed."). Hm,

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-01-05 Thread Julien Rouhaud
On Sun, Jan 5, 2020 at 7:02 PM legrand legrand wrote: > > Julien Rouhaud wrote > > On Sun, Jan 5, 2020 at 4:11 PM legrand legrand > > > > > legrand_legrand@ > > > wrote: > >> > >> Hi Julien, > >> > >> I would like to create a link with > >> https://www.postgresql.org/message-id/ > > >

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-05 Thread Tom Lane
I wrote: > Indeed. It appears that recent libedit breaks tab-completion for > words involving a backslash, which is the fault of this upstream > commit: > http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/filecomplete.c.diff?r1=1.52=1.53 > Basically what that's doing is applying de-backslashing

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-01-05 Thread legrand legrand
Julien Rouhaud wrote > On Sun, Jan 5, 2020 at 4:11 PM legrand legrand > > legrand_legrand@ > wrote: >> >> Hi Julien, >> >> I would like to create a link with >> https://www.postgresql.org/message-id/ > 1577490124579-0.post@.nabble >> >> where we met an ASSET FAILURE because query text was

Re: Rethinking opclass member checks and dependency strength

2020-01-05 Thread Tom Lane
Tomas Vondra writes: > The latest version of this patch (from 2019/09/14) no longer applies, > although maybe it's some issue with patch format (applying it using > patch works fine, git am fails with "Patch format detection failed."). Hm, seems to be just a trivial conflict against the

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-05 Thread Dagfinn Ilmari Mannsåker
On 5 January 2020 16:38:36 GMT, Tom Lane wrote: >ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >> Here's one final style cleanup for the TAP test. > >LGTM, pushed. Thanks! >One minor note: you wanted to change the \DRD test to > >+check_completion("\\DRD\t", qr/\\drds

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-05 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Here's one final style cleanup for the TAP test. LGTM, pushed. One minor note: you wanted to change the \DRD test to +check_completion("\\DRD\t", qr/\\drds /, "complete \\DRD to \\drds"); but that doesn't work everywhere,

Re: FETCH FIRST clause WITH TIES option

2020-01-05 Thread Tomas Vondra
On Fri, Nov 29, 2019 at 05:19:00AM +, Andrew Gierth wrote: "Alvaro" == Alvaro Herrera writes: Alvaro> First, I noticed that there's a significant unanswered issue Alvaro> from Andrew Gierth about this using a completely different Alvaro> mechanism, namely an implicit window function.

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-01-05 Thread Julien Rouhaud
On Sun, Jan 5, 2020 at 4:11 PM legrand legrand wrote: > > Hi Julien, > > I would like to create a link with > https://www.postgresql.org/message-id/1577490124579-0.p...@n3.nabble.com > > where we met an ASSET FAILURE because query text was not initialized ... > > The question raised is: > > -

Re: WIP: System Versioned Temporal Table

2020-01-05 Thread Vik Fearing
On 05/01/2020 16:01, legrand legrand wrote: > >> As for the syntax, you have: >> >> >> select a from for stest0 system_time from '2000-01-01 00:00:00.0' to >> 'infinity' ORDER BY a; >> >> >> when you should have: >> >> >> select a from stest0 for system_time from '2000-01-01 00:00:00.0' to

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-01-05 Thread legrand legrand
Hi Julien, I would like to create a link with https://www.postgresql.org/message-id/1577490124579-0.p...@n3.nabble.com where we met an ASSET FAILURE because query text was not initialized ... The question raised is: - should query text be always provided or - if not how to deal that case (in

Re: WIP: System Versioned Temporal Table

2020-01-05 Thread legrand legrand
Vik Fearing-4 wrote > On 05/01/2020 11:16, Surafel Temesgen wrote: >> >> >> On Fri, Jan 3, 2020 at 4:22 PM Vik Fearing >> > vik.fearing@ > mailto: > vik.fearing@ > > wrote: >> > > [...] > > You only test FROM-TO and with a really wide interval.  There are no > tests for AS OF and no tests

Re: parallel vacuum options/syntax

2020-01-05 Thread Amit Kapila
On Sun, Jan 5, 2020 at 7:38 PM Masahiko Sawada wrote: > > On Sun, 5 Jan 2020 at 22:39, Tomas Vondra > wrote: > > > > > > So if we think we need an option to determine vacuum parallel degree, we > > should have an option to disable parallelism too. I don't care much if > > it's called

Re: parallel vacuum options/syntax

2020-01-05 Thread Masahiko Sawada
On Sun, 5 Jan 2020 at 22:39, Tomas Vondra wrote: > > On Sun, Jan 05, 2020 at 09:17:57PM +0900, Masahiko Sawada wrote: > >On Sun, Jan 5, 2020 at 7:26 PM Amit Kapila wrote: > >> > >> ... > >> > >> > If we want to have a vacuum option to determine parallel degree, we > >> > should probably have a

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-05 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > Tom Lane writes: > >> Cool, I'll go commit a fix along those lines. Thanks for tracing >> this down! > > Here's one final style cleanup for the TAP test. > > - use like() for the banner test > - pass the regexes around as qr// objects, so

Re: parallel vacuum options/syntax

2020-01-05 Thread Tomas Vondra
On Sun, Jan 05, 2020 at 09:17:57PM +0900, Masahiko Sawada wrote: On Sun, Jan 5, 2020 at 7:26 PM Amit Kapila wrote: ... > If we want to have a vacuum option to determine parallel degree, we > should probably have a vacuum option to disable parallelism using just a > vacuum option. I don't

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-05 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Cool, I'll go commit a fix along those lines. Thanks for tracing > this down! Here's one final style cleanup for the TAP test. - use like() for the banner test - pass the regexes around as qr// objects, so they can be syntax-highlighted properly, and don't need regex

Re: WIP: System Versioned Temporal Table

2020-01-05 Thread Vik Fearing
On 05/01/2020 11:16, Surafel Temesgen wrote: > > > On Fri, Jan 3, 2020 at 4:22 PM Vik Fearing > mailto:vik.fear...@2ndquadrant.com>> wrote: > > > > > Rebased and conflict resolved i hope it build clean this time > > > > It does but you haven't included your tests file so `make

Re: parallel vacuum options/syntax

2020-01-05 Thread Masahiko Sawada
On Sun, Jan 5, 2020 at 7:26 PM Amit Kapila wrote: > > On Sun, Jan 5, 2020 at 6:40 AM Tomas Vondra > wrote: > > > > On Sun, Jan 05, 2020 at 08:54:15AM +0900, Masahiko Sawada wrote: > > >On Thu, Jan 2, 2020 at 9:09 PM Amit Kapila > > >wrote: > > >> > > >> Hi, > > >> > > >> I am starting a new

Re: parallel vacuum options/syntax

2020-01-05 Thread Tomas Vondra
On Sun, Jan 05, 2020 at 03:56:35PM +0530, Amit Kapila wrote: ... >If parallel vacuum is enabled by default, I would prefer (b) but I >don't think it's a good idea to accept 0 as parallel degree. If we want >to disable parallel vacuum we should max_parallel_maintenance_workers >to 0 instead. >

Re: Patch to document base64 encoding

2020-01-05 Thread Fabien COELHO
Hello Karl, Attached is doc_base64_v11.patch Patch applies cleanly and compiles. I'm in favor of moving and reorganizing these function descriptions, as they are somehow scattered with a unclear logic when you are looking for them. + bytea || +bytea bytea

Re: parallel vacuum options/syntax

2020-01-05 Thread Amit Kapila
On Sun, Jan 5, 2020 at 6:40 AM Tomas Vondra wrote: > > On Sun, Jan 05, 2020 at 08:54:15AM +0900, Masahiko Sawada wrote: > >On Thu, Jan 2, 2020 at 9:09 PM Amit Kapila > >wrote: > >> > >> Hi, > >> > >> I am starting a new thread for some of the decisions for a parallel > >> vacuum in the hope to

Re: WIP: System Versioned Temporal Table

2020-01-05 Thread Surafel Temesgen
On Mon, Oct 28, 2019 at 6:36 PM Vik Fearing wrote: > On 28/10/2019 13:48, Surafel Temesgen wrote: > > > > > > On Fri, Oct 25, 2019 at 10:45 PM Vik Fearing > > mailto:vik.fear...@2ndquadrant.com>> > wrote: > > > > > > > > I don't understand what you mean by this. > > > > > > >

Re: WIP: System Versioned Temporal Table

2020-01-05 Thread Surafel Temesgen
On Fri, Jan 3, 2020 at 4:22 PM Vik Fearing wrote: > > > > Rebased and conflict resolved i hope it build clean this time > > > > It does but you haven't included your tests file so `make check` fails. > > > what tests file? i add system_versioned_table.sql and system_versioned_table.out test

Re: pgbench - add pseudo-random permutation function

2020-01-05 Thread Fabien COELHO
This patch was marked as RFC on 2019-03-30, but since then there have been a couple more issues pointed out in a review by Thomas Munro, and it went through 2019-09 and 2019-11 without any attention. Is the RFC status still appropriate? Thomas review was about comments/documentation

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-01-05 Thread Julien Rouhaud
On Fri, Nov 22, 2019 at 11:23 AM imai.yoshik...@fujitsu.com wrote: > > On Wed, Nov 20, 2019 at 4:55 PM, Julien Rouhaud wrote: > > On Wed, Nov 20, 2019 at 2:06 AM imai.yoshik...@fujitsu.com > > wrote: > > > > > > On Tue, Nov 19, 2019 at 2:27 PM, Julien Rouhaud wrote: > > > > On Fri, Nov 15, 2019