RE: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2019-08-13 Thread Smith, Peter
On Sat, Aug 10, 2019 at 1:19 AM Tomas Vondra wrote: > We can of course support "forced" re-encryption, but I think it's acceptable > if that's fairly expensive as long as it can be throttled and executed in the > background (kinda similar to the patch to enable checksums in the background).

Re: subscriptionCheck failures on nightjar

2019-08-13 Thread Michael Paquier
On Wed, Feb 13, 2019 at 01:51:47PM -0800, Andres Freund wrote: > I'm not yet sure that that's actually something that's supposed to > happen, I got to spend some time analysing how this actually > happens. Normally the contents of the slot should actually prevent it > from being removed (as they're

Re: errbacktrace

2019-08-13 Thread Peter Eisentraut
On 2019-07-22 20:19, Peter Eisentraut wrote: > On 2019-07-09 11:43, Peter Eisentraut wrote: >> After further research I'm thinking about dropping the libunwind >> support. The backtrace()/backtrace_symbols() API is more widely >> available: darwin, freebsd, linux, netbsd, openbsd (via port), solar

Re: Global temporary tables

2019-08-13 Thread Konstantin Knizhnik
On 13.08.2019 8:34, Craig Ringer wrote: On Tue, 13 Aug 2019 at 00:47, Pavel Stehule > wrote: But Postgres is not storing this information now anywhere else except statistic, isn't it? not only - critical numbers are reltuples, relpages from

Re: Global temporary tables

2019-08-13 Thread Craig Ringer
On Fri, 9 Aug 2019 at 22:07, Konstantin Knizhnik wrote: > > > Ok, here it is: global_private_temp-1.patch > Initial pass review follows. Relation name "SESSION" is odd. I guess you're avoiding "global" because the data is session-scoped, not globally temporary. But I'm not sure "session" fits

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Dilip Kumar
On Tue, Jul 30, 2019 at 1:32 PM Andres Freund wrote: > > Hi, > > Amit, short note: The patches aren't attached in patch order. Obviously > a miniscule thing, but still nicer if that's not the case. > > Dilip, this also contains the start of a review for the undo record > interface further down. >

Re: Global temporary tables

2019-08-13 Thread Craig Ringer
On Tue, 13 Aug 2019 at 16:19, Konstantin Knizhnik wrote: > > > On 13.08.2019 8:34, Craig Ringer wrote: > > On Tue, 13 Aug 2019 at 00:47, Pavel Stehule > wrote: > > >> But Postgres is not storing this information now anywhere else except >>> statistic, isn't it? >>> >> >> not only - critical numb

Re: using explicit_bzero

2019-08-13 Thread Peter Eisentraut
On 2019-07-30 07:08, Michael Paquier wrote: > On Mon, Jul 29, 2019 at 11:30:53AM +0200, Peter Eisentraut wrote: >> Another patch, with various fallback implementations. > > I have spotted some issues with this patch: > 1) The list of port files @pgportfiles in Mkvcbuild.pm has not been > updated w

Re: using explicit_bzero

2019-08-13 Thread Peter Eisentraut
On 2019-07-30 07:58, Andres Freund wrote: > I think it's better to have a pg_explicit_bzero or such, and implement > that via the various platform dependant mechanisms. It's considerably > harder to understand code when one is surprised that a function normally > not available is called, the build

Re: Global temporary tables

2019-08-13 Thread Konstantin Knizhnik
On 13.08.2019 11:21, Craig Ringer wrote: On Fri, 9 Aug 2019 at 22:07, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: Ok, here it is: global_private_temp-1.patch Initial pass review follows. Relation name "SESSION" is odd. I guess you're avoiding "global" because the

Re: Some memory not freed at the exit of RelationBuildPartitionDesc()

2019-08-13 Thread amul sul
On Sat, Aug 10, 2019 at 12:16 AM David Fetter wrote: > On Thu, Aug 08, 2019 at 05:42:21PM +0900, Amit Langote wrote: > > On Thu, Aug 8, 2019 at 5:33 PM amul sul wrote: > > > On Thu, Aug 8, 2019 at 1:27 PM Amit Langote > wrote: > > > > >> Thanks for the patch. This was discussed recently in the

Re: Converting NOT IN to anti-joins during planning

2019-08-13 Thread Antonin Houska
David Rowley wrote: > On Mon, 27 May 2019 at 20:43, Antonin Houska wrote: > > I've spent some time looking into this. > > Thank you for having a look at this. > > > One problem I see is that SubLink can be in the JOIN/ON clause and thus it's > > not necessarily at the top of the join tree. Con

Feature: Use DNS SRV records for connecting

2019-08-13 Thread Feike Steenbergen
Hi all, I'd like to get some feedback on whether or not implementing a DNS SRV feature for connecting to PostgreSQL would be desirable/useful. The main use case is to have a DNS SRV record that lists all the possible primaries of a given replicated PostgreSQL cluster. With auto failover solutions

Re: Bison state table

2019-08-13 Thread John Naylor
On Sat, Jan 26, 2019 at 5:39 AM Bruce Momjian wrote: > > With our scanner keywords list now more cache-aware, and with us > planning to use Bison for years to come, has anyone ever looked at > reordering the bison state machine array to be more cache aware, e.g., > having common states next to eac

Re: Feature: Use DNS SRV records for connecting

2019-08-13 Thread Graham Leggett
On 13 Aug 2019, at 11:50, Feike Steenbergen wrote: > I'd like to get some feedback on whether or not implementing a DNS SRV feature > for connecting to PostgreSQL would be desirable/useful. A big +1. We currently use SRV records to tell postgresql what kind of server it is. This way all of our

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Amit Kapila
On Fri, Aug 9, 2019 at 1:57 AM Robert Haas wrote: > > On Thu, Aug 8, 2019 at 9:31 AM Andres Freund wrote: > > I know that Robert is working on a patch that revises the undo request > > layer somewhat, it's possible that this is best discussed afterwards. > > Here's what I have at the moment. Thi

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Amit Kapila
On Thu, Aug 8, 2019 at 7:01 PM Andres Freund wrote: > On 2019-08-07 14:50:17 +0530, Amit Kapila wrote: > > On Tue, Aug 6, 2019 at 1:26 PM Andres Freund wrote: > > > On 2019-08-05 11:29:34 -0700, Andres Freund wrote: > > > > > typedef struct TwoPhaseFileHeader > > > > { > > > > @@ -927,6 +928,16

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Dilip Kumar
On Mon, Aug 5, 2019 at 11:59 PM Andres Freund wrote: > > Hi, > > (as I was out of context due to dealing with bugs, I've switched to > lookign at the current zheap/undoprocessing branch. > > On 2019-07-30 01:02:20 -0700, Andres Freund wrote: > > +/* > > + * Insert a previously-prepared undo record

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Dilip Kumar
On Tue, Aug 6, 2019 at 1:26 PM Andres Freund wrote: > > Hi, > > On 2019-08-05 11:29:34 -0700, Andres Freund wrote: > > Need to do something else for a bit. More later. > > > > + /* > > + * Compute the header size of the undo record. > > + */ > > +Size > > +UndoRecordHeaderSize(uint16 uur_info) >

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Robert Haas
On Tue, Aug 13, 2019 at 6:28 AM Amit Kapila wrote: > So, for top-level transactions rollback, we can directly refer from > UndoRequest *, the start and end locations. But, what should we do > for sub-transactions (rollback to savepoint)? One related point is > that we also need information about

Re: Do not check unlogged indexes on standby

2019-08-13 Thread Andrey Borodin
> 13 авг. 2019 г., в 3:23, Peter Geoghegan написал(а): > > I pushed your patch to all branches that have amcheck just now, so now > we skip over unlogged relations when in recovery, though I made some > revisions. Oh, cool, thanks! > Your patch didn't handle temp tables/indexes that were crea

Configuring bgw_restart_time

2019-08-13 Thread Jeremy Finzel
I am working on an extension that uses background workers, and interested in adding code for it to auto-restart after a crash or server restart (similar to as-coded in worker_spi). But I'm also interested in being able to configure bgw_restart_time using a GUC without having to restart the server,

Re: errbacktrace

2019-08-13 Thread Alvaro Herrera
On 2019-Aug-13, Peter Eisentraut wrote: > I have changed the configuration setting to backtrace_functions plural, > so that you can debug more than one location at once. I had originally > wanted to do that but using existing functions like > SplitIdentifierString() resulted in lots of complicati

Re: Global temporary tables

2019-08-13 Thread Konstantin Knizhnik
On 13.08.2019 11:27, Craig Ringer wrote: On Tue, 13 Aug 2019 at 16:19, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: On 13.08.2019 8:34, Craig Ringer wrote: On Tue, 13 Aug 2019 at 00:47, Pavel Stehule mailto:pavel.steh...@gmail.com>> wrote: But P

Re: progress report for ANALYZE

2019-08-13 Thread Alvaro Herrera
Hello, On 2019-Jul-03, Tatsuro Yamada wrote: > My ex-colleague Vinayak created same patch in 2017 [1], and he > couldn't get commit because there are some reasons such as the > patch couldn't handle analyzing Foreign table. Therefore, I wonder > whether your patch is able to do that or not. > [1

Re: Configuring bgw_restart_time

2019-08-13 Thread Craig Ringer
On Tue, 13 Aug 2019 at 20:37, Jeremy Finzel wrote: > I am working on an extension that uses background workers, and interested > in adding code for it to auto-restart after a crash or server restart > (similar to as-coded in worker_spi). > What pglogical does for this is use dynamic background w

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2019-08-13 Thread Alvaro Herrera
On 2019-Aug-13, Michael Paquier wrote: > On Mon, Aug 12, 2019 at 05:32:08PM -0400, Alvaro Herrera wrote: > > So do we have an updated patch for this? It's been a while since this > > patch saw any movement ... > > Please note that this involves a couple of people in Japan, and this > week is the

Re: errbacktrace

2019-08-13 Thread Tom Lane
Peter Eisentraut writes: > I have changed the configuration setting to backtrace_functions plural, > so that you can debug more than one location at once. I had originally > wanted to do that but using existing functions like > SplitIdentifierString() resulted in lots of complications with error

Re: Some memory not freed at the exit of RelationBuildPartitionDesc()

2019-08-13 Thread David Fetter
On Tue, Aug 13, 2019 at 03:08:34PM +0530, amul sul wrote: > On Sat, Aug 10, 2019 at 12:16 AM David Fetter wrote: > > > On Thu, Aug 08, 2019 at 05:42:21PM +0900, Amit Langote wrote: > > > On Thu, Aug 8, 2019 at 5:33 PM amul sul wrote: > > > > On Thu, Aug 8, 2019 at 1:27 PM Amit Langote > > wrote

Re: Some memory not freed at the exit of RelationBuildPartitionDesc()

2019-08-13 Thread Tom Lane
David Fetter writes: > On Tue, Aug 13, 2019 at 03:08:34PM +0530, amul sul wrote: >> Look like commit # d3f48dfae42 added the required fix but is enabled only >> for the clobber-cache builds :( > I've got a real world multi-tenancy case that would really be helped > by this. Can we enable it for a

Re: Feature: Use DNS SRV records for connecting

2019-08-13 Thread Tom Lane
Feike Steenbergen writes: > I'd like to get some feedback on whether or not implementing a DNS SRV feature > for connecting to PostgreSQL would be desirable/useful. How would we get at that data without writing our own DNS client? (AFAIK, our existing DNS interactions are all handled by getnamein

Re: Built-in connection pooler

2019-08-13 Thread Konstantin Knizhnik
Updated version of the patch is attached. I rewrote  edge-triggered mode emulation and have tested it at MacOS/X. So right now three major platforms: Linux, MaxOS and Windows are covered. In theory it should work on most of other Unix dialects. -- Konstantin Knizhnik Postgres Professional: http:/

Re: Problem with default partition pruning

2019-08-13 Thread Alvaro Herrera
On 2019-Aug-13, Amit Langote wrote: > Thanks a lot for revising. Looks neat, except: > > + * This is a measure of last resort only to be used because the default > + * partition cannot be pruned using the steps; regular pruning, which is > + * cheaper, is sufficient when no default p

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2019-08-13 Thread Anastasia Lubennikova
06.08.2019 4:28, Peter Geoghegan wrote: Attached is v5, which is based on your v4. The three main differences between this and v4 are: * Removed BT_COMPRESS_THRESHOLD stuff, for the reasons explained in my July 24 e-mail. We can always add something like this back during performance validation o

pgbench - rework variable management

2019-08-13 Thread Fabien COELHO
Hello pgdevs, The attached patch improves pgbench variable management as discussed in: https://www.postgresql.org/message-id/flat/alpine.DEB.2.21.1904081752210.5867@lancre As discussed there as well, the overall effect is small compared to libpq & system costs when pgbench is talking to a pos

Re: SegFault on 9.6.14

2019-08-13 Thread Tom Lane
Amit Kapila writes: > On Tue, Aug 13, 2019 at 3:18 AM Tom Lane wrote: >> To clarify my position --- I think it's definitely possible to improve >> the situation a great deal. We "just" have to pass down more information >> about whether rescans are possible. > Right, you have speculated above t

Re: pg_upgrade fails with non-standard ACL

2019-08-13 Thread Anastasia Lubennikova
29.07.2019 18:37, Stephen Frost wrote: Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: Bruce Momjian writes: On Thu, Jul 18, 2019 at 06:53:12PM +0300, Anastasia Lubennikova wrote: pg_upgrade from 9.6 fails if old cluster had non-standard ACL on pg_catalog functions that have changed betwee

Re: Add "password_protocol" connection parameter to libpq

2019-08-13 Thread Jeff Davis
On Tue, 2019-08-13 at 11:56 +0900, Michael Paquier wrote: > I tend to prefer #2 as well and that's the kind of approach we were > tending to agree on when we discussed this issue during the v11 beta > for the downgrade issues with libpq. And as you say extend it so as > we can apply filtering of m

Re: Bison state table

2019-08-13 Thread Bruce Momjian
On Tue, Aug 13, 2019 at 05:09:30PM +0700, John Naylor wrote: > On Sat, Jan 26, 2019 at 5:39 AM Bruce Momjian wrote: > > > > With our scanner keywords list now more cache-aware, and with us > > planning to use Bison for years to come, has anyone ever looked at > > reordering the bison state machine

Re: pg_upgrade fails with non-standard ACL

2019-08-13 Thread Bruce Momjian
On Tue, Aug 13, 2019 at 07:04:42PM +0300, Anastasia Lubennikova wrote: > > In an ideal world, it seems like we'd make a judgement call and arrange > > to pull the privileges across when we can do so without granting the > > user privileges beyond those that were intended, and otherwise we'd > > sup

Re: Do not check unlogged indexes on standby

2019-08-13 Thread Peter Geoghegan
On Tue, Aug 13, 2019 at 5:17 AM Andrey Borodin wrote: > We have a bunch of internal testing HA clusters that suffered from corruption > conditions. > We fixed everything that can be detected with parent-check on primaries or > usual check on standbys. > (page updates were lost both on primary an

Re: Unix-domain socket support on Windows

2019-08-13 Thread Peter Eisentraut
On 2019-08-07 15:56, Peter Eisentraut wrote: > Depending on your Windows environment, there might not be a suitable > /tmp directory, so you'll need to specify a directory explicitly using > postgres -k or similar. This leads to the question what the default for > DEFAULT_PGSOCKET_DIR should be on

Re: Fix runtime errors from -fsanitize=undefined

2019-08-13 Thread Peter Eisentraut
On 2019-07-05 19:10, Tom Lane wrote: > Peter Eisentraut writes: >> On 2019-07-05 01:33, Noah Misch wrote: >>> I just saw this proposal. The undefined behavior in question is strictly >>> academic. These changes do remove the need for new users to discover >>> -fno-sanitize=nonnull-attribute, but

Re: Use PageIndexTupleOverwrite() within nbtsort.c

2019-08-13 Thread Peter Geoghegan
On Tue, Aug 6, 2019 at 8:30 AM Anastasia Lubennikova wrote: > Should we also update similar code in _bt_mark_page_halfdead()? > I attached a new version of the patch with this change. Pushed. At first I thought that there might be a problem with doing the same thing within _bt_mark_page_halfdead

Re: Small patch to fix build on Windows

2019-08-13 Thread Dmitry Igrishin
вт, 13 авг. 2019 г. в 06:19, Michael Paquier : > > On Fri, Aug 09, 2019 at 11:21:52AM +0300, Dmitry Igrishin wrote: > > Personally I don't care. I used || notation only in order to be > > consistent, since this notation is already used in Solution.pm. If > > this consistency is not required let me

Re: Improve search for missing parent downlinks in amcheck

2019-08-13 Thread Peter Geoghegan
On Mon, Aug 12, 2019 at 12:01 PM Alexander Korotkov wrote: > BTW, there is next revision of patch I'm proposing for v13. Cool. > In this revision check for missing downlinks is combined with > bt_downlink_check(). So, pages visited by bt_downlink_check() patch > doesn't cause extra accessed. I

Re: block-level incremental backup

2019-08-13 Thread Ibrar Ahmed
On Mon, Aug 12, 2019 at 4:57 PM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Fri, Aug 9, 2019 at 6:36 PM Robert Haas wrote: > >> On Wed, Aug 7, 2019 at 5:46 AM Jeevan Chalke >> wrote: >> > So, do you mean we should just do fread() and fwrite() for the whole >> file? >> > >> >

Re: Add "password_protocol" connection parameter to libpq

2019-08-13 Thread Jonathan S. Katz
On 8/13/19 12:25 PM, Jeff Davis wrote: > On Tue, 2019-08-13 at 11:56 +0900, Michael Paquier wrote: >> I tend to prefer #2 as well and that's the kind of approach we were >> tending to agree on when we discussed this issue during the v11 beta >> for the downgrade issues with libpq. And as you say e

Re: Add "password_protocol" connection parameter to libpq

2019-08-13 Thread Jeff Davis
On Tue, 2019-08-13 at 16:51 -0400, Jonathan S. Katz wrote: > Alternatively, we could combine 2 & 3, e.g.: > > channel_binding = {disable|prefer|require} > > # comma-separated list of protocols that are ok to the user, remove > # ones you don't want. empty means all is ok > password_protoc

12's AND CHAIN doesn't chain when transaction raised an error

2019-08-13 Thread Philip Dubé
The easiest way to see this is to BEGIN READ ONLY & then attempt an insert. Execute either of COMMIT AND CHAIN or ROLLBACK AND CHAIN & attempt the insert a second time This seems incorrect. The documentation should at least point out this behavior if it's intended

Re: Add "password_protocol" connection parameter to libpq

2019-08-13 Thread Jonathan S. Katz
On 8/13/19 6:25 PM, Jeff Davis wrote: > On Tue, 2019-08-13 at 16:51 -0400, Jonathan S. Katz wrote: >> Alternatively, we could combine 2 & 3, e.g.: >> >> channel_binding = {disable|prefer|require} >> >> # comma-separated list of protocols that are ok to the user, remove >> # ones you don't wan

Re: Unexpected "shared memory block is still in use"

2019-08-13 Thread Tom Lane
Noah Misch writes: > On Fri, May 10, 2019 at 04:46:40PM -0400, Tom Lane wrote: >> Done now, but while thinking more about the issue, I had an idea: why is >> it that we base the shmem key on the postmaster's port number, and not >> on the data directory's inode number? Using the port number not o

BF failure: could not open relation with OID XXXX while querying pg_views

2019-08-13 Thread Thomas Munro
Hi, Here are three strange recent failures in the "rules" test: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=blenny&dt=2019-08-13%2022:19:27 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=alewife&dt=2019-07-27%2009:39:05 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=

Re: pg_upgrade fails with non-standard ACL

2019-08-13 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Tue, Aug 13, 2019 at 07:04:42PM +0300, Anastasia Lubennikova wrote: > > Maybe, as a compromise, we can reset grants to default for all changed > > functions > > and also generate a script that will allow a user to preserve privileges of > >

Re: Problem with default partition pruning

2019-08-13 Thread Amit Langote
On Wed, Aug 14, 2019 at 12:25 AM Alvaro Herrera wrote: > On 2019-Aug-13, Amit Langote wrote: > > > Thanks a lot for revising. Looks neat, except: > > > > + * This is a measure of last resort only to be used because the default > > + * partition cannot be pruned using the steps; regular pr

Re: pg_upgrade fails with non-standard ACL

2019-08-13 Thread Bruce Momjian
On Tue, Aug 13, 2019 at 08:28:12PM -0400, Stephen Frost wrote: > Getting it to be at check time would certainly be a great improvement. > > Solving this in pg_upgrade does seem like it's probably the better > approach rather than trying to do it in pg_dump. Unfortunately, that > likely means that

Re: Recent failures in IsolationCheck deadlock-hard

2019-08-13 Thread Thomas Munro
On Tue, Aug 6, 2019 at 6:18 PM Tom Lane wrote: > Thomas Munro writes: > > On Sat, Aug 3, 2019 at 2:11 AM Tom Lane wrote: > >> Also worth noting is that anole failed its first try at the new > >> deadlock-parallel isolation test: > >> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=anole&

Re: [HACKERS] CLUSTER command progress monitor

2019-08-13 Thread Tatsuro Yamada
Hi Alvaro and All, On 2019/08/13 14:40, Tatsuro Yamada wrote: Hi Alvaro! On 2019/08/02 3:43, Alvaro Herrera wrote: Hmm, I'm trying this out now and I don't see the index_rebuild_count ever go up.  I think it's because the indexes are built using parallel index build ... or maybe it was the tab

Re: Add "password_protocol" connection parameter to libpq

2019-08-13 Thread Michael Paquier
On Tue, Aug 13, 2019 at 04:51:57PM -0400, Jonathan S. Katz wrote: > On 8/13/19 12:25 PM, Jeff Davis wrote: >> On Tue, 2019-08-13 at 11:56 +0900, Michael Paquier wrote: >>> I tend to prefer #2 as well and that's the kind of approach we were >>> tending to agree on when we discussed this issue during

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2019-08-13 Thread Etsuro Fujita
Hi Alvaro and Michael, On Tue, Aug 13, 2019 at 11:04 PM Alvaro Herrera wrote: > On 2019-Aug-13, Michael Paquier wrote: > > On Mon, Aug 12, 2019 at 05:32:08PM -0400, Alvaro Herrera wrote: > > > So do we have an updated patch for this? It's been a while since this > > > patch saw any movement ...

Re: [HACKERS] CLUSTER command progress monitor

2019-08-13 Thread Michael Paquier
On Wed, Aug 14, 2019 at 11:38:01AM +0900, Tatsuro Yamada wrote: > On 2019/08/13 14:40, Tatsuro Yamada wrote: >> On 2019/08/02 3:43, Alvaro Herrera wrote: >>> Hmm, I'm trying this out now and I don't see the index_rebuild_count >>> ever go up.  I think it's because the indexes are built using parall

Re: using explicit_bzero

2019-08-13 Thread Michael Paquier
On Tue, Aug 13, 2019 at 10:30:39AM +0200, Peter Eisentraut wrote: > Another patch, to attempt to fix the Windows build. I have not been able to test the compilation, but the changes look good on this side. -- Michael signature.asc Description: PGP signature

Re: BF failure: could not open relation with OID XXXX while querying pg_views

2019-08-13 Thread Tom Lane
Thomas Munro writes: > Here are three strange recent failures in the "rules" test: > ... > They all raised "ERROR: could not open relation with OID " > while running: > SELECT viewname, definition FROM pg_views > WHERE schemaname IN ('pg_catalog', 'public') > ORDER BY viewname; I think the pr

Re: Regression test failure in regression test temp.sql

2019-08-13 Thread Michael Paquier
On Tue, Aug 13, 2019 at 12:15:26PM +0900, Michael Paquier wrote: > Indeed. Good catch! Perhaps you would like to fix it? There are two > queries in need of an ORDER BY, and the second query even uses two > semicolons (spoiler warning: that's a nit). And fixed. The test case was new as of v12.

Re: SegFault on 9.6.14

2019-08-13 Thread Amit Kapila
On Tue, Aug 13, 2019 at 9:28 PM Tom Lane wrote: > > Amit Kapila writes: > > On Tue, Aug 13, 2019 at 3:18 AM Tom Lane wrote: > >> To clarify my position --- I think it's definitely possible to improve > >> the situation a great deal. We "just" have to pass down more information > >> about whethe

Re: SegFault on 9.6.14

2019-08-13 Thread Tom Lane
Amit Kapila writes: > Another point which I am wondering is why can't we use the existing > REWIND flag to solve the current issue, basically if we have access to > that information in nodeLimit.c (ExecLimit), then can't we just pass > down that to ExecShutdownNode? The existing REWIND flag tells

Re: clean up obsolete initdb locale handling

2019-08-13 Thread Peter Eisentraut
On 2019-08-12 20:17, Tom Lane wrote: > Peter Eisentraut writes: >> OK, let's do it like that. Updated patch attached. > > LGTM, but I don't have the ability to test it on Windows. Committed, after some testing on Windows. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL

Re: BF failure: could not open relation with OID XXXX while querying pg_views

2019-08-13 Thread Peter Eisentraut
On 2019-08-14 05:52, Tom Lane wrote: > Thomas Munro writes: >> Here are three strange recent failures in the "rules" test: >> ... >> They all raised "ERROR: could not open relation with OID " >> while running: >> SELECT viewname, definition FROM pg_views >> WHERE schemaname IN ('pg_catalog', 'p

Re: [proposal] de-TOAST'ing using a iterator

2019-08-13 Thread John Naylor
On Sat, Aug 3, 2019 at 11:11 PM Binguo Bao wrote: > > John Naylor 于2019年8月2日周五 下午3:12写道: >> >> I like the use of a macro here. However, I think we can find a better >> location for the definition. See the header comment of fmgr.h: >> "Definitions for the Postgres function manager and function-cal

Re: BF failure: could not open relation with OID XXXX while querying pg_views

2019-08-13 Thread Tom Lane
Peter Eisentraut writes: > On 2019-08-14 05:52, Tom Lane wrote: >> Thomas Munro writes: >>> They all raised "ERROR: could not open relation with OID " >>> while running: >>> SELECT viewname, definition FROM pg_views >>> WHERE schemaname IN ('pg_catalog', 'public') >>> ORDER BY viewname; >> I th

Re: BF failure: could not open relation with OID XXXX while querying pg_views

2019-08-13 Thread Thomas Munro
On Wed, Aug 14, 2019 at 5:06 PM Tom Lane wrote: > Oh, hmm --- yeah, that should mean it's safe. Maybe somebody incautiously > changed one of the other tests that run concurrently with "rules"? Looks like stats_ext.sql could be the problem. It creates and drops priv_test_view, not in a schema.

use of the term "verifier" with SCRAM

2019-08-13 Thread Peter Eisentraut
I'm confused by how the code uses the term "verifier" in relation to SCRAM. ISTM that the code uses the term as meaning whatever is or would be stored in pg_auth.rolpassword. I don't see this usage supported in the RFCs. In RFC 5802, verifier= "v=" base64 ;; base

Re: Custom table AMs need to include heapam.h because of BulkInsertState

2019-08-13 Thread David Rowley
On Wed, 17 Jul 2019 at 06:46, Andres Freund wrote: > 2) Add a execPartition.c function that returns all the used tables from >a PartitionTupleRouting*. Here's a patch which implements it that way. I struggled a bit to think of a good name for the execPartition.c function. I ended up with Exe

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Andres Freund
Hi, On 2019-08-06 14:18:42 -0700, Andres Freund wrote: > Here's the last section of my low-leve review. Plan to write a higher > level summary afterwards, now that I have a better picture of the code. General comments: - For a feature of this complexity, there's very little architectural docum

RE: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2019-08-13 Thread Smith, Peter
On Sat, Aug 10, 2019 at 1:19 AM Tomas Vondra wrote: > We can of course support "forced" re-encryption, but I think it's acceptable > if that's fairly expensive as long as it can be throttled and executed in the > background (kinda similar to the patch to enable checksums in the background).

Re: subscriptionCheck failures on nightjar

2019-08-13 Thread Michael Paquier
On Wed, Feb 13, 2019 at 01:51:47PM -0800, Andres Freund wrote: > I'm not yet sure that that's actually something that's supposed to > happen, I got to spend some time analysing how this actually > happens. Normally the contents of the slot should actually prevent it > from being removed (as they're

Re: errbacktrace

2019-08-13 Thread Peter Eisentraut
On 2019-07-22 20:19, Peter Eisentraut wrote: > On 2019-07-09 11:43, Peter Eisentraut wrote: >> After further research I'm thinking about dropping the libunwind >> support. The backtrace()/backtrace_symbols() API is more widely >> available: darwin, freebsd, linux, netbsd, openbsd (via port), solar

Re: Global temporary tables

2019-08-13 Thread Konstantin Knizhnik
On 13.08.2019 8:34, Craig Ringer wrote: On Tue, 13 Aug 2019 at 00:47, Pavel Stehule > wrote: But Postgres is not storing this information now anywhere else except statistic, isn't it? not only - critical numbers are reltuples, relpages from

Re: Global temporary tables

2019-08-13 Thread Craig Ringer
On Fri, 9 Aug 2019 at 22:07, Konstantin Knizhnik wrote: > > > Ok, here it is: global_private_temp-1.patch > Initial pass review follows. Relation name "SESSION" is odd. I guess you're avoiding "global" because the data is session-scoped, not globally temporary. But I'm not sure "session" fits

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Dilip Kumar
On Tue, Jul 30, 2019 at 1:32 PM Andres Freund wrote: > > Hi, > > Amit, short note: The patches aren't attached in patch order. Obviously > a miniscule thing, but still nicer if that's not the case. > > Dilip, this also contains the start of a review for the undo record > interface further down. >

Re: Global temporary tables

2019-08-13 Thread Craig Ringer
On Tue, 13 Aug 2019 at 16:19, Konstantin Knizhnik wrote: > > > On 13.08.2019 8:34, Craig Ringer wrote: > > On Tue, 13 Aug 2019 at 00:47, Pavel Stehule > wrote: > > >> But Postgres is not storing this information now anywhere else except >>> statistic, isn't it? >>> >> >> not only - critical numb

Re: using explicit_bzero

2019-08-13 Thread Peter Eisentraut
On 2019-07-30 07:08, Michael Paquier wrote: > On Mon, Jul 29, 2019 at 11:30:53AM +0200, Peter Eisentraut wrote: >> Another patch, with various fallback implementations. > > I have spotted some issues with this patch: > 1) The list of port files @pgportfiles in Mkvcbuild.pm has not been > updated w

Re: using explicit_bzero

2019-08-13 Thread Peter Eisentraut
On 2019-07-30 07:58, Andres Freund wrote: > I think it's better to have a pg_explicit_bzero or such, and implement > that via the various platform dependant mechanisms. It's considerably > harder to understand code when one is surprised that a function normally > not available is called, the build

Re: Global temporary tables

2019-08-13 Thread Konstantin Knizhnik
On 13.08.2019 11:21, Craig Ringer wrote: On Fri, 9 Aug 2019 at 22:07, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: Ok, here it is: global_private_temp-1.patch Initial pass review follows. Relation name "SESSION" is odd. I guess you're avoiding "global" because the

Re: Some memory not freed at the exit of RelationBuildPartitionDesc()

2019-08-13 Thread amul sul
On Sat, Aug 10, 2019 at 12:16 AM David Fetter wrote: > On Thu, Aug 08, 2019 at 05:42:21PM +0900, Amit Langote wrote: > > On Thu, Aug 8, 2019 at 5:33 PM amul sul wrote: > > > On Thu, Aug 8, 2019 at 1:27 PM Amit Langote > wrote: > > > > >> Thanks for the patch. This was discussed recently in the

Re: Converting NOT IN to anti-joins during planning

2019-08-13 Thread Antonin Houska
David Rowley wrote: > On Mon, 27 May 2019 at 20:43, Antonin Houska wrote: > > I've spent some time looking into this. > > Thank you for having a look at this. > > > One problem I see is that SubLink can be in the JOIN/ON clause and thus it's > > not necessarily at the top of the join tree. Con

Feature: Use DNS SRV records for connecting

2019-08-13 Thread Feike Steenbergen
Hi all, I'd like to get some feedback on whether or not implementing a DNS SRV feature for connecting to PostgreSQL would be desirable/useful. The main use case is to have a DNS SRV record that lists all the possible primaries of a given replicated PostgreSQL cluster. With auto failover solutions

Re: Bison state table

2019-08-13 Thread John Naylor
On Sat, Jan 26, 2019 at 5:39 AM Bruce Momjian wrote: > > With our scanner keywords list now more cache-aware, and with us > planning to use Bison for years to come, has anyone ever looked at > reordering the bison state machine array to be more cache aware, e.g., > having common states next to eac

Re: Feature: Use DNS SRV records for connecting

2019-08-13 Thread Graham Leggett
On 13 Aug 2019, at 11:50, Feike Steenbergen wrote: > I'd like to get some feedback on whether or not implementing a DNS SRV feature > for connecting to PostgreSQL would be desirable/useful. A big +1. We currently use SRV records to tell postgresql what kind of server it is. This way all of our

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Amit Kapila
On Fri, Aug 9, 2019 at 1:57 AM Robert Haas wrote: > > On Thu, Aug 8, 2019 at 9:31 AM Andres Freund wrote: > > I know that Robert is working on a patch that revises the undo request > > layer somewhat, it's possible that this is best discussed afterwards. > > Here's what I have at the moment. Thi

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Amit Kapila
On Thu, Aug 8, 2019 at 7:01 PM Andres Freund wrote: > On 2019-08-07 14:50:17 +0530, Amit Kapila wrote: > > On Tue, Aug 6, 2019 at 1:26 PM Andres Freund wrote: > > > On 2019-08-05 11:29:34 -0700, Andres Freund wrote: > > > > > typedef struct TwoPhaseFileHeader > > > > { > > > > @@ -927,6 +928,16

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Dilip Kumar
On Mon, Aug 5, 2019 at 11:59 PM Andres Freund wrote: > > Hi, > > (as I was out of context due to dealing with bugs, I've switched to > lookign at the current zheap/undoprocessing branch. > > On 2019-07-30 01:02:20 -0700, Andres Freund wrote: > > +/* > > + * Insert a previously-prepared undo record

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Dilip Kumar
On Tue, Aug 6, 2019 at 1:26 PM Andres Freund wrote: > > Hi, > > On 2019-08-05 11:29:34 -0700, Andres Freund wrote: > > Need to do something else for a bit. More later. > > > > + /* > > + * Compute the header size of the undo record. > > + */ > > +Size > > +UndoRecordHeaderSize(uint16 uur_info) >

Re: POC: Cleaning up orphaned files using undo logs

2019-08-13 Thread Robert Haas
On Tue, Aug 13, 2019 at 6:28 AM Amit Kapila wrote: > So, for top-level transactions rollback, we can directly refer from > UndoRequest *, the start and end locations. But, what should we do > for sub-transactions (rollback to savepoint)? One related point is > that we also need information about

Re: Do not check unlogged indexes on standby

2019-08-13 Thread Andrey Borodin
> 13 авг. 2019 г., в 3:23, Peter Geoghegan написал(а): > > I pushed your patch to all branches that have amcheck just now, so now > we skip over unlogged relations when in recovery, though I made some > revisions. Oh, cool, thanks! > Your patch didn't handle temp tables/indexes that were crea

Configuring bgw_restart_time

2019-08-13 Thread Jeremy Finzel
I am working on an extension that uses background workers, and interested in adding code for it to auto-restart after a crash or server restart (similar to as-coded in worker_spi). But I'm also interested in being able to configure bgw_restart_time using a GUC without having to restart the server,

Re: errbacktrace

2019-08-13 Thread Alvaro Herrera
On 2019-Aug-13, Peter Eisentraut wrote: > I have changed the configuration setting to backtrace_functions plural, > so that you can debug more than one location at once. I had originally > wanted to do that but using existing functions like > SplitIdentifierString() resulted in lots of complicati

Re: Global temporary tables

2019-08-13 Thread Konstantin Knizhnik
On 13.08.2019 11:27, Craig Ringer wrote: On Tue, 13 Aug 2019 at 16:19, Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: On 13.08.2019 8:34, Craig Ringer wrote: On Tue, 13 Aug 2019 at 00:47, Pavel Stehule mailto:pavel.steh...@gmail.com>> wrote: But P

Re: progress report for ANALYZE

2019-08-13 Thread Alvaro Herrera
Hello, On 2019-Jul-03, Tatsuro Yamada wrote: > My ex-colleague Vinayak created same patch in 2017 [1], and he > couldn't get commit because there are some reasons such as the > patch couldn't handle analyzing Foreign table. Therefore, I wonder > whether your patch is able to do that or not. > [1

Re: Configuring bgw_restart_time

2019-08-13 Thread Craig Ringer
On Tue, 13 Aug 2019 at 20:37, Jeremy Finzel wrote: > I am working on an extension that uses background workers, and interested > in adding code for it to auto-restart after a crash or server restart > (similar to as-coded in worker_spi). > What pglogical does for this is use dynamic background w

  1   2   >