Re: Does PostgreSQL check database integrity at startup?

2017-12-30 Thread Jan Wieck
Cs if you have all the pages you should have. You could have extra pages that aren't supposed to be there or missing some (or any mix of the two). A per page CRC is useless for those cases. Regards, Jan > > Thanks! > > Stephen > -- Jan Wieck Senior Postgres Architect http://pgblog.wi3ck.info

Re: Does PostgreSQL check database integrity at startup?

2017-12-29 Thread Jan Wieck
t on the primary when you run the query and then replay the replica to > that point in the WAL and then run the query on the replica, otherwise > you could end up with differences that are just because of the ongoing > transactions being run to update the table. > > Thanks! > > Stephen > -- Jan Wieck Senior Postgres Architect http://pgblog.wi3ck.info

Re: session_replication_role meaning?

2018-01-30 Thread Jan Wieck
is very important if you have triggers that for example do auditing or stuff like stamping created and last update timestamps or session users. You certainly don't want to overwrite the real last update timestamp or session user with the replication engine user and time. Regards, Jan > > Yours, > Laurenz Albe > > -- Jan Wieck Senior Postgres Architect http://pgblog.wi3ck.info

Re: ERROR: invalid memory alloc request size 1073741824

2018-01-30 Thread Jan Wieck
15GP.gisp.nec.co.jp > > https://www.postgresql.org/message-id/flat/CAKJS1f_sxPyBHF6% > 3DnEYwPJdKKDNjVDP91b_EJApfyGTei%3DViDw%40mail.gmail.com > > postgresql 9.5.4 (2PGDG.rhel6) > work_mem = 256MB > > Thanks, > Stefan > > -- Jan Wieck Senior Postgres Architect http://pgblog.wi3ck.info

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Jan Wieck
Have you tried to reindex the table? Toast internally forces an index scan, so missing index tuples or an otherwise corrupted toast index would have the same symptoms as toast chunks actually missing. Regards, Jan On Sun, Mar 15, 2020, 16:21 Karsten Hilbert wrote: > On Sun, Mar 15, 2020 at

Re: Christopher Browne

2020-11-04 Thread Jan Wieck
Christopher Browne was my colleague and friend at Afilias and past for more than a decade. I have countless memories that connect us. He will be missed. Jan On Wed, Nov 4, 2020, 18:29 Steve Singer wrote: > > It is with much sadness that I am letting the community know that Chris > Browne

Re: bottom / top posting

2021-06-09 Thread Jan Wieck
implementations in whatever GUI they are using. Regards, Jan -- Jan Wieck Postgres User since 1994

Re: bottom / top posting

2021-06-10 Thread Jan Wieck
I will stop reading whatever you thought was important. Want to get a message to me? Think less about what you deem appropriate. Best Regards, Jan -- Jan Wieck Postgres User since 1994

Re: pg_upgrade and wraparound

2021-05-03 Thread Jan Wieck
On 4/30/21 3:32 PM, Bruce Momjian wrote: On Sat, Mar 13, 2021 at 08:43:54AM -0500, Jan Wieck wrote: On 3/12/21 8:30 PM, Michael Paquier wrote: > Hi Jan, > > On Fri, Mar 12, 2021 at 06:13:33PM -0500, Jan Wieck wrote: > > One of the things in my way is that when using pg_

Re: pg_upgrade and wraparound

2021-03-12 Thread Jan Wieck
as --jobs=N to pg_restore Patch is attached. Regards, Jan -- Jan Wieck Principle Database Engineer Amazon Web Services diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index c6059fc..fdcb5e7 100644 --- a/src/bin/pg_dump/parallel.c +++ b/src/bin/pg_dump/parallel.c @@ -865,6 +

Re: pg_upgrade and wraparound

2021-03-13 Thread Jan Wieck
On 3/12/21 8:30 PM, Michael Paquier wrote: Hi Jan, On Fri, Mar 12, 2021 at 06:13:33PM -0500, Jan Wieck wrote: One of the things in my way is that when using pg_resetwal to put the NextXID way into the future (to push the old cluster close to wraparound for example), the postmaster won't start

Re: Unkillable processes creating millions of tiny temp files

2021-03-20 Thread Jan Wieck
. They are just trying to unlink a file another one already did. Under normal circumstances the rm(1) will clean up while the postmaster is already up and possibly created a new pgsql_tmp. Regards, Jan -- Jan Wieck Principle Database Engineer Amazon Web Services

Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-11 Thread Jan Wieck
ppropriate to ask here. -- Jan Wieck Postgres User since 1994

Re: The Amazon CloudFront distribution is configured to block access from your country.

2021-04-12 Thread Jan Wieck
ce, Amazon is using to determine the origin of your IP address. I know a few people at EDB (I did work there in the past). Asking them won't do any harm and if all of this is actually by mistake, they will be glad you asked. Regards, Jan -- Jan Wieck Postgres User since 1994

Re: reading this group other than thru mails

2021-11-16 Thread Jan Wieck
iendly. There are 11 pages of search result for "forum email" in pgsql-general. I believe the answer is somewhere in there. https://www.postgresql.org/search/?m=1=forum+email+=2=-1=r -- Jan Wieck

Re: What have I done!?!?!? :-)

2022-04-07 Thread Jan Wieck
On 4/6/22 18:25, Perry Smith wrote: Rather than explain how I got here, I’ll just explain the state I’m in. ... I’m using Active Record with the psql adapter.  It has a disable_referential_integrity which takes a block of code.  When the block of code exists, the constraints are put back.  At

Re: What have I done!?!?!? :-)

2022-04-08 Thread Jan Wieck
On 4/8/22 01:57, Nikolay Samokhvalov wrote: On Thu, Apr 7, 2022 at 8:10 AM Jan Wieck <mailto:j...@wi3ck.info>> wrote: So **IF** Active Record is using that feature, then it can dump any amount of garbage into your PostgreSQL database and PostgreSQL will happily accept it

Re: What have I done!?!?!? :-)

2022-04-08 Thread Jan Wieck
On 4/8/22 08:58, Magnus Hagander wrote: A side-note on this, which of course won't help the OP at this point, but if the general best practice of not running the application with a highly privileged account is followed, the problem won't occur (it will just fail early before breaking things).

Re: What have I done!?!?!? :-)

2022-04-08 Thread Jan Wieck
On 4/8/22 09:27, Magnus Hagander wrote: On Fri, Apr 8, 2022 at 3:23 PM Perry Smith > wrote: It has been a long time since I’ve done Rails stuff.  What follows is the best I can recall but please take it with a grain of salt. The first problem is that

Re: What have I done!?!?!? :-)

2022-04-08 Thread Jan Wieck
On 4/8/22 09:58, Jan Wieck wrote: It only affects constraints that have been declared DEFERRABLE. Those that are not are silently ignored (as per SQL standard). I should have said "... silently ignored by this statement and still fire IMMEDIATE". Just to be clear, Jan

Re: External psql editor

2022-04-29 Thread Jan Wieck
On 4/29/22 13:13, Rich Shepard wrote: While in psql, type \e and Enter. You will have the current query buffer in the editor. You can do this at the end of a partial (not yet semicolon terminated) query. Can I set it before entering any command or better yet, when I invoke psql? Not that I

Re: External psql editor

2022-04-29 Thread Jan Wieck
On 4/29/22 15:50, Mladen Gogala wrote: Is there a way to define the name of the temporary file created by \e command? I'd like to name it "afiedt.buf", not for sentimental reasons. I already have a cron job that cleans afiedt.buf from my home directory every hour and having psql name temporary

Re: External psql editor

2022-04-29 Thread Jan Wieck
On 4/29/22 16:17, Rich Shepard wrote: On Fri, 29 Apr 2022, Jan Wieck wrote: Did you hit Enter after \e ? Jan, Yes. For example, I put a previous command at the prompt to be modified. It began with 'insert ...' so I added an initial \e to the command. psql told me that \einsert

Re: Help with large delete

2022-04-16 Thread Jan Wieck
Make your connection immune to disconnects by using something like the screen utility. Regards, Jan On Sat, Apr 16, 2022, 09:26 Perry Smith wrote: > Currently I have one table that mimics a file system. Each entry has a > parent_id and a base name where parent_id is an id in the table that

Re: External psql editor

2022-04-29 Thread Jan Wieck
On 4/29/22 14:10, Rich Shepard wrote: I tried, unsuccessily, to use \e. Entering it while a command is displayed does nothing. So I'm doing something wrong. Did you hit Enter after \e ? Regards, Jan

Re: External psql editor

2022-04-29 Thread Jan Wieck
On 4/29/22 11:55, Rich Shepard wrote: I do all my postgres work using the psql shell. Editing a command reguires moving character-by-character and I'd like to use my small text editor (joe) because it allows more control over line movement. A web search found a stackexchange thread that

Re: Purpose of DEFERRABLE _and_ INITIALLY DEFERRED foreign key constraint checking?

2022-08-04 Thread Jan Wieck
On 8/3/22 20:30, Ron wrote: AWS RDS Postgresql 12.10 https://www.postgresql.org/docs/12/sql-createtable.html [quote] |DEFERRABLE| |NOT DEFERRABLE| This controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every

Re: Active Active PostgreSQL Solution

2023-06-14 Thread Jan Wieck
On 6/9/23 06:38, Mohsin Kazmi wrote: Hello Everyone, I have been working on PostgreSQL databases for the last three years and I have also migrate databases from Oracle to PostgreSQL as well. I configured PostgreSQL for logical replication as well. Now in order to deploy PostgreSQL in our

Re: Profiling a function call

2023-05-21 Thread Jan Wieck
On 5/20/23 00:36, Tiffany Thang wrote: Hi, I have a function that has been executing for a long time and not returning any results. Wait event=NULL so it seems like it is still executing and not waiting on any specific resources. Is there a way to profile the function call to get an idea of

Re: Failed to parse new syntax

2023-08-05 Thread Jan Wieck
Are you aware that PostgreSQL has a built in '~' operator for regular expressions? Regards, Jan On 8/5/23 11:56, jacktby jacktby wrote: /* * similarity_search_expr is used for our multi-mode * similarity_search, and we just use this for multi * cols search. */

Re: How to reference a DB with a period in its name ?

2024-03-30 Thread Jan Wieck
On 3/29/24 17:16, David Gauthier wrote: I tried encapsulating the DB name in double quotes (no good), single quotes (still no good) escaping with '\' (no good), escaping with ".." (no good). SELECT * FROM "thedb.v1".theschem.thetab; Just as documented.