Re: [GENERAL] Serializable Isolation and read/write conflict with index and different keys

2017-08-29 Thread Thomas Munro
s. Sometimes simple SSI tests can show a lot of false positives just because of empty tables or missing statistics (ANALYZE). -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postg

Re: [GENERAL] Isolation of schema renames

2017-08-09 Thread Thomas Munro
/message-id/flat/20170605191104.1442.24999%40wrigleys.postgresql.org -- Thomas Munro http://www.enterprisedb.com -- 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] Multixact members limit exceeded

2017-08-09 Thread Thomas Munro
On Thu, Aug 10, 2017 at 10:26 AM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > eaten a total of n! member space with an average size of n/2 per Erm, math fail, not n! but 1 + 2 + ... + n. -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing li

Re: [GENERAL] Multixact members limit exceeded

2017-08-09 Thread Thomas Munro
building even larger ones. A thundering herd of worker processes repeatedly share-locking the same row or something like that? -- Thomas Munro http://www.enterprisedb.com -- 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] Concurrency and UPDATE [...] FROM

2017-07-10 Thread Thomas Munro
here the race would change the outcome, or some other serialisation scheme like table or advisory locks. [1] https://github.com/postgres/postgres/blob/master/src/backend/executor/README#L297 -- Thomas Munro http://www.enterprisedb.com -- 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 Thomas Munro
for some ideas), but the idea would be basically the same. -- Thomas Munro http://www.enterprisedb.com -- 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-02 Thread Thomas Munro
ub.com/macdice/check_pg_collations [4] https://www.postgresql.org/message-id/flat/85364fde-091f-bbc0-fec2-e3ede3984...@2ndquadrant.com -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: htt

Re: [GENERAL] Immutable datastore library?

2016-10-17 Thread Thomas Munro
sed on Richard Snodgrass's excellent book (which I hear is widely read at utility companies among others), without any special library support: http://www.cs.arizona.edu/~rts/tdbbook.pdf His work influenced the SQL standard which I expect/hope is inspiring those projects. SQL:2011 has a temporal feat

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-13 Thread Thomas Munro
On Fri, Oct 14, 2016 at 2:04 AM, Kevin Grittner <kgri...@gmail.com> wrote: > On Wed, Oct 12, 2016 at 8:06 PM, Thomas Munro <thomas.mu...@enterprisedb.com> > wrote: >> The "higher isolation levels" probably shouldn't be treated the same way. >> >> I

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Thomas Munro
On Thu, Oct 13, 2016 at 2:32 PM, Peter Geoghegan <p...@bowt.ie> wrote: > On Wed, Oct 12, 2016 at 6:06 PM, Thomas Munro > <thomas.mu...@enterprisedb.com> wrote: >> But yeah, the existing code raises false positive serialization >> failures under SERIALIZABLE, and t

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Thomas Munro
edicate locking code via heap_fetch etc. [1] https://www.postgresql.org/message-id/CAEepm%3D2kYCegxp9qMR5TM1X3oXHj16iYzLPj_go52R2R07EvnA%40mail.gmail.com -- Thomas Munro http://www.enterprisedb.com -- 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 Thomas Munro
action. And as you and Vitaly have said, there is literally no concurrent update. -- Thomas Munro http://www.enterprisedb.com isolation-test.patch Description: Binary data check-self-inserted.patch Description: Binary data -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-12 Thread Thomas Munro
d with avoiding insertion (taking speculative insertion's alternative * path) on the basis of another tuple that is not visible to MVCC snapshot. * Check for the need to raise a serialization failure, and do so as necessary. */ So it seems to be working as designed. Perhaps someone could arg

Re: [GENERAL] postgresql-8.1.18-2.1 information

2016-10-06 Thread Thomas Munro
.postgresql.org/support/versioning/ > > Close as I can come is the source version: > > https://www.postgresql.org/ftp/source/v8.1.18/ Ancient Red Hat source RPMs are apparently still be available for archeology projects though: ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/S

Re: [GENERAL] Time travel?

2016-09-29 Thread Thomas Munro
as "creation" without affecting access > time. Apparently some filesystems change the ctime for rename and others don't, and POSIX tolerates both. -- Thomas Munro http://www.enterprisedb.com -- 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] Allowing multiple versions of PG under NetBSD

2016-07-29 Thread Thomas Munro
er 9.5/main. The client library on the other hand would not be versioned in that way: there would be just the latest major version's libpq5[2], and that is what other things like py-psycopg2 etc would depend on (instead of depending on a specific client major version like postgresql93-client). [1

Re: [GENERAL] Locking issue

2016-07-27 Thread Thomas Munro
p and only gets its hands on tuples emitted by nodes below it, so if there is a LIMIT then how could it lock anything outside the limited set of rows that are returned? -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Transaction serialization

2016-06-23 Thread Thomas Munro
access due to read/write dependencies among transactions DETAIL: Reason code: Canceled on identification as a pivot, during write. HINT: The transaction might succeed if retried. -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Streaming replication - slave server

2016-05-02 Thread Thomas Munro
ion reaches EOL pretty soon: http://www.postgresql.org/support/versioning/ -- Thomas Munro http://www.enterprisedb.com -- 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] How to manually force a transaction wraparound

2016-04-29 Thread Thomas Munro
m this email: http://www.postgresql.org/message-id/CAEepm=3z0eolpo5wtuwsem38kbq+gjp8xxiuljkuqpm-sw7...@mail.gmail.com That used pg_resetxlog -x $XID $PGDATA, but needed to do several hops stop/pg_resetxlog/start hops to get all the way around the xid clock. -- Thomas Munro http://www.enterprisedb.co

Re: [GENERAL] Proper relational database?

2016-04-22 Thread Thomas Munro
─┤ └──┘ (0 rows) postgres=# create unique index dum_unique on dum((dum)); CREATE INDEX postgres=# insert into dum select; INSERT 0 1 postgres=# select * from dum; ┌──┐ ├──┤ └──┘ (1 row) postgres=# insert into dum select; ERROR: duplicate key value violates unique constraint "dum_unique" DETAIL: Key ((dum.*))=(()) already exists. -- Thomas Munro http://www.enterprisedb.com -- 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] Multixacts wraparound monitoring

2016-03-31 Thread Thomas Munro
1600 > members, this is normal? Where did you get 2045 from? I thought it was like this: number of members = number of member segment files * 1636 * 32 number of multixacts = number of offsets segment files * 2048 * 32 -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general m

Re: [GENERAL] pg_dump crashing

2016-03-20 Thread Thomas Munro
perfectly when executed > manually from the shell. Is this related? http://www.postgresql.org/message-id/cak7teys9-o4bterbs3xuk2bffnnd55u2sm9j5r2fi7v6bhj...@mail.gmail.com -- Thomas Munro http://www.enterprisedb.com -- 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] How to Qualifying or quantify risk of loss in asynchronous replication

2016-03-16 Thread Thomas Munro
xlog.c, which expands to a call to WalSndWakeup in walsender.c which sets latches (= a mechanism for waking processes) on all walsenders, and see the WaitLatchOrSocket calls in walsender.c which wait for that to happen. -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general maili

Re: [GENERAL] How to Qualifying or quantify risk of loss in asynchronous replication

2016-03-15 Thread Thomas Munro
onous standby's WAL contains the transaction or doesn't contain the transaction, but not for you to have taken any external action based on the commit having returned, because it didn't. (If your primary crashes and restarts before COMMIT returns, and it had got as far as flushing locally but n

Re: [GENERAL] synch streaming replication question

2016-02-22 Thread Thomas Munro
onfigure both of your standbys as synchronous standbys. Only one of them will actually be a synchronous standby at a time, and the other one will take over that role if the first one is down, so your system won't hang but you'll still have the sync standby guarantee. -- Thomas Munro http://www.en

Re: [GENERAL] pg_multixact issues

2016-02-10 Thread Thomas Munro
pending on your database size so you don't want them too often. 3. You could do nothing and wait for autovacuum to detect that you are using more than half the member address space and trigger a freeze, which will happen some time after you have around 41k member segments (occupying around 10GB of

Re: [GENERAL] pg_multixact issues

2016-02-10 Thread Thomas Munro
On Thu, Feb 11, 2016 at 11:05 AM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Thomas Munro wrote: > >> 4. You could look into whether all those multixacts with many member >> are really expected. (Large numbers of concurrent FK checks or >> explicit share

Re: [GENERAL] BSD initdb without ICU support and switch later

2016-01-29 Thread Thomas Munro
en/postgresql-icu/readme.html If the goal is to get Unicode collation support, note also that FreeBSD 11 (due some time this year) supports that in libc. -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscr

Re: [GENERAL] Synchronous replication

2016-01-13 Thread Thomas Munro
will wait just for that one server to report that it has fsync'ed the WAL. (There is a patch being developed to change that so that you might be able to wait for more than one in a future release). -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] planner does not detect same-as-default collation.

2016-01-04 Thread Thomas Munro
he OID of that collation, you could teach indxpath.c and (and I don't know what other planner machinery) to consider that OID to be equivalent to DEFAULT_COLLATION_OID when comparing them to consider an index path. There was another email somewhere talking about constraint exclusion's treatment of explicit and defa

Re: [GENERAL] Replication with 9.4

2015-12-01 Thread Thomas Munro
On Tue, Oct 6, 2015 at 12:27 PM, Thomas Munro <thomas.mu...@enterprisedb.com > wrote: > On Sun, Oct 4, 2015 at 11:47 PM, Michael Paquier > <michael.paqu...@gmail.com> wrote: > > (Seems like you forgot to push the Reply-all button) > > > > On Sun, Oct 4, 2015 at

Re: [GENERAL] Issues with german locale on CentOS 5,6,7

2015-11-12 Thread Thomas Munro
On Thu, Oct 8, 2015 at 12:49 PM, Thomas Munro <thomas.mu...@enterprisedb.com > wrote: > On Thu, Oct 8, 2015 at 5:52 AM, Peter Geoghegan > <peter.geoghega...@gmail.com> wrote: > > On Wed, Oct 7, 2015 at 6:25 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > >> Th

Re: [GENERAL] A question about PL/pgSQL DECLAREd variable behavior

2015-10-22 Thread Thomas Munro
On Fri, Oct 23, 2015 at 12:33 PM, Dane Foster <studdu...@gmail.com> wrote: > On Thu, Oct 22, 2015 at 6:54 PM, Thomas Munro > <thomas.mu...@enterprisedb.com> wrote: >> >> On Fri, Oct 23, 2015 at 10:27 AM, Dane Foster <studdu...@gmail.com> wrote: >> &g

Re: [GENERAL] A question about PL/pgSQL DECLAREd variable behavior

2015-10-22 Thread Thomas Munro
NOT] NULL that has that strange special case. Other constructs that have special behaviour for NULL don't consider a composite type composed of NULLs to be NULL. For example IS DISTINCT FROM, COALESCE, COUNT, STRICT functions. -- Thomas Munro http://www.enterprisedb.com -- 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] A question about PL/pgSQL DECLAREd variable behavior

2015-10-21 Thread Thomas Munro
will be set to the first row returned by the query, or to nulls if the query returned no rows." -- Thomas Munro http://www.enterprisedb.com -- 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] Issues with german locale on CentOS 5,6,7

2015-10-07 Thread Thomas Munro
backends). Or at least tell me that's needed. Obviously completely OS-specific... -- Thomas Munro http://www.enterprisedb.com -- 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] Issues with german locale on CentOS 5,6,7

2015-10-07 Thread Thomas Munro
On Thu, Oct 8, 2015 at 1:16 PM, Peter Geoghegan <peter.geoghega...@gmail.com> wrote: > On Wed, Oct 7, 2015 at 4:49 PM, Thomas Munro > <thomas.mu...@enterprisedb.com> wrote: >>> I agree that that would be almost as bad as carrying on, because there >>> is no r

Re: [GENERAL] Replication with 9.4

2015-10-05 Thread Thomas Munro
nd which in async to avoid a big >> latency in case of let's say 100 hot standby. >> it was an idea, a concept to let the master write and update the nodes, like >> a queen bee ;) >> but I'm afraid it's not possible, so maybe future version of pg will do it, >> for now re

Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-16 Thread Thomas Munro
On Wed, Jun 17, 2015 at 6:58 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Thomas Munro wrote: Thanks. As mentioned elsewhere in the thread, I discovered that the same problem exists for page boundaries, with a different error message. I've tried the attached repro scripts on 9.3.0

Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-05 Thread Thomas Munro
On Fri, Jun 5, 2015 at 1:47 PM, Thomas Munro thomas.mu...@enterprisedb.com wrote: On Fri, Jun 5, 2015 at 11:47 AM, Thomas Munro thomas.mu...@enterprisedb.com wrote: On Fri, Jun 5, 2015 at 9:29 AM, Robert Haas robertmh...@gmail.com wrote: Here's a new version with some more fixes

Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-04 Thread Thomas Munro
On Fri, Jun 5, 2015 at 11:47 AM, Thomas Munro thomas.mu...@enterprisedb.com wrote: On Fri, Jun 5, 2015 at 9:29 AM, Robert Haas robertmh...@gmail.com wrote: Here's a new version with some more fixes and improvements: - SetOffsetVacuumLimit was failing to set MultiXactState-oldestOffset when

Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-04 Thread Thomas Munro
. -- Thomas Munro http://www.enterprisedb.com -- 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] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-03 Thread Thomas Munro
2048 DETAIL: Could not read from file pg_multixact/offsets/ at offset 8192: Undefined error: 0. FATAL: could not access status of transaction 131072 DETAIL: Could not open file pg_multixact/offsets/0002: No such file or directory. But, yeah, this isn't the bug we're looking for. -- Thomas

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-03 Thread Thomas Munro
On Wed, Jun 3, 2015 at 3:42 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Thomas Munro wrote: On Tue, Jun 2, 2015 at 9:30 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: My guess is that the file existed, and perhaps had one or more pages, but the wanted page doesn't exist, so we

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-06-02 Thread Thomas Munro
ordering that causes trouble, but I don't yet see why it would break if you replay the WAL from the backup label checkpoint (and I think the repro would take days/weeks to run...) -- Thomas Munro http://www.enterprisedb.com copy-after-truncation.sh Description: Bourne shell script copy-before

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-29 Thread Thomas Munro
we encounter multixacts in tuple headers (updating, locking or vacuuming). If you have truncated multixacts referenced in your tuples then you have a different form of corruption than the pg_upgrade-tramples-on-oldestMultiXactId case we're trying to handle gracefully here. -- Thomas Munro http

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-29 Thread Thomas Munro
. -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Thomas Munro
, filename); -- Thomas Munro http://www.enterprisedb.com -- 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] Roadmap for Postgres on AIX

2013-04-17 Thread Thomas Munro
On 19 March 2013 01:00, Tom Lane t...@sss.pgh.pa.us wrote: Wasim Arif wasima...@gmail.com writes: What is the road map for Postgres on the AIX platform? I understand that the pg build farm contains an AIX 5.3 server; are there any plans to upgrade to 6.1 and 7.1? The reason there's an

Re: [GENERAL] Money casting too liberal?

2013-03-29 Thread Thomas Munro
On 28 March 2013 13:52, Shaun Thomas stho...@optionshouse.com wrote: On 03/28/2013 07:43 AM, Gavan Schneider wrote: Personally I have ignored the money type in favour of numeric. Money seemed to do too much behind the scenes for my taste, but, that's me being lazy as well, I haven't spend

[GENERAL] Exclusion constraints with time expressions

2012-11-05 Thread Thomas Munro
Hi I am using 9.1.6, and I've set up a partitioned table as described in the manual, with partitions based on a timestamptz column called 'time'. The exclusion constraints work nicely when I select ranges of times with literal constants. But why would a WHERE clause like the following not

Re: [GENERAL] migrating/spliting Postgres data directory on OpenIndiana

2012-10-25 Thread Thomas Munro
On 25 October 2012 19:46, Boris Epstein borepst...@gmail.com wrote: And if I want to split the storage - i.e., put databases into different directories - can I do that? Take a look at the tablespace feature: http://www.postgresql.org/docs/current/static/sql-createtablespace.html You can move

Re: [GENERAL] Curosity question regarding LOCK NOWAIT

2012-09-22 Thread Thomas Munro
. Locking is an implementation matter (and the use of FOR UPDATE outside of a cursor specification, ie in a query specification, may be non-standard anyway). NOWAIT is not an ANSI SQL keyword, and WAIT is a keyword reserved for future use. Regards, Thomas Munro -- Sent via pgsql-general mailing

Re: [GENERAL] PostgreSQL server embedded in NAS firmware?

2012-09-08 Thread Thomas Munro
it to be the slowest build farm member... Thomas Munro -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Statistical aggregates with intervals

2012-08-22 Thread Thomas Munro
Hi I noticed that 'avg' works on 'interval', but 'stddev' and 'variance' don't: hack= create table test (start_time timestamptz, end_time timestamptz); CREATE TABLE hack= insert into test values (now(), now() + interval '1 second'); INSERT 0 1` hack= insert into test values (now(), now() +

Re: [GENERAL] index update

2012-07-18 Thread Thomas Munro
Pawel Veselov pawel.vese...@gmail.com wrote: Hi. If I have a lot (10k) tables, and each table has a btree index, and all the tables are being constantly inserted into, would all the indexes have to be in memory, and would effectively start fighting for space? Thank you, Pawel. -- Sent via

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-13 Thread Thomas Munro
Adrian Klaver adrian.kla...@gmail.com wrote: On 07/05/2012 07:46 AM, Stefan Schwarzer wrote: Now, when I launch a query which includes crosstab() as a postgres user, everything works fine. However, if I launch it as user XXX, it complaints: The search path is indicated as:

[GENERAL] ctid ranges

2012-06-08 Thread Thomas Munro
in a physical range quickly? (I realise this is a pretty odd thing to want to do... I was experimenting with a crackpot idea for storing some data in a known physical order and finding the beginning of ends ranges by binary chop, instead of using a btree.) Thanks Thomas Munro -- Sent via pgsql-general

[GENERAL] IEEE 754-2008 decimal numbers

2010-10-10 Thread Thomas Munro
Hi Has anyone done any work on IEEE 754-2008 decimal types for PostgreSQL? I couldn't find anything, so I was thinking it might be a fun exercise for learning about extending PostgreSQL with user defined types. My first goal is to be able to store decimal numbers with a smaller disk footprint