A few warnings on Windows

2018-04-30 Thread Thomas Munro
Hi, Not sure if it's a goal to be warning free on Windows, but I was testing some patches on that fine operating system and spotted a couple of warnings that seemed worth asking about: src/backend/replication/basebackup.c(1470): warning C4146: unary minus operator applied to unsigned type, resul

Re: wal_consistency_checking reports an inconsistency on master branch

2018-04-30 Thread Andres Freund
On 2018-04-23 07:58:30 -0700, Andres Freund wrote: > On 2018-04-23 13:22:21 +0300, Heikki Linnakangas wrote: > > On 13/04/18 13:08, Michael Paquier wrote: > > > On Fri, Apr 13, 2018 at 02:15:35PM +0530, amul sul wrote: > > > > I have looked into this and found that the issue is in heap_xlog_delete

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Andrey Borodin
Hi! > 30 апр. 2018 г., в 23:15, Andres Freund написал(а): > On 2018-04-30 15:39:08 +0500, Andrey Borodin wrote: >> I suspect that performance benefits can be not that big or even >> marginal, if we do not extend comprehensive eviction strategy with >> bgwriter fixes and O_DIRECT. > > If so, then

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Tom Lane
Andres Freund writes: > Heath, could you use process explorer or such to check which processes > are running inside a working backend process? It seems to be possible to enumerate the threads that are present inside a Windows process, although it's not clear to me how much identifying info is ava

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Thomas Munro
On Tue, May 1, 2018 at 2:59 PM, Noah Misch wrote: > Likely some privileged daemon is creating a thread in every new process. (On > Windows, it's not unusual for one process to create a thread in another > process.) We don't have good control over that. Huh. I was already amazed (as a non-Windo

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Tom Lane
Noah Misch writes: > On Mon, Apr 30, 2018 at 08:01:40PM -0400, Tom Lane wrote: >> What seems like a plausible theory at this point is that the apparent >> asynchronicity is due to the allocation being triggered by a different >> thread, and the fact that our added monitoring code seems to make the

Re: [HACKERS] proposal: schema variables

2018-04-30 Thread Pavel Stehule
Hi 2018-05-01 3:56 GMT+02:00 Peter Eisentraut : > On 4/20/18 13:45, Pavel Stehule wrote: > > I dunno, it seems awfully different to me. There's only one > "column", > > right? What code is really shared here? Are constraints and > triggers > > even desirable feature for variables?

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Noah Misch
On Mon, Apr 30, 2018 at 08:01:40PM -0400, Tom Lane wrote: > It's clear from dory's results that something is causing a 4MB chunk > of memory to get reserved in the process's address space, sometimes. > It might happen during the main MapViewOfFileEx call, or during the > preceding VirtualFree, or w

RE: power() function in Windows: "value out of range: underflow"

2018-04-30 Thread Huong Dangminh
> From: Tom Lane [mailto:t...@sss.pgh.pa.us] > > I updated the patch as David Rowley mentioned. > > Pushed. I'd mainly note that you need to update all the variant float8 > expected-files, not just the primary one. (Sometimes this requires a bit Thank you. I will be careful next time. > of gue

Re: [HACKERS] proposal: schema variables

2018-04-30 Thread Peter Eisentraut
On 4/20/18 13:45, Pavel Stehule wrote: > I dunno, it seems awfully different to me.  There's only one "column", > right?  What code is really shared here?  Are constraints and triggers > even desirable feature for variables?  What would be the use case? > > > The schema variable can h

Re: FOR EACH ROW triggers on partitioned tables

2018-04-30 Thread Amit Langote
On 2018/04/30 18:38, Ashutosh Bapat wrote: > On Fri, Mar 23, 2018 at 7:19 PM, Alvaro Herrera > wrote: >> Pushed. Thanks for all the review. >> > > https://www.postgresql.org/docs/devel/static/ddl-partitioning.html > > section 5.10.2.3 still says > "Row triggers, if necessary, must be defined o

Re: Postgres, fsync, and OSs (specifically linux)

2018-04-30 Thread Craig Ringer
On 1 May 2018 at 00:09, Andres Freund wrote: > It's not. Only SYNC_FILE_RANGE_WAIT_{BEFORE,AFTER} eat errors. Which > seems sensible, because they could be considered data integrity > operations. Ah, I misread that. Thankyou. >> I'm very suspicious about the safety of the msync() path too. > >

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Юрий Соколов
вт, 1 мая 2018 г., 0:02 Thomas Munro : > On Mon, Apr 30, 2018 at 10:39 PM, Andrey Borodin > wrote: > >> 30 апр. 2018 г., в 0:48, Andres Freund написал(а): > >> On 2018-04-25 11:31:12 +0500, Andrey Borodin wrote: > >> 30 апр. 2018 г., в 0:39, Юрий Соколов > написал(а): > >> > >> (btw, why no one

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Andres Freund
Him On 2018-04-30 20:01:40 -0400, Tom Lane wrote: > What seems like a plausible theory at this point is that the apparent > asynchronicity is due to the allocation being triggered by a different > thread, and the fact that our added monitoring code seems to make the > failure more likely can be ex

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Andres Freund
On 2018-05-01 12:15:21 +1200, Thomas Munro wrote: > On Thu, Apr 26, 2018 at 1:31 PM, Thomas Munro > wrote: > > ... I > > suppose when you read a page in, you could tell the kernel that you > > POSIX_FADV_DONTNEED it, and when you steal a clean PG buffer you could > > tell the kernel that you POSI

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Thomas Munro
On Thu, Apr 26, 2018 at 1:31 PM, Thomas Munro wrote: > ... I > suppose when you read a page in, you could tell the kernel that you > POSIX_FADV_DONTNEED it, and when you steal a clean PG buffer you could > tell the kernel that you POSIX_FADV_WILLNEED its former contents (in > advance somehow), on

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Tom Lane
I wrote: > The solution I was thinking about last night was to have > PGSharedMemoryReAttach call MapViewOfFileEx to map the shared memory > segment at an unspecified address, then unmap it, then call VirtualFree, > and finally call MapViewOfFileEx with the real target address. The idea > here is

Re: EXECUTE does not process parameters

2018-04-30 Thread Tom Lane
Peter Eisentraut writes: > The SQL-level EXECUTE statement does not process parameters in its > arguments. So for example, the following does not work: > ... > It seems this needs some special treatment in transformStmt(). Any > reason not to do that? I have a vague recollection of having poked

Re: Fsync request queue

2018-04-30 Thread Andres Freund
On 2018-04-30 16:07:48 -0700, Peter Geoghegan wrote: > On Mon, Apr 30, 2018 at 4:03 PM, Andres Freund wrote: > >> Is this a problem in practice, though? I don't remember seeing any reports > >> of the fsync queue filling up, after we got the code to compact it. I don't > >> know if anyone has been

Re: Fsync request queue

2018-04-30 Thread Peter Geoghegan
On Mon, Apr 30, 2018 at 4:03 PM, Andres Freund wrote: >> Is this a problem in practice, though? I don't remember seeing any reports >> of the fsync queue filling up, after we got the code to compact it. I don't >> know if anyone has been looking for that, so that might also explain the >> absence

Re: Issues while building PG in MS Windows, using MSYS2 and MinGW-w64

2018-04-30 Thread Yuriy Zhuravlev
If you have time, can you check CMake version? https://github.com/stalkerg/postgres_cmake During Mingw installation you can choose a version, it can be more MSVC like or more Unix, probably Postgres have a problem with one of mingw type. So I unpacked the source tarball within the shell itself(u

Re: Fsync request queue

2018-04-30 Thread Andres Freund
On 2018-04-25 09:19:52 +0300, Heikki Linnakangas wrote: > On 24/04/18 21:00, Andres Freund wrote: > > Right now if the queue is full and can't be compacted we end up > > fsync()ing on every single write, rather than once per checkpoint > > afaict. That's a fairly horrible. > > > > For the case tha

Re: documentation is now XML

2018-04-30 Thread Bruce Momjian
On Mon, Apr 30, 2018 at 03:20:44PM -0400, Peter Eisentraut wrote: > On 4/27/18 11:03, Bruce Momjian wrote: > > On Fri, Apr 27, 2018 at 11:00:36AM -0400, Peter Eisentraut wrote: > >> On 4/23/18 05:54, Liudmila Mantrova wrote: > >>> Reading this thread, I got an impression that everyone would benefit

Re: obsoleting plpython2u and defaulting plpythonu to plpython3u

2018-04-30 Thread Yuriy Zhuravlev
And Gentoo too. > PEP 394 points out that some distros (at least Arch) have already switched >

Re: Support Python 3 tests under MSVC

2018-04-30 Thread Yuriy Zhuravlev
Interesting, this working fine more than year with CMake build version. On Tue, 1 May 2018, 04:53 Andrew Dunstan, wrote: > > Here are a couple of patches, one for master and one for the back > branches from 9.5 to 10 to allow testing of plpython3 and associated > contrib modules when building wi

EXECUTE does not process parameters

2018-04-30 Thread Peter Eisentraut
The SQL-level EXECUTE statement does not process parameters in its arguments. So for example, the following does not work: create table t1 (a int); prepare p1 as insert into t1 (a) values ($1); create function f2(x int) returns int language sql as $$ execute p1($1); -- HERE select null::int; $

Re: Is there a memory leak in commit 8561e48?

2018-04-30 Thread Peter Eisentraut
On 4/27/18 02:44, Andrew Gierth wrote: >> "Tom" == Tom Lane writes: > > Tom> I would bet money that that "_SPI_current->internal_xact" thing is > Tom> wrong/inadequate. > > In particular this looks wrong to me: after doing: > > do $$ > begin > execute 'declare foo cursor with hold f

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Thomas Munro
On Mon, Apr 30, 2018 at 10:39 PM, Andrey Borodin wrote: >> 30 апр. 2018 г., в 0:48, Andres Freund написал(а): >> On 2018-04-25 11:31:12 +0500, Andrey Borodin wrote: >> 30 апр. 2018 г., в 0:39, Юрий Соколов написал(а): >> >> (btw, why no one mention CLOCK+ in this thread). > > I do not know what

Re: [RFC] Add an until-0 loop in psql

2018-04-30 Thread Peter Eisentraut
On 4/30/18 07:01, Daniel Verite wrote: >> As of v11, DO blocks can do transactions. I think this will meet your needs. > > They do support COMMIT and ROLLBACK in the current > development tree, but not VACUUM as in Pierre's example. Support for VACUUM can be added in the future. There is no big

nbtsort.c performs unneeded (though harmless) truncation

2018-04-30 Thread Peter Geoghegan
I noticed that we're calling _bt_nonkey_truncate() needlessly when a minimum key is needed at the leftmost page on each level of the tree. This was always a special case, and I think that it should remain as one. Attached patch avoids unneeded truncations, while preserving the generic BTreeTupleGet

Re: Support Python 3 tests under MSVC

2018-04-30 Thread Peter Eisentraut
On 4/30/18 15:52, Andrew Dunstan wrote: > I'd like to apply these - they only affect the testing script > vcregress.pl, so they should be very low risk. In case there are concerns about maintaining a second copy of the "mangle" script: The obvious answer is to rewrite that script in Python. I tri

Re: Patch missing from back branches

2018-04-30 Thread Tom Lane
Andrew Dunstan writes: > Well, the commit suggests that we should be guided by what the buildfarm > did, and then we never followed that up. I'd say in the light of > experience we should backpatch it to the remaining live branches. There are other VS2015 patches that were not pushed back further

Re: Patch missing from back branches

2018-04-30 Thread Andrew Dunstan
On 04/26/2018 01:29 AM, Michael Paquier wrote: > On Thu, Apr 26, 2018 at 09:06:09AM +0500, Haroon wrote: >> Apparently the following patch[1] got committed to head only (9.6 at the >> time) and never made it into back branches i.e. 9.5, 9.4 and 9.3. Is it an >> oversight ? >> >> [1] >> http://gi

Support Python 3 tests under MSVC

2018-04-30 Thread Andrew Dunstan
Here are a couple of patches, one for master and one for the back branches from 9.5 to 10 to allow testing of plpython3 and associated contrib modules when building with MSVC. I've tested this out on a Windows 2016 machine with Visual Studio 2017. I'd like to apply these - they only affect the t

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Tom Lane
Heath Lord writes: >So what I noticed after adding the '--force' flag was that in the Event > Viewer logs there was an Error in the System log stating that "The > application-specific permission settings do not grant Local Activation > permission for the COM Server application" for the Runtime

Re: Issues while building PG in MS Windows, using MSYS2 and MinGW-w64

2018-04-30 Thread Andrew Dunstan
On 04/30/2018 02:59 PM, Tom Lane wrote: > "insaf.k" writes: >> gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement >> -Wendif-labels -Wmissing-format-attribute -Wformat-security >> -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -std=c11 >> -I../../src/por

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Stephen Frost
Greetings, * Heath Lord (heath.l...@crunchydata.com) wrote: >Any ideas or changes that we could do to help debug or verify would be > helpful. We have considered changing it to run everything as SYSTEM but if > possible we would like to avoid this for security reasons. Thank you in > advance

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Heath Lord
On Mon, Apr 30, 2018 at 2:34 PM, Stephen Frost wrote: > Greetings, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > [ Thanks to Stephen for cranking up a continuous build loop on dory ] > > That was actually Heath, who is also trying to work this issue and has > an idea about something else which m

Re: mogrify and indent features for jsonb

2018-04-30 Thread Andrew Dunstan
On 04/30/2018 05:33 AM, jamesmalvi wrote: > I would like to suggest https://jsonformatter.org/json-pretty-print for > formatting and beautifying JSON data. > > Also for use this validationg JSON data, https://jsonformatter.org > > We already have a pretty-print function built in, and we alrea

Re: documentation is now XML

2018-04-30 Thread Peter Eisentraut
On 4/27/18 11:03, Bruce Momjian wrote: > On Fri, Apr 27, 2018 at 11:00:36AM -0400, Peter Eisentraut wrote: >> On 4/23/18 05:54, Liudmila Mantrova wrote: >>> Reading this thread, I got an impression that everyone would benefit >>> from converting back branches to XML, but the main concern is lack of

Re: obsoleting plpython2u and defaulting plpythonu to plpython3u

2018-04-30 Thread Peter Eisentraut
On 4/27/18 12:38, Pavel Raiskup wrote: > Well, also it depends what's meant by "get PEP 394 changed". My guess is > that distros might well avoid providing /bin/python if that PEP is > a concern.. that's actually typical situation in Fedora even now; python2 > package isn't installed by default.

Re: [HACKERS] Add hint for function named "is"

2018-04-30 Thread Robert Haas
On Mon, Apr 30, 2018 at 2:14 PM, Tom Lane wrote: > Not *nearly* as much as I'd object to mostly-breaking postfix operators. > Now admittedly, if the Berkeley guys had never put those in, nobody > would miss them. But they're there, and I'm afraid that users are > likely depending on them. Neithe

Re: BufFileSize() doesn't work on a "shared" BufFiles

2018-04-30 Thread Peter Geoghegan
On Mon, Apr 30, 2018 at 10:18 AM, Heikki Linnakangas wrote: > Perhaps that would be OK, if it was properly commented. But it's not > actually hard to make BufFileSize() work on shared files, too, so I think we > should do that. I agree that this could use a comment, but I don't see much point in

Re: Issues while building PG in MS Windows, using MSYS2 and MinGW-w64

2018-04-30 Thread Tom Lane
"insaf.k" writes: > gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -std=c11 > -I../../src/port -DFRONTEND -I../../src/include -I./src/includ

Re: [RFC] Add an until-0 loop in psql

2018-04-30 Thread Corey Huinker
On Mon, Apr 30, 2018 at 7:05 AM Pierre Ducroquet < pierre.ducroq...@people-doc.com> wrote: > On Monday, April 30, 2018 1:01:25 PM CEST Daniel Verite wrote: > > Corey Huinker wrote: > > > As of v11, DO blocks can do transactions. I think this will meet your > > > needs. > > They do support CO

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > [ Thanks to Stephen for cranking up a continuous build loop on dory ] That was actually Heath, who is also trying to work this issue and has an idea about something else which might help (and some more information about what's happening in the e

Re: Verbosity of genbki.pl

2018-04-30 Thread Peter Eisentraut
On 4/29/18 06:50, Michael Paquier wrote: > On Sat, Apr 28, 2018 at 01:02:10PM -0400, Stephen Frost wrote: >> +1 for making them not output anything if all is well. > > +1. done -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Trainin

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Andres Freund
Hi, On 2018-04-30 15:39:08 +0500, Andrey Borodin wrote: > I suspect that performance benefits can be not that big or even > marginal, if we do not extend comprehensive eviction strategy with > bgwriter fixes and O_DIRECT. If so, then the improvements aren't real. Bgwriter doesn't matter for read-

Re: [HACKERS] Add hint for function named "is"

2018-04-30 Thread Tom Lane
Robert Haas writes: > I think there would be a lot of value in coming up with some kind of > incremental improvement here; this is a common annoyance for users > migrating from other database systems (and one in particular). Agreed, but ... > Technically, that doesn't look hard to do: (1) remove

Re: [HACKERS] Add hint for function named "is"

2018-04-30 Thread Robert Haas
On Fri, Aug 12, 2016 at 2:40 PM, Tom Lane wrote: > It's likely that by rejiggering the precedence of productions, we could > resolve these ambiguities in favor of "it's not a ColLabel if it appears > in a context like this". And probably that wouldn't be too surprising > most of the time. But de

Re: mogrify and indent features for jsonb

2018-04-30 Thread jamesmalvi
I would like to suggest https://jsonformatter.org/json-pretty-print for formatting and beautifying JSON data. Also for use this validationg JSON data, https://jsonformatter.org -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Issues while building PG in MS Windows, using MSYS2 and MinGW-w64

2018-04-30 Thread insaf.k
Hi Tom Lane, Thanks for the help. I had extracted PG using WinZip outside of MSYS2, and it was causing many of the errors, may be due to some errors in file attributes. So I unpacked the source tarball within the shell itself(using gunzip and tar), and I could fix many errors. Now ne

Re: proposal: schema variables

2018-04-30 Thread Fabrízio Mello
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested 1) There are some errors applying the patch against the current master:

Re: Transform for pl/perl

2018-04-30 Thread Peter Eisentraut
These two items are now outstanding: On 4/10/18 07:33, Dagfinn Ilmari Mannsåker wrote: > 2) jsonb scalar values are passed to the plperl function wrapped in not >one, but _two_ layers of references I don't understand this one, or why it's a problem, or what to do about it. > 3) jsonb numeric

Re: Transform for pl/perl

2018-04-30 Thread Peter Eisentraut
On 4/29/18 14:28, Tom Lane wrote: > Peter Eisentraut writes: >> On 4/24/18 14:31, Andrew Dunstan wrote: >>> There is the routine IsValidJsonNumber that helps - see among others >>> hstore_io.c for an example use. > >> I would need something like that taking a double/float8 input. But I >> think

BufFileSize() doesn't work on a "shared" BufFiles

2018-04-30 Thread Heikki Linnakangas
Hi, I've been noodling around the tuplesort/logtape code, reviewing the changes that were made in v11 to support parallel sorting, and also rebasing my older patch to replace the polyphase merge with a simple balanced merge. Looking at TapeShare: /* * The approach tuplesort.c takes to par

Re: "could not reattach to shared memory" on buildfarm member dory

2018-04-30 Thread Tom Lane
[ Thanks to Stephen for cranking up a continuous build loop on dory ] Noah Misch writes: > On Tue, Apr 24, 2018 at 11:37:33AM +1200, Thomas Munro wrote: >> Maybe try asking what's mapped there with VirtualQueryEx() on failure? > +1. An implementation of that: > https://www.postgresql.org/messag

Re: Postgres, fsync, and OSs (specifically linux)

2018-04-30 Thread Andres Freund
On 2018-04-30 13:03:24 +0800, Craig Ringer wrote: > Hrm, something else that just came up. On 9.6+ we use sync_file_range. > It's surely going to eat errors: > > rc = sync_file_range(fd, offset, nbytes, > SYNC_FILE_RANGE_WRITE); > > /* don't error out,

Re: Intermittent ECPG test failures on Windows buildfarm machines

2018-04-30 Thread Andrew Dunstan
On 04/30/2018 12:22 AM, Tom Lane wrote: > Observe the following buildfarm failures: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=whelk&dt=2018-03-29%2013%3A41%3A13 > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=woodlouse&dt=2018-04-18%2016%3A42%3A03 > https://buildfarm.p

Re: Intermittent ECPG test failures on Windows buildfarm machines

2018-04-30 Thread Michael Meskes
Am Montag, den 30.04.2018, 00:22 -0400 schrieb Tom Lane: > Observe the following buildfarm failures: > ... > The common feature is that a single ECPG test case emitted an empty > stdout > file. There is no other indication of a problem: the corresponding > stderr > output files are correct (and no

Re: Explain buffers wrong counter with parallel plans

2018-04-30 Thread Adrien Nayrat
On 04/29/2018 05:10 PM, Amit Kapila wrote: > Yeah, it would have been convenient, if Gather and Finalize Aggregate > displays that way as it would have been easier for users to > understand. However, as of now, the aggregated stats for parallel > workers and leader are displayed at parallel/partia

Re: Explain buffers wrong counter with parallel plans

2018-04-30 Thread Adrien Nayrat
On 04/29/2018 05:11 PM, Amit Kapila wrote: > I think you can try 'verbose' option, it will give per-worker stats. Thanks! I didn't know verbose give per-woker stats! -- Adrien signature.asc Description: OpenPGP digital signature

Re: XML/XPath issues: text/CDATA in XMLTABLE, XPath evaluated with wrong context

2018-04-30 Thread Markus Winand
Hi and thanks for your efforts. > On 2018-04-26, at 21:18 , Alvaro Herrera wrote: > > Hello Markus, > > Markus Winand wrote: > >> * Patch 0001: Accept TEXT and CDATA nodes in XMLTABLE’s column_expression. >> >>> Column_expressions that match TEXT or CDATA nodes must return >>> the contents of

Re: [RFC] Add an until-0 loop in psql

2018-04-30 Thread Pierre Ducroquet
On Monday, April 30, 2018 1:01:25 PM CEST Daniel Verite wrote: > Corey Huinker wrote: > > As of v11, DO blocks can do transactions. I think this will meet your > > needs. > They do support COMMIT and ROLLBACK in the current > development tree, but not VACUUM as in Pierre's example. > > postg

Re: [RFC] Add an until-0 loop in psql

2018-04-30 Thread Daniel Verite
Corey Huinker wrote: > As of v11, DO blocks can do transactions. I think this will meet your needs. They do support COMMIT and ROLLBACK in the current development tree, but not VACUUM as in Pierre's example. postgres=# \echo :SERVER_VERSION_NAME 11devel postgres=# do ' begin vacuum; en

Re: [HACKERS] Clock with Adaptive Replacement

2018-04-30 Thread Andrey Borodin
> 30 апр. 2018 г., в 0:48, Andres Freund написал(а): > > On 2018-04-25 11:31:12 +0500, Andrey Borodin wrote: >> >> 1. Teaching BgWriter to used data from eviction strategy to aggressively >> flush data to disk (instead of ++next_to_clean ) >> 2. Implementing strategies as lock-free algorithms

Re: FOR EACH ROW triggers on partitioned tables

2018-04-30 Thread Ashutosh Bapat
On Fri, Mar 23, 2018 at 7:19 PM, Alvaro Herrera wrote: > Pushed. Thanks for all the review. > https://www.postgresql.org/docs/devel/static/ddl-partitioning.html section 5.10.2.3 still says "Row triggers, if necessary, must be defined on individual partitions, not the partitioned table." Should