Re: Duplicate Workers entries in some EXPLAIN plans

2020-01-15 Thread Georgios Kokolatos
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:not tested The current version of the patch (v2) applies cleanly and does what it

Re: TRUNCATE on foreign tables

2020-01-15 Thread Michael Paquier
On Tue, Jan 14, 2020 at 06:16:17PM +0900, Kohei KaiGai wrote: > The "frels_list" is a list of foreign tables that are connected to a > particular > foreign server, thus, the server-id pulled out by foreign tables id should be > identical for all the relations in the list. > Due to the API design,

Re: pause recovery if pitr target not reached

2020-01-15 Thread Leif Gunnar Erlandsen
> "Peter Eisentraut" skrev 14. januar 2020 > kl. 21:13: > > On 2019-12-11 12:40, Leif Gunnar Erlandsen wrote: >> Adding patch written for 13dev from git >> "Michael Paquier" skrev 1. desember 2019 kl. 03:08: >> On Fri, Nov 22, 2019 at 11:26:59AM +, Leif Gunnar Erlandsen wrote: > >> No it

Re: [PATCH v1] pg_ls_tmpdir to show directories

2020-01-15 Thread Fabien COELHO
Hello Justin, About this v4. It applies cleanly. I'm trying to think about how to get rid of the strange structure and hacks, and the arbitrary looking size 2 array. Also the recursion is one step, but I'm not sure why, ISTM it could/should go on always? Maybe the recursive

Re: proposal: type info support functions for functions that use "any" type

2020-01-15 Thread Pavel Stehule
út 14. 1. 2020 v 22:09 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > [ parser-support-function-with-demo-20191128.patch ] > > TBH, I'm still not convinced that this is a good idea. Restricting > the support function to only change the function's return type is > safer than the

Re: Disallow cancellation of waiting for synchronous replication

2020-01-15 Thread Maksim Milyutin
On 15.01.2020 01:53, Andres Freund wrote: On 2020-01-12 16:18:38 +0500, Andrey Borodin wrote: 11 янв. 2020 г., в 7:34, Bruce Momjian написал(а): Actually, it might be worse than that. In my reading of RecordTransactionCommit(), we do this: write to WAL flush WAL (durable)

Re: [HACKERS] WAL logging problem in 9.4.3?

2020-01-15 Thread Kyotaro Horiguchi
Hello. I added a fix for the defect 2. At Wed, 25 Dec 2019 16:15:21 -0800, Noah Misch wrote in > === Defect 2: Forgets to skip WAL due to oversimplification in heap_create() > > In ALTER TABLE cases where TryReuseIndex() avoided an index rebuild, we need > to transfer WAL-skipped state to the

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2020-01-15 Thread Paul Guo
I further fixed the last test failure (due to a small bug in the test, not in code). Attached are the new patch series. Let's see the CI pipeline result. v9-0001-Support-node-initialization-from-backup-with-tabl.patch Description: Binary data

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-15 Thread Arthur Zakirov
Hello! On 2020/01/13 21:04, Juan José Santamaría Flecha wrote: Please, find attached a version addressing the above mentioned. I have some couple picky notes. + if (name_len != norm_len) + pfree(norm_name); I'm not sure here. Is it save to assume that if it was

RE: Index Skip Scan

2020-01-15 Thread Floris Van Nee
Hi all, I reviewed the latest version of the patch. Overall some good improvements I think. Please find my feedback below. - I think I mentioned this before - it's not that big of a deal, but it just looks weird and inconsistent to me: create table t2 as (select a, b, c, 10 d from

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Wed, 15 Jan 2020 at 17:27, Amit Kapila wrote: > > On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada > wrote: > > > > Thank you for updating the patch! I have a few small comments. > > > > I have adapted all your changes, fixed the comment by Mahendra related > to initializing parallel state

Re: Add pg_file_sync() to adminpack

2020-01-15 Thread Atsushi Torikoshi
On Wed, Jan 15, 2020 at 1:49 Julien Rouhaud : > Actually, pg_write_server_files has enough privileges to execute those > functions anywhere on the FS as far as C code is concerned, provided > that the user running postgres daemon is allowed to (see > convert_and_check_filename), but won't be

Re: TRUNCATE on foreign tables

2020-01-15 Thread Kohei KaiGai
2020年1月15日(水) 17:11 Michael Paquier : > > On Tue, Jan 14, 2020 at 06:16:17PM +0900, Kohei KaiGai wrote: > > The "frels_list" is a list of foreign tables that are connected to a > > particular > > foreign server, thus, the server-id pulled out by foreign tables id should > > be > > identical for

Re: base backup client as auxiliary backend process

2020-01-15 Thread Peter Eisentraut
On 2020-01-15 01:40, Masahiko Sawada wrote: Could you rebase the main patch that adds base backup client as auxiliary backend process since the previous version patch (v3) conflicts with the current HEAD? attached -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL

Re: [Proposal] Add accumulated statistics for wait event

2020-01-15 Thread Imai Yoshikazu
On 2020/01/13 4:11, Pavel Stehule wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: not tested > Documentation:tested, passed > > I like

Re: our checks for read-only queries are not great

2020-01-15 Thread Peter Eisentraut
On 2020-01-13 20:14, Robert Haas wrote: On Mon, Jan 13, 2020 at 5:57 AM Peter Eisentraut wrote: On 2020-01-10 14:41, Robert Haas wrote: This rule very nearly matches the current behavior: it explains why temp table operations are allowed, and why ALTER SYSTEM is allowed, and why REINDEX etc.

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Amit Kapila
On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada wrote: > > Thank you for updating the patch! I have a few small comments. > I have adapted all your changes, fixed the comment by Mahendra related to initializing parallel state only when there are at least two indexes. Additionally, I have

Re: [Proposal] Global temporary tables

2020-01-15 Thread 曾文旌(义从)
> 2020年1月13日 下午4:08,Konstantin Knizhnik 写道: > > > > On 12.01.2020 4:51, Tomas Vondra wrote: >> On Fri, Jan 10, 2020 at 11:47:42AM +0300, Konstantin Knizhnik wrote: >>> >>> >>> On 09.01.2020 19:48, Tomas Vondra wrote: > The most complex and challenged task is to support GTT for

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor wrote: > > On Wed, 15 Jan 2020 at 17:27, Amit Kapila wrote: > > > > On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada > > wrote: > > > > > > Thank you for updating the patch! I have a few small comments. > > > > > > > I have adapted all your

Re: Remove libpq.rc, use win32ver.rc for libpq

2020-01-15 Thread Peter Eisentraut
On 2020-01-15 07:44, Michael Paquier wrote: I have been testing and checking the patch a bit more seriously, and the information gets generated correctly for dlls and exe files. The rest of the changes look fine to me. For src/makefiles/Makefile.win32, I don't have a MinGW environment at hand

Re: Improve errors when setting incorrect bounds for SSL protocols

2020-01-15 Thread Daniel Gustafsson
> On 15 Jan 2020, at 03:28, Michael Paquier wrote: > > On Tue, Jan 14, 2020 at 11:21:53AM +0100, Daniel Gustafsson wrote: >> On 14 Jan 2020, at 04:54, Michael Paquier wrote: >>> Please note that OpenSSL 1.1.0 has added two routines to be able to >>> get the min/max protocols set in a context,

Re: Rearranging ALTER TABLE to avoid multi-operations bugs

2020-01-15 Thread Tom Lane
Alvaro Herrera writes: > I didn't review in detail, but it seems good to me. I especially liked > getting rid of the ProcessedConstraint code, and the additional test > cases. Thanks for looking! Yeah, all those test cases expose situations where we misbehave today :-(. I wish this were small

Re: Complete data erasure

2020-01-15 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Tomas Vondra writes: > > But let's assume it makes sense - is this really the right solution? I > > think what I'd prefer is encryption + rotation of the keys. Which should > > work properly even on COW filesystems, the performance impact is

Re: Rearranging ALTER TABLE to avoid multi-operations bugs

2020-01-15 Thread Alvaro Herrera
On 2020-Jan-14, Tom Lane wrote: > I wrote: > > [ fix-alter-table-order-of-operations-3.patch ] > > Rebased again, fixing a minor conflict with f595117e2. > > > I'd kind of like to get this cleared out of my queue soon. > > Does anyone intend to review it further? > > If I don't hear objections

Re: Duplicate Workers entries in some EXPLAIN plans

2020-01-15 Thread Maciek Sakrejda
Sounds good, I'll try that format. Any idea how to test YAML? With the JSON format, I was able to rely on Postgres' own JSON-manipulating functions to strip or canonicalize fields that can vary across executions--I can't really do that with YAML. Or should I run EXPLAIN with COSTS OFF, TIMING OFF,

Re: Complete data erasure

2020-01-15 Thread Tomas Vondra
On Wed, Jan 15, 2020 at 10:23:22AM -0500, Stephen Frost wrote: Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: "asaba.takan...@fujitsu.com" writes: > I want to add the feature to erase data so that it cannot be restored > because it prevents attackers from stealing data from released data

Re: Complete data erasure

2020-01-15 Thread Stephen Frost
Greetings, * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > On Wed, Jan 15, 2020 at 10:23:22AM -0500, Stephen Frost wrote: > >I disagree entirely. If the operating system and hardware level provide > >a way for this to work, which is actually rather common when you > >consider that ext4 is

Re: Rearranging ALTER TABLE to avoid multi-operations bugs

2020-01-15 Thread Tom Lane
Sergei Kornilov writes: > I am clearly not a good reviewer for such changes... But for a note: I read > the v4 patch and have no useful comments. Good new tests, reasonable code > changes to fix multiple bug reports. Thanks for looking! > The patch is proposed only for the master branch,

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-15 Thread Juan José Santamaría Flecha
On Wed, Jan 15, 2020 at 11:20 AM Arthur Zakirov wrote: > > I have some couple picky notes. > > Thanks for the review. > > + if (name_len != norm_len) > > + pfree(norm_name); > > I'm not sure here. Is it save to assume that if it was allocated a new > norm_name name_len and

Re: Rearranging ALTER TABLE to avoid multi-operations bugs

2020-01-15 Thread Sergei Kornilov
Hello Thank you! I am clearly not a good reviewer for such changes... But for a note: I read the v4 patch and have no useful comments. Good new tests, reasonable code changes to fix multiple bug reports. The patch is proposed only for the master branch, right? regards, Sergei

Re: Complete data erasure

2020-01-15 Thread Tom Lane
Tomas Vondra writes: > But let's assume it makes sense - is this really the right solution? I > think what I'd prefer is encryption + rotation of the keys. Which should > work properly even on COW filesystems, the performance impact is kinda > low and amortized etc. Of course, we're discussing

Re: our checks for read-only queries are not great

2020-01-15 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jan 15, 2020 at 10:25 AM Peter Eisentraut > wrote: > > Well, if the transaction was declared read-only, then committing it > > (directly or 2PC) shouldn't change anything. This appears to be a > > circular argument. > > I don't

Re: progress report for ANALYZE

2020-01-15 Thread Alvaro Herrera
I just pushed this after some small extra tweaks. Thanks, Yamada-san, for seeing this to completion! -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: our checks for read-only queries are not great

2020-01-15 Thread Robert Haas
On Wed, Jan 15, 2020 at 10:25 AM Peter Eisentraut wrote: > Well, if the transaction was declared read-only, then committing it > (directly or 2PC) shouldn't change anything. This appears to be a > circular argument. I don't think it's a circular argument. Suppose that someone decrees that, as

relcache sometimes initially ignores has_generated_stored

2020-01-15 Thread Andres Freund
Hi, I think it's probably not relevant, but it confused me for a moment that RelationBuildTupleDesc() might set constr->has_generated_stored to true, but then throw away the constraint at the end, because nothing matches the /* * Set up constraint/default info */

Re: Making psql error out on output failures

2020-01-15 Thread David Zhang
Right, the file difference is caused by "-At". On the other side, in order to keep the output message more consistent with other tools, I did a litter bit more investigation on pg_dump to see how it handles this situation. Here is my findings. pg_dump using WRITE_ERROR_EXIT to throw the error

Re: Extracting only the columns needed for a query

2020-01-15 Thread Dmitry Dolgov
> On Thu, Jan 02, 2020 at 05:21:55PM -0800, Melanie Plageman wrote: > > That makes me think that maybe the function name, > extract_used_columns() is bad, though. Maybe extract_scan_columns()? > I tried this in the attached, updated patch. Thanks, I'll take a look at the new version. Following

Re: pgindent && weirdness

2020-01-15 Thread Bruce Momjian
On Tue, Jan 14, 2020 at 05:30:21PM -0500, Tom Lane wrote: > Alvaro Herrera writes: > > I just ran pgindent over some patch, and noticed that this hunk ended up > > in my working tree: > > > - if (IsA(leftop, Var) && IsA(rightop, Const)) > > + if (IsA(leftop, Var) &(rightop, Const)) > >

Re: Corruption with duplicate primary key

2020-01-15 Thread Alex Adriaanse
On Thu., December 12, 2019 at 5:25 PM, Tomas Vondra wrote: >On Wed, Dec 11, 2019 at 11:46:40PM +, Alex Adriaanse wrote: >>On Thu., December 5, 2019 at 5:45 PM, Tomas Vondra wrote: >>> At first I thought maybe this might be due to collations changing and >>> breaking the index silently. What

Re: aggregate crash

2020-01-15 Thread Andres Freund
Hi, On 2020-01-14 23:27:02 -0800, Andres Freund wrote: > On 2020-01-14 17:54:16 -0500, Tom Lane wrote: > > Andres Freund writes: > > > I'm still not sure I actually fully understand the bug. It's obvious how > > > returning the input value again could lead to memory not being freed (so > > >

making the backend's json parser work in frontend code

2020-01-15 Thread Robert Haas
The discussion on the backup manifest thread has gotten bogged down on the issue of the format that should be used to store the backup manifest file. I want something simple and ad-hoc; David Steele and Stephen Frost prefer JSON. That is problematic because our JSON parser does not work in

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Wed, 15 Jan 2020 at 19:31, Mahendra Singh Thalor wrote: > > On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Jan 2020 at 17:27, Amit Kapila wrote: > > > > > > On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada > > > wrote: > > > > > > > > Thank you for updating

Re: Append with naive multiplexing of FDWs

2020-01-15 Thread Bruce Momjian
On Tue, Jan 14, 2020 at 02:37:48PM +0500, Ahsan Hadi wrote: > Summary > The patch is pretty good, it works well when there were little data back to > the parent node. The patch doesn’t provide parallel FDW scan, it ensures > that child nodes can send data to parent in parallel but  the parent can 

Re: src/test/recovery regression failure on bionic

2020-01-15 Thread Christoph Berg
Re: Amit Kapila 2020-01-09 > The point is that we know what is going wrong on sidewinder on back > branches. However, we still don't know what is going wrong with tern > and mandrill on v10 [1][2] where the log is: Fwiw, the problem on bionic disappeared yesterday with the build triggered by

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

2020-01-15 Thread Christoph Berg
Re: Tom Lane 2020-01-09 <16328.1578606...@sss.pgh.pa.us> > build part.) I pushed a patch using SKIP_READLINE_TESTS. > Christoph should be able to set that for the Ubuntu branches > where the test is failing. That "fixed" the problem on xenial, thanks. Christoph

Re: SlabCheck leaks memory into TopMemoryContext

2020-01-15 Thread Tom Lane
Andres Freund writes: > On 2020-01-16 00:09:53 -0500, Tom Lane wrote: >> It's basically assuming that the memory management mechanism is sane, >> which makes the whole thing fundamentally circular, even if it's >> relying on some other context to be sane. Is there a way to do the >> checking

Re: [Proposal] Global temporary tables

2020-01-15 Thread Konstantin Knizhnik
On 15.01.2020 16:10, 曾文旌(义从) wrote: I do not see principle difference here with scenario when 50 sessions create (local) temp table, populate it with GB of data and create index for it. I think the problem is that when one session completes the creation of the index on GTT, it will

Re: Expose lock group leader pid in pg_stat_activity

2020-01-15 Thread Michael Paquier
On Thu, Jan 16, 2020 at 04:27:27PM +0900, Michael Paquier wrote: > While looking at the code, I think that we could refactor things a bit > for raw_wait_event, wait_event_type and wait_event which has some > duplicated code for backend and auxiliary processes. What about > filling in the wait

Re: relcache sometimes initially ignores has_generated_stored

2020-01-15 Thread Kyotaro Horiguchi
At Wed, 15 Jan 2020 10:11:05 -0800, Andres Freund wrote in > Hi, > > I think it's probably not relevant, but it confused me for a moment > that RelationBuildTupleDesc() might set constr->has_generated_stored to > true, but then throw away the constraint at the end, because nothing > matches the

Re: Append with naive multiplexing of FDWs

2020-01-15 Thread Kyotaro Horiguchi
Thank you very much for the testing of the patch, Ahsan! At Wed, 15 Jan 2020 15:41:04 -0500, Bruce Momjian wrote in > On Tue, Jan 14, 2020 at 02:37:48PM +0500, Ahsan Hadi wrote: > > Summary > > The patch is pretty good, it works well when there were little data back to > > the parent node. The

Re: proposal: type info support functions for functions that use "any" type

2020-01-15 Thread Pavel Stehule
st 15. 1. 2020 v 11:04 odesílatel Pavel Stehule napsal: > > > út 14. 1. 2020 v 22:09 odesílatel Tom Lane napsal: > >> Pavel Stehule writes: >> > [ parser-support-function-with-demo-20191128.patch ] >> >> TBH, I'm still not convinced that this is a good idea. Restricting >> the support

Re: remove support for old Python versions

2020-01-15 Thread Peter Eisentraut
Rémi, please update your build farm member "locust" to a new Python version (>=2.6) for the master branch, or disable the Python option. Thanks. On 2020-01-08 23:04, Peter Eisentraut wrote: On 2019-12-31 10:46, Peter Eisentraut wrote: On 2019-12-09 11:37, Peter Eisentraut wrote: Per

Re: Complete data erasure

2020-01-15 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > "asaba.takan...@fujitsu.com" writes: > > I want to add the feature to erase data so that it cannot be restored > > because it prevents attackers from stealing data from released data area. > > I think this is fairly pointless, unfortunately.

Re: base backup client as auxiliary backend process

2020-01-15 Thread Peter Eisentraut
On 2020-01-09 11:57, Alexandra Wang wrote: Back to the base backup stuff, I don't quite understand all the benefits you mentioned above. It seems to me the greatest benefit with this patch is that postmaster takes care of pg_basebackup itself, which reduces the human wait in between running the

Re: SlabCheck leaks memory into TopMemoryContext

2020-01-15 Thread Andres Freund
Hi, On 2020-01-16 00:09:53 -0500, Tom Lane wrote: > Andres Freund writes: > > I just noticed that having a slab context around in an assertion build > > leads to performance degrading and memory usage going up. A bit of > > poking revealed that SlabCheck() doesn't free the freechunks it > >

Re: SlabCheck leaks memory into TopMemoryContext

2020-01-15 Thread Andres Freund
Hi, On 2020-01-16 01:25:00 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2020-01-16 00:09:53 -0500, Tom Lane wrote: > >> It's basically assuming that the memory management mechanism is sane, > >> which makes the whole thing fundamentally circular, even if it's > >> relying on some other

Re: Expose lock group leader pid in pg_stat_activity

2020-01-15 Thread Michael Paquier
On Fri, Dec 27, 2019 at 10:15:33AM +0100, Julien Rouhaud wrote: > I think that not using "parallel" to name this field will help to > avoid confusion if the lock group infrastructure is eventually used > for something else, but that's only true if indeed we explain what a > lock group is. As you

Re: src/test/recovery regression failure on bionic

2020-01-15 Thread Amit Kapila
On Thu, Jan 16, 2020 at 2:10 AM Christoph Berg wrote: > > Re: Amit Kapila 2020-01-09 > > > The point is that we know what is going wrong on sidewinder on back > > branches. However, we still don't know what is going wrong with tern > > and mandrill on v10 [1][2] where the log is: > > Fwiw, the

Re: making the backend's json parser work in frontend code

2020-01-15 Thread Robert Haas
On Wed, Jan 15, 2020 at 6:40 PM Andres Freund wrote: > It's not obvious why the better approach here wouldn't be to just have a > very simple ereport replacement, that needs to be explicitly included > from frontend code. It'd not be meaningfully harder, imo, and it'd > require fewer adaptions,

Re: pgindent && weirdness

2020-01-15 Thread Thomas Munro
On Wed, Jan 15, 2020 at 11:30 AM Tom Lane wrote: > Alvaro Herrera writes: > > I just ran pgindent over some patch, and noticed that this hunk ended up > > in my working tree: > > > - if (IsA(leftop, Var) && IsA(rightop, Const)) > > + if (IsA(leftop, Var) &(rightop, Const)) > > Yeah, it's

Re: isTempNamespaceInUse() is incorrect with its handling of MyBackendId

2020-01-15 Thread Michael Paquier
On Tue, Jan 14, 2020 at 07:23:19AM +0900, Michael Paquier wrote: > Yes, I'd rather keep this routine in its simplest shape for now. If > the optimization makes sense, though in most cases it won't because it > just helps sessions to detect faster their own temp schema, then let's > do it. I'll

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Thu, 16 Jan 2020 at 08:22, Amit Kapila wrote: > > On Thu, Jan 16, 2020 at 1:02 AM Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Jan 2020 at 19:31, Mahendra Singh Thalor > > wrote: > > > > > > On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor > > > wrote: > > > > > > > > > > > > I

Re: [HACKERS] WAL logging problem in 9.4.3?

2020-01-15 Thread Kyotaro Horiguchi
All the known defects are fixed. At Wed, 25 Dec 2019 16:15:21 -0800, Noah Misch wrote in > === Defect 3: storage.c checks size decrease of MAIN_FORKNUM only > > storage.c tracks only MAIN_FORKNUM in pendingsync->max_truncated. Is it > possible for MAIN_FORKNUM to have a net size increase

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Amit Kapila
On Thu, Jan 16, 2020 at 1:02 AM Mahendra Singh Thalor wrote: > > On Wed, 15 Jan 2020 at 19:31, Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor > > wrote: > > > > > > > > > I reviewed v48 patch and below are some comments. > > > > > > 1. > > > +*

Re: aggregate crash

2020-01-15 Thread Andres Freund
Hi, On 2020-01-15 12:47:47 -0800, Andres Freund wrote: > FWIW, I'm working on narrowing it down to something small. I can > reliably trigger the bug, and I understand the mechanics, I > think. Interestingly enough the reproducer currently only triggers on > v12, not on v11 and before. That's

Re: Minimal logical decoding on standbys

2020-01-15 Thread Amit Khandekar
On Fri, 10 Jan 2020 at 17:50, Rahila Syed wrote: > > Hi Amit, > > Can you please rebase the patches as they don't apply on latest master? Thanks for notifying. Attached is the rebased version. logicaldecodng_standby_v5_rebased.tar.gz Description: GNU Zip compressed data

SlabCheck leaks memory into TopMemoryContext

2020-01-15 Thread Andres Freund
Hi Tomas, I just noticed that having a slab context around in an assertion build leads to performance degrading and memory usage going up. A bit of poking revealed that SlabCheck() doesn't free the freechunks it allocates. It's on its own obviously trivial to fix. But there's also this note at

Re: TRUNCATE on foreign tables

2020-01-15 Thread Michael Paquier
On Wed, Jan 15, 2020 at 11:33:07PM +0900, Kohei KaiGai wrote: > 2020年1月15日(水) 17:11 Michael Paquier : >> I have done a quick read through the patch. You have modified the >> patch to pass down to the callback a list of relation OIDs to execute >> one command for all, and there are tests for FKs

Re: Setting min/max TLS protocol in clientside libpq

2020-01-15 Thread Michael Paquier
On Wed, Jan 15, 2020 at 02:58:09PM +0900, Michael Paquier wrote: > On Tue, Jan 14, 2020 at 11:01:00PM +0100, Daniel Gustafsson wrote: >> Files renamed to match existing naming convention, the rest of the patch left >> unchanged. > > [previous review] One thing I remembered after sleeping on it is

Re: making the backend's json parser work in frontend code

2020-01-15 Thread Michael Paquier
On Wed, Jan 15, 2020 at 09:39:13PM -0500, Robert Haas wrote: > On Wed, Jan 15, 2020 at 6:40 PM Andres Freund wrote: >> It's not obvious why the better approach here wouldn't be to just have a >> very simple ereport replacement, that needs to be explicitly included >> from frontend code. It'd not

Re: Reorderbuffer crash during recovery

2020-01-15 Thread Dilip Kumar
On Tue, Dec 31, 2019 at 11:35 AM vignesh C wrote: > > On Mon, Dec 30, 2019 at 11:17 AM Amit Kapila wrote: > > > > On Fri, Dec 27, 2019 at 8:37 PM Alvaro Herrera > > wrote: > > > > > > On 2019-Dec-27, vignesh C wrote: > > > > > > > I felt amit solution also solves the problem. Attached patch

Re: Implementing Incremental View Maintenance

2020-01-15 Thread nuko yokohama
Aggregate operation of user-defined type cannot be specified (commit e150d964df7e3aeb768e4bae35d15764f8abd284) A SELECT statement using the MIN() and MAX() functions can be executed on a user-defined type column that implements the aggregate functions MIN () and MAX (). However, if the same

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

2020-01-15 Thread Michael Paquier
On Fri, Jan 10, 2020 at 08:07:48PM +0900, Michael Paquier wrote: > Thinking more about it, this has a race condition if a temporary > schema is removed after collecting the OIDs in the drop phase. So the > updated attached is actually much more conservative and does not need > an update of the

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Amit Kapila
On Thu, Jan 16, 2020 at 10:11 AM Mahendra Singh Thalor wrote: > > On Thu, 16 Jan 2020 at 08:22, Amit Kapila wrote: > > > > > 2. > > > I checked time taken by vacuum.sql test. Execution time is almost same > > > with and without v45 patch. > > > > > > Without v45 patch: > > > Run1) vacuum

Re: SlabCheck leaks memory into TopMemoryContext

2020-01-15 Thread Tom Lane
Andres Freund writes: > I just noticed that having a slab context around in an assertion build > leads to performance degrading and memory usage going up. A bit of > poking revealed that SlabCheck() doesn't free the freechunks it > allocates. > It's on its own obviously trivial to fix. It seems

Re: remove some STATUS_* symbols

2020-01-15 Thread Michael Paquier
On Sat, Jan 11, 2020 at 08:14:17AM +0100, Peter Eisentraut wrote: > OK, pushed as it was then. Thanks, that looks fine. I am still not sure whether the second patch adding an enum via ProcWaitStatus improves the code readability though, so my take would be to discard it for now. Perhaps others

Re: making the backend's json parser work in frontend code

2020-01-15 Thread Tom Lane
Robert Haas writes: > ... However, I decided to spend today doing some further > investigation of an alternative approach, namely making the backend's > existing JSON parser work in frontend code as well. I did not solve > all the problems there, but I did come up with some patches which I >

Enabling B-Tree deduplication by default

2020-01-15 Thread Peter Geoghegan
There are some outstanding questions about how B-Tree deduplication [1] should be configured, and whether or not it should be enabled by default. I'm starting this new thread in the hopes of generating discussion on these high level questions. The commit message of the latest version of the patch

Re: [PATCH v1] pg_ls_tmpdir to show directories

2020-01-15 Thread Justin Pryzby
On Wed, Jan 15, 2020 at 11:21:36AM +0100, Fabien COELHO wrote: > I'm trying to think about how to get rid of the strange structure and hacks, > and the arbitrary looking size 2 array. > > Also the recursion is one step, but I'm not sure why, ISTM it could/should > go on always? Because tmpfiles

Re: Improve errors when setting incorrect bounds for SSL protocols

2020-01-15 Thread Michael Paquier
On Wed, Jan 15, 2020 at 06:34:39PM +0100, Daniel Gustafsson wrote: > This is pretty much exactly the patch I was intending to write for this, so +1 > from me. Thanks for the review. Let's wait a couple of days to see if others have objections or more comments about this patch, but I'd like to

Re: Unicode escapes with any backend encoding

2020-01-15 Thread Tom Lane
I wrote: > Andrew Dunstan writes: >> Perhaps I expressed myself badly. What I meant was that we should keep >> the json and text escape rules in sync, as they are now. Since we're >> changing the text rules to allow resolvable non-ascii unicode escapes >> in non-utf8 locales, we should do the

Re: Use compiler intrinsics for bit ops in hash

2020-01-15 Thread Jesse Zhang
On Tue, Jan 14, 2020 at 2:09 PM David Fetter wrote: > > The changes in hash AM and SIMPLEHASH do look like a net positive > > improvement. My biggest cringe might be in pg_bitutils: > > > > 1. Is ceil_log2_64 dead code? > > Let's call it nascent code. I suspect there are places it could go, if >

Re: making the backend's json parser work in frontend code

2020-01-15 Thread Andres Freund
Hi, On 2020-01-15 16:02:49 -0500, Robert Haas wrote: > The discussion on the backup manifest thread has gotten bogged down on > the issue of the format that should be used to store the backup > manifest file. I want something simple and ad-hoc; David Steele and > Stephen Frost prefer JSON. That