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, Au

Re: Why overhead of SPI is so large?

2019-08-24 Thread David Fetter
s lying to the RDBMS, so it's pilot error. The problem of determining from the function itself whether it is in fact immutable is, in general, equivalent to the Halting Problem, so no, we can't figure it out. We do need to trust our users not to lie to us, and we do not need to protect them from the consequences when they do. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Statement timeout in pg_rewind

2019-08-25 Thread David Fetter
only thing that this hits? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Statement timeout in pg_rewind

2019-08-25 Thread David Fetter
On Sun, Aug 25, 2019 at 04:30:38PM -0400, Tom Lane wrote: > David Fetter writes: > > Is pg_rewind the only thing that this hits? > > pg_dump has forced statement_timeout to 0 for ages. If pg_rewind > is also likely to have a long-running transaction, I don't see any >

Re: RFC: seccomp-bpf support

2019-08-28 Thread David Fetter
examples of software that already > support seccomp. Neat! Are the seccomp interfaces for other kernels arranged in a manner similar enough to have a unified interface in PostgreSQL, or is this more of a Linux-only feature? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778

Proposal: roll pg_stat_statements into core

2019-09-01 Thread David Fetter
ke a consensus as to the what and how of doing this. What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Proposal: roll pg_stat_statements into core

2019-09-01 Thread David Fetter
On Sun, Sep 01, 2019 at 08:12:15PM +0200, Pavel Stehule wrote: > Hi > > ne 1. 9. 2019 v 20:00 odesílatel David Fetter napsal: > > > Folks, > > > > I'd like to $Subject, on by default, with a switch to turn it off for > > those really at the outer e

Re: [HACKERS] [FEATURE PATCH] pg_stat_statements with plans (v02)

2018-01-11 Thread David Fetter
ribution reasonable for outlier plans as you've seen them? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Parameters in user-defined aggregate final functions

2018-01-11 Thread David Fetter
with those parameters all included, passing each along as one goes? SELECT my_custom_agg(expression) WITH ([finalfunc_args = ...][, finalfunc_extra_args = ...]...) is what I could come up with. It seems ugly as grammar and ill-advised in that it makes promises about the implementation details of aggregates into a distant future. What am I missing? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: CREATE ROUTINE MAPPING

2018-01-11 Thread David Fetter
wrote had remote_execute(), which did many of the things you describe here, only with no help from the rest of PostgreSQL, as it was implemented strictly in userland. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: WIP: a way forward on bootstrap data

2018-01-12 Thread David Fetter
that obviously looks like it updates > doc/src/sgml/bki.sgml to explain things. > > So could we have an explanation of what it is we're agreeing to? That would be awesome. A walk-through example or two would also help. Best, David. -- David Fetter http://fetter.org/ Phone: +1 4

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread David Fetter
type | RETURNS TABLE ( column_name column_type [, ...] ) ] SERVER foreign_server_name [ (option [, ...]) ] Does that seem like too broad an interpretation? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread David Fetter
la IMPORT FOREIGN SCHEMA, so as of yet there > wouldn't be any way to grab all the functions that .a foreign server is > offering up. How about making an option to IMPORT FOREIGN SCHEMA do it? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: WIP: a way forward on bootstrap data

2018-01-12 Thread David Fetter
ight now it's approachable programmatically. I > recently proposed to patch to replace the columns proisagg and > proiswindow with a combined column prokind. I could easily write a > small Perl script to make that change in pg_proc.h, because the > format is easy to parse

Re: Implementing SQL ASSERTION

2018-01-15 Thread David Fetter
writes at any isolation level other than SERIALIZABLE. Very Precise: Disallow writes at any other isolation level when the ASSERTION could come into play using the same machinery that enforces the ASSERTION in the first place. What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: proposal: alternative psql commands quit and exit

2018-01-15 Thread David Fetter
ile trying to find the EOF setting in libreadline might get > messy, you're already assuming that ctrl-C hasn't been knobbled > using stty intr. Unless you want to go searching for that too? I'm pretty sure changing either or both of those settings would qualify as pilot error, and p

Re: proposal: alternative psql commands quit and exit

2018-01-15 Thread David Fetter
On Mon, Jan 15, 2018 at 01:24:45PM -0500, Chapman Flack wrote: > On 01/15/18 11:56, David Fetter wrote: > >> And while trying to find the EOF setting in libreadline might get > >> messy, you're already assuming that ctrl-C hasn't been knobbled > >> using st

Re: let's not complain about harmless patch-apply failures

2018-01-16 Thread David Fetter
e to each > patch in a sensible way. I recommend it, but I don't think we > should insist on it. I'm sure I'm not alone in finding it helpful when patch sets come with a single-sentence summary of the patch set and a commit message for each individual patch. Is git format-patch really too heavy a lift to ask of people? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: CREATE ROUTINE MAPPING

2018-01-17 Thread David Fetter
mote input > > > SELECT local_func1(remote_func1(r.x)) FROM remote_table r WHERE r.active = > true; > > > But other situations seem un-handle-able to me: > > SELECT remote_func1(l.x) FROM local_table l WHERE l.active = true; Do we have any way, or any plan to make a way, to push the set (SELECT x FROM local_table WHERE active = true) to the remote side for execution there? Obviously, there are foreign DBs that couldn't support this, but I'm guessing they wouldn't have much by way of UDFs either. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: make_etags: avoid recursive symbolic creation.

2018-01-18 Thread David Fetter
n make_ctags is to accommodate people who hadn't tuned up their text editor to do the right thing. If we're going to revisit this, we should do both or neither. I'm for removing both and adding some minimal explanation of how not to need the tags files all over the tree. Best, Davi

Re: documentation is now XML

2018-01-24 Thread David Fetter
tly, who's > printing the PG manual on dead trees anymore? I find the PDF output > to be mostly a legacy thing in the first place. Speaking of legacy things, do we want to see about deprecating LaTeX output for tables in psql? I haven't seen such a thing in production, but maybe I&

Re: documentation is now XML

2018-01-24 Thread David Fetter
On Wed, Jan 24, 2018 at 10:06:49AM -0500, Tom Lane wrote: > Alvaro Herrera writes: > > David Fetter wrote: > >> Speaking of legacy things, do we want to see about deprecating LaTeX > >> output for tables in psql? I haven't seen such a thing in production, >

Re: documentation is now XML

2018-01-24 Thread David Fetter
On Wed, Jan 24, 2018 at 10:49:38AM -0500, Stephen Frost wrote: > David, Alvaro, > > * Alvaro Herrera (alvhe...@alvh.no-ip.org) wrote: > > David Fetter wrote: > > > > > Speaking of legacy things, do we want to see about deprecating > > > LaTeX output for

Re: CREATE ROUTINE MAPPING

2018-01-24 Thread David Fetter
nd. - During planning, at least to start, we'd ensure that foreign functions can only take arguments on the same server. - Once it's established that the combinations could actually work, execution gets pushed to the foreign server(s) What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: \describe*

2018-01-26 Thread David Fetter
which would do what it says on the label in a copy-and-paste-able form, but that's not strictly necessary for the first cut. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: JIT compiling with LLVM v9.0

2018-01-26 Thread David Fetter
; > More advanced forms of this are that you JIT in the background for > frequently executed code (so not to incur latency the first time > somebody executes). Aand/or that you emit unoptimized code the first > time through, which is quite quick, and run the optimizer after the > que

Re: \describe*

2018-01-27 Thread David Fetter
On Fri, Jan 26, 2018 at 04:28:24PM +0100, Vik Fearing wrote: > On 01/26/2018 03:49 PM, David Fetter wrote: > > I propose that we do what at least MySQL, Oracle, and DB2 do and > > implement DESCRIBE as its own command. > Hard pass. Would you be so kind as to expand on this? &qu

Re: \describe*

2018-01-27 Thread David Fetter
On Sat, Jan 27, 2018 at 10:54:07PM +0100, Vik Fearing wrote: > On 01/27/2018 05:39 PM, David Fetter wrote: > > On Fri, Jan 26, 2018 at 04:28:24PM +0100, Vik Fearing wrote: > >> On 01/26/2018 03:49 PM, David Fetter wrote: > >>> I propose that we do what at least

Re: \describe*

2018-01-29 Thread David Fetter
7;s "hard pass" as being on > having DESCRIBE which looks like an SQL command but would actually be > implemented on the client. This seems simpler at first but could cause > deep confusion later. If we implement \d as DESCRIBE for server versions as of when DESCRIBE is actually

Re: JIT compiling with LLVM v9.0

2018-01-30 Thread David Fetter
downside that a lot of > people who actually want the postgresql-server-jit package will not > realize that they need to install it, which sucks. It does indeed. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: JIT compiling with LLVM v9.0

2018-01-30 Thread David Fetter
On Tue, Jan 30, 2018 at 02:08:30PM -0800, Andres Freund wrote: > Hi, > > On 2018-01-30 22:57:06 +0100, David Fetter wrote: > > On Tue, Jan 30, 2018 at 01:46:37PM -0500, Robert Haas wrote: > > > On Mon, Jan 29, 2018 at 1:40 PM, Andres Freund wrote: > > > >

Better Upgrades

2018-02-05 Thread David Fetter
xt try will find a brand new server without a down time event. Does this seem worth coding up in its current form? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: it's a feature, but it feels like a bug

2018-02-07 Thread David Fetter
are not really the same kind of > thing. Another way might be to partition the table on the boolean and make a foreign key to the "true" partition, e.g.: CREATE TABLE foo(b BOOLEAN, i INTEGER NOT NULL, t TEXT NOT NULL) PARTITION BY LIST (b); CREATE TABLE foo_true PARTITION OF foo (PRI

Re: Minor version upgrades and extension packaging

2018-02-12 Thread David Fetter
to not revert > this struct change and just keep ABI compatibility with 10.2 going forward. > We will also integrate testing against the tip of 10 nightly going forward > so that we can hopefully catch and report such issues early. If it's not too much trouble, you could add whatev

Re: rename sgml files?

2018-02-12 Thread David Fetter
e, the issue would disappear if we were to > back-patch the XML-ization of the documentation. So I'd be fine > with this if we did it uniformly in the supported branches. Otherwise > I think the costs outweigh the benefits. +1 for back-patching. Are there scripts for (at lea

Re: [Proposal] Arbitrary queries in postgres_fdw

2019-10-27 Thread David Fetter
ble to incorporate it into the previous patch that implemented that feature? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [Proposal] Arbitrary queries in postgres_fdw

2019-11-05 Thread David Fetter
On Tue, Nov 05, 2019 at 11:09:34AM +0100, rto...@carto.com wrote: > On Sun, Oct 27, 2019 at 7:07 PM David Fetter wrote: > > There's a SQL MED standard feature for CREATE ROUTINE MAPPING that > > does something similar to this. Might it be possible to incorporate > >

Re: Handy describe_pg_lock function

2019-11-11 Thread David Fetter
Anyone inclined to object to the addition of an official "pg_lock_details" > view with info like in my example function, and a "pg_lock_waiters" or > "pg_locks_blocked" view with info on blocking/blocked-by relationships? I'd > be inclined to add a C l

Re: Invisible PROMPT2

2019-11-13 Thread David Fetter
de with whitespace, but keeps the width? > > Or just define %w as meaning "whitespace of the same width as > PROMPT1". You couldn't use it *in* PROMPT1, then, but I see > no use-case for that anyway. +1 for doing it this way. Would it make more sense to error out if

Re: Invisible PROMPT2

2019-11-13 Thread David Fetter
On Wed, Nov 13, 2019 at 03:06:08PM -0300, Alvaro Herrera wrote: > On 2019-Nov-13, David Fetter wrote: > > > On Wed, Nov 13, 2019 at 09:47:01AM -0500, Tom Lane wrote: > > > > > How about a circumfix directive (like the existing %[ ... %]) > > > > that rep

Re: Invisible PROMPT2

2019-11-13 Thread David Fetter
On Wed, Nov 13, 2019 at 03:58:38PM -0300, Alvaro Herrera wrote: > On 2019-Nov-13, David Fetter wrote: > > > On Wed, Nov 13, 2019 at 03:06:08PM -0300, Alvaro Herrera wrote: > > > On 2019-Nov-13, David Fetter wrote: > > > > > > > On Wed, Nov 13

Reverse collations (initially for making keyset pagination cover more cases)

2019-11-17 Thread David Fetter
, b, c) > (most_recent_a, most_recent_b COLLATE "C_backwards", most_recent_c) with an ORDER BY like: ORDER BY a, b DESC, c What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org

Re: Reverse collations (initially for making keyset pagination cover more cases)

2019-11-17 Thread David Fetter
On Sun, Nov 17, 2019 at 02:30:35PM -0500, Tom Lane wrote: > David Fetter writes: > > Please find attached a patch for $Subject. > > I think there's a reason why this hasn't been proposed before. > > Back before we had full support of ASC/DESC index sort order,

Re: Reverse collations (initially for making keyset pagination cover more cases)

2019-11-17 Thread David Fetter
On Sun, Nov 17, 2019 at 11:23:23PM +, Andrew Gierth wrote: > >>>>> "David" == David Fetter writes: > > First, in testing the patch I found there were indeed some missing > cases: the sortsupport version of the comparator needs to be fixed too. > I at

Re: Invisible PROMPT2

2019-11-19 Thread David Fetter
I also skipped negative results from PQdsplen like > pg_wcswidth() does (that oversight explained why a non-readline build > showed the correct alignment for PROMPT1 '%[%033[1m%]%M > %n@%/%R%[%033[0m%]%# ' by strange concindence). > > Thanks all for the feedback. I thin

Re: missing estimation for coalesce function

2019-11-27 Thread David Fetter
t=0.00..49766.00 rows=995700 width=4) (actual time=0.043..524.401 rows=999772 loops=1) Filter: ((a IS NULL) OR (a = 0)) Rows Removed by Filter: 2000228 Planning Time: 0.106 ms Execution Time: 560.593 ms (5 rows) Time: 561.186 ms Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Make autovacuum sort tables in descending order of xid_age

2019-11-29 Thread David Fetter
Folks, Per a suggestion Christophe made, please find attached a patch to $Subject: Apart from carefully fudging with pg_resetwal, and short of running in production for a few weeks, what would be some good ways to test this? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235

Re: Make autovacuum sort tables in descending order of xid_age

2019-11-29 Thread David Fetter
On Fri, Nov 29, 2019 at 07:01:39PM +0100, David Fetter wrote: > Folks, > > Per a suggestion Christophe made, please find attached a patch to > $Subject: > > Apart from carefully fudging with pg_resetwal, and short of running in > production for a few weeks, what would be s

Re: Make autovacuum sort tables in descending order of xid_age

2019-11-30 Thread David Fetter
On Sat, Nov 30, 2019 at 10:04:07AM -0800, Mark Dilger wrote: > On 11/29/19 2:21 PM, David Fetter wrote: > > On Fri, Nov 29, 2019 at 07:01:39PM +0100, David Fetter wrote: > > > Folks, > > > > > > Per a suggestion Christophe made, please find attached a patch t

Adding a Partition in Painful

2019-12-02 Thread David Fetter
s while holding an AEL. I'm pretty sure this one's a non-starter, but I wanted to mention it for completeness. What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Let people set host(no)ssl settings from initdb

2019-12-11 Thread David Fetter
-- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 5750bafe6169a239f6084d8d2e12b40da422fced Mon Sep 17 00:00:00 2001 From: David Fetter Date: Wed, 11 Dec 2019 18:55:03 -0800 Subject: [PATCH v1] E

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

2019-12-11 Thread David Fetter
On Thu, Dec 12, 2019 at 12:23:42AM -0500, Tom Lane wrote: > David Fetter writes: > > I've found myself writing a lot of boilerplate pg_hba.conf entries > > along the lines of > > hostnosslall all 0.0.0.0/0 reject > > hostssl all a

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

2019-12-12 Thread David Fetter
On Thu, Dec 12, 2019 at 10:47:52AM +0100, Peter Eisentraut wrote: > On 2019-12-12 07:24, David Fetter wrote: > > > That problem exists even before you get to the question of whether > > > this specific option is useful or well-designed ... a question I'm > > > n

Re: Make autovacuum sort tables in descending order of xid_age

2019-12-12 Thread David Fetter
On Thu, Dec 12, 2019 at 08:02:25AM -0800, Mark Dilger wrote: > On 11/30/19 2:23 PM, David Fetter wrote: > > On Sat, Nov 30, 2019 at 10:04:07AM -0800, Mark Dilger wrote: > > > On 11/29/19 2:21 PM, David Fetter wrote: > > > > On Fri, Nov 29, 2019 at 07:01:

Re: Should we rename amapi.h and amapi.c?

2019-12-23 Thread David Fetter
bout which AM we're talking about. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: use CLZ instruction in AllocSetFreeIndex()

2019-12-27 Thread David Fetter
> https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanreverse-bitscanreverse64?view=vs-2015 There's also various flavors of lczntN for N in (16,32,64) on (relatively) modern architectures. https://docs.microsoft.com/en-us/cpp/intrinsics/lzcnt16-lzcnt-lzcnt64?redirectedfrom=MSDN&vie

Re: use CLZ instruction in AllocSetFreeIndex()

2019-12-27 Thread David Fetter
bably worth doing the things you've found unambiguous gains for as a patch, putting it on the next commitfest, and seeing what the commitfest.cputube.org machinery has to say about it. Maybe it'd be worth trying out a patch that enables CLZ for Windows, but that seems like a separate issue. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Allow WHEN in INSTEAD OF triggers

2019-12-27 Thread David Fetter
haven't dug further into those just yet. What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From cb0bb4b39efff33d7eee7cd4cde7879b7107d250 Mon Sep 17 00:00:00 2001 Fro

Re: Allow WHEN in INSTEAD OF triggers

2019-12-28 Thread David Fetter
On Fri, Dec 27, 2019 at 10:29:15PM -0500, Tom Lane wrote: > David Fetter writes: > > While noodling around with an upcoming patch to remove user-modifiable > > RULEs, I noticed that WHEN conditions were disallowed from INSTEAD OF > > triggers for no discernible reason. Th

Re: Allow WHEN in INSTEAD OF triggers

2019-12-28 Thread David Fetter
On Sat, Dec 28, 2019 at 12:12:30AM -0300, Alvaro Herrera wrote: > On 2019-Dec-28, David Fetter wrote: > > > While noodling around with an upcoming patch to remove user-modifiable > > RULEs, I noticed that WHEN conditions were disallowed from INSTEAD OF > > triggers for no

Re: Recognizing superuser in pg_hba.conf

2019-12-30 Thread David Fetter
p;superuser 0.0.0.0/0 reject or similar. The feature works as described, and is useful. I have thus far been unable to make it crash. I haven't used intentionally hostile strings to test it, as I didn't see those as an important attack surface. This is because by the

Re: backup manifests

2019-12-31 Thread David Fetter
already available in every PostgreSQL installation. Imposing a structure atop that includes a version number, as you suggest, seems pretty straightforward, and should be done. Would it make sense to include some kind of capability description in the format along with the version number? Best, Dav

Re: backup manifests

2020-01-01 Thread David Fetter
ssage": "null", ↵ "severity": "null"↵ } ↵ ] (1 row) Time: 3.050 ms > As to the suggestion that a version number be included, that's been > there in every version of the patch I've posted. and thanks for that! Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: backup manifests

2020-01-02 Thread David Fetter
On Wed, Jan 01, 2020 at 08:57:11PM -0500, Robert Haas wrote: > On Wed, Jan 1, 2020 at 7:46 PM Tom Lane wrote: > > David Fetter writes: > > > On Wed, Jan 01, 2020 at 01:43:40PM -0500, Robert Haas wrote: > > >> So, if someone can suggest to me how I could read JSON

Re: Make autovacuum sort tables in descending order of xid_age

2020-01-11 Thread David Fetter
On Thu, Jan 09, 2020 at 12:23:46PM -0500, Robert Haas wrote: > On Thu, Dec 12, 2019 at 2:26 PM David Fetter wrote: > > > I wonder if you might add information about table size, table changes, > > > and bloat to your RelFrozenXidAge struct and modify rfxa_comparator to >

Re: Why is pq_begintypsend so slow?

2020-01-11 Thread David Fetter
#x27;t think we care exactly what > is inserted into those bytes at this point. And maybe > appendStringInfoSpaces could stand some micro-optimization, too. > Use a memset and a single len adjustment, perhaps? Please find attached a patch that does it both of the things you suggested. B

Use compiler intrinsics for bit ops in hash

2020-01-14 Thread David Fetter
Folks, The recent patch for distinct windowing aggregates contained a partial fix of the FIXME that didn't seem entirely right, so I extracted that part, changed it to use compiler intrinsics, and submit it here. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Rem

Re: backup manifests

2020-01-14 Thread David Fetter
> we might pick to go dead pretty soon. Given jq's extreme popularity and compatible license, I'd nominate that. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Use compiler intrinsics for bit ops in hash

2020-01-14 Thread David Fetter
On Tue, Jan 14, 2020 at 12:21:41PM -0800, Jesse Zhang wrote: > Hi David, > > On Tue, Jan 14, 2020 at 9:36 AM David Fetter wrote: > > > > Folks, > > > > The recent patch for distinct windowing aggregates contained a partial > > fix of the FIXME that didn

Re: backup manifests

2020-01-14 Thread David Fetter
On Tue, Jan 14, 2020 at 03:35:40PM -0500, Stephen Frost wrote: > Greetings, > > * David Fetter (da...@fetter.org) wrote: > > On Tue, Jan 14, 2020 at 12:53:04PM -0500, Tom Lane wrote: > > > Robert Haas writes: > > > > ... I would also expect that depending

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

2020-01-17 Thread David Fetter
On Wed, Jan 08, 2020 at 02:53:47AM +, tsunakawa.ta...@fujitsu.com wrote: > From: David Fetter > > > But I see two problems with the proposed approach: (1) initdb > > > doesn't support setting up SSL, so the only thing you can achieve > > > here is to rejec

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

2020-01-17 Thread David Fetter
On Fri, Jan 17, 2020 at 08:47:49PM +0100, David Fetter wrote: > On Wed, Jan 08, 2020 at 02:53:47AM +, tsunakawa.ta...@fujitsu.com wrote: > > From: David Fetter > > > > But I see two problems with the proposed approach: (1) initdb > > > > doesn't support

longs where uint64s could be

2020-01-17 Thread David Fetter
ility to expressing as longs things that can only have non-negative integer values? Did this practice pre-date our now-required 64-bit integers? Thanks in advance for any insights into this! Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donati

Re: Use compiler intrinsics for bit ops in hash

2020-01-18 Thread David Fetter
On Sat, Jan 18, 2020 at 11:46:24AM +0800, John Naylor wrote: > On Wed, Jan 15, 2020 at 6:09 AM David Fetter wrote: > > [v2 patch] > > Hi David, > > I have a stylistic comment on this snippet: > > - for (i = _hash_log2(metap->hashm_bsize); i > 0; --i

Re: longs where uint64s could be

2020-01-19 Thread David Fetter
On Fri, Jan 17, 2020 at 05:12:20PM -0800, Peter Geoghegan wrote: > On Fri, Jan 17, 2020 at 4:42 PM David Fetter wrote: > > While going over places where I might use compiler intrinsics for > > things like ceil(log2(n))) and next power of 2(n), I noticed that a > > lot of

Increase psql's password buffer size

2020-01-20 Thread David Fetter
Folks, At least two cloud providers are now stuffing large amounts of information into the password field. This change makes it possible to accommodate that usage in interactive sessions. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider

Re: Increase psql's password buffer size

2020-01-20 Thread David Fetter
On Mon, Jan 20, 2020 at 01:12:35PM -0500, Tom Lane wrote: > David Fetter writes: > > At least two cloud providers are now stuffing large amounts of > > information into the password field. This change makes it possible to > > accommodate that usage in interactive sessions. &g

Re: Increase psql's password buffer size

2020-01-20 Thread David Fetter
On Mon, Jan 20, 2020 at 07:44:25PM +0100, David Fetter wrote: > On Mon, Jan 20, 2020 at 01:12:35PM -0500, Tom Lane wrote: > > David Fetter writes: > > > At least two cloud providers are now stuffing large amounts of > > > information into the password field. This

Re: Increase psql's password buffer size

2020-01-20 Thread David Fetter
GPASSCOMMAND setting that it shouldn't have made, i.e. it decided which took precedence. I think it should fail when presented with both, as there's not a single right answer that will cover all cases. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Increase psql's password buffer size

2020-01-21 Thread David Fetter
maximum length? The shell variable is a const char *, so why not just re(p)alloc as needed? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Increase psql's password buffer size

2020-01-21 Thread David Fetter
On Tue, Jan 21, 2020 at 10:23:59AM -0500, Bruce Momjian wrote: > On Tue, Jan 21, 2020 at 04:19:13PM +0100, David Fetter wrote: > > On Tue, Jan 21, 2020 at 10:12:52AM -0500, Bruce Momjian wrote: > > > I think we should be using a macro to define the maximum length, rather > &

Re: Minor issues in .pgpass

2020-01-21 Thread David Fetter
), libpq should treat any lines beginning with # as comments. Would it make sense for lines starting with whitespace and then # to be treated as comments, too, e.g.: # Please don't treat this as a parameter ? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Increase psql's password buffer size

2020-01-21 Thread David Fetter
On Tue, Jan 21, 2020 at 07:05:47PM +0100, David Fetter wrote: > On Tue, Jan 21, 2020 at 10:23:59AM -0500, Bruce Momjian wrote: > > On Tue, Jan 21, 2020 at 04:19:13PM +0100, David Fetter wrote: > > > On Tue, Jan 21, 2020 at 10:12:52AM -0500, Bruce Momjian wrote: > > > >

Re: Retronym: s/magnetic disk/main data/

2019-04-04 Thread David Fetter
dex AMs. As opposed to the proposed undo and SLRU > SMGRs that provide layouts specialised for different life cycles. Maybe we could use dd for "diamagnetic data" ;) Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [PATCH] Implement uuid_version()

2019-04-07 Thread David Fetter
on't see any reason to think > the situation has changed since prior discussions. I see some. UUIDs turn out to be super useful in distributed systems to give good guarantees of uniqueness without coordinating with a particular node. Such systems have become a good bit more common si

Re: change password_encryption default to scram-sha-256?

2019-04-07 Thread David Fetter
t; last year, no? What do we know about the state of support in client > libraries? Great idea! Does it make sense to test all, or at least some significant fraction of the connectors listed in https://wiki.postgresql.org/wiki/Client_Libraries by default? Best, David. -- David Fetter http

Re: Commit message / hash in commitfest page.

2019-04-13 Thread David Fetter
of lift out of the git_fdw (well, out of caching it, as performance isn't great yet) for constructing the PostgreSQL Weekly News section on things already committed. About 3.5% of commits (as of last week) on master are within a minute of each other, so grabbing a window two minutes wide wou

Re: block-level incremental backup

2019-04-18 Thread David Fetter
nd block number (3 int32 > values) should be sufficient. Would doing it that way constrain the design of new table access methods in some meaningful way? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

[PATCH v1] Add \echo_stderr to psql

2019-04-21 Thread David Fetter
Folks, Any interest in this? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 089d48c00ffa6dfd0a6a443e83f6d618c9847deb Mon Sep 17 00:00:00 2001 From: David Fetter Date: Sun,

Re: [PATCH v1] Add \echo_stderr to psql

2019-04-21 Thread David Fetter
e of the two[1] hard problems in CS. I'm happy with whatever the community consensus comes out to be. Best, David. [1] The others are cache coherency and off-by-one -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [PATCH v1] Add \echo_stderr to psql

2019-04-22 Thread David Fetter
Maybe the 4 letter option is better > because its the same length as "echo". > > > I suppose we could go the bash &2 route here, but I don't want to. > > I agree on this one. Please find attached v2, name is now \warn. How might we test this portably? Best

[PATCH v1] Show whether tables are logged in \dt+

2019-04-22 Thread David Fetter
Folks, I noticed that there wasn't a bulk way to see table logged-ness in psql, so I made it part of \dt+. What say? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: doc: datatype-table and xfunc-c-type-table

2019-04-23 Thread David Fetter
of the documentation that should also be generated from the source code, but that's a matter for separate threads for the cases where that would make sense. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: [PATCH v1] Show whether tables are logged in \dt+

2019-04-23 Thread David Fetter
gt; Tests? Included, but they're not stable for temp tables. I'm a little stumped as to how to either stabilize them or test some other way. > Doc? What further documentation does it need? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Rememb

Re: [PATCH v1] Show whether tables are logged in \dt+

2019-04-26 Thread David Fetter
then 'temporary' when 'u' then 'unlogged' else 'unknown' end as > \"%s\"", > + gettext_noop("Persistence")); > > is not right, it is being called for indexes with verbose option also. > There should be an extra

Re: [PATCH v1] Add \echo_stderr to psql

2019-04-27 Thread David Fetter
h > could be extended to test many more things which are currently out of > coverage (src/bin/psql stuff is covered around 40% only). Thanks for putting this together. I've added this test, and agree that increasing coverage is important for another patch. Best, David. -- David Fet

Re: nRe: [PATCH v1] Show whether tables are logged in \dt+

2019-04-27 Thread David Fetter
ged table with a SERIAL which created a > sequence. The table is unlogged but the sequence is permanent, which > is probably ok. > I only have packages down to pg 9.3, so I could not test prior 9.1. > By looking at the online documentation, is seems that relistemp > appears in pg 8.4

[PATCH v4] Add \warn to psql

2019-04-28 Thread David Fetter
. Speaking of which, I'd like to see about getting your patch against Testlib.pm in so more tests of psql can also go in. It's not a new feature /per se/, and it doesn't break any current scripts, so I'd make the argument that it's OK for them to go in and possibly even be ba

[PATCH v1] Add a way to supply stdin to TAP tests

2019-04-28 Thread David Fetter
Folks, Our test coverage needs all the help it can get. This patch, extracted from another by Fabian Coelho, helps move things in that direction. I'd like to argue that it's not a new feature, and that it should be back-patched as far as possible. Best, David. -- David Fe

[PATCH v5] Show detailed table persistence in \dt+

2019-04-28 Thread David Fetter
t; > > Done. > > After some checking, I think that there is an issue with the version > numbers: > - 9.1 is 90100, not 91000 > - 8.4 is 80400, not 84000 Another brown paper bag, now fixed. > Also, it seems that describes builds queries with uppercase > keywords,

<    1   2   3   4   5   >