Re: recovery_target_action=pause with confusing hint

2020-04-08 Thread Fujii Masao
On 2020/04/02 10:41, movead...@highgo.ca wrote: >So I'd like to propose the attached patch. The patch changes the message logged when a promotion is requested, based on whether the recovery is in paused state or not. It is a compromise, Ok, so barring any objection, I will commit the pat

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-08 Thread davinder singh
On Tue, Apr 7, 2020 at 8:30 PM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > > * The logic on "defined(_MSC_VER) && (_MSC_VER >= 1900)" is defined as > "_WIN32_WINNT >= 0x0600" on other parts of the code. I would > recommend using the later. > I think "_WIN32_WINNT >= 0x0600

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-08 Thread Amit Kapila
On Wed, Apr 8, 2020 at 11:53 AM Masahiko Sawada wrote: > > On Wed, 8 Apr 2020 at 14:44, Amit Kapila wrote: > > > > > > Thanks for the investigation. I don't see we can do anything special > > about this. In an ideal world, this should be done once and not for > > each worker but I guess it does

Re: WIP/PoC for parallel backup

2020-04-08 Thread Asif Rehman
rebased and updated to current master (d025cf88ba). v12 is attahced. Also, changed the grammar for LIST_WAL_FILES and SEND_FILE to: - LIST_WAL_FILES 'startptr' 'endptr' - SEND_FILE 'FILE' [NOVERIFY_CHECKSUMS] On Wed, Apr 8, 2020 at 10:48 AM Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterpris

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-08 Thread Julien Rouhaud
On Wed, Apr 8, 2020 at 8:23 AM Masahiko Sawada wrote: > > On Wed, 8 Apr 2020 at 14:44, Amit Kapila wrote: > > > > On Tue, Apr 7, 2020 at 5:17 PM Masahiko Sawada > > wrote: > > > > > > On Tue, 7 Apr 2020 at 18:29, Masahiko Sawada > > > wrote: > > > > > > > > On Tue, 7 Apr 2020 at 17:42, Amit Kap

Re: segmentation fault using currtid and partitioned tables

2020-04-08 Thread Michael Paquier
On Sun, Apr 05, 2020 at 12:51:56PM -0400, Tom Lane wrote: > I think it might be a good idea to make relations-without-storage > set up rd_tableam as a vector of dummy functions that will throw > some suitable complaint about "relation lacks storage". NULL is > a horrible default for this. Yeah, t

Re: doc review for parallel vacuum

2020-04-08 Thread Masahiko Sawada
On Tue, 7 Apr 2020 at 13:55, Justin Pryzby wrote: > > On Tue, Apr 07, 2020 at 09:57:46AM +0530, Amit Kapila wrote: > > On Mon, Mar 23, 2020 at 10:34 AM Amit Kapila > > wrote: > > > On Sun, Mar 22, 2020 at 7:48 AM Justin Pryzby > > > wrote: > > > > > > > > Original, long thread > > > > https://

Re: BUG #16346: pg_upgrade fails on a trigger with a comment

2020-04-08 Thread Hamid Akhtar
I have tested the patch in a little more detail. (1) Verified that it fixes the bug (2) Ran regression tests; all are passing. To recap, the attached patch moves restoration of comments to the RESTORE_PASS_POST_ACL. This ensures that comments are restored in a PASS when essentially all required ob

Re: 2pc leaks fds

2020-04-08 Thread Antonin Houska
Antonin Houska wrote: > Andres Freund wrote: > > But I'm not sure it's quite the right idea. I'm not sure I fully > > understand the design of 0dc8ead46, but it looks to me like it's > > intended to allow users of the interface to have different ways of > > opening files. If we just close() the

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-08 Thread Kuntal Ghosh
Hi, On Wed, Apr 8, 2020 at 7:07 AM Etsuro Fujita wrote: > > Pushed after modifying some comments further, based on the suggestions > of Ashutosh. I'm getting the following warning during compilation. partbounds.c: In function ‘partition_bounds_merge’: partbounds.c:1024:21: warning: unused variab

Re: recovery_target_action=pause with confusing hint

2020-04-08 Thread movead...@highgo.ca
>> we should notice it in document I think. >There is the following explation about the relationship the recovery >pause and the promotion, in the document. You may want to add more >descriptions into the docs? >-- >If a promotion is triggered while recovery is paused,

Re: [HACKERS] Restricting maximum keep segments by repslots

2020-04-08 Thread Kyotaro Horiguchi
At Wed, 08 Apr 2020 14:19:56 +0900 (JST), Kyotaro Horiguchi wrote in > I saw another issue, the following sequence on the primary freezes > when invalidation happens. > > =# create table tt(); drop table tt; select pg_switch_wal();create table > tt(); drop table tt; select pg_switch_wal();crea

Re: 2pc leaks fds

2020-04-08 Thread Antonin Houska
Andres Freund wrote: > On 2020-04-06 09:12:32 +0200, Antonin Houska wrote: > > Andres Freund wrote: > > It should have allowed users to have different ways to *locate the segment* > > file. The WALSegmentOpen callback could actually return file path instead of > > the file descriptor and let WAL

Re: [HACKERS] Restricting maximum keep segments by repslots

2020-04-08 Thread Kyotaro Horiguchi
At Wed, 08 Apr 2020 16:46:05 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 08 Apr 2020 14:19:56 +0900 (JST), Kyotaro Horiguchi > wrote in > The latch triggered by checkpoint request by CHECKPOINT command has > been absorbed by ConditionVariableSleep() in > InvalidateObsoleteReplicationSlo

Re: [Proposal] Global temporary tables

2020-04-08 Thread 曾文旌
> 2020年4月7日 下午6:22,Prabhat Sahu 写道: > > Thanks for review. > This parameter should support all types of writing of the bool type like > parameter autovacuum_enabled. > So I fixed in global_temporary_table_v24-pg13.patch. > > Thank you Wenjing for the new patch with the fix and the "VACUUM FUL

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-08 Thread Masahiko Sawada
On Wed, 8 Apr 2020 at 16:04, Amit Kapila wrote: > > On Wed, Apr 8, 2020 at 11:53 AM Masahiko Sawada > wrote: > > > > On Wed, 8 Apr 2020 at 14:44, Amit Kapila wrote: > > > > > > > > > Thanks for the investigation. I don't see we can do anything special > > > about this. In an ideal world, this

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-04-08 Thread Fujii Masao
On 2020/04/03 16:26, Julien Rouhaud wrote: On Thu, Apr 02, 2020 at 01:04:28PM -0700, legrand legrand wrote: Fujii Masao-4 wrote On 2020/04/01 18:19, Fujii Masao wrote: Finally I pushed the patch! Many thanks for all involved in this patch! As a remaining TODO item, I'm thinking that the doc

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-08 Thread Amit Kapila
On Wed, Apr 8, 2020 at 1:49 PM Masahiko Sawada wrote: > > On Wed, 8 Apr 2020 at 16:04, Amit Kapila wrote: > > > > On Wed, Apr 8, 2020 at 11:53 AM Masahiko Sawada > > wrote: > > > > > > On Wed, 8 Apr 2020 at 14:44, Amit Kapila wrote: > > > > > > > > > > > > Thanks for the investigation. I don't

[PATCH] RUM Postgres 13 patch

2020-04-08 Thread Pavel Borisov
Dear hackers! Due to changes in PG13 RUM extension had errors on compiling. I propose a short patch to correct this. Best regards, Pavel Borisov rum_pg13_patch.diff Description: Binary data

Re: recovery_target_action=pause with confusing hint

2020-04-08 Thread Fujii Masao
On 2020/04/08 16:41, movead...@highgo.ca wrote: >> we should notice it in document I think. There is the following explation about the relationship the recovery pause and the promotion, in the document. You may want to add more descriptions into the docs? >--

Re: adding partitioned tables to publications

2020-04-08 Thread Peter Eisentraut
On 2020-04-08 07:45, Amit Langote wrote: On Wed, Apr 8, 2020 at 1:22 AM Amit Langote wrote: On Tue, Apr 7, 2020 at 6:01 PM Peter Eisentraut wrote: The descriptions of the new fields in RelationSyncEntry don't seem to match the code accurately, or at least it's confusing. replicate_as_relid is

Re: [PATCH] RUM Postgres 13 patch

2020-04-08 Thread Alexander Korotkov
Hi, Pavel! On Wed, Apr 8, 2020 at 12:14 PM Pavel Borisov wrote: > Due to changes in PG13 RUM extension had errors on compiling. > I propose a short patch to correct this. RUM is an extension managed by Postgres Pro and not discussed in pgsql-hackers mailing lists. Please, make a pull request on

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-04-08 Thread Julien Rouhaud
On Wed, Apr 08, 2020 at 05:37:27PM +0900, Fujii Masao wrote: > > > On 2020/04/03 16:26, Julien Rouhaud wrote: > > On Thu, Apr 02, 2020 at 01:04:28PM -0700, legrand legrand wrote: > > > Fujii Masao-4 wrote > > > > On 2020/04/01 18:19, Fujii Masao wrote: > > > > > > > > Finally I pushed the patch!

Re: recovery_target_action=pause with confusing hint

2020-04-08 Thread movead...@highgo.ca
>To cover your case, what about adding the following description? >- >There can be delay between a promotion request by users and the trigger of >a promotion in the server. Note that pg_wal_replay_pause() succeeds >during that delay, i.e., until a promotion is actually triggered.

[Patch] Use internal pthreads reimplementation only when building with MSVC

2020-04-08 Thread Sandro Mani
Hi The following patch, which we added to build mingw-postgresql on Fedora, makes the internal minimal pthreads reimplementation only used when building with MSVC, as on MINGW it causes symbol collisions with the symbols provided my winpthreads. Thanks Sandro diff -rupN postgresql-11.5/src

[Patch] Add missing libraries to Libs.private of libpq.pc

2020-04-08 Thread Sandro Mani
Hello The following patch, which we added to build mingw-postgresql on Fedora, adds some missing libraries to Libs.private of libpq.pc, discovered when attempting to statically link with libpq: -lz: is required by -lcrypto -liconv: is required by -lintl (though possibly depends on whether ge

Re: 2pc leaks fds

2020-04-08 Thread Ahsan Hadi
I have tested with and without the commit from Andres using the pgbench script (below) provided in the initial email. pgbench -n -s 500 -c 4 -j 4 -T 10 -P1 -f pgbench-write-2pc.sql I am not getting the leak anymore, it seems to be holding up pretty well. On Wed, Apr 8, 2020 at 12:59 PM Anto

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-08 Thread Etsuro Fujita
Hi Kuntal, On Wed, Apr 8, 2020 at 4:30 PM Kuntal Ghosh wrote: > I'm getting the following warning during compilation. > > partbounds.c: In function ‘partition_bounds_merge’: > partbounds.c:1024:21: warning: unused variable ‘inner_binfo’ > [-Wunused-variable] > PartitionBoundInfo inner_binfo =

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-08 Thread Ashutosh Bapat
Thanks Kuntal for the report. Let me know if this patch works for you. On Wed, 8 Apr 2020 at 13:00, Kuntal Ghosh wrote: > Hi, > > On Wed, Apr 8, 2020 at 7:07 AM Etsuro Fujita > wrote: > > > > Pushed after modifying some comments further, based on the suggestions > > of Ashutosh. > I'm getting t

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-08 Thread Ashutosh Bapat
On Wed, 8 Apr 2020 at 15:42, Etsuro Fujita wrote: > Hi Kuntal, > > On Wed, Apr 8, 2020 at 4:30 PM Kuntal Ghosh > wrote: > > I'm getting the following warning during compilation. > > > > partbounds.c: In function ‘partition_bounds_merge’: > > partbounds.c:1024:21: warning: unused variable ‘inner_

Re: [Proposal] Global temporary tables

2020-04-08 Thread tushar
On 4/7/20 2:27 PM, 曾文旌 wrote: Vacuum full GTT, cluster GTT is already supported in global_temporary_table_v24-pg13.patch. Please refer this below scenario , where pg_upgrade is failing 1)Server is up and running (./pg_ctl -D data status) 2)Stop the server ( ./pg_ctl -D data stop) 3)Connect to se

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread Tomas Vondra
On Tue, Apr 07, 2020 at 11:54:23PM -0400, Tom Lane wrote: hyrax is not too happy with this test: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hyrax&dt=2020-04-07%2004%3A55%3A15 It's not too clear to me why CLOBBER_CACHE_ALWAYS would be breaking EXPLAIN output, but it evidently is.

Re: [Proposal] Global temporary tables

2020-04-08 Thread Prabhat Sahu
On Wed, Apr 8, 2020 at 1:48 PM 曾文旌 wrote: > > > 2020年4月7日 下午6:22,Prabhat Sahu 写道: > > Thanks for review. >> This parameter should support all types of writing of the bool type like >> parameter autovacuum_enabled. >> So I fixed in global_temporary_table_v24-pg13.patch. >> > > Thank you Wenjing f

Re: Parallel copy

2020-04-08 Thread Amit Kapila
On Tue, Apr 7, 2020 at 7:08 PM Ants Aasma wrote: > > On Tue, 7 Apr 2020 at 08:24, vignesh C wrote: > > Leader will create a circular queue > > and share it across the workers. The circular queue will be present in > > DSM. Leader will be using a fixed size queue to share the contents > > between

Re: adding partitioned tables to publications

2020-04-08 Thread Amit Langote
On Wed, Apr 8, 2020 at 6:26 PM Peter Eisentraut wrote: > All committed. > > Thank you and everyone very much for working on this. I'm very happy > that these two features from PG10 have finally met. :) Thanks a lot for reviewing and committing. prion seems to have failed: https://buildfarm.post

Re: WIP: WAL prefetch (another approach)

2020-04-08 Thread Thomas Munro
On Wed, Apr 8, 2020 at 12:52 PM Thomas Munro wrote: > * he gave some feedback on the read_local_xlog_page() modifications: I > probably need to reconsider the change to logical.c that passes NULL > instead of cxt to the read_page callback; and the switch statement in > read_local_xlog_page() proba

Re: WIP: WAL prefetch (another approach)

2020-04-08 Thread Thomas Munro
On Wed, Apr 8, 2020 at 11:27 PM Thomas Munro wrote: > On Wed, Apr 8, 2020 at 12:52 PM Thomas Munro wrote: > > * he gave some feedback on the read_local_xlog_page() modifications: I > > probably need to reconsider the change to logical.c that passes NULL > > instead of cxt to the read_page callbac

Re: adding partitioned tables to publications

2020-04-08 Thread Peter Eisentraut
On 2020-04-08 13:16, Amit Langote wrote: On Wed, Apr 8, 2020 at 6:26 PM Peter Eisentraut wrote: All committed. Thank you and everyone very much for working on this. I'm very happy that these two features from PG10 have finally met. :) Thanks a lot for reviewing and committing. prion seems

Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread tushar
Hi, I just came across this scenario  where - vaccum o/p with (full 1, parallel 0) option not working --working postgres=# vacuum (parallel 1, full 0 ) foo; VACUUM postgres=# --Not working postgres=# vacuum (full 1, parallel 0 ) foo; ERROR:  cannot specify both FULL and PARALLEL options I

Re: Thoughts on "killed tuples" index hint bits support on standby

2020-04-08 Thread Michail Nikolaev
Hello, Peter. Thanks for your feedback. > Attached is a very rough POC patch of my own, which makes item > deletion occur "non-opportunistically" in unique indexes. The idea is > that we exploit the uniqueness property of unique indexes to identify > "version churn" from non-HOT updates. If any s

Re: WIP: WAL prefetch (another approach)

2020-04-08 Thread David Steele
On 4/8/20 8:12 AM, Thomas Munro wrote: Ok, so the following parts of this work have been committed: b09ff536: Simplify the effective_io_concurrency setting. fc34b0d9: Introduce a maintenance_io_concurrency setting. 3985b600: Support PrefetchBuffer() in recovery. d140f2f3: Rationalize GetWal

Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 8:22 AM tushar wrote: > I just came across this scenario where - vaccum o/p with (full 1, > parallel 0) option not working > > --working > > postgres=# vacuum (parallel 1, full 0 ) foo; > VACUUM > postgres=# > > --Not working > > postgres=# vacuum (full 1, parallel 0 ) foo;

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-04-08 Thread legrand legrand
Fujii Masao-4 wrote > On 2020/04/03 16:26 > [...] >> >> "Note that planning and execution statistics are updated only at their >> respective end phase, and only for successful operations. >> For example the execution counters of a long running query >> will only be updated at the execution end, wi

Re: [patch]socket_timeout in interfaces/libpq

2020-04-08 Thread David Steele
On 3/24/20 10:58 AM, David Steele wrote: On 11/29/19 12:22 AM, nagaura.ryo...@fujitsu.com wrote: > I couldn't understand what you meant. Do you say that we shouldn't change pqWait() behavior? Or should I modify my patch to use pqDropConnection()? This patch no longer applies: http://cfbot.cpu

Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove pgbench "progress" test pending solution of its timing is (fwd)

2020-04-08 Thread David Steele
On 3/28/20 5:27 AM, Fabien COELHO wrote: Hello Tom, Thanks for your feedback, I'd be rather unclear about what the actual feedback is, though. I'd interpret it as "pg does not care much about code coverage". Most clients are in the red on coverage.postgresql.org. I'd like pgbench at least t

Re: Improving connection scalability: GetSnapshotData()

2020-04-08 Thread Alexander Korotkov
On Wed, Apr 8, 2020 at 3:43 PM Andres Freund wrote: > Realistically it still 2-3 hours of proof-reading. > > This makes me sad :( Can we ask RMT to extend feature freeze for this particular patchset? I think it's reasonable assuming extreme importance of this patchset. -- Alexander Korotkov

Re: Improving connection scalability: GetSnapshotData()

2020-04-08 Thread Robert Haas
On Tue, Apr 7, 2020 at 4:27 PM Andres Freund wrote: > The main reason is that we want to be able to cheaply check the current > state of the variables (mostly when checking a backend's own state). We > can't access the "dense" ones without holding a lock, but we e.g. don't > want to make ProcArray

Re: Allow auto_explain to log plans before queries are executed

2020-04-08 Thread David Steele
On 3/5/20 8:46 AM, Julien Rouhaud wrote: On Thu, Feb 27, 2020 at 7:31 AM Julien Rouhaud wrote: On Thu, Feb 27, 2020 at 7:12 AM Pavel Stehule wrote: čt 27. 2. 2020 v 7:01 odesílatel Yugo NAGATA napsal: I think "query debugger" feature you proposed is out of scope of auto_explain module.

Re: Improving connection scalability: GetSnapshotData()

2020-04-08 Thread Jonathan S. Katz
On 4/8/20 8:59 AM, Alexander Korotkov wrote: > On Wed, Apr 8, 2020 at 3:43 PM Andres Freund wrote: >> Realistically it still 2-3 hours of proof-reading. >> >> This makes me sad :( > > Can we ask RMT to extend feature freeze for this particular patchset? > I think it's reasonable assuming extreme

Re: NOT IN subquery optimization

2020-04-08 Thread David Steele
On 3/26/20 4:58 PM, Li, Zheng wrote: >BTW, so far as I can see, the only reason you're bothering with the whole thing is to compare the size of the subquery output with work_mem, because that's all that subplan_is_hashable does. I wonder whether that consideration is even sti

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread Tomas Vondra
On Wed, Apr 08, 2020 at 12:51:05PM +0200, Tomas Vondra wrote: On Tue, Apr 07, 2020 at 11:54:23PM -0400, Tom Lane wrote: hyrax is not too happy with this test: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hyrax&dt=2020-04-07%2004%3A55%3A15 It's not too clear to me why CLOBBER_CACHE_A

Re: Improving connection scalability: GetSnapshotData()

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 9:27 AM Jonathan S. Katz wrote: > One of the features of RMT responsibilities[1] is to be "hands off" as > much as possible, so perhaps a reverse ask: how would people feel about > this patch going into PG13, knowing that the commit would come after the > feature freeze date

Re: WIP/PoC for parallel backup

2020-04-08 Thread Kashif Zeeshan
On Tue, Apr 7, 2020 at 9:44 PM Asif Rehman wrote: > Hi, > > Thanks, Kashif and Rajkumar. I have fixed the reported issues. > > I have added the shared state as previously described. The new grammar > changes > are as follows: > > START_BACKUP [LABEL ''] [FAST] [MAX_RATE %d] > - This will gene

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread James Coleman
On Wed, Apr 8, 2020 at 9:43 AM Tomas Vondra wrote: > > On Wed, Apr 08, 2020 at 12:51:05PM +0200, Tomas Vondra wrote: > >On Tue, Apr 07, 2020 at 11:54:23PM -0400, Tom Lane wrote: > >>hyrax is not too happy with this test: > >> > >>https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hyrax&dt=202

Re: Resume vacuum and autovacuum from interruption and cancellation

2020-04-08 Thread David Steele
On 2/28/20 8:56 AM, Masahiko Sawada wrote: According to those results, it's thought that the more we resume vacuum from the tail of the table, the efficiency is good. Since the table is being updated uniformly even during autovacuum it was more efficient to restart autovacuum from last position

Re: adding partitioned tables to publications

2020-04-08 Thread Amit Langote
On Wed, Apr 8, 2020 at 9:21 PM Peter Eisentraut wrote: > On 2020-04-08 13:16, Amit Langote wrote: > > On Wed, Apr 8, 2020 at 6:26 PM Peter Eisentraut > > wrote: > >> All committed. > >> > >> Thank you and everyone very much for working on this. I'm very happy > >> that these two features from PG

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-08 Thread Juan José Santamaría Flecha
On Wed, Apr 8, 2020 at 9:03 AM davinder singh wrote: > On Tue, Apr 7, 2020 at 8:30 PM Juan José Santamaría Flecha < > juanjo.santama...@gmail.com> wrote: > >> >> * The logic on "defined(_MSC_VER) && (_MSC_VER >= 1900)" is defined as >> "_WIN32_WINNT >= 0x0600" on other parts of the code. I would

Re: adding partitioned tables to publications

2020-04-08 Thread Amit Langote
On Wed, Apr 8, 2020 at 11:07 PM Amit Langote wrote: > On Wed, Apr 8, 2020 at 9:21 PM Peter Eisentraut > wrote: > > I think this is because the END { } section in PostgresNode.pm shuts > > down all running instances in immediate mode, which doesn't save > > coverage properly. > > Thanks for that t

Re: Online checksums patch - once again

2020-04-08 Thread David Steele
On 4/1/20 11:30 AM, David Steele wrote: On 1/18/20 6:18 PM, Daniel Gustafsson wrote: Attached is a v16 rebased on top of current master which addresses the above commented points, and which I am basing the concurrency work on. This patch no longer applies cleanly: http://cfbot.cputube.org/

Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread Mahendra Singh Thalor
On Wed, 8 Apr 2020 at 17:59, Robert Haas wrote: > > On Wed, Apr 8, 2020 at 8:22 AM tushar wrote: > > I just came across this scenario where - vaccum o/p with (full 1, > > parallel 0) option not working > > > > --working > > > > postgres=# vacuum (parallel 1, full 0 ) foo; > > VACUUM > > postgres

Re: Verify true root on replicas with amcheck

2020-04-08 Thread David Steele
On 1/16/20 7:40 PM, Peter Geoghegan wrote: On Thu, Jan 9, 2020 at 12:55 AM godjan • wrote: I heard that amcheck has an invariant about locking no more than 1 page at a moment for avoiding deadlocks. Is there possible a deadlock situation? This is a conservative principle that I came up with

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2020-04-08 Thread Julien Rouhaud
On Tue, Apr 7, 2020 at 8:40 AM Tatsuro Yamada wrote: > > Hi Julien, > > On 2020/04/02 22:25, Julien Rouhaud wrote: > > New conflict, rebased v9 attached. > > I tested the patch on the head (c7654f6a3) and > the result was fine. See below: > > $ make installcheck-world > = > A

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-08 Thread Kuntal Ghosh
Hello Ashutosh, Fujita, On Wed, Apr 8, 2020 at 3:49 PM Ashutosh Bapat wrote: > On Wed, 8 Apr 2020 at 15:42, Etsuro Fujita wrote: >> On Wed, Apr 8, 2020 at 4:30 PM Kuntal Ghosh >> wrote: >> > I'm getting the following warning during compilation. >> > >> > partbounds.c: In function ‘partition_bo

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread Tomas Vondra
On Wed, Apr 08, 2020 at 04:08:39PM +0200, Tomas Vondra wrote: On Wed, Apr 08, 2020 at 09:54:42AM -0400, James Coleman wrote: On Wed, Apr 8, 2020 at 9:43 AM Tomas Vondra wrote: On Wed, Apr 08, 2020 at 12:51:05PM +0200, Tomas Vondra wrote: On Tue, Apr 07, 2020 at 11:54:23PM -0400, Tom Lane wro

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread James Coleman
On Wed, Apr 8, 2020 at 11:02 AM Tomas Vondra wrote: > > On Wed, Apr 08, 2020 at 04:08:39PM +0200, Tomas Vondra wrote: > >On Wed, Apr 08, 2020 at 09:54:42AM -0400, James Coleman wrote: > >>On Wed, Apr 8, 2020 at 9:43 AM Tomas Vondra > >> wrote: > >>> > >>>On Wed, Apr 08, 2020 at 12:51:05PM +0200, T

Re: Conflict handling for COPY FROM

2020-04-08 Thread David Steele
On Fri, Mar 27, 2020 at 3:27 PM Tom Lane > wrote: I took a quick look at this patch, since it was marked "ready for committer", but I don't see how it can possibly be considered committable. Based on Tom's review I've marked this patch Returned with Feedba

DETACH PARTITION and FOR EACH ROW triggers on partitioned tables

2020-04-08 Thread Justin Pryzby
This seems to be a bug in master, v12, and (probably) v11, where "FOR EACH FOR" was first allowed on partition tables (86f575948). I thought this would work like partitioned indexes (8b08f7d48), where detaching a partition makes its index non-inherited, and attaching a partition marks a pre-existi

Re: [PATCH] Incremental sort

2020-04-08 Thread David Steele
On 4/8/20 11:13 AM, James Coleman wrote: James, can you verify it that's still true? I marked this entry as committed in the 2020-03 CF but it's not clear to me if that's entirely true. I'll leave it up to you (all) to move it to the 2020-07 CF if there is remaining work (other than making t

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread Tom Lane
James Coleman writes: > Should we change `analyze` to `analyze t` to avoid unnecessarily > re-analyzing all other tables in the regression db? Yes, a global analyze here is a remarkably horrid idea. regards, tom lane

Re: [PATCH] Incremental sort

2020-04-08 Thread James Coleman
On Wed, Apr 8, 2020 at 11:29 AM David Steele wrote: > > On 4/8/20 11:13 AM, James Coleman wrote: > >> > >> James, can you verify it that's still true? > > I marked this entry as committed in the 2020-03 CF but it's not clear to > me if that's entirely true. I'll leave it up to you (all) to move it

Re: Function to track shmem reinit time

2020-04-08 Thread David Steele
On 2/24/20 10:57 PM, Robert Haas wrote: On Sat, Feb 22, 2020 at 10:31 PM Tom Lane wrote: I'm still going to object to it, on the grounds that (1) it's exposing an implementation detail that clients should not be concerned with, and that we might change in future. The name isn't even well chos

Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor wrote: > I think, Tushar point is that either we should allow both > vacuum(parallel 0, full 1) and vacuum(parallel 1, full 0) or in the > both cases, we should through error. Oh, yeah, good point. Somebody must not've been careful enough with

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread Tomas Vondra
On Wed, Apr 08, 2020 at 11:13:26AM -0400, James Coleman wrote: On Wed, Apr 8, 2020 at 11:02 AM Tomas Vondra wrote: On Wed, Apr 08, 2020 at 04:08:39PM +0200, Tomas Vondra wrote: >On Wed, Apr 08, 2020 at 09:54:42AM -0400, James Coleman wrote: >>On Wed, Apr 8, 2020 at 9:43 AM Tomas Vondra >> wrot

Re: [PATCH] Incremental sort

2020-04-08 Thread Tomas Vondra
On Wed, Apr 08, 2020 at 11:42:12AM -0400, James Coleman wrote: On Wed, Apr 8, 2020 at 11:29 AM David Steele wrote: On 4/8/20 11:13 AM, James Coleman wrote: >> >> James, can you verify it that's still true? I marked this entry as committed in the 2020-03 CF but it's not clear to me if that's e

Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables

2020-04-08 Thread Alvaro Herrera
On 2020-Apr-08, Justin Pryzby wrote: > This seems to be a bug in master, v12, and (probably) v11, where "FOR EACH > FOR" > was first allowed on partition tables (86f575948). > > I thought this would work like partitioned indexes (8b08f7d48), where > detaching > a partition makes its index non-i

warning in partioning code

2020-04-08 Thread Erik Rijkers
Hi, Compiling master on debian stretch, gcc 9.3.0 complains: partbounds.c: In function ‘partition_bounds_merge’: partbounds.c:1024:21: warning: unused variable ‘inner_binfo’ [-Wunused-variable] 1024 | PartitionBoundInfo inner_binfo = inner_rel->boundinfo; | ^~~~

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-08 Thread Tomas Vondra
On Wed, Apr 08, 2020 at 09:54:42AM -0400, James Coleman wrote: On Wed, Apr 8, 2020 at 9:43 AM Tomas Vondra wrote: On Wed, Apr 08, 2020 at 12:51:05PM +0200, Tomas Vondra wrote: >On Tue, Apr 07, 2020 at 11:54:23PM -0400, Tom Lane wrote: >>hyrax is not too happy with this test: >> >>https://build

Re: Let people set host(no)ssl settings from initdb

2020-04-08 Thread David Fetter
On Mon, Apr 06, 2020 at 10:12:16PM +, Cary Huang 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:tested,

Re: warning in partioning code

2020-04-08 Thread Etsuro Fujita
Hi Erik, On Thu, Apr 9, 2020 at 1:07 AM Erik Rijkers wrote: > Compiling master on debian stretch, gcc 9.3.0 complains: > > partbounds.c: In function ‘partition_bounds_merge’: > partbounds.c:1024:21: warning: unused variable ‘inner_binfo’ > [-Wunused-variable] > 1024 | PartitionBoundInfo inner_

Re: Commitfest 2020-03 Now in Progress

2020-04-08 Thread David Steele
On 4/1/20 10:09 AM, David Steele wrote: On 3/17/20 8:10 AM, David Steele wrote: On 3/1/20 4:10 PM, David Steele wrote: The last Commitfest for v13 is now in progress! Current stats for the Commitfest are: Needs review: 192 Waiting on Author: 19 Ready for Committer: 4 Total: 215 Halfway thro

More efficient RI checks - take 2

2020-04-08 Thread Antonin Houska
After having reviewed [1] more than a year ago (the problem I found was that the transient table is not available for deferred constraints), I've tried to implement the same in an alternative way. The RI triggers still work as row level triggers, but if multiple events of the same kind appear in th

Re: Commitfest 2020-03 Now in Progress

2020-04-08 Thread Tom Lane
David Steele writes: > The 2020-03 Commitfest is officially closed. > Final stats are (for entire CF, not just from March 1 this time): > Committed: 90. > Moved to next CF: 115. > Withdrawn: 8. > Rejected: 1. > Returned with Feedback: 23. > Total: 237. > Good job everyone! Thanks for running i

Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread Justin Pryzby
On Wed, Apr 08, 2020 at 11:57:08AM -0400, Robert Haas wrote: > On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor > wrote: > > I think, Tushar point is that either we should allow both > > vacuum(parallel 0, full 1) and vacuum(parallel 1, full 0) or in the > > both cases, we should through erro

Re: Conflict handling for COPY FROM

2020-04-08 Thread David G. Johnston
On Fri, Mar 27, 2020 at 3:27 PM Tom Lane wrote: > Surafel Temesgen writes: > > [ conflict-handling-copy-from-v16.patch ] > > I took a quick look at this patch, since it was marked "ready for > committer", but I don't see how it can possibly be considered committable. > [...] > > Looking at th

Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables

2020-04-08 Thread Justin Pryzby
On Wed, Apr 08, 2020 at 12:02:39PM -0400, Alvaro Herrera wrote: > On 2020-Apr-08, Justin Pryzby wrote: > > > This seems to be a bug in master, v12, and (probably) v11, where "FOR EACH > > FOR" > > was first allowed on partition tables (86f575948). > > > > I thought this would work like partition

Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables

2020-04-08 Thread Tom Lane
Alvaro Herrera writes: > Hmm. Let's agree to what behavior we want, and then we implement that. > It seems to me there are two choices: > 1. on detach, keep the trigger but make it independent of the trigger on > parent. (This requires that the trigger is made dependent on the > trigger on pare

doc review for v13

2020-04-08 Thread Justin Pryzby
I reviewed docs for v13, like: git log --cherry-pick origin/master...origin/REL_12_STABLE -p doc I did something similar for v12 [0]. I've included portions of that here which still seem lacking 12 months later (but I'm not intending to continue defending each individual patch hunk). I previousl

Re: where should I stick that backup?

2020-04-08 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Apr 6, 2020 at 2:23 PM Stephen Frost wrote: > > So, instead of talking about 'bzip2 > %f.bz2', and then writing into our > > documentation that that's how this feature can be used, what about > > proposing something that would actu

Re: More efficient RI checks - take 2

2020-04-08 Thread Pavel Stehule
st 8. 4. 2020 v 18:36 odesílatel Antonin Houska napsal: > After having reviewed [1] more than a year ago (the problem I found was > that > the transient table is not available for deferred constraints), I've tried > to > implement the same in an alternative way. The RI triggers still work as row

Re: A problem about partitionwise join

2020-04-08 Thread Tom Lane
Richard Guo writes: > On Sun, Apr 5, 2020 at 4:38 AM Tom Lane wrote: >> There is already something in equivclass.c that would almost do what >> we want here: exprs_known_equal() would tell us whether the partkeys >> can be found in the same eclass, without having to generate data >> structures al

Re: where should I stick that backup?

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 1:05 PM Stephen Frost wrote: > What if %f.bz2 already exists? That cannot occur in the scenario I described. > How about if %f has a space in it? For a tar-format backup I don't think that can happen, because the file names will be base.tar and ${tablespace_oid}.tar. For

Re: backup manifests

2020-04-08 Thread Robert Haas
On Wed, Apr 8, 2020 at 1:15 AM Fujii Masao wrote: > When there is a backup_manifest in the database cluster, it's included in > the backup even when --no-manifest is specified. ISTM that this is problematic > because the backup_manifest is obviously not valid for the backup. > So, isn't it better

Re: backup manifests and contemporaneous buildfarm failures

2020-04-08 Thread Andrew Dunstan
On 4/7/20 9:42 AM, Andrew Dunstan wrote: > On Tue, Apr 7, 2020 at 12:37 AM Tom Lane wrote: >> Robert Haas writes: >>> Taking stock of the situation this morning, most of the buildfarm is >>> now green. There are three failures, on eelpout (6 hours ago), >>> fairywren (17 hours ago), and hyrax (3

Re: More efficient RI checks - take 2

2020-04-08 Thread Corey Huinker
On Wed, Apr 8, 2020 at 1:06 PM Pavel Stehule wrote: > > > st 8. 4. 2020 v 18:36 odesílatel Antonin Houska napsal: > >> After having reviewed [1] more than a year ago (the problem I found was >> that >> the transient table is not available for deferred constraints), I've >> tried to >> implement

Re: backup manifests and contemporaneous buildfarm failures

2020-04-08 Thread Tom Lane
Andrew Dunstan writes: > OK, tricky, but here's what I did to get this working on fairywren. > First, on Msys2 there is a problem with name mangling. We've had to fix > this before by telling it to ignore certain argument prefixes. > Second, once that was fixed rmdir was failing on the tablespace.

Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables

2020-04-08 Thread Alvaro Herrera
On 2020-Apr-08, Tom Lane wrote: > Alvaro Herrera writes: > > Hmm. Let's agree to what behavior we want, and then we implement that. > > It seems to me there are two choices: > > > 1. on detach, keep the trigger but make it independent of the trigger on > > parent. (This requires that the trigg

Re: where should I stick that backup?

2020-04-08 Thread Stephen Frost
Greeitngs, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Apr 8, 2020 at 1:05 PM Stephen Frost wrote: > > What if %f.bz2 already exists? > > That cannot occur in the scenario I described. Of course it can. > > How about if %f has a space in it? > > For a tar-format backup I don't thin

Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables

2020-04-08 Thread Tom Lane
Alvaro Herrera writes: > On 2020-Apr-08, Tom Lane wrote: >> I think that #1 would soon lead to needing all the same infrastructure >> as we have for inherited columns and constraints, ie triggers would need >> equivalents of attislocal and attinhcount. I don't really want to go >> there, so I'd v

Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread Mahendra Singh Thalor
On Wed, 8 Apr 2020 at 22:11, Justin Pryzby wrote: > > On Wed, Apr 08, 2020 at 11:57:08AM -0400, Robert Haas wrote: > > On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor > > wrote: > > > I think, Tushar point is that either we should allow both > > > vacuum(parallel 0, full 1) and vacuum(paral

Re: Vacuum o/p with (full 1, parallel 0) option throwing an error

2020-04-08 Thread Justin Pryzby
On Thu, Apr 09, 2020 at 12:06:04AM +0530, Mahendra Singh Thalor wrote: > On Wed, 8 Apr 2020 at 22:11, Justin Pryzby wrote: > > > > On Wed, Apr 08, 2020 at 11:57:08AM -0400, Robert Haas wrote: > > > On Wed, Apr 8, 2020 at 10:25 AM Mahendra Singh Thalor > > > wrote: > > > > I think, Tushar point is

  1   2   >