Re: Error in pg_restore (could not close data file: Success)

2020-10-20 Thread Kyotaro Horiguchi
At Wed, 21 Oct 2020 13:45:15 +0900 (JST), Kyotaro Horiguchi wrote in > https://www.postgresql.org/message-id/flat/20200416.181945.759179589924840062.horikyota.ntt%40gmail.com#ed85c5fda64873c45811be4e3027a2ea > > Me> Hmm. Sounds reasonable. I'm going to do that. Thanks! > > But somehow that h

RE: Use of "long" in incremental sort code

2020-10-20 Thread Tang, Haiying
Hi >Found one more place needed to be changed(long -> int64). > >Also changed the output for int64 data(Debug mode on & define EXEC_SORTDEBUG ) > >And, maybe there's a typo in " src\backend\executor\nodeIncrementalSort.c" as >below. >Obviously, the ">=" is meaningless, right? > >And, maybe there'

Re: Error in pg_restore (could not close data file: Success)

2020-10-20 Thread Kyotaro Horiguchi
At Tue, 20 Oct 2020 13:48:25 +0300, Andrii Tkach wrote in > Hello, > After restoring 'directory' backup with pg_restore (PostgreSQL 10.6) I've > got a message: > pg_restore: [directory archiver] could not close data file: Success > pg_restore: [parallel archiver] a worker process died unexpectedl

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-20 Thread Amit Kapila
On Tue, Oct 20, 2020 at 12:41 PM Masahiro Ikeda wrote: > > On 2020-10-20 12:46, Amit Kapila wrote: > > On Tue, Oct 20, 2020 at 8:01 AM Masahiro Ikeda > >> 1. Basic statistics of WAL activity > >> > >> - wal_records: Total number of WAL records generated > >> - wal_fpi: Total number of WAL full pag

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Abhijit Menon-Sen
At 2020-10-20 10:53:04 -0700, and...@anarazel.de wrote: > > > postgres=# ALTER SYSTEM SET max_worker_processes += 4; > > ALTER SYSTEM > > Much less clear that this is a good idea... I agree it's less clear. I still think it might be useful in some cases (such as the example with max_worke

Re: parallel distinct union and aggregate support patch

2020-10-20 Thread Thomas Munro
On Tue, Oct 20, 2020 at 3:49 AM bu...@sohu.com wrote: > I write a path for soupport parallel distinct, union and aggregate using > batch sort. > steps: > 1. generate hash value for group clauses values, and using mod hash value > save to batch > 2. end of outer plan, wait all other workers fin

Re: Track statistics for streaming of in-progress transactions

2020-10-20 Thread Amit Kapila
On Wed, Oct 21, 2020 at 8:15 AM Masahiko Sawada wrote: > > On Tue, 20 Oct 2020 at 14:29, Amit Kapila wrote: > > > > > > Thanks. One thing I have considered while updating this patch was to > > write a test case similar to what we have for spilled stats in > > test_decoding/sql/stats.sql but I dec

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-20 Thread Amit Kapila
On Tue, Oct 13, 2020 at 10:33 AM Amit Kapila wrote: > > On Tue, Oct 13, 2020 at 10:21 AM Tom Lane wrote: > > > > > > I know I can go read the source code, but most users will not want to. > > Is the documentation in monitoring.sgml really sufficient? If we can't > > explain this with more precis

Re: Track statistics for streaming of in-progress transactions

2020-10-20 Thread Masahiko Sawada
On Tue, 20 Oct 2020 at 14:29, Amit Kapila wrote: > > On Mon, Oct 19, 2020 at 1:52 PM Ajin Cherian wrote: > > > > On Wed, Oct 14, 2020 at 2:39 PM Amit Kapila wrote: > > > > > > Commit 464824323e has added the support of the streaming of > > > in-progress transactions into the built-in logical rep

Re: Reduce the dependence on access/xlog_internal.h

2020-10-20 Thread Mark Dilger
> On Oct 19, 2020, at 7:05 PM, Andres Freund wrote: > > Hi, > > On 2020-10-19 18:29:27 -0700, Mark Dilger wrote: >> Please find access/xlog_internal.h refactored in the attached patch >> series. This header is included from many places, including external >> tools. It is aesthetically disple

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Robert Haas
On Tue, Oct 20, 2020 at 3:24 PM Andres Freund wrote: > As far as I understand what the proposal does, if you were to do do an > ALTER SYSTEM like you do, it'd actually write an "absolute" > shared_preload_libraries value to postgresql.auto.conf. So if you then > subsequently modified the shared_pr

RE: [Patch] Optimize dropping of relation buffers using dlist

2020-10-20 Thread tsunakawa.ta...@fujitsu.com
From: tsunakawa.ta...@fujitsu.com > Can you measure the time DropRelFileNodeBuffers()? You can call > GetTimestamp() at the beginning and end of the function, and use > TimestampDifference() to calculate the difference. Then, for instance, > elog(WARNING, "time is | %u.%u", sec, usec) at the end

Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version

2020-10-20 Thread Tom Lane
Justin Pryzby writes: > I wonder if pg_upgrade should try to rmdir() the tablespace dirs before > restoring global objects, allowing it to succeed, rather than just "failing > early". I'm a little confused about that. If the directories aren't empty, that will fail, but if they are, shouldn't th

RE: Resetting spilled txn statistics in pg_stat_replication

2020-10-20 Thread Shinoda, Noriyoshi (PN Japan A&PS Delivery)
> I have pushed the patch after updating the test_decoding/sql/stats. > The corresponding changes in the test were missing. Thank you very much for your help! Regards, Noriyoshi Shinoda -Original Message- From: Masahiko Sawada [mailto:masahiko.saw...@2ndquadrant.com] Sent: Tuesday, Octo

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Alvaro Herrera
On 2020-Oct-20, Justin Pryzby wrote: > On Tue, Oct 20, 2020 at 03:56:30PM -0400, Tom Lane wrote: > > Alvaro Herrera writes: > > > Hmm, next question: should we backpatch a fix for this? (This applies > > > all the way back to 11.) If we do, then we would change behavior of > > > partition creat

Re: ECPG gets embedded quotes wrong

2020-10-20 Thread Tom Lane
I wrote: > It looks to me like a sufficient fix is just to keep these quote > sequences as-is within a converted string, so that the attached > appears to fix it. Poking at this further, I noticed that there's a semi-related bug that this patch changes the behavior for, without fixing it exactly.

Re: speed up unicode decomposition and recomposition

2020-10-20 Thread Michael Paquier
On Tue, Oct 20, 2020 at 08:03:12AM -0400, John Naylor wrote: > I've confirmed that. How about a new header unicode_norm_hashfunc.h which > would include unicode_norm_table.h at the top. In unicode.c, we can include > one of these depending on frontend or backend. Sounds good to me. Looking at the

Re: speed up unicode normalization quick check

2020-10-20 Thread Michael Paquier
On Tue, Oct 20, 2020 at 05:33:43AM -0400, John Naylor wrote: > This is cleaner, so I'm good with this. Thanks. Applied this way, then. -- Michael signature.asc Description: PGP signature

Re: dynamic result sets support in extended query protocol

2020-10-20 Thread Dave Cramer
On Tue, 20 Oct 2020 at 20:09, Andres Freund wrote: > Hi, > > On 2020-10-20 18:55:41 -0500, Jack Christensen wrote: > > Upthread someone posted a page pgjdbc detailing desired changes to the > > backend protocol ( > > > https://github.com/pgjdbc/pgjdbc/blob/master/backend_protocol_v4_wanted_featur

Re: dynamic result sets support in extended query protocol

2020-10-20 Thread Andres Freund
Hi, On 2020-10-20 18:55:41 -0500, Jack Christensen wrote: > Upthread someone posted a page pgjdbc detailing desired changes to the > backend protocol ( > https://github.com/pgjdbc/pgjdbc/blob/master/backend_protocol_v4_wanted_features.md). A lot of the stuff on there seems way beyond what can be

Re: dynamic result sets support in extended query protocol

2020-10-20 Thread Jack Christensen
Regarding decoding binary vs text performance: There can be a significant performance cost to fetching the binary format over the text format for types such as text. See https://www.postgresql.org/message-id/CAMovtNoHFod2jMAKQjjxv209PCTJx5Kc66anwWvX0mEiaXwgmA%40mail.gmail.com for the previous discu

Re: pg_upgrade: fail early if a tablespace dir already exists for new cluster version

2020-10-20 Thread Justin Pryzby
On Thu, Oct 15, 2020 at 07:35:30PM -0400, Bruce Momjian wrote: > On Fri, Oct 9, 2020 at 07:42:51PM -0400, Bruce Momjian wrote: > > On Fri, Oct 9, 2020 at 02:23:10PM -0500, Justin Pryzby wrote: > > > In my local branch, I had revised this comment to say: > > > > > > + * Note, v8.4 has no tablespa

Re: PostgresNode::backup uses spread checkpoint?

2020-10-20 Thread Michael Paquier
On Tue, Oct 20, 2020 at 11:13:34AM -0400, David Steele wrote: > On 10/20/20 11:01 AM, Alvaro Herrera wrote: >> I noticed a few days ago that method backup() in PostgresNode uses >> pg_basebackup without specifying a checkpoint mode -- and the default is >> a spread checkpoint, which may cause any t

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Alvaro Herrera
On 2020-Oct-20, Alvaro Herrera wrote: > > diff --git a/src/backend/commands/tablecmds.c > > b/src/backend/commands/tablecmds.c > > index 511f015a86..c8d6f78da2 100644 > > --- a/src/backend/commands/tablecmds.c > > +++ b/src/backend/commands/tablecmds.c > > @@ -4321,6 +4321,7 @@ ATPrepCmd(List **w

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Justin Pryzby
On Tue, Oct 20, 2020 at 03:56:30PM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Hmm, next question: should we backpatch a fix for this? (This applies > > all the way back to 11.) If we do, then we would change behavior of > > partition creation. It's hard to see that the current behavior

Re: Hash support for row types

2020-10-20 Thread Tom Lane
Robert Haas writes: > Do we need to worry about what happens if somebody modifies the > opclass/opfamily definitions? There's a lot of places that you can break by doing that. I'm not too concerned about it. regards, tom lane

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Alvaro Herrera
On 2020-Oct-16, Alvaro Herrera wrote: > On 2020-Oct-16, Alvaro Herrera wrote: > > > I also just noticed that ALTER TABLE ONLY recurses to children, which it > > should not. > > Apparently I wrote (bogus) bespoke code to handle recursion in > EnableDisableTrigger instead of using ATSimpleRecursio

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Tom Lane
Alvaro Herrera writes: > Hmm, next question: should we backpatch a fix for this? (This applies > all the way back to 11.) If we do, then we would change behavior of > partition creation. It's hard to see that the current behavior is > desirable ... and I think anybody who would have come across

ECPG gets embedded quotes wrong

2020-10-20 Thread Tom Lane
A recent user complaint [1] led me to investigate what ECPG does with embedded quotes (that is, quotes-meant-to-be-data) in SQL identifiers and strings. AFAICS, it gets it wrong. For example, if you write the literal 'abc''def' in an EXEC SQL command, that will come out the other end as 'abc'def'

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Justin Pryzby
On Tue, Oct 20, 2020 at 04:04:20PM -0300, Alvaro Herrera wrote: > On 2020-Sep-30, Justin Pryzby wrote: > > > CREATE TABLE t(i int) PARTITION BY RANGE(i); > > CREATE TABLE t1 PARTITION OF t FOR VALUES FROM (1) TO (10); > > CREATE OR REPLACE FUNCTION tgf() RETURNS trigger LANGUAGE plpgsql AS $$ > >

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Andres Freund
Hi, On 2020-10-20 14:39:42 -0400, Robert Haas wrote: > On Tue, Oct 20, 2020 at 2:34 PM Alvaro Herrera > wrote: > > On 2020-Oct-20, Tom Lane wrote: > > > and the fact that we've gone twenty-odd years without similar > > > previous proposals doesn't speak well for it being really useful. > > > > A

Re: Support for NSS as a libpq TLS backend

2020-10-20 Thread Andres Freund
Hi, On 2020-10-20 14:24:24 +0200, Daniel Gustafsson wrote: > From 0cb0e6a0ce9adb18bc9d212bd03e4e09fa452972 Mon Sep 17 00:00:00 2001 > From: Daniel Gustafsson > Date: Thu, 8 Oct 2020 18:44:28 +0200 > Subject: [PATCH] Support for NSS as a TLS backend v12 > --- > configure

Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers

2020-10-20 Thread Alvaro Herrera
On 2020-Sep-30, Justin Pryzby wrote: > CREATE TABLE t(i int) PARTITION BY RANGE(i); > CREATE TABLE t1 PARTITION OF t FOR VALUES FROM (1) TO (10); > CREATE OR REPLACE FUNCTION tgf() RETURNS trigger LANGUAGE plpgsql AS $$ begin > raise exception 'except'; end $$; > CREATE TRIGGER tg AFTER INSERT ON

Re: Hash support for row types

2020-10-20 Thread Robert Haas
On Tue, Oct 20, 2020 at 11:10 AM Peter Eisentraut wrote: > On 2020-10-20 01:32, Andres Freund wrote: > > How does this deal with row types with a field that doesn't have a hash > > function? Erroring out at runtime could cause queries that used to > > succeed, e.g. because all fields have btree op

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Robert Haas
On Tue, Oct 20, 2020 at 2:34 PM Alvaro Herrera wrote: > On 2020-Oct-20, Tom Lane wrote: > > and the fact that we've gone twenty-odd years without similar > > previous proposals doesn't speak well for it being really useful. > > Actually, there's at least two threads about this: > > https://postgr.

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Alvaro Herrera
On 2020-Oct-20, Tom Lane wrote: > and the fact that we've gone twenty-odd years without similar > previous proposals doesn't speak well for it being really useful. Actually, there's at least two threads about this: https://postgr.es/m/flat/86d2ceg611@jerry.enova.com https://postgr.es/m/flat/

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Tom Lane
Andres Freund writes: > On 2020-10-20 14:16:12 -0400, Tom Lane wrote: >> I'd make that point against the whole proposal. There's nothing here that >> can't be done with current_setting() + set_config(). > The one case where I can see SET support being useful even without > config support is to a

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Andres Freund
Hi, On 2020-10-20 14:16:12 -0400, Tom Lane wrote: > Andres Freund writes: > > Given that this is just SQL level, I don't see why we'd need a special > > type of language here. You can just use DO etc. > > I'd make that point against the whole proposal. There's nothing here that > can't be done

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Tom Lane
Andres Freund writes: > Given that this is just SQL level, I don't see why we'd need a special > type of language here. You can just use DO etc. I'd make that point against the whole proposal. There's nothing here that can't be done with current_setting() + set_config(). I'm pretty dubious abou

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Isaac Morland
On Sun, 27 Sep 2020 at 23:39, Abhijit Menon-Sen wrote: > postgres=# SET search_path += octopus; > SET > postgres=# SET search_path += "giant squid", kraken, narwhal; -- [1] > SET > postgres=# SET search_path -= public, narwhal; > SET > postgres=# SHOW search_path; >

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Andres Freund
Hi, On 2020-09-28 09:09:24 +0530, Abhijit Menon-Sen wrote: > postgres=# SET search_path += octopus; > SET Yea, that would be quite useful! > The second patch > (0002-Support-SET-syntax-for-numeric-configuration-setting.patch) adds > support to modify numeric configuration settings: >

Re: Non-configure build of thread_test has been broken for awhile

2020-10-20 Thread Tom Lane
Alvaro Herrera writes: > On 2020-Oct-18, Tom Lane wrote: >> It doesn't really seem sane to me to support two different build >> environments for thread_test, especially when one of them is so >> little-used that it can be broken for years before we notice. >> So I'd be inclined to rip out the Make

Re: PostgresNode::backup uses spread checkpoint?

2020-10-20 Thread David Steele
On 10/20/20 11:01 AM, Alvaro Herrera wrote: I noticed a few days ago that method backup() in PostgresNode uses pg_basebackup without specifying a checkpoint mode -- and the default is a spread checkpoint, which may cause any tests that use that to take slightly longer than the bare minimum. I pr

Re: Hash support for row types

2020-10-20 Thread Peter Eisentraut
On 2020-10-20 01:32, Andres Freund wrote: How does this deal with row types with a field that doesn't have a hash function? Erroring out at runtime could cause queries that used to succeed, e.g. because all fields have btree ops, to fail, if we just have a generic unconditionally present hash opc

PostgresNode::backup uses spread checkpoint?

2020-10-20 Thread Alvaro Herrera
I noticed a few days ago that method backup() in PostgresNode uses pg_basebackup without specifying a checkpoint mode -- and the default is a spread checkpoint, which may cause any tests that use that to take slightly longer than the bare minimum. I propose to make it use a fast checkpoint, as per

Re: dynamic result sets support in extended query protocol

2020-10-20 Thread Shay Rojansky
Very interesting conversation, thanks for including me Dave. Here are some thoughts from the Npgsql perspective, Re the binary vs. text discussion... A long time ago, Npgsql became a "binary-only" driver, meaning that it never sends or receives values in text encoding, and practically always uses

Re: partition routing layering in nodeModifyTable.c

2020-10-20 Thread Amit Langote
On Mon, Oct 19, 2020 at 8:55 PM Heikki Linnakangas wrote: > On 17/10/2020 18:54, Alvaro Herrera wrote: > > On 2020-Oct-17, Amit Langote wrote: > >> As I said in my previous email, I don't see how we can make > >> initializing the map any lazier than it already is. If a partition > >> has a differ

Re: Make procedure OUT parameters work with JDBC

2020-10-20 Thread Andrew Dunstan
On 10/19/20 8:35 PM, Craig Ringer wrote: > > > On Mon, 19 Oct 2020, 19:16 Andrew Dunstan, > wrote: > > > On 10/19/20 5:19 AM, Peter Eisentraut wrote: > > A follow-up to the recently added support for OUT parameters for > > procedures.  The JDBC driver send

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-20 Thread Amit Langote
Hi Andy, On Tue, Oct 20, 2020 at 4:05 PM Andy Fan wrote: > On Wed, Oct 14, 2020 at 11:26 AM Andy Fan wrote: >> On Mon, Oct 12, 2020 at 4:37 PM Amit Langote wrote: >>> I think we should remove this duplicative logic and return the >>> generated steps in a list from this function, which the code

Re: Is Recovery actually paused?

2020-10-20 Thread Dilip Kumar
On Tue, Oct 20, 2020 at 3:00 PM Simon Riggs wrote: > > On Tue, 20 Oct 2020 at 09:50, Dilip Kumar wrote: > > > > > Why would we want this? What problem are you trying to solve? > > > > > > The requirement is to know the last replayed WAL on the standby so > > > unless we can guarantee that the rec

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-20 Thread Masahiko Sawada
On Tue, 20 Oct 2020 at 20:11, Amit Kapila wrote: > > On Mon, Oct 19, 2020 at 1:20 PM Masahiko Sawada > wrote: > > > > On Mon, 19 Oct 2020 at 14:24, Amit Kapila wrote: > > > > > > > > So, let's > > > stick with 'text' data type for slot_name which means we should > > > go-ahead with the v3 versio

Re: Transactions involving multiple postgres foreign servers, take 2

2020-10-20 Thread Masahiko Sawada
On Tue, 20 Oct 2020 at 17:56, tsunakawa.ta...@fujitsu.com wrote: > > From: Kyotaro Horiguchi > > It seems to respond to a statement-cancel signal immediately while > > waiting for a coming byte. However, seems to wait forever while > > waiting a space in send-buffer. (Is that mean the session wi

Re: pgbench - test whether a variable exists

2020-10-20 Thread Ibrar Ahmed
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: tested, failed Documentation:not tested I am not very convinced to have that, but I have performed some testing o

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Erik Rijkers
On 2020-10-20 13:02, Ibrar Ahmed wrote: The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested Thanks for the patch.

Re: Transactions involving multiple postgres foreign servers, take 2

2020-10-20 Thread Masahiko Sawada
On Tue, 20 Oct 2020 at 16:54, tsunakawa.ta...@fujitsu.com wrote: > > From: Kyotaro Horiguchi > > At Tue, 20 Oct 2020 15:53:29 +0900, Masahiko Sawada > > wrote in > > > I think it doesn't matter whether in FDW framework or not. The user > > > normally doesn't care which backend processes connecti

Re: [doc] improve tableoid description

2020-10-20 Thread Ashutosh Bapat
On Mon, Oct 19, 2020 at 5:58 PM Ian Lawrence Barwick wrote: > > > That line further suggests using > > regnamespace which is not as efficient as joining with > > pg_namespace.oid. But pg_namespace won't have as many entries as > > pg_class so casting to regnamespace might be fine. Should we sugges

Re: speed up unicode decomposition and recomposition

2020-10-20 Thread John Naylor
On Tue, Oct 20, 2020 at 3:22 AM Michael Paquier wrote: > On Mon, Oct 19, 2020 at 10:34:33AM -0400, John Naylor wrote: > > I don't see any difference on gcc/Linux in those two files, nor in > > unicode_norm_shlib.o -- I do see a difference in unicode_norm_srv.o as > > expected. Could it depend on

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-20 Thread Amit Kapila
On Mon, Oct 19, 2020 at 1:20 PM Masahiko Sawada wrote: > > On Mon, 19 Oct 2020 at 14:24, Amit Kapila wrote: > > > > > So, let's > > stick with 'text' data type for slot_name which means we should > > go-ahead with the v3 version of the patch [1] posted by Shinoda-San, > > right? > > Right. +1 >

Re: [PATCH] SET search_path += octopus

2020-10-20 Thread Ibrar Ahmed
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested Thanks for the patch. The patch works on my machine as per specs

Re: [HACKERS] logical decoding of two-phase transactions

2020-10-20 Thread Ajin Cherian
On Fri, Oct 16, 2020 at 5:21 PM Peter Smith wrote: > > Hello Ajin, > > The v9 patches provided support for two-phase transactions for NON-streaming. > > Now I have added STREAM support for two-phase transactions, and bumped > all patches to version v10. > > (The 0001 and 0002 patches are unchanged

Error in pg_restore (could not close data file: Success)

2020-10-20 Thread Andrii Tkach
Hello, After restoring 'directory' backup with pg_restore (PostgreSQL 10.6) I've got a message: pg_restore: [directory archiver] could not close data file: Success pg_restore: [parallel archiver] a worker process died unexpectedly In this thread: https://www.postgresql.org/message-id/CAFcNs%2Bos5Ex

Re: dynamic result sets support in extended query protocol

2020-10-20 Thread Dave Cramer
On Tue, 20 Oct 2020 at 05:57, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2020-10-09 21:02, Dave Cramer wrote: > > For the most part we know exactly which types we want in binary for 99% > > of queries. > > > > The hard part around this really is whether and how to deal wi

Re: dynamic result sets support in extended query protocol

2020-10-20 Thread Peter Eisentraut
On 2020-10-09 21:02, Dave Cramer wrote: For the most part we know exactly which types we want in binary for 99% of queries. The hard part around this really is whether and how to deal with changes in type definitions. From types just being created - comparatively simple - to extensi

Re: Parallel copy

2020-10-20 Thread Bharath Rupireddy
On Fri, Oct 9, 2020 at 2:52 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > > On Tue, Sep 29, 2020 at 6:30 PM Amit Kapila wrote: > > > > 2. Do we have tests for toast tables? I think if you implement the > > previous point some existing tests might cover it but I feel we sh

Re: speed up unicode normalization quick check

2020-10-20 Thread John Naylor
On Mon, Oct 19, 2020 at 9:49 PM Michael Paquier wrote: > > The aligned numbers have the advantage to make the checks of the code > generated easier, for the contents and the format produced. So using > a right padding as you are suggesting here rather than a new exception > in .gitattributes sou

Re: Is Recovery actually paused?

2020-10-20 Thread Simon Riggs
On Tue, 20 Oct 2020 at 09:50, Dilip Kumar wrote: > > > Why would we want this? What problem are you trying to solve? > > > > The requirement is to know the last replayed WAL on the standby so > > unless we can guarantee that the recovery is actually paused we can > > never get the safe last_repla

Re: Online verification of checksums

2020-10-20 Thread Michael Paquier
On Mon, Apr 06, 2020 at 04:45:44PM -0400, Tom Lane wrote: > Actually, after thinking about that a bit more: why is there an LSN-based > special condition at all? It seems like it'd be far more useful to > checksum everything, and on failure try to re-read and re-verify the page > once or twice, so

select_common_typmod

2020-10-20 Thread Peter Eisentraut
While working on another patch, I figured adding a select_common_typmod() to go along with select_common_type() and select_common_collation() would be handy. Typmods were previously combined using hand-coded logic in several places, and not at all in other places. The logic in select_common_t

RE: Transactions involving multiple postgres foreign servers, take 2

2020-10-20 Thread tsunakawa.ta...@fujitsu.com
From: Kyotaro Horiguchi > It seems to respond to a statement-cancel signal immediately while > waiting for a coming byte. However, seems to wait forever while > waiting a space in send-buffer. (Is that mean the session will be > stuck if it sends a large chunk of bytes while the network is down?)

Re: Is Recovery actually paused?

2020-10-20 Thread Dilip Kumar
On Tue, Oct 20, 2020 at 1:22 PM Dilip Kumar wrote: > > On Tue, Oct 20, 2020 at 1:11 PM Simon Riggs wrote: > > > > On Mon, 19 Oct 2020 at 15:11, Dilip Kumar wrote: > > > > > We have an interface to pause the WAL replay (pg_wal_replay_pause) and > > > to know whether the WAL replay pause is reques

Re: Timing of relcache inval at parallel worker init

2020-10-20 Thread Kyotaro Horiguchi
At Sat, 17 Oct 2020 04:53:06 -0700, Noah Misch wrote in > While reviewing what became commit fe4d022, I was surprised at the sequence of > relfilenode values that RelationInitPhysicalAddr() computed for pg_class, > during ParallelWorkerMain(), when running the last command of this recipe: > >

RE: Transactions involving multiple postgres foreign servers, take 2

2020-10-20 Thread tsunakawa.ta...@fujitsu.com
From: Kyotaro Horiguchi > At Tue, 20 Oct 2020 15:53:29 +0900, Masahiko Sawada > wrote in > > I think it doesn't matter whether in FDW framework or not. The user > > normally doesn't care which backend processes connecting to foreign > > servers. They will attempt to cancel the query like always i

Re: Is Recovery actually paused?

2020-10-20 Thread Dilip Kumar
On Tue, Oct 20, 2020 at 1:11 PM Simon Riggs wrote: > > On Mon, 19 Oct 2020 at 15:11, Dilip Kumar wrote: > > > We have an interface to pause the WAL replay (pg_wal_replay_pause) and > > to know whether the WAL replay pause is requested > > (pg_is_wal_replay_paused). But there is no way to know wh

Re: Is Recovery actually paused?

2020-10-20 Thread Simon Riggs
On Mon, 19 Oct 2020 at 15:11, Dilip Kumar wrote: > We have an interface to pause the WAL replay (pg_wal_replay_pause) and > to know whether the WAL replay pause is requested > (pg_is_wal_replay_paused). But there is no way to know whether the > recovery is actually paused or not. Actually, the

Re: Transactions involving multiple postgres foreign servers, take 2

2020-10-20 Thread Kyotaro Horiguchi
At Tue, 20 Oct 2020 04:23:12 +, "tsunakawa.ta...@fujitsu.com" wrote in > From: Kyotaro Horiguchi > > > Furthermore, FDW is not cancellable in general. So, I don't see a point > > > in > > trying hard to make only commit be cancelable. > > > > I think that it is quite important that opera

Re: Commitfest manager 2020-11

2020-10-20 Thread gkokolatos
‐‐‐ Original Message ‐‐‐ > [snip] > > Wow, that was well in advance) I am willing to assist if you need any help. > Indeed it was a bit early. I left for vacation after that. For the record, I am newly active to the community. In our PUG, in Stockholm, we held a meetup during which

Re: speed up unicode decomposition and recomposition

2020-10-20 Thread Michael Paquier
On Mon, Oct 19, 2020 at 10:34:33AM -0400, John Naylor wrote: > I don't see any difference on gcc/Linux in those two files, nor in > unicode_norm_shlib.o -- I do see a difference in unicode_norm_srv.o as > expected. Could it depend on the compiler? Hmm. My guess is that you don't have --enable-deb

Re: Transactions involving multiple postgres foreign servers, take 2

2020-10-20 Thread Kyotaro Horiguchi
At Tue, 20 Oct 2020 15:53:29 +0900, Masahiko Sawada wrote in > On Tue, 20 Oct 2020 at 13:23, tsunakawa.ta...@fujitsu.com > wrote: > > > > From: Kyotaro Horiguchi > > > I don't think the inability to cancel all session at once cannot be a > > > reason not to not to allow operators to cancel a s

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-20 Thread Masahiro Ikeda
On 2020-10-20 12:46, Amit Kapila wrote: On Tue, Oct 20, 2020 at 8:01 AM Masahiro Ikeda wrote: Hi, I think we need to add some statistics to pg_stat_wal view. Although there are some parameter related WAL, there are few statistics for tuning them. I think it's better to provide the following

RE: [Patch] Optimize dropping of relation buffers using dlist

2020-10-20 Thread tsunakawa.ta...@fujitsu.com
From: Jamison, Kirk/ジャミソン カーク > However, I still can't seem to find the cause of why the non-recovery > performance does not change when compared to master. (1 min 15 s for the > given test case below) Can you check and/or try the following? 1. Isn't the vacuum cost delay workin

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-20 Thread Andy Fan
On Wed, Oct 14, 2020 at 11:26 AM Andy Fan wrote: > > > On Mon, Oct 12, 2020 at 4:37 PM Amit Langote > wrote: > >> Hi, >> >> On Thu, Oct 8, 2020 at 6:56 PM Andy Fan wrote: >> > >> > Hi: >> > >> > I found the following code in gen_partprune_steps_internal, which >> > looks the if-statement to