Re: inserts failed because of primary key conflict, weird sequence issue. what could cause a reset?

2017-12-12 Thread Laurenz Albe
On Tue, 2017-12-12 at 18:10 -0500, jonathan vanasco wrote: > I have table where the primary key is a sequence. I was getting a lot of > errors on insertions, > and noticed the current value was around 65k, but the max id in the database > was around 160k. > everything works now that i've restart

Re: Size of pg_multixact/members increases 11355

2017-12-12 Thread Yogesh Sharma
Dear Thomas and All, Thanks for sharing your input. How we calculate autovacuum_multixact_freeze_max_age paramter limit into system? Regards, Yogesh On Wednesday, December 13, 2017, Thomas Munro wrote: > On Wed, Dec 13, 2017 at 5:05 AM, David G. Johnston > wrote: > > On Tue, Dec 12, 2017 at 2

inserts failed because of primary key conflict, weird sequence issue. what could cause a reset?

2017-12-12 Thread jonathan vanasco
I can't figure out how this happened I have table where the primary key is a sequence. I was getting a lot of errors on insertions, and noticed the current value was around 65k, but the max id in the database was around 160k. everything works now that i've restarted it, but I can't find any

Logical replication blocking alter/drop

2017-12-12 Thread Mark Fletcher
Hi All, Postgres 9.6.5. We run several logical replication processes off our main postgres server. What we've noticed is that schema changes seem to block until we halt the logical replication processes. For example, I just did a 'DROP INDEX CONCURRENTLY' command, and it just sat there until I sto

Re: transaction wrap around

2017-12-12 Thread Thomas Munro
On Mon, Dec 11, 2017 at 12:07 PM, Jeff Janes wrote: > On Tue, Dec 5, 2017 at 5:50 PM, Thomas Munro > wrote: >> The problem is that our logic (1) focuses on when we should *start* >> freezing, not by when we'd like to be finished, and (2) is defined in >> such a way that many tables are likely to

Re: Removing INNER JOINs

2017-12-12 Thread David Rowley
On 12 December 2017 at 02:38, Jim Finnerty wrote: > If necessary, the planner could also check that the FK constraint is not > DEFERRED, but if there are no volatile functions and the SELECT statement > can't see an inconsistent state created by any other transaction, I think > that just checking

Re: Size of pg_multixact/members increases 11355

2017-12-12 Thread Thomas Munro
On Wed, Dec 13, 2017 at 5:05 AM, David G. Johnston wrote: > On Tue, Dec 12, 2017 at 2:52 AM, Yogesh Sharma > wrote: >> >> Dear All, >> >> I am using PostgreSQL 9.3.6 version and PGDATA pg_multixact.members folder >> size is increased to around 3GB. How to reduce this folder size and how to >> fi

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread Peter Geoghegan
On Tue, Dec 12, 2017 at 5:18 AM, John McKown wrote: > On Tue, Dec 12, 2017 at 2:17 AM, Tsunakawa, Takayuki > wrote: >> >> Hi Laurenz, Tom, Peter, >> >> Thanks for your suggestions. The practical solution seems to be to >> override comparison operators of char, varchar and text data types with UD

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread George Neuner
On Tue, 12 Dec 2017 07:18:10 -0600, John McKown wrote: >?This is a guess on my part, based on many years on an EBCDIC system. But >I'll bet that they are doing a conversion off of the EBCDIC system (maybe >Db2 on z/OS) to an ASCII system (Linux or Windows) running PostgreSQL. They >want to be abl

Re: Missing RHEL rpm(pg_catcheck-10) in postgres 10 repo.

2017-12-12 Thread Devrim Gündüz
Hi, On Thu, 2017-12-07 at 11:29 +, Kaliappa, Karthic wrote: > We are looking to upgrade our application from postgres 9.5 to 10x, but we > are unable to find the RPM named 'pg_catcheck-10x' for Redhat: https://downl > oad.postgresql.org/pub/repos/yum/10/redhat/rhel-6.7-x86_64/ > We request y

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread James Keener
If that's the case, I wonder if OP could write a function that would convert from the ASCII code-point ot the EBCDIC codepoint. For instance, (using the function at https://wiki.postgresql.org/wiki/Binary_Replace) convert A to char 193, `select binary_replace('Anne'::bytea, 'A'::bytea, '\xc1'::byte

Re: Size of pg_multixact/members increases 11355

2017-12-12 Thread David G. Johnston
On Tue, Dec 12, 2017 at 2:52 AM, Yogesh Sharma wrote: > Dear All, > > I am using PostgreSQL 9.3.6 version and PGDATA pg_multixact.members folder > size is increased to around 3GB. How to reduce this folder size and how to > fix this issue? > Is it realted to poatgres issue? If yes how to reprodu

Re: Size of pg_multixact/members increases 11355

2017-12-12 Thread Yogesh Sharma
Please share direction to resolve below issue. Regards, Yogesh On Tuesday, December 12, 2017, Yogesh Sharma wrote: > Dear All, > > I am using PostgreSQL 9.3.6 version and PGDATA pg_multixact.members folder > size is increased to around 3GB. How to reduce this folder size and how to > fix this

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread John McKown
On Tue, Dec 12, 2017 at 9:43 AM, James Keener wrote: > Sorry for spamming the list. It appears that I'm an idiot. Sorry :( > ​I guess we're even now. We both made a similar mistake.​ ​But, despite my error, I still think the OP's need for an EBCDIC order is to compare output from parallel runs

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread James Keener
Sorry for spamming the list. It appears that I'm an idiot. Sorry :( jim=# select * from test order by a collate "C"; a -- 12 Days of Christmas 12 drummers Anne Isaac Jim a aardvark b island job (10 rows) jim=# select * from test order by a collate "en_US.ut

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread James Keener
en_US.utf8. is still 0-9A-Za-z and in my example set (as it's my default too :)) You'd need a case insensitive collation to do what you described, and I'm not sure those exist in postgres. (I guess you could always build your own if you _really_ wanted to. Jim On Tue, Dec 12, 2017 at 10:24 AM, J

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread John McKown
On Tue, Dec 12, 2017 at 9:11 AM, James Keener wrote: > The default C locale on Linux (I don't know Windows) will sort "digits", >> then alphabetic with the lower then upper case of each letter in order >> like: "aAbB...zZ" >> > > That's no true at all! The C locales are 0-9A-Za-z > ​Thanks for t

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread James Keener
> > The default C locale on Linux (I don't know Windows) will sort "digits", > then alphabetic with the lower then upper case of each letter in order > like: "aAbB...zZ" > That's no true at all! The C locales are 0-9A-Za-z #include > #include > #include > #include > #include > > > static int

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread John McKown
On Tue, Dec 12, 2017 at 2:17 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > Hi Laurenz, Tom, Peter, > > Thanks for your suggestions. The practical solution seems to be to > override comparison operators of char, varchar and text data types with > UDFs that behave as Tom mentio

Re: How to know if a database has changed

2017-12-12 Thread Edson Carlos Ericksson Richter
Em 12/12/2017 10:14, marcelo escreveu: Hi Sam You are right, and here are the reason behind my question: The server where postgres will be installed is not on 24/7. It turns on in the morning and goes off at the end of the day. The idea is that, as part of the shutdown process, a local backup

Re: How to know if a database has changed

2017-12-12 Thread Karsten Hilbert
On Tue, Dec 12, 2017 at 07:40:46AM -0500, Adam Tauno Williams wrote: > > The next day, that backup will be copied to the cloud. > > What does this mean?  If it is rsync of a local dump to a remote use > the directory dump format - disable compression - then each table which > didn't change will '

Re: How to know if a database has changed

2017-12-12 Thread Adam Tauno Williams
> The next day, that backup will be copied to the cloud. What does this mean?  If it is rsync of a local dump to a remote use the directory dump format - disable compression - then each table which didn't change will 'copy' almost instantly. -- Meetings Coordinator, Michigan Association of Railr

Re: How to know if a database has changed

2017-12-12 Thread marcelo
Hi Sam You are right, and here are the reason behind my question: The server where postgres will be installed is not on 24/7. It turns on in the morning and goes off at the end of the day. The idea is that, as part of the shutdown process, a local backup is made. The next day, that backup wil

Re: Windows XP to Win 10 migration issue

2017-12-12 Thread Moreno Andreo
Il 11/12/2017 14:37, Vincent Veyron ha scritto: On Sat, 9 Dec 2017 10:11:42 -0600 Dale Seaburg wrote:   No Go!  Would not start. Any error message in your logs? I would certainly second Scott's suggestion to check the processors. I've had to do what you describe once, and it took me four m

Size of pg_multixact/members increases 11355

2017-12-12 Thread Yogesh Sharma
Dear All, I am using PostgreSQL 9.3.6 version and PGDATA pg_multixact.members folder size is increased to around 3GB. How to reduce this folder size and how to fix this issue? Is it realted to poatgres issue? If yes how to reproduce this issue? Thanks in advance. Regards, Yogesh

RE: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread Tsunakawa, Takayuki
Hi Laurenz, Tom, Peter, Thanks for your suggestions. The practical solution seems to be to override comparison operators of char, varchar and text data types with UDFs that behave as Tom mentioned. From: Peter Geoghegan [mailto:p...@bowt.ie] > That said, the idea of an "EBCDIC collation" seems