Re: [GENERAL] Serializable isolation -- are predicate locks still held across all databases?

2017-05-19 Thread Kevin Grittner
uess it's worth having on the list, where it will compete with other possible enhancements on a cost/benefit basis. Thanks for raising the issue! -- Kevin Grittner VMware vCenter Server https://www.vmware.com/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Serializable isolation -- are predicate locks still held across all databases?

2017-05-18 Thread Kevin Grittner
to recommend the workaround of using a separate cluster; but if we get other reports it might be worth adding to the list of enhancements that SSI could use. Thanks! -- Kevin Grittner VMware vCenter Server https://www.vmware.com/ -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] update error with serializable

2017-01-20 Thread Kevin Grittner
On Fri, Jan 20, 2017 at 11:27 AM, Rob Sargent <robjsarg...@gmail.com> wrote: > On 01/20/2017 10:05 AM, Kevin Grittner wrote: >> https://www.postgresql.org/message-id/flat/d8joa0eh9yw@dalvik.ping.uio.no#d8joa0eh9yw@dalvik.ping.uio.no > Configurable or dynamic? Wouldn't

Re: [GENERAL] update error with serializable

2017-01-20 Thread Kevin Grittner
e. https://www.postgresql.org/message-id/flat/d8joa0eh9yw@dalvik.ping.uio.no#d8joa0eh9yw@dalvik.ping.uio.no If you are able to build from source, you might want to test the efficacy of the patch for your situation. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise P

[GENERAL] Re: [ADMIN] postgresql : could not serialize access due to read/write dependencies among transactions

2017-01-18 Thread Kevin Grittner
er from repeatable read: https://wiki.postgresql.org/wiki/SSI And of course, if you haven't already read the fine manual on the topic: https://www.postgresql.org/docs/current/static/mvcc.html -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgs

Re: [GENERAL] raise notice question

2017-01-16 Thread Kevin Grittner
ortant to be able to do so (and perhaps do so by default) if we get stored procedures which can return a complex result stream like TDS does. The series of literals and results sets of different types is something which can be quite useful to DBAs. -- Kevin Grittner EDB: http://www.enterprisedb.co

Re: [GENERAL] Re: Are new connection/security features in order, given connection pooling?

2017-01-16 Thread Kevin Grittner
and have the connection pooler connect to the server with a login with rights to do the appropriate SET ROLE (preferably without requiring superuser rights). -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Materialized view vs. view

2017-01-10 Thread Kevin Grittner
years. https://en.wikipedia.org/wiki/Jargon : "A main driving force in the creation of technical jargon is precision and efficiency of communication when a discussion must easily range from general themes to specific, finely differentiated details without circumlocution." -- Kevin G

Re: [GENERAL] Materialized view vs. view

2017-01-10 Thread Kevin Grittner
t to beat up on you, but to try to keep terminology clear, to facilitate efficient communication. There are some terms we have been unable to avoid using with different meanings in different contexts (e.g., "serialization"); that's unfortunate, but hard to avoid. I want to keep it to the min

Re: [GENERAL] Materialized view vs. view

2017-01-10 Thread Kevin Grittner
performance over a non-materialized view. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [GENERAL] Improve PostGIS performance with 62 million rows?

2017-01-09 Thread Kevin Grittner
e the first run? If not, hint bits may be another part of it. The first access to each page after the bulk load would require some extra work for visibility checking and would cause a page rewrite for the hint bits. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQ

Re: [GENERAL] Row value expression much faster than equivalent OR clauses

2017-01-04 Thread Kevin Grittner
>= 0 AND (e.sequenceNumber > 0 OR (e.aggregateIdentifier > 'dev:642e1953-2562-4768-80d9-0c3af9b0ff84') -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Re: [GENERAL] Love Your Database project — Thoughts on effectively handling constraints?

2016-12-17 Thread Kevin Grittner
a message looks like? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Kevin Grittner
On Tue, Dec 13, 2016 at 7:37 PM, Melvin Davidson <melvin6...@gmail.com> wrote: > On Tue, Dec 13, 2016 at 7:36 PM, Kevin Grittner <kgri...@gmail.com> wrote: >> On Tue, Dec 13, 2016 at 5:57 PM, Jonathan Vanasco <postg...@2xlp.com> wrote: >> >>> Is there

Re: [GENERAL] does postgres log the create/refresh of a materialized view anywhere?

2016-12-13 Thread Kevin Grittner
n the view in a system table. This is not currently tracked in the system catalogs. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] FreeBSD 10 => 11: Dump and reload your PostgreSQL database unless you like it broken

2016-12-07 Thread Kevin Grittner
If we reached a point where most DBAs understood the point of being able to set a client_encoding that is different from the server_encoding, I think I would need to pop the cork on some champagne. Hm. Maybe a topic for a blog post.... -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterpri

Re: [GENERAL] Methods to quiesce PostgreSQL DB without configuring log archival

2016-11-23 Thread Kevin Grittner
, do NOT delete the backup_label file created by pg_start_backup(). -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] max_connections limit violation not showing in pg_stat_activity

2016-11-23 Thread Kevin Grittner
On Wed, Nov 23, 2016 at 4:43 AM, Charles Clavadetscher <clavadetsc...@swisspug.org> wrote: > From: Kevin Grittner [mailto:kgri...@gmail.com] >> Is it possible to upgrade? You are missing over a year's worth >> of fixes for serious bugs and security vulnerabiliti

Re: [GENERAL] max_connections limit violation not showing in pg_stat_activity

2016-11-22 Thread Kevin Grittner
nnections has repercussions on the configuration > of work_mem (if I remember well) Each connection can allocate one work_mem allocation per node which requires a sort, hash, CTE, etc. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-ge

Re: [GENERAL] pg_class (system) table increasing size.

2016-11-21 Thread Kevin Grittner
On Mon, Nov 21, 2016 at 11:34 AM, dhaval jaiswal <dhava...@hotmail.com> wrote: > Due to business impact auto vacuum is off. You have now discovered some of the the negative business impact of turning it off. If you leave it off, much worse is likely to follow. -- Kevin Grittner

Re: [GENERAL] pg_class (system) table increasing size.

2016-11-17 Thread Kevin Grittner
large machine you would probably need to raise autovacuum_vacuum_cost limit. And if autovacuum somehow got turned *off* you are likely to have all kinds of problems with bloat, and may need to schedule some down time to get it cleaned up. -- Kevin Grittner EDB: http://www.enterprisedb.com The Ente

Re: [GENERAL] Locking question

2016-10-27 Thread Kevin Grittner
erver, but not SQLite) and cursors (supported by most database products, including the three you mention). -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to yo

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-26 Thread Kevin Grittner
On Wed, Oct 26, 2016 at 3:20 PM, Peter Geoghegan <p...@bowt.ie> wrote: > On Mon, Oct 24, 2016 at 8:07 AM, Kevin Grittner <kgri...@gmail.com> wrote: >> My initial thought is that since reducing the false positive rate >> would only help when there was a high rate of conf

Re: [GENERAL] Locking question

2016-10-26 Thread Kevin Grittner
(either from triggers or application code), which will cause a write conflict if two transactions try to update the same total at the same time, or by using explicit locking controlled from the application. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-24 Thread Kevin Grittner
e. Reducing the rate of false positive serialization failures is a worthy goal, but it's gotta make sense from a cost/benefit perspective. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] out-of-order XID insertion in KnownAssignedXids

2016-10-24 Thread Kevin Grittner
lem is, without a backup_label file things look exactly like a crash recovery, which is why it just goes to the last usable checkpoint; that's the correct behavior for crash recovery. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-gener

Re: [GENERAL] out-of-order XID insertion in KnownAssignedXids

2016-10-21 Thread Kevin Grittner
l-on-restore-will.html -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-14 Thread Kevin Grittner
On Thu, Oct 13, 2016 at 5:26 PM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > On Fri, Oct 14, 2016 at 2:04 AM, Kevin Grittner <kgri...@gmail.com> wrote: >> Where do you see a problem if REPEATABLE READ handles INSERT/ON >> CONFLICT without error? > I thin

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-13 Thread Kevin Grittner
On Thu, Oct 13, 2016 at 3:16 PM, Kevin Grittner <kgri...@gmail.com> wrote: > On Thu, Oct 13, 2016 at 2:16 PM, Peter Geoghegan <p...@bowt.ie> wrote: >> We must still determine if a fix along the lines of the one proposed >> by Thomas is basically acceptable (that i

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-13 Thread Kevin Grittner
On Thu, Oct 13, 2016 at 2:16 PM, Peter Geoghegan <p...@bowt.ie> wrote: > On Thu, Oct 13, 2016 at 6:19 AM, Kevin Grittner <kgri...@gmail.com> wrote: >> Every situation that generates a false positive hurts performance; >> we went to great lengths to minimize t

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-13 Thread Kevin Grittner
eworks designed to work with serializable transactions. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-13 Thread Kevin Grittner
On Wed, Oct 12, 2016 at 8:06 PM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > On Thu, Oct 13, 2016 at 10:06 AM, Kevin Grittner <kgri...@gmail.com> wrote: >> On Wed, Oct 12, 2016 at 3:02 PM, Peter Geoghegan <p...@bowt.ie> wrote: >> >>> I agree th

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-13 Thread Kevin Grittner
On Wed, Oct 12, 2016 at 5:21 PM, Peter Geoghegan <p...@bowt.ie> wrote: > On Wed, Oct 12, 2016 at 2:06 PM, Kevin Grittner <kgri...@gmail.com> wrote: >> If the "proper" fix is impossible (or just too freaking ugly) we >> might fall back on the fix Thomas s

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Kevin Grittner
On Wed, Oct 12, 2016 at 3:55 PM, Peter Geoghegan <p...@bowt.ie> wrote: > On Wed, Oct 12, 2016 at 1:41 PM, Kevin Grittner <kgri...@gmail.com> wrote: >> Aren't these two completely separate and independent bugs? > > Technically they are, but they are both isolated t

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Kevin Grittner
"proper" fix is impossible (or just too freaking ugly) we might fall back on the fix Thomas suggested, but I would like to take advantage of the "special properties" of the INSERT/ON CONFLICT DO NOTHING code to avoid false positives where we can. -- Kevin Grittner EDB: http://www.e

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Kevin Grittner
bug I mentioned... Aren't these two completely separate and independent bugs? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Kevin Grittner
On Wed, Oct 12, 2016 at 10:06 AM, Kevin Grittner <kgri...@gmail.com> wrote: > The test in ExecCheckHeapTupleVisible() seems wrong to me. It's > not immediately obvious what the proper fix is. To identify what cases ExecCheckHeapTupleVisible() was meant to cover I commented

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Kevin Grittner
NSERT raises "duplicate key > value violates unique constraint" and doesn't run to > "ExecCheckHeapTupleVisible" check. > The "ExecInsert" handles constraint checks but not later checks like > ExecCheckHeapTupleVisible. The test in ExecCheckHeapTupleVisible() seems wrong to me. It's not immediately obvious what the proper fix is. Peter, do you have any ideas on this? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Kevin Grittner
On Wed, Oct 12, 2016 at 2:50 AM, Albe Laurenz <laurenz.a...@wien.gv.at> wrote: > Kevin Grittner wrote: >> I don't see that on development HEAD. What version are you >> running? What is your setting for default_transaction_isolation? > > The subject says SERIALIZA

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-11 Thread Kevin Grittner
ERROR: could not serialize access due to concurrent update > =# END; > ROLLBACK I don't see that on development HEAD. What version are you running? What is your setting for default_transaction_isolation? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Com

Re: [GENERAL] Transactional-DDL DROP/CREATE TABLE

2016-10-06 Thread Kevin Grittner
ing > DROP TABLE > test=# create table ddl_test(id int); > ERROR: duplicate key value violates unique constraint > "pg_type_typname_nsp_index" > DETAIL: Key (typname, typnamespace)=(ddl_test, 2200) already exists. > test=# commit ; > ROLLBACK I recommend using

Re: [GENERAL] Time travel?

2016-09-29 Thread Kevin Grittner
t can render the database unusable without warning... > How is it possible for the WAL file to be accessed BEFORE it was > created? Perhaps renaming it counts as "creation" without affecting access time. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [GENERAL] isnull() function in pgAdmin3

2016-09-28 Thread Kevin Grittner
n PostgreSQL NULL = NULL does not evaluate to TRUE. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Update two tables returning id from insert CTE Query

2016-09-27 Thread Kevin Grittner
tter off if you can leave the relationship intact all the way through -- perhaps by adding name_last to table_1. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] Update two tables returning id from insert CTE Query

2016-09-27 Thread Kevin Grittner
value of 124312. Effectively the database is complaining that it can only store one value, not a set of values. I can only guess at what you might be intending to ask the database to do. Can you explain what you are trying to do? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise Pos

Re: [GENERAL] isnull() function in pgAdmin3

2016-09-27 Thread Kevin Grittner
en ((("s"."Funding_Date") is null or ("s"."Funding_Date" <> '')) and (("s"."Actual_Close_Date" = '') or ("s"."Actual_Close_Date") is null))

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Kevin Grittner
e for how to go about that, although operating a row at a time you probably won't approach the speed of statement-level set logic for statements that affect very many rows. :-( -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Kevin Grittner
T * FROM "Δ(tri_hop)" ORDER BY 1, 2; -- Now we're done with snapshots and all but the highest-level delta. DROP TABLE link1, link2, "Δ(link)"; DROP TABLE hop1, hop2, "Δ(hop)"; -- At some later time the MV delta is processed "behind the scenes". -- We can't do the dem

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Kevin Grittner
rep1=pdf The first step in using either of those techniques (counting or DRed) is to capture a delta relation to feed into the relational algebra used by these techniques. As a first step in that direction I have been floating a patch to implement the SQL-standard "transition table

Re: [GENERAL] COL unique (CustomerID) plus COL unique (COUNT) inside CustomerID

2016-09-01 Thread Kevin Grittner
the customer table, defaulting to zero on customer insert, and which you increment to get values for the second key column in the contact table. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Understanding Postgres Memory Usage

2016-08-25 Thread Kevin Grittner
e sum of differences between PSS and USS == total shared memory.) RSS has the usual meaning. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] incorrect checksum detected on "global/pg_filenode.map" when VACUUM FULL is executed

2016-08-22 Thread Kevin Grittner
. It should at least be an informed decision so that the decision-maker can stand behind it and feel as good as possible about circumstances should that happen. You might want to keep a copy of the email or memo in which you point this out, in case anyone's memory gets foggy during such a

Re: [GENERAL] Serializable read and blocking

2016-08-11 Thread Kevin Grittner
gt; Are the above statements true even with SET TRANSACTION SERIALIZEABLE mode. > I am specifically interested in the 3rd condition (- Writers do not > block readers.) Yes. https://wiki.postgresql.org/wiki/SSI http://vldb.org/pvldb/vol5/p1850_danrkports_vldb2012.pdf -- Kevin Gr

Re: [GENERAL] Column order in multi column primary key

2016-08-09 Thread Kevin Grittner
e trigger for rehashing old flame-wars. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Materialized view auto refresh

2016-08-09 Thread Kevin Grittner
s often been set aside to address more immediate issues for particular end users; but I expect to get back to it Real Soon Now. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] Column order in multi column primary key

2016-08-08 Thread Kevin Grittner
scale, by modifying one column of one row. That is, of course, a double-edged sword -- in discussing design alternatives with the CPAs who were going to be auditing financial data stored in a database, they didn't tend to see that as nearly as much of a plus as some programmers do. -- Kevin Grittner E

Re: [GENERAL] Detecting if current transaction is modifying the database

2016-08-08 Thread Kevin Grittner
action ID and just returned NULL if none has yet been assigned. I'm not sure what the best name would be for such a function when we already have a function called txid_current() which does something different from that. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise Post

Re: [GENERAL] Allowing multiple versions of PG under NetBSD

2016-07-29 Thread Kevin Grittner
*required*, but it makes a restart after a crash less problematic and it is generally better from a security standpoint, so you might want to look for a way to allow it. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-29 Thread Kevin Grittner
ve 10 million database objects, that might be a hard one to overcome, but it might be something with an easy solution in the pg_upgrade options or server configuration. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing lis

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Kevin Grittner
ze being 3TB. They symptoms you report are a little thin to diagnose the actual cause. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.

Re: [GENERAL] question on parsing postgres sql queries

2016-07-27 Thread Kevin Grittner
; Could the parser commiters share some lights on how the documentation > process interacts with the parser commits ? There is no automated interaction there -- it depends on human attention. On the other hand, try connecting to a database with psql and typing: \h create index ..

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Kevin Grittner
a back-out plan. Until you get to the end of the upgrade and *start the cluster under the new version* you can fall back to the old version. I remember a couple times that we saw something during a pg_upgrade --link run that we weren't expecting, and did exactly that so we could investigate and try

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-27 Thread Kevin Grittner
are not taking advantage of the available features. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] unique constraint with several null values

2016-07-20 Thread Kevin Grittner
s somehow. >> Any thoughts are certainly appreciated. I can't do much about >> the data model itself right now, I need to protect the integrity >> of the data. Rather than unique constraints, you could add a unique index on the COALESCE of each column with some i

Re: --EXTERNAL--Re: [GENERAL] PSQL does not remove obvious useless joins

2016-07-02 Thread Kevin Grittner
m analyze b; vacuum analyze c; select id, b1_name from v; explain (analyze, buffers, verbose) select id, b1_name from v; I'm seeing the unreferenced tables pruned from the plan, and a 1ms execution time for the select from the view. -- Kevin Grittner EDB: http://www.enterprisedb.com The En

Re: --EXTERNAL--Re: [GENERAL] PSQL does not remove obvious useless joins

2016-07-01 Thread Kevin Grittner
uess. If it is important enough to you you could submit a patch or fund development of such a feature; but since it would add at least some small amount of planning time to every inner join just to avoid specifying that the join is an optional one when writing the query, it seems to me unlikely to be

Re: [GENERAL] PSQL does not remove obvious useless joins

2016-07-01 Thread Kevin Grittner
actual time=0.006..0.006 rows=3 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 9kB -> Seq Scan on b b1 (cost=0.00..12.60 rows=260 width=278) (actual time=0.002..0.003 rows=3 loops=1) Planning time: 0.177 ms Execution time: 0.044 ms (8 rows) Note the difference in results

Re: [GENERAL] Sequences, txids, and serial order of transactions

2016-06-14 Thread Kevin Grittner
e numbers to be assigned in the apparent order of execution of the serializable transactions, I'm afraid that I don't know of any good solution for that right now. There has been some occasional talk of providing a way to read the AOoE, but nothing has come of it so far. -- Kevin Grittner EDB: htt

Re: [GENERAL] dumb question

2016-06-02 Thread Kevin Grittner
ref_id = t1.id); max - 3 (1 row) Note that providing minimal setup (like the above) helps in getting good answers quickly. >> do note, this is whats known as an 'anti-join', and these can be pretty >> expensive on large tables. > > +1 *Can* be. Proper indexing can make them

Re: [GENERAL] plql and or clausule

2016-05-31 Thread Kevin Grittner
On Tue, May 31, 2016 at 4:18 PM, <car...@lpis.com> wrote: > ERROR: el operador no existe: character varying == character varying > LINE 1: SELECT OLD.Peticionario == NEW.Peticionario or OLD.interlocc... Perhaps you want the = operator? -- Kevin Grittner EDB: http://www.ente

Re: [GENERAL] full text search index

2016-05-26 Thread Kevin Grittner
t; to_tsvector ? I very much doubt that full text search is going to be helpful here -- perhaps trigrams with an appropriate gist or gin index could help. Depending on table sizes and data present, picking out rows based on the OR of scanning for a sequence of characters in a couple character string

Re: [GENERAL] Timestamp with timezone output

2016-05-25 Thread Kevin Grittner
n_date | 2015-09-07 00:00:00+02 > -[ RECORD 7 ]---+--- > expiration_date | 2015-11-27 00:00:00+01 > > Shouldn't all value be converted to the same timezone ? Perhaps your local time zone ends Daylight Saving Time between those dates, so the offset from UTC is different o

Re: [GENERAL] Increased I/O / Writes

2016-05-23 Thread Kevin Grittner
huge pages are debilitating. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Increased I/O / Writes

2016-05-17 Thread Kevin Grittner
me RAM, but the amount is hard to predict exactly. You might want to go over this page: https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server ... and then read the documentation of any setting you are thinking of adjusting. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise

Re: [GENERAL] Invalid data read from synchronously replicated hot standby

2016-05-11 Thread Kevin Grittner
e detail to be able to even guess at whether you have actually solved the flaws in your process or have just been lucky so far. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] MVIEW refresh consistently faster then insert ... select

2016-05-04 Thread Kevin Grittner
is because most of the work is done in temporary files and workspace, with just the delta applied to the table and index in permanent storage. It's hard to guess which way will be faster for the use case you describe -- it will probably depend on what percentage of rows remain unchanged on each REFRESH

Re: [GENERAL] Proper relational database?

2016-04-23 Thread Kevin Grittner
')) x(id, name); SELECT 2 test=# select * from people; id | name +-- 1 | Fred 2 | Bob (2 rows) test=# \d List of relations Schema | Name | Type | Owner ++---+- public | people | table | kgrittn (1 row) -- Kevin Grittner EDB: http://www.enterprised

Re: [GENERAL] Add relcreated (timestamp) column to pg_class catalog to record the time an object was created

2016-04-20 Thread Kevin Grittner
itized it to the point of developing a proposed patch. That and the fact that there is no guarantee that the community as a whole would feel that the feature "carried its own weight" in terms of benefit / maintenance cost, so it might not make it in anyway. -- Kevin Grittner EDB: http://www

Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-13 Thread Kevin Grittner
On Wed, Apr 13, 2016 at 5:54 PM, Kevin Grittner <kgri...@gmail.com> wrote: > See this example, and imagine that > the transaction generating the list of receipts for the closed > batch is run on the standby before the transaction adding the last > receipt commits.

Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-13 Thread Kevin Grittner
http://pgpool.net/mediawiki/index.php/Bug_tracking_system > > Filed http://www.pgpool.net/mantisbt/view.php?id=191 As the entry stands at the moment, the suggestions for fixes will allow incorrect query results. See this example, and imagine that the transaction generating the list of receipts f

Re: [GENERAL] How to quote the COALESCE function?

2016-04-04 Thread Kevin Grittner
y zero error: SELECT COALESCE(1, 1/0); -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-10 Thread Kevin Grittner
de a reasonable mechanism for implementing such behavior is not one I would consider to be mature enough for "prime time" -- although others might feel differently. Kevin Grittner -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:

Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-09 Thread Kevin Grittner
om foo where mynum < 100; id | mynum +--- 1 |10 2 |10 3 |10 4 |10 5 |10 (5 rows) mydb=# update foo set mynum = 20 where id < 100; UPDATE 5 mydb=# select * from foo; id | mynum +--- 1 |20 2 | 20 3 |20 4 |20 5 |20 (5 rows)

Re: [GENERAL] multicolumn index and setting effective_cache_size using human-readable-numbers

2016-02-29 Thread Kevin Grittner
that it can estimate the amount of random storage I/O needed to use an indexed plan. If you tell it that you only have 64MB between those two types of cache, it will assume that the index (particularly if it is deep and/or wide) will be very expensive. -- Kevin Grittner EDB: http://www.enterprise

Re: [GENERAL] Let's Do the CoC Right

2016-01-22 Thread Kevin Grittner
ngendered elsewhere should not be brought in. Problems should be resolved in a way that minimizes the chance of escalation, recognizing that there could be miscommunication.[2] -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company [1] https://en.wikipedia.org/wiki/Gol

Re: [GENERAL] CoC [Final]

2016-01-20 Thread Kevin Grittner
ral times on this thread by multiple people that we should settle on the code to implement before talking about enforcement processes. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] CoC [Final]

2016-01-18 Thread Kevin Grittner
e with the rest of it, but this one made me squirm a little. Could we spin that to say that those behaviors will not be tolerated, versus not tolerating the people? Maybe: * Disruption of the collaborative space or any pattern of behaviour which could be considered harassment will not be tolerated. -- Kev

Re: [GENERAL] Data Packaging/Data Unpacking

2016-01-13 Thread Kevin Grittner
stgreSQL backend process associated with the database connection. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Data Packaging/Data Unpacking

2016-01-13 Thread Kevin Grittner
the file > system. At all times the data is present only in files owned by the OS user which runs the database server or in RAM allocated to processes run by that user. Files and RAM are freed without overwrite; we count on the OS to not gratuitously show the old values to processes making new

Re: [GENERAL] Data Packaging/Data Unpacking

2016-01-13 Thread Kevin Grittner
uns the database service. If a machine contains multiple clusters it is (IMO) best practice, for both security and operational reasons, to use a separate OS user for each cluster. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mai

Re: [GENERAL] WIP: CoC V5

2016-01-13 Thread Kevin Grittner
On Tue, Jan 12, 2016 at 10:04 PM, Joshua D. Drake <j...@commandprompt.com> wrote: > On 01/12/2016 07:10 PM, Tom Lane wrote: >> Kevin Grittner <kgri...@gmail.com> writes: >>> * To maintain a safe, respectful, productive and collaborative >>> e

Re: [GENERAL] WIP: CoC V5

2016-01-12 Thread Kevin Grittner
ose of team, at the top of the community's "Contributor Profiles" page: http://www.postgresql.org/community/contributors/ To me, this reads more like the document itself. I hope I have done justice to Josh's points as well as Tom's, although I would bet there are a number

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-11 Thread Kevin Grittner
t a new thread with a different subject line. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-11 Thread Kevin Grittner
On Mon, Jan 11, 2016 at 4:10 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Kevin Grittner <kgri...@gmail.com> writes: >> If someone wants to take the step of posting a concrete proposal, >> please start a new thread with a different subject line. > > I thought w

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-11 Thread Kevin Grittner
but if the gist of it is that they have a code of conduct that attempts to control the speech or actions of contributors outside of the venue of the lists or events of the project, count me as -1, regardless of how offensive I might find said speech or actions. -- Kevin Grittner EDB: http://www.e

[GENERAL] Re: [BUGS] BUG #13847: WARNING: skipping "pg_toast_" --- cannot vacuum indexes, views, or special system tables VACUUM

2016-01-06 Thread Kevin Grittner
uster (created from initdb). If you can still find a copy of 8.2.23 you might want to install that. > PostgreSQL 9.4.1 on x86_64-mv-linux-gnu, compiled by > i686-montavista-linux-gnu-gcc (MontaVista Linux G++ 4.4-1311130628) 4.4.1, > 64-bit 9.3 and 9.4 had serious bugs in early releases which coul

Re: [GENERAL] A unique pairs version of UNNEST() ?

2016-01-05 Thread Kevin Grittner
3,5} {4,5} (10 rows) Nothing in that not already mentioned; just putting it all together. The OP mentioned wanting a count, but that wasn't too clear to me; using a window function to number the rows, changing the comparison from > to >= while excluding self-matches should make that prett

Re: [GENERAL] Secret Santa List

2015-12-23 Thread Kevin Grittner
Earl'); > -- with g as (select giver, row_number() over () as rownum from secretsanta), r as (select giver, row_number() over () as rownum from (select giver from secretsanta order by random()) as x) update secretsanta set recipient = r.giver from g join r on g.rownum = r.rownum wher

Re: [GENERAL] connections not getting closed on a replica

2015-12-11 Thread Kevin Grittner
oblem, suggestions for a solution are shots in the dark. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Kevin Grittner
s who may later have a similar problem and find this thread, it would be great if you could provide a little self-contained example of a Java program which uses the technique that you settled on. Thanks! -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent

  1   2   3   4   5   6   >