pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Yessica Brinkmann <yessica.brinkmann@gmail.com>
To: Jony Cohen <jony.cohenjo@gmail.com>
To: laurenz.albe@cybertec.at
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: I think that my data is saved correctly, but when printing again, other data appears
Date: Mon, 28 Oct 2019 07:03:21 -0400
Message-ID: <efb6bd16-268c-5360-3206-7f0fb5fef523@joeconway.com> (raw)
In-Reply-To: <CABrYqSNNhfY0QxKZKaDh3FAtEmZ4LzqO3Zq98-+pbFG32u84BQ@mail.gmail.com>
References: <CABrYqSOSaFoM+FWNhajxpygVLWZECLt4nvtAwz7a_gunDgfgzQ@mail.gmail.com>
	<17316.1572011977@sss.pgh.pa.us>
	<6cn43v-kpk6i5gmroah-8s3fxj-obuf01-7gthsn-w01z6b-lpzvej-661z71jmpmi8-1npytb57lzgg-2cagvflpw1wnfjg834kpo46kpvh3rt-d709lq-mzqirq-vv9lx095h9fk-83gie7-rgk77o-xjfd1r.1572017048567@email.android.com>
	<CABrYqSNRL7mmNWPE4qBWYQ-5oFWGYNY8aEVp4YW3J09V2k1HAA@mail.gmail.com>
	<CAD9xk19M0iteWgL6Zgrz-=k_XU=19WVqr=Frdz5VTCsFsasfmQ@mail.gmail.com>
	<CABrYqSNNhfY0QxKZKaDh3FAtEmZ4LzqO3Zq98-+pbFG32u84BQ@mail.gmail.com>

On 10/27/19 8:01 PM, Yessica Brinkmann wrote:
> Thank you so much for the answers.
> By telling me this: "MemoryContextStrdup enables you to create a copy of
> a string in an explicitly specified memory context." I better understood
> the function of MemoryContextStrdup.
> And thank you very much to Mr. Jony Cohen for giving me the reference of
> his work. I really was already researching about his work, and I
> included it in the state of the art of my thesis, but I didn't look at
> the source code.
> I will be looking at the source code for a help, and especially in this
> case to see for the moment, the maintenance of the context for its
> subsequent restoration.

For better understanding of how Postgres manages memory, you might want
to also read this:

https://github.com/postgres/postgres/blob/master/src/backend/utils/mmgr/README

and possibly browse through this:

https://github.com/postgres/postgres/blob/master/src/backend/utils/mmgr/mcxt.c

HTH,

Joe
-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (13+ messages)  latest in thread

Message-ID: <efb6bd16-268c-5360-3206-7f0fb5fef523@joeconway.com>
Permalink:  ../efb6bd16-268c-5360-3206-7f0fb5fef523@joeconway.com/
Also on:    postgresql.org/message-id/efb6bd16-268c-5360-3206-7f0fb5fef523@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mail@joeconway.com, yessica.brinkmann@gmail.com, jony.cohenjo@gmail.com, laurenz.albe@cybertec.at
  Subject: Re: I think that my data is saved correctly, but when printing again, other data appears
  In-Reply-To: <efb6bd16-268c-5360-3206-7f0fb5fef523@joeconway.com>
  References: <CABrYqSOSaFoM+FWNhajxpygVLWZECLt4nvtAwz7a_gunDgfgzQ@mail.gmail.com> <17316.1572011977@sss.pgh.pa.us> <6cn43v-kpk6i5gmroah-8s3fxj-obuf01-7gthsn-w01z6b-lpzvej-661z71jmpmi8-1npytb57lzgg-2cagvflpw1wnfjg834kpo46kpvh3rt-d709lq-mzqirq-vv9lx095h9fk-83gie7-rgk77o-xjfd1r.1572017048567@email.android.com> <CABrYqSNRL7mmNWPE4qBWYQ-5oFWGYNY8aEVp4YW3J09V2k1HAA@mail.gmail.com> <CAD9xk19M0iteWgL6Zgrz-=k_XU=19WVqr=Frdz5VTCsFsasfmQ@mail.gmail.com> <CABrYqSNNhfY0QxKZKaDh3FAtEmZ4LzqO3Zq98-+pbFG32u84BQ@mail.gmail.com> <efb6bd16-268c-5360-3206-7f0fb5fef523@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox