Re: Detecting File Damage & Inconsistencies

2020-11-11 Thread Simon Riggs
On Thu, 12 Nov 2020 at 06:42, tsunakawa.ta...@fujitsu.com wrote: > > From: Simon Riggs > > I would like to propose a few points that will help us detect file > > damage, inconsistencies in files and track actions of users. > > Hello, Simon san. Long time no see. I'm happy to see you be back

Re: proposal: possibility to read dumped table's name from file

2020-11-11 Thread Pavel Stehule
st 11. 11. 2020 v 16:17 odesílatel Alvaro Herrera napsal: > On 2020-Nov-11, Pavel Stehule wrote: > > > I think the proposed feature is very far to be the config file for > pg_dump > > (it implements a option "--filter"). This is not the target. It is not > > designed for this. This is just an

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

2020-11-11 Thread Fujii Masao
On 2020/11/12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20

Re: abstract Unix-domain sockets

2020-11-11 Thread Michael Paquier
On Wed, Nov 11, 2020 at 01:39:17PM +0100, Peter Eisentraut wrote: > Thinking about it further, I think the hint in the Unix-domain socket case > is bogus. A socket in the file-system namespace never reports EADDRINUSE > anyway, it just overwrites the file. For sockets in the abstract namespace,

Re: Clean up optional rules in grammar

2020-11-11 Thread Peter Eisentraut
On 2020-11-11 11:54, Heikki Linnakangas wrote: On 11/11/2020 11:12, Peter Eisentraut wrote: The attached patch cleans this up to make them all look like the first style. +1 done

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

2020-11-11 Thread Peter Smith
The subscriber tests are updated to include test cases for "cascading" pub/sub scenarios. i.e.. NODE_A publisher => subscriber NODE_B publisher => subscriber NODE_C PSA only the modified v20-0006 patch (the other 5 patches remain unchanged) Kind Regards, Peter Smith. Fujitsu Australia.

Re: In-place persistance change of a relation

2020-11-11 Thread Kyotaro Horiguchi
At Wed, 11 Nov 2020 09:56:44 -0500, Stephen Frost wrote in > Greetings, > > * Kyotaro Horiguchi (horikyota@gmail.com) wrote: > > At Tue, 10 Nov 2020 09:33:12 -0500, Stephen Frost > > wrote in > > > * Kyotaro Horiguchi (horikyota@gmail.com) wrote: > > > > For fuel(?) of the

Re: In-placre persistance change of a relation

2020-11-11 Thread Kyotaro Horiguchi
At Wed, 11 Nov 2020 14:18:04 -0800, Andres Freund wrote in > Hi, > > I suggest outlining what you are trying to achieve here. Starting a new > thread and expecting people to dig through another thread to infer what > you are actually trying to achive isn't great. Agreed. I'll post that.

RE: Detecting File Damage & Inconsistencies

2020-11-11 Thread tsunakawa.ta...@fujitsu.com
From: Simon Riggs > I would like to propose a few points that will help us detect file > damage, inconsistencies in files and track actions of users. Hello, Simon san. Long time no see. I'm happy to see you be back here recently. What kind of improvement do you expect? What problems would

Re: logical streaming of xacts via test_decoding is broken

2020-11-11 Thread Dilip Kumar
On Thu, 12 Nov 2020 at 11:37 AM, Amit Kapila wrote: > On Thu, Nov 12, 2020 at 11:29 AM Dilip Kumar > wrote: > > > > On Thu, Nov 12, 2020 at 8:45 AM Amit Kapila > wrote: > > > > > > > > Another thing I am thinking let's just not expose skip_empty_stream to > > > the user and consider the

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 7:54 PM Eugen Konkov wrote: > Hello David, > > I have a table with services, each service have a period. After which > service is auto renewal > > Services also could be one-time. At this case its interval is '00:00:00' > In which case the concept of interval is

Re: logical streaming of xacts via test_decoding is broken

2020-11-11 Thread Amit Kapila
On Thu, Nov 12, 2020 at 11:29 AM Dilip Kumar wrote: > > On Thu, Nov 12, 2020 at 8:45 AM Amit Kapila wrote: > > > > > Another thing I am thinking let's just not expose skip_empty_stream to > > the user and consider the behavior based on the value of > > skip_empty_xacts. Internally, in the code,

Re: logical streaming of xacts via test_decoding is broken

2020-11-11 Thread Dilip Kumar
On Thu, Nov 12, 2020 at 8:45 AM Amit Kapila wrote: > > On Wed, Nov 11, 2020 at 7:05 PM Dilip Kumar wrote: > > > > On Wed, Nov 11, 2020 at 6:59 PM Amit Kapila wrote: > > > > > > On Wed, Nov 11, 2020 at 10:00 AM Dilip Kumar > > > wrote: > > > > > > > > On Tue, Nov 10, 2020 at 7:20 PM Amit

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

2020-11-11 Thread Fujii Masao
On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda

Re: Proposition for autoname columns

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 5:56 PM Bruce Momjian wrote: > On Thu, Nov 12, 2020 at 12:18:49AM +, Dagfinn Ilmari Mannsåker wrote: > > Bruce Momjian writes: > > > I think we could do it, but it would only work if the column was output > > > as a single json value, and not a multi-key/value field.

Re: Is it useful to record whether plans are generic or custom?

2020-11-11 Thread Pavel Stehule
čt 12. 11. 2020 v 2:50 odesílatel torikoshia napsal: > On 2020-09-29 02:39, legrand legrand wrote: > > Hi Atsushi, > > > > +1: Your proposal is a good answer for time based performance analysis > > (even if parsing durationor blks are not differentiated) . > > > > As it makes pgss number of

Re: Detecting File Damage & Inconsistencies

2020-11-11 Thread Jose Luis Tallon
On 11/11/20 21:56, Simon Riggs wrote: [ŝnip] REINDEX VERIFY After the new index is created, but before we drop the old index: Check whether the two indexes match: * checks whether the previous index had pointers to row versions that don't exist * checks whether the heap has rows that were not

Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module

2020-11-11 Thread Fujii Masao
On 2020/11/10 21:30, Bharath Rupireddy wrote: On Tue, Nov 10, 2020 at 3:04 PM Fujii Masao wrote: The main reason for having SetLatch() in SignalHandlerForConfigReload() is to wake up the calling process if waiting in WaitLatchOrSocket() or WaitLatch() and reload the new config file and

Re: Background writer and checkpointer in crash recovery

2020-11-11 Thread Thomas Munro
On Wed, Nov 11, 2020 at 9:57 PM Simon Riggs wrote: > Having said that, we did raise the checkpoint_timeout by a lot, so the > situation today might be quite different. A large checkpoint_timeout > could eventually overflow shared buffers, with the right workload. FWIW Jakuk Wartak did manage to

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

2020-11-11 Thread tsunakawa.ta...@fujitsu.com
The patch looks OK. I think as Thomas-san suggested, we can remove the modification to smgrnblocks() and don't care wheter the size is cached or not. But I think the current patch is good too, so I'd like to leave it up to a committer to decide which to choose. I measured performance in a

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

2020-11-11 Thread k.jami...@fujitsu.com
On Tuesday, November 10, 2020 3:10 PM, Tsunakawa-san wrote: > From: Jamison, Kirk/ジャミソン カーク > > So I proceeded to update the patches using the "cached" parameter and > > updated the corresponding comments to it in 0002. > > OK, I'm in favor of the name "cached" now, although I first agreed with

Re: Strange GiST logic leading to uninitialized memory access in pg_trgm gist code

2020-11-11 Thread Alexander Korotkov
Hi! On Wed, Nov 11, 2020 at 12:53 PM Andrew Gierth wrote: > Now the obvious simple fix is just to reorder those last two operations, > and the original reporter verified that doing so fixed their problem > (patch attached). But I'd really like to understand the logic here and > whether there is

Re: Delay of standby shutdown

2020-11-11 Thread Fujii Masao
On 2020/11/04 9:35, Soumyadeep Chakraborty wrote: Hello Fujii, On Thu, Sep 17, 2020 at 6:49 AM Fujii Masao wrote: As far as I understand after debugging, the problem is as follows: Yes. 1. After the primary is stopped, and the standby startup process is waiting inside: (void)

Re: logical streaming of xacts via test_decoding is broken

2020-11-11 Thread Amit Kapila
On Wed, Nov 11, 2020 at 7:05 PM Dilip Kumar wrote: > > On Wed, Nov 11, 2020 at 6:59 PM Amit Kapila wrote: > > > > On Wed, Nov 11, 2020 at 10:00 AM Dilip Kumar wrote: > > > > > > On Tue, Nov 10, 2020 at 7:20 PM Amit Kapila > > > wrote: > > > > > > > > On Tue, Nov 10, 2020 at 2:25 PM Dilip

RE: Disable WAL logging to speed up data loading

2020-11-11 Thread tsunakawa.ta...@fujitsu.com
From: Stephen Frost > I'm not sure that I see this as really being much of an issue. Perhaps there > are > some things we can do, as I mentioned before, to make it easier for users to > have tables be created as unlogged from the start, or to be able to ALTER > TABLE a bunch of tables at once

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-11-11 Thread David Rowley
On Tue, 10 Nov 2020 at 12:55, David Rowley wrote: > > On Tue, 10 Nov 2020 at 12:49, Tom Lane wrote: > > > > Alvaro Herrera writes: > > > Are you taking into account the possibility that generated machine code > > > is a small percent slower out of mere bad luck? I remember someone > > >

Re: enable pg_stat_statements to track rows processed by REFRESH MATERIALIZED VIEW

2020-11-11 Thread Fujii Masao
On 2020/11/10 17:29, Fujii Masao wrote: On 2020/11/05 23:54, Seino Yuki wrote: 2020-11-02 20:01 に Fujii Masao さんは書きました: On 2020/11/02 14:02, Yuki Seino wrote: The following review has been posted through the commitfest application: make installcheck-world:  tested, passed Implements

Re: Add docs stub for recovery.conf

2020-11-11 Thread Craig Ringer
On Thu, Nov 12, 2020 at 4:01 AM Bruce Momjian wrote: > On Wed, Nov 11, 2020 at 08:59:40PM +0100, Daniel Gustafsson wrote: > > > On 11 Nov 2020, at 20:44, Bruce Momjian wrote: > > > On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: > > > > >> I noticed that when recovery.conf was

Re: Add docs stub for recovery.conf

2020-11-11 Thread Craig Ringer
On Thu, Nov 12, 2020 at 3:44 AM Bruce Momjian wrote: > On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: > > Hi all > > > > I noticed that when recovery.conf was removed in 2dedf4d9a8 (yay!) the > docs for > > it were removed completely as well. That's largely sensible, but is >

RE: POC: postgres_fdw insert batching

2020-11-11 Thread tsunakawa.ta...@fujitsu.com
From: t...@corona.is.ed.ac.uk On Behalf Of > Does this patch affect trigger semantics on the base table? > > At the moment when I insert 1000 rows into a postgres_fdw table using a > single insert statement (e.g. INSERT INTO fdw_foo SELECT ... FROM bar) I > naively expect a "statement level"

Re: Avoiding useless SHA256 initialization with backup manifests, breaking base backups with FIPS

2020-11-11 Thread Michael Paquier
On Tue, Nov 10, 2020 at 11:00:14AM +0900, Michael Paquier wrote: > Attached is a patch that I would like to back-patch down to v13 to > avoid this useless initialization, giving users the possibility to > take base backups with FIPS when not using a backup manifest. Without > the solution in the

Re: Is it useful to record whether plans are generic or custom?

2020-11-11 Thread torikoshia
On 2020-09-29 02:39, legrand legrand wrote: Hi Atsushi, +1: Your proposal is a good answer for time based performance analysis (even if parsing durationor blks are not differentiated) . As it makes pgss number of columns wilder, may be an other solution would be to create a

Re: recovery_target immediate timestamp

2020-11-11 Thread Fujii Masao
On 2020/11/12 6:00, Euler Taveira wrote: Hi, While restoring a backup using recovery_target immediate, I noticed that there isn't a timestamp available. LOG:  consistent recovery state reached at 0/A000100 LOG:  recovery stopping after reaching consistency LOG:  pausing at the end of

Re: pg_upgrade analyze script

2020-11-11 Thread Michael Paquier
On Wed, Nov 11, 2020 at 04:51:27PM +0100, Magnus Hagander wrote: > Gah. For some reason, I did not spot this email until after I had > applied the other patch. And not only that, I also missed one line in > my patch that you included in yours :/ > > My apologies. No worries, thanks. -- Michael

Re: Proposition for autoname columns

2020-11-11 Thread Bruce Momjian
On Thu, Nov 12, 2020 at 12:18:49AM +, Dagfinn Ilmari Mannsåker wrote: > Bruce Momjian writes: > > I think we could do it, but it would only work if the column was output > > as a single json value, and not a multi-key/value field. I am afraid if > > we tried to do it, the result would be too

Re: Proposition for autoname columns

2020-11-11 Thread Dagfinn Ilmari Mannsåker
Bruce Momjian writes: > On Mon, Nov 2, 2020 at 05:05:29PM +0200, Eugen Konkov wrote: >> Hello Pgsql-hackers, >> >> When selecting data from json column it named as '?column?' >> tucha=# select info->>'suma', docn from document order by id desc limit 5; >> ?column? | docn >> --+--

Returning NULL from satisfies_hash_partition() is a bad idea

2020-11-11 Thread Tom Lane
So far as I can tell, the partition machinery is critically dependent on the idea that partition constraint conditions can never return NULL, only true or false. This is explicitly noted in the comments in get_qual_for_list, for instance, and it's visibly true by construction for both list and

Re: PATCH: Batch/pipelining support for libpq

2020-11-11 Thread Andres Freund
Hi, On 2020-11-03 10:42:34 -0300, Alvaro Herrera wrote: > It would definitely help if you (and others) could think about the API > being added: Does it fulfill the promises being made? Does it offer the > guarantees that real-world apps want to have? I'm not much of an > application writer

Tracking cluster upgrade and configuration history

2020-11-11 Thread Mark Dilger
Hello Hackers, While supporting customers, it would frequently be useful to have more information about the history of a cluster. For example, which prior versions were ever installed and running on the cluster? Has the cluster ever been run with fsync=off? When did the server last enter

Re: In-placre persistance change of a relation

2020-11-11 Thread Andres Freund
Hi, I suggest outlining what you are trying to achieve here. Starting a new thread and expecting people to dig through another thread to infer what you are actually trying to achive isn't great. FWIW, I'm *extremely* doubtful it's worth adding features that depend on a PGC_POSTMASTER

Re: Allow matching whole DN from a client certificate

2020-11-11 Thread Stephen Frost
Greetings, * Andrew Dunstan (and...@dunslane.net) wrote: > Currently we only match the Common Name (CN) of a client certificate > when authenticating a user. The attached patch allows matching the > entire Distinguished Name (DN) of the certificate. This is enabled by > the HBA line option

recovery_target immediate timestamp

2020-11-11 Thread Euler Taveira
Hi, While restoring a backup using recovery_target immediate, I noticed that there isn't a timestamp available. LOG: consistent recovery state reached at 0/A000100 LOG: recovery stopping after reaching consistency LOG: pausing at the end of recovery HINT: Execute pg_wal_replay_resume() to

Detecting File Damage & Inconsistencies

2020-11-11 Thread Simon Riggs
I would like to propose a few points that will help us detect file damage, inconsistencies in files and track actions of users. Optionally, we could add these fields onto the WAL commit record: * 8-byte session start time (from MyStartTime) * 2-byte pid (from MyProcPid) * 4-byte user oid

Re: cutting down the TODO list thread

2020-11-11 Thread John Naylor
Here is the next section on data types, proposed to be moved to the "not worth doing" page. As before, if there are any objections, do speak up. I'll make the move in a few days. **Datatypes - Fix data types where equality comparison is not intuitive, e.g. box There is likely no way to do this

Allow matching whole DN from a client certificate

2020-11-11 Thread Andrew Dunstan
Currently we only match the Common Name (CN) of a client certificate when authenticating a user. The attached patch allows matching the entire Distinguished Name (DN) of the certificate. This is enabled by the HBA line option "clientname", which can take the values "CN" or "DN". "CN" is the

Re: Add docs stub for recovery.conf

2020-11-11 Thread Daniel Gustafsson
> On 11 Nov 2020, at 21:01, Bruce Momjian wrote: > > On Wed, Nov 11, 2020 at 08:59:40PM +0100, Daniel Gustafsson wrote: >>> On 11 Nov 2020, at 20:44, Bruce Momjian wrote: >>> On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: >> I noticed that when recovery.conf was removed in

Re: Add docs stub for recovery.conf

2020-11-11 Thread Bruce Momjian
On Wed, Nov 11, 2020 at 08:59:40PM +0100, Daniel Gustafsson wrote: > > On 11 Nov 2020, at 20:44, Bruce Momjian wrote: > > On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: > > >> I noticed that when recovery.conf was removed in 2dedf4d9a8 (yay!) the > >> docs for > >> it were

Re: Add docs stub for recovery.conf

2020-11-11 Thread Daniel Gustafsson
> On 11 Nov 2020, at 20:44, Bruce Momjian wrote: > On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: >> I noticed that when recovery.conf was removed in 2dedf4d9a8 (yay!) the docs >> for >> it were removed completely as well. That's largely sensible, but is confusing >> when users

Re: Add docs stub for recovery.conf

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 12:44 PM Bruce Momjian wrote: > On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: > > Hi all > > > > I noticed that when recovery.conf was removed in 2dedf4d9a8 (yay!) the > docs for > > it were removed completely as well. That's largely sensible, but is >

Re: Parallel bitmap index scan

2020-11-11 Thread Tomas Vondra
Hi, I took a look at this today, doing a bit of stress-testing, and I can get it to crash because of segfaults in pagetable_create (not sure if the issue is there, it might be just a symptom of an issue elsewhere). Attached is a shell script I use to run the stress test - it's using 'test'

Re: Split copy.c

2020-11-11 Thread Soumyadeep Chakraborty
Hey Heikki, On Tue, Nov 3, 2020 at 1:30 AM Heikki Linnakangas wrote: Thanks for working on this refactor. LGTM! I had a few minor comments: 1. We should rename the CopyFormatOptions *cstate param in ProcessCopyOptions() to CopyFormatOptions *options and List *options to List *raw_options IMO,

Re: Add docs stub for recovery.conf

2020-11-11 Thread Bruce Momjian
On Tue, Nov 10, 2020 at 01:38:14PM +0800, Craig Ringer wrote: > Hi all > > I noticed that when recovery.conf was removed in 2dedf4d9a8 (yay!) the docs > for > it were removed completely as well. That's largely sensible, but is confusing > when users have upgraded and are trying to find out what

Re: Allow some recovery parameters to be changed with reload

2020-11-11 Thread Sergei Kornilov
Hello > Anyway, for now I think that your first patch would be enough, i.e., > just change the context of restore_command to PGC_SIGHUP. Glad to hear. Attached a rebased version of the original proposal. regards, Sergeidiff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 12:12 PM Eugen Konkov wrote: > > > So I feature request to allow zero size step for cases when > start point is equest to finish > > > What do you think? > > > > hm probably with step 0 we always should generate series of one > value and exit, despite on

Re: Add session statistics to pg_stat_database

2020-11-11 Thread Laurenz Albe
On Tue, 2020-11-10 at 15:03 +, Georgios Kokolatos wrote: > I noticed that the cfbot fails for this patch. > > For this, I am setting the status to: 'Waiting on Author'. Thanks for noticing, it was only the documentation build. Version 5 attached, status changed back to "waiting for review".

Re: Proposition for autoname columns

2020-11-11 Thread Eugen Konkov
Hello Bruce, Wednesday, November 11, 2020, 5:56:08 PM, you wrote: > On Mon, Nov 2, 2020 at 05:05:29PM +0200, Eugen Konkov wrote: >> Hello Pgsql-hackers, >> >> When selecting data from json column it named as '?column?' >> tucha=# select info->>'suma', docn from document order by id desc limit

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread Eugen Konkov
Hello Eugen, Wednesday, November 11, 2020, 8:50:59 PM, you wrote: > Hello Pgsql-hackers, > Seems I fall into corner case: test=>> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL '00:00:00' ); > ERROR: step size cannot equal zero > But: test=>> SELECT * FROM

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 11:59 AM Eugen Konkov wrote: > So I feature request to allow zero size step for cases when start > point is equest to finish > > What do you think? > I don't see how this is useful. If they are equal and you use a non-zero step you get back the one record you

Re: Support for NSS as a libpq TLS backend

2020-11-11 Thread Jacob Champion
On Nov 11, 2020, at 10:17 AM, Jacob Champion wrote: > > (Two failures left on my machine.) False alarm -- the stderr debugging I'd added in to track down the assertion tripped up the "no stderr" tests. Zero failing tests now. --Jacob

Re: Feature request: Improve allowed values for generate series

2020-11-11 Thread Pavel Stehule
st 11. 11. 2020 v 19:59 odesílatel Eugen Konkov napsal: > Hello Pgsql-hackers, > > Seems I fall into corner case: > > test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL > '00:00:00' ); > ERROR: step size cannot equal zero > > But: > test=> SELECT * FROM generate_series(

Feature request: Improve allowed values for generate series

2020-11-11 Thread Eugen Konkov
Hello Pgsql-hackers, Seems I fall into corner case: test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-09', INTERVAL '00:00:00' ); ERROR: step size cannot equal zero But: test=> SELECT * FROM generate_series( '2020-11-09', '2020-11-10', INTERVAL '1 day' ); generate_series

Re: Allow some recovery parameters to be changed with reload

2020-11-11 Thread Fujii Masao
On 2020/11/07 6:36, Sergei Kornilov wrote: Hello I'm wondering if it's safe to allow restore_command to be emptied during archive recovery. Even when it's emptied, archive recovery can proceed by reading WAL files from pg_wal directory. This is the same behavior as when restore_command is

Re: Support for NSS as a libpq TLS backend

2020-11-11 Thread Jacob Champion
On Nov 10, 2020, at 2:28 PM, Daniel Gustafsson wrote: > > Digging through the archives from when this landed in curl, the assertion > failure was never fully identified back then but happened spuriously. Which > version of NSPR is this happening with? This is NSPR 4.29, with debugging enabled.

Re: PATCH: Attempt to make dbsize a bit more consistent

2020-11-11 Thread Soumyadeep Chakraborty
Hey Georgios, On Tue, Nov 10, 2020 at 6:20 AM wrote: > > > > > > > ‐‐‐ Original Message ‐‐‐ > On Monday, November 9, 2020 7:50 PM, Soumyadeep Chakraborty > wrote: > > > Hey Georgios, > > > > Thanks for looking for more avenues to invoke tableAM APIS! Please find > > my review below: >

Re: Parallel copy

2020-11-11 Thread vignesh C
On Tue, Nov 10, 2020 at 7:27 PM Amit Kapila wrote: > > On Tue, Nov 10, 2020 at 7:12 PM vignesh C wrote: > > > > On Tue, Nov 3, 2020 at 2:28 PM Amit Kapila wrote: > > > > > > > I have worked to provide a patch for the parallel safety checks. It > > checks if parallely copy can be performed,

Re: Implementing Incremental View Maintenance

2020-11-11 Thread legrand legrand
Hello Konstantin, I remember testing it with pg_stat_statements (and planning counters enabled). Maybe identifying internal queries associated with this (simple) test case, could help dev team ? Regards PAscal -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-11 Thread Bruce Momjian
On Wed, Nov 11, 2020 at 05:39:10PM +0100, Magnus Hagander wrote: > On Wed, Nov 11, 2020 at 5:38 PM Bruce Momjian wrote: > > > > On Wed, Nov 11, 2020 at 11:21:22AM -0500, Bruce Momjian wrote: > > > On Wed, Nov 11, 2020 at 05:11:38PM +0100, Magnus Hagander wrote: > > > > > In summary, I think the

Re: Proposition for autoname columns

2020-11-11 Thread David G. Johnston
On Wed, Nov 11, 2020 at 8:56 AM Bruce Momjian wrote: > > It would be useful if the name of column will be autoassigned based on > > name of json key. Like at next query: > > > > tucha=# select info->>'suma' as suma, docn from document order by id > desc limit 5; > > suma | docn > >

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-11 Thread Magnus Hagander
On Wed, Nov 11, 2020 at 5:38 PM Bruce Momjian wrote: > > On Wed, Nov 11, 2020 at 11:21:22AM -0500, Bruce Momjian wrote: > > On Wed, Nov 11, 2020 at 05:11:38PM +0100, Magnus Hagander wrote: > > > > In summary, I think the vacuumdb --analyze is now a one-line command, > > > > but the delete part

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-11 Thread Bruce Momjian
On Wed, Nov 11, 2020 at 11:21:22AM -0500, Bruce Momjian wrote: > On Wed, Nov 11, 2020 at 05:11:38PM +0100, Magnus Hagander wrote: > > > In summary, I think the vacuumdb --analyze is now a one-line command, > > > but the delete part can be complex and not easily typed. > > > > I definitely agree

Re: Supporting = operator in gin/gist_trgm_ops

2020-11-11 Thread Georgios Kokolatos
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Hi, this patch implements a useful and missing feature. Thank you.

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-11 Thread Bruce Momjian
On Wed, Nov 11, 2020 at 05:11:38PM +0100, Magnus Hagander wrote: > > Uh, pg_upgrade does enumerate things like tablespaces in > > create_script_for_old_cluster_deletion(). I think config file locations > > are beyond the scope of what we want pg_upgrade to handle. > > Ah, that's right. Forgot

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-11 Thread Magnus Hagander
On Wed, Nov 11, 2020 at 4:53 PM Bruce Momjian wrote: > > On Mon, Nov 2, 2020 at 02:23:35PM +0100, Magnus Hagander wrote: > > On Tue, Oct 27, 2020 at 12:40 PM Bruce Momjian wrote: > > > > > > On Tue, Oct 27, 2020 at 12:35:56PM +0100, Peter Eisentraut wrote: > > > > On 2020-10-27 11:53, Bruce

Re: Implementing Incremental View Maintenance

2020-11-11 Thread Konstantin Knizhnik
On 05.10.2020 12:16, Yugo NAGATA wrote: Hi, Attached is the rebased patch (v18) to add support for Incremental Materialized View Maintenance (IVM). It is able to be applied to current latest master branch. Thank you very much for this work. I consider incremental materialized views as

RE: POC: postgres_fdw insert batching

2020-11-11 Thread Tim . Colles
On Wed, 11 Nov 2020, tsunakawa.ta...@fujitsu.com wrote: This email was sent to you by someone outside of the University. You should only click on links or attachments if you are certain that the email is genuine and the content is safe. From: Tomas Vondra I see the patch builds the "bulk"

Re: Proposition for autoname columns

2020-11-11 Thread Bruce Momjian
On Mon, Nov 2, 2020 at 05:05:29PM +0200, Eugen Konkov wrote: > Hello Pgsql-hackers, > > When selecting data from json column it named as '?column?' > tucha=# select info->>'suma', docn from document order by id desc limit 5; > ?column? | docn > --+-- > 665.97 | 695 > 513.51 |

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-11 Thread Bruce Momjian
On Mon, Nov 2, 2020 at 02:23:35PM +0100, Magnus Hagander wrote: > On Tue, Oct 27, 2020 at 12:40 PM Bruce Momjian wrote: > > > > On Tue, Oct 27, 2020 at 12:35:56PM +0100, Peter Eisentraut wrote: > > > On 2020-10-27 11:53, Bruce Momjian wrote: > > > > On Tue, Oct 27, 2020 at 11:35:25AM +0100,

Re: pg_upgrade analyze script

2020-11-11 Thread Magnus Hagander
On Wed, Nov 11, 2020 at 2:21 AM Michael Paquier wrote: > > On Tue, Nov 10, 2020 at 10:21:04AM +0900, Michael Paquier wrote: > > On Mon, Nov 09, 2020 at 03:47:22PM +0100, Peter Eisentraut wrote: > >> You should just remove those calls. There is no need to replace them with > >> vacuumdb calls.

Re: pg_upgrade analyze script

2020-11-11 Thread Magnus Hagander
On Mon, Nov 9, 2020 at 3:47 PM Peter Eisentraut wrote: > > On 2020-11-09 11:22, Magnus Hagander wrote: > >> I have spotted one small-ish thing. This patch is missing to update > >> the following code in vcregress.pl: > >> print "\nSetting up stats on new cluster\n\n"; > >>

Re: proposal: possibility to read dumped table's name from file

2020-11-11 Thread Alvaro Herrera
On 2020-Nov-11, Pavel Stehule wrote: > I think the proposed feature is very far to be the config file for pg_dump > (it implements a option "--filter"). This is not the target. It is not > designed for this. This is just an alternative for options like -t, -T, ... > and I am sure so nobody will

Re: In-place persistance change of a relation

2020-11-11 Thread Stephen Frost
Greetings, * Kyotaro Horiguchi (horikyota@gmail.com) wrote: > At Tue, 10 Nov 2020 09:33:12 -0500, Stephen Frost wrote > in > > * Kyotaro Horiguchi (horikyota@gmail.com) wrote: > > > For fuel(?) of the discussion, I tried a very-quick PoC for in-place > > > ALTER TABLE SET

Re: Disable WAL logging to speed up data loading

2020-11-11 Thread Stephen Frost
Greetings, * tsunakawa.ta...@fujitsu.com (tsunakawa.ta...@fujitsu.com) wrote: > * ALTER TABLE SET UNLOGGED/LOGGED without data copy > Good: > - Does not require server restart (if this feature can be used in all > wal_level settings). > > Bad: > - The user has to maintain and modify some

Re: avoid bitmapOR-ing indexes with scan condition inconsistent with partition constraint

2020-11-11 Thread Konstantin Knizhnik
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 I think that work on improving operator_predicate_proof should

Re: Skip ExecCheckRTPerms in CTAS with no data

2020-11-11 Thread Bharath Rupireddy
On Tue, Nov 10, 2020 at 1:18 AM Anastasia Lubennikova wrote: > > I took a look at the patch. It is quite simple, so no comments about the > code. It would be good to add a test to select_into.sql to show that it > only applies to 'WITH NO DATA' and that subsequent insertions will fail > if

Re: logical streaming of xacts via test_decoding is broken

2020-11-11 Thread Dilip Kumar
On Wed, Nov 11, 2020 at 6:59 PM Amit Kapila wrote: > > On Wed, Nov 11, 2020 at 10:00 AM Dilip Kumar wrote: > > > > On Tue, Nov 10, 2020 at 7:20 PM Amit Kapila wrote: > > > > > > On Tue, Nov 10, 2020 at 2:25 PM Dilip Kumar wrote: > > > > > > > > > > You can probably add a comment as to why we

Re: logical streaming of xacts via test_decoding is broken

2020-11-11 Thread Amit Kapila
On Wed, Nov 11, 2020 at 10:00 AM Dilip Kumar wrote: > > On Tue, Nov 10, 2020 at 7:20 PM Amit Kapila wrote: > > > > On Tue, Nov 10, 2020 at 2:25 PM Dilip Kumar wrote: > > > > > > > You can probably add a comment as to why we are disallowing this case. > > I thought of considering

Re: cutting down the TODO list thread

2020-11-11 Thread John Naylor
On Tue, Nov 10, 2020 at 7:08 PM Bruce Momjian wrote: > On Tue, Nov 3, 2020 at 02:06:13PM -0400, John Naylor wrote: > > I was thinking of not having the next updates during commitfest, but it > could > > also be argued this is a type of review, and the things here will be > returned > > with

Re: Clean up optional rules in grammar

2020-11-11 Thread John Naylor
On Wed, Nov 11, 2020 at 5:13 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > It's obviously confusing to have multiple different styles to do the > same thing. And these extra rules (including the empty ones) also end > up in the output, so they create more work down the line.

Re: Prefer TG_TABLE_NAME over TG_RELNAME in tests

2020-11-11 Thread Greg Sabino Mullane
Thanks so much: the Bucardo PR has been merged in.

Re: ModifyTable overheads in generic plans

2020-11-11 Thread Heikki Linnakangas
I'm still a bit confused and unhappy about the initialization of ResultRelInfos and the various fields in them. We've made progress in the previous patches, but it's still a bit messy. /* * If transition tuples will be captured, initialize a map to convert

Re: Clean up optional rules in grammar

2020-11-11 Thread Peter Eisentraut
On 2020-11-11 12:43, Vik Fearing wrote: No objections, but could we also take this opportunity to standardize the comment itself? Even in your patch there is a mix of spacing and casing. My preference is /* EMPTY */. That is, uppercase with spaces, but whatever gets chosen is fine with me.

Re: abstract Unix-domain sockets

2020-11-11 Thread Peter Eisentraut
On 2020-11-10 07:24, Michael Paquier wrote: Can you sketch how you would structure this? I realize it's not very elegant, but I couldn't come up with a better way that didn't involve having to duplicate some of the error messages into multiple branches. I think that I would use a StringInfo

RE: pgbench: option delaying queries till connections establishment?

2020-11-11 Thread Fabien COELHO
Hello, I can remove the line, but I strongly believe that reporting performance figures if some client connection failed thus the bench could not run as prescribed is a bad behavior. The good news is that it is probably quite unlikely. So I'd prefer to keep it and possibly submit a patch to

Re: making update/delete of inheritance trees scale better

2020-11-11 Thread Heikki Linnakangas
On 29/10/2020 15:03, Amit Langote wrote: Rebased over the recent executor result relation related commits. ModifyTablePath didn't get the memo that a ModifyTable can only have one subpath after these patches. Attached patch, on top of your v5 patches, cleans that up. - Heikki diff --git

Re: Clean up optional rules in grammar

2020-11-11 Thread Vik Fearing
On 11/11/20 10:12 AM, Peter Eisentraut wrote: > There are a number of rules like this in the grammar: > > opt_foo: FOO >     | /*EMPTY*/ > ; > > And there are some like this: > > opt_foo: FOO {} >     | /*EMPTY*/  {} > ; > > and some even like this: > > %type opt_foo > >

RE: pgbench: option delaying queries till connections establishment?

2020-11-11 Thread kuroda.hay...@fujitsu.com
Dear Fabien, > Usually I run many pgbench through scripts, so I'm probably not there to > check a lone stderr failure at the beginning if performance figures are > actually reported. > I can remove the line, but I strongly believe that reporting performance > figures if some client connection

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

2020-11-11 Thread Ajin Cherian
Did some further tests on the problem I saw and I see that it does not have anything to do with this patch. I picked code from top of head. If I have enough changes in a transaction to initiate streaming, then it will also stream the same changes after a commit. BEGIN; INSERT INTO stream_test

Re: Clean up optional rules in grammar

2020-11-11 Thread Heikki Linnakangas
On 11/11/2020 11:12, Peter Eisentraut wrote: The attached patch cleans this up to make them all look like the first style. +1 - Heikki

Re: warn_unused_results

2020-11-11 Thread Peter Eisentraut
On 2020-11-10 04:34, Michael Paquier wrote: I am not sure about the addition of repalloc(), as it is quite obvious that one has to use its result. Lists are fine, these are proper to PG internals and beginners tend to be easily confused in the way to use them. realloc() is listed in the GCC

Strange GiST logic leading to uninitialized memory access in pg_trgm gist code

2020-11-11 Thread Andrew Gierth
(From a report by user "ftzdomino" on IRC of a segfault while loading data with a pg_trgm gist index) If gtrgm_picksplit is invoked on a vector of exactly 2 items (which I think is rare, but it can happen if gistSplit recurses or I think in cases of secondary splits), then it tries to access

  1   2   >