Thread

  1. Questions about document "Concurrenry control" section

    admin@iseki.space — 2024-10-09T10:07:09Z

    Hello,
    
    I found it difficult to understanding some paragraph in the document 
    "Concurrency control" section.
    
     > The Repeatable Read mode provides a rigorous guarantee that each 
    transaction sees a completely stable view of the database. However, this 
    view will not necessarily always be consistent with some serial (one at 
    a time) execution of concurrent transactions of the same level. For 
    example, even a read-only transaction at this level may see a control 
    record updated to show that a batch has been completed but/not/see one 
    of the detail records which is logically part of the batch because it 
    read an earlier revision of the control record. Attempts to enforce 
    business rules by transactions running at this isolation level are not 
    likely to work correctly without careful use of explicit locks to block 
    conflicting transactions.
    
    At: 
    https://www.postgresql.org/docs/17/transaction-iso.html#XACT-REPEATABLE-READ:~:text=The%20Repeatable%20Read%20mode,to%20block%20conflicting%20transactions.
    
    Specifically, I can't understand the example. Why in an earlier 
    revision, the control record show that the batch has been completed? In 
    my recognization, the control record state transation should be 
    "running" -> "completed". And only after all batch operation completed 
    then the control record will be changed to "completed".
    
    The another big problem is, I interpret the whole batch operation is in 
    one transaction. So, we can read updates from another uncommited yet 
    transaction?? I read the front paragraph(Read Committed), the locking 
    behaviour will effect the read view, and I understand the behaviour 
    might still be exists in Repeatable Read. But the example said, 
    read-only transaction.
    
    Thank you
    
    iseki zero
    
    
    
    
    
  2. Re: Questions about document "Concurrenry control" section

    Laurenz Albe <laurenz.albe@cybertec.at> — 2024-10-09T14:51:16Z

    On Wed, 2024-10-09 at 18:07 +0800, iseki zero wrote:
    > I found it difficult to understanding some paragraph in the document 
    > "Concurrency control" section.
    > 
    >  > The Repeatable Read mode provides a rigorous guarantee that each 
    > transaction sees a completely stable view of the database. However, this 
    > view will not necessarily always be consistent with some serial (one at 
    > a time) execution of concurrent transactions of the same level. For 
    > example, even a read-only transaction at this level may see a control 
    > record updated to show that a batch has been completed but/not/see one 
    > of the detail records which is logically part of the batch because it 
    > read an earlier revision of the control record. Attempts to enforce 
    > business rules by transactions running at this isolation level are not 
    > likely to work correctly without careful use of explicit locks to block 
    > conflicting transactions.
    > 
    > At: 
    > https://www.postgresql.org/docs/17/transaction-iso.html#XACT-REPEATABLE-READ:~:text=The%20Repeatable%20Read%20mode,to%20block%20conflicting%20transactions.
    > 
    > Specifically, I can't understand the example.
    
    I think this is referring to this example:
    https://wiki.postgresql.org/wiki/SSI#Deposit_Report
    
    Yours,
    Laurenz Albe
    
    
    
    
  3. Re: Questions about document "Concurrenry control" section

    admin@iseki.space — 2024-10-11T13:00:25Z

    Oh sorry, I should use [reply to all] instead of [reply]. I don't have 
    much experience with mailing lists...
    
    But why the mailing list haven't use the "Reply-To" header specify where 
    to reply? Because the mail is you send to me directly?
    
    Thank you.
    
    On 2024/10/11 14:53, Laurenz Albe wrote:
    > On Fri, 2024-10-11 at 11:04 +0800, admin@iseki.space wrote:
    >> Maybe add the whole example or the URL to the document is better?
    > You shouldn't address that reply to me personally...
    >
    > Yours,
    > Laurenz Albe
    
    
    
    
  4. Re: Questions about document "Concurrenry control" section

    Erik Wienhold <ewie@ewie.name> — 2024-10-11T13:46:56Z

    On 2024-10-11 15:00 +0200, iseki wrote:
    > Oh sorry, I should use [reply to all] instead of [reply]. I don't have much
    > experience with mailing lists...
    > 
    > But why the mailing list haven't use the "Reply-To" header specify where to
    > reply? Because the mail is you send to me directly?
    
    The message author sets Reply-To, if necessary, according to RFC 5322.
    Are there mailing lists that actually set this header?
    
    -- 
    Erik
    
    
    
    
  5. Re: Questions about document "Concurrenry control" section

    Tom Lane <tgl@sss.pgh.pa.us> — 2024-10-11T14:19:13Z

    Erik Wienhold <ewie@ewie.name> writes:
    > On 2024-10-11 15:00 +0200, iseki wrote:
    >> But why the mailing list haven't use the "Reply-To" header specify where to
    >> reply? Because the mail is you send to me directly?
    
    > The message author sets Reply-To, if necessary, according to RFC 5322.
    > Are there mailing lists that actually set this header?
    
    It's been done in the past, but current practice is strongly against
    it.  For example, in your own message that I'm replying to, there's
    a DKIM signature (RFC 6376):
    
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001;
    	t=1728654419;
    	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
    	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
    	 in-reply-to:in-reply-to:references:references;
    	bh=7w7CHebdKaXtlhCMxa/jNIcoEy1tFhZmzOD+dT7nP8k=;
    	b=K3s//HzYXU+chTDeY5p/wGwd5eglESiaugVSpGWo49ryL9ajLdimYMD3uIc3rr8PglZizV
    	nk2wDiMsHnLR0EAgKsGzNvtxt4N9hHxMk7UI3F4XOVYqnemk95YVRNpFpEFww833uUqA+9
    	RPypj/ezsKbi2vBzzXIoZ+Tf3t6XfuZYf6poq1J+ud0X278yQMnA1XbZNsenQkCWoYPiXb
    	yklxY2Nbp9NyiDHCDQ0KPYAT6/0ttzbprNhgSzhN7LND6ehUvLlsmKG3rwqby2LmFRwliQ
    	RDZ4MAxEzZKfOr8HGnubQf8FdQPGw6jlAn3U8199c+3QcIAWJ99Wrtb5rQPdEw==
    
    That lists "reply-to" as one of the signed header fields.  So if the
    mailing list were to modify Reply-To (including inserting one where
    there was none before) a DKIM-verifying recipient would regard the
    message as a forgery.
    
    			regards, tom lane
    
    
    
    
  6. Re: Questions about document "Concurrenry control" section

    admin@iseki.space — 2024-10-12T02:25:08Z

    So, should I use the [reply to all] button? I'm afraid the receipt list 
    will growing to have too many address.
    
    BTW, I'm using Thunderbird. If you have better software, tell me please.
    
    Sorry for my poor English.
    
    iseki zero.
    
    在 2024/10/11 22:19, Tom Lane 写道:
    > Erik Wienhold<ewie@ewie.name> writes:
    >> On 2024-10-11 15:00 +0200, iseki wrote:
    >>> But why the mailing list haven't use the "Reply-To" header specify where to
    >>> reply? Because the mail is you send to me directly?
    >> The message author sets Reply-To, if necessary, according to RFC 5322.
    >> Are there mailing lists that actually set this header?
    > It's been done in the past, but current practice is strongly against
    > it.  For example, in your own message that I'm replying to, there's
    > a DKIM signature (RFC 6376):
    >
    > DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001;
    > 	t=1728654419;
    > 	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
    > 	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
    > 	 in-reply-to:in-reply-to:references:references;
    > 	bh=7w7CHebdKaXtlhCMxa/jNIcoEy1tFhZmzOD+dT7nP8k=;
    > 	b=K3s//HzYXU+chTDeY5p/wGwd5eglESiaugVSpGWo49ryL9ajLdimYMD3uIc3rr8PglZizV
    > 	nk2wDiMsHnLR0EAgKsGzNvtxt4N9hHxMk7UI3F4XOVYqnemk95YVRNpFpEFww833uUqA+9
    > 	RPypj/ezsKbi2vBzzXIoZ+Tf3t6XfuZYf6poq1J+ud0X278yQMnA1XbZNsenQkCWoYPiXb
    > 	yklxY2Nbp9NyiDHCDQ0KPYAT6/0ttzbprNhgSzhN7LND6ehUvLlsmKG3rwqby2LmFRwliQ
    > 	RDZ4MAxEzZKfOr8HGnubQf8FdQPGw6jlAn3U8199c+3QcIAWJ99Wrtb5rQPdEw==
    >
    > That lists "reply-to" as one of the signed header fields.  So if the
    > mailing list were to modify Reply-To (including inserting one where
    > there was none before) a DKIM-verifying recipient would regard the
    > message as a forgery.
    >
    > 			regards, tom lane
    >
    >
  7. Re: Questions about document "Concurrenry control" section

    David G. Johnston <david.g.johnston@gmail.com> — 2024-10-12T02:38:40Z

    On Friday, October 11, 2024, iseki zero <admin@iseki.space> wrote:
    
    > So, should I use the [reply to all] button? I'm afraid the receipt list
    > will growing to have too many address.
    >
    >
    Yes, just use reply-all.  The to list only grows when people reply, and it
    is a mailing list - all these people are getting the email anyway…this just
    lets them filter on things they have replied to.
    
    David J.
    
  8. Re: Questions about document "Concurrenry control" section

    admin@iseki.space — 2024-10-12T03:10:46Z

    I found. Maybe we should reply to the mailing list only. Otherwise we'll receive multiple copies of the emails.
    
    
    
    
    
  9. Re: Questions about document "Concurrenry control" section

    Adrian Klaver <adrian.klaver@aklaver.com> — 2024-10-12T04:21:16Z

    On 10/11/24 20:10, admin@iseki.space wrote:
    > I found. Maybe we should reply to the mailing list only. Otherwise we'll 
    > receive multiple copies of the emails.
    > 
    > 
    
    Not if you go here:
    
    https://lists.postgresql.org/manage/
    
    and check:
    
    Don't receive an extra copy of mails when listed in To or CC fields
    
    -- 
    Adrian Klaver
    adrian.klaver@aklaver.com
    
    
    
    
    
  10. Re: Questions about document "Concurrenry control" section

    Peter J. Holzer <hjp-pgsql@hjp.at> — 2024-10-12T10:09:05Z

    On 2024-10-12 10:25:08 +0800, iseki zero wrote:
    > So, should I use the [reply to all] button?
    
    This mailing-list (like most lists) sets the "List-Post" header:
    
    List-Post: <mailto:pgsql-general@lists.postgresql.org>
    
    So the best thing would be for the mail program to detect that and offer
    a [reply to list] button. Not many do, though, so [reply to all] is
    probably your best choice.
    
    
    > I'm afraid the receipt list will growing to have too many address.
    
    Not much of a problem since usually there won't be that many people
    participating in a thread.
    
    
    > BTW, I'm using Thunderbird. If you have better software, tell me please.
    
    I'm using (neo)mutt, but these days the limitations of a text-only
    mailer can be quite noticeable.
    
            hp
    
    -- 
       _  | Peter J. Holzer    | Story must make more sense than reality.
    |_|_) |                    |
    | |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
    __/   | http://www.hjp.at/ |       challenge!"
    
  11. Re: Questions about document "Concurrenry control" section

    Peter J. Holzer <hjp-pgsql@hjp.at> — 2024-10-12T10:17:19Z

    On 2024-10-11 21:21:16 -0700, Adrian Klaver wrote:
    > On 10/11/24 20:10, admin@iseki.space wrote:
    > > I found. Maybe we should reply to the mailing list only. Otherwise we'll
    > > receive multiple copies of the emails.
    > > 
    > > 
    > 
    > Not if you go here:
    > 
    > https://lists.postgresql.org/manage/
    > 
    > and check:
    > 
    > Don't receive an extra copy of mails when listed in To or CC fields
    
    Yes, but that's the wrong way around. Then I get some mails only
    directly and some only through the list, which makes proper filtering
    hard to impossible. For me it's much better to get all the mails through
    the list (so I can use the List-ID header to filter them into the
    appropriate folder) and live with the extra copies in my inbox. I would
    prefer to not get those extra copies, but there is nothing the list can
    do about them, that's under the control of the sender.
    
            hp
    
    -- 
       _  | Peter J. Holzer    | Story must make more sense than reality.
    |_|_) |                    |
    | |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
    __/   | http://www.hjp.at/ |       challenge!"
    
  12. Re: Questions about document "Concurrenry control" section

    Arbol One <arbolone@hotmail.ca> — 2024-10-12T11:30:20Z

    Yes, this is IMOP, the best way.
    I have set up Thunderbird to throw everything that is not in my contact 
    list to Trash, thus your email will never be read by me if you don't use 
    - Reply to Mailing list -. Just saying.
    
    On 2024-10-11 11:10 p.m., admin@iseki.space wrote:
    > I found. Maybe we should reply to the mailing list only. Otherwise 
    > we'll receive multiple copies of the emails.
    >
    >
    >
    -- 
    */ArbolOne ™/*
    Using Fire Fox and Thunderbird.
    ArbolOne is composed of students and volunteers dedicated to providing 
    free services to charitable organizations.
    ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in 
    progress [ í ]
  13. Re: Questions about document "Concurrenry control" section

    Adrian Klaver <adrian.klaver@aklaver.com> — 2024-10-12T16:02:37Z

    On 10/12/24 03:17, Peter J. Holzer wrote:
    > On 2024-10-11 21:21:16 -0700, Adrian Klaver wrote:
    >> On 10/11/24 20:10, admin@iseki.space wrote:
    >>> I found. Maybe we should reply to the mailing list only. Otherwise we'll
    >>> receive multiple copies of the emails.
    >>>
    >>>
    >>
    >> Not if you go here:
    >>
    >> https://lists.postgresql.org/manage/
    >>
    >> and check:
    >>
    >> Don't receive an extra copy of mails when listed in To or CC fields
    > 
    > Yes, but that's the wrong way around. Then I get some mails only
    > directly and some only through the list, which makes proper filtering
    > hard to impossible. For me it's much better to get all the mails through
    > the list (so I can use the List-ID header to filter them into the
    > appropriate folder) and live with the extra copies in my inbox. I would
    > prefer to not get those extra copies, but there is nothing the list can
    > do about them, that's under the control of the sender.
    
    Not following. If it goes through the list either by 'Reply to list' or 
    Reply All' it is going to pick up the List-ID and be filtered. All the 
    setting does is make sure you don't get extra copies when your email is 
    in the To or CC fields, which is the list doing something about them. 
    I've been using this for years and aside from some general list/email 
    issues it has worked as advertised.
    
    
    > 
    >          hp
    > 
    
    -- 
    Adrian Klaver
    adrian.klaver@aklaver.com
    
    
    
    
    
  14. Re: Questions about document "Concurrenry control" section

    Peter J. Holzer <hjp-pgsql@hjp.at> — 2024-10-15T22:24:01Z

    On 2024-10-12 09:02:37 -0700, Adrian Klaver wrote:
    > On 10/12/24 03:17, Peter J. Holzer wrote:
    > > On 2024-10-11 21:21:16 -0700, Adrian Klaver wrote:
    > > > On 10/11/24 20:10, admin@iseki.space wrote:
    > > > > I found. Maybe we should reply to the mailing list only. Otherwise we'll
    > > > > receive multiple copies of the emails.
    > > > > 
    > > > > 
    > > > 
    > > > Not if you go here:
    > > > 
    > > > https://lists.postgresql.org/manage/
    > > > 
    > > > and check:
    > > > 
    > > > Don't receive an extra copy of mails when listed in To or CC fields
    > > 
    > > Yes, but that's the wrong way around. Then I get some mails only
    > > directly and some only through the list, which makes proper filtering
    > > hard to impossible. For me it's much better to get all the mails through
    > > the list (so I can use the List-ID header to filter them into the
    > > appropriate folder) and live with the extra copies in my inbox. I would
    > > prefer to not get those extra copies, but there is nothing the list can
    > > do about them, that's under the control of the sender.
    > 
    > Not following. If it goes through the list either by 'Reply to list' or
    > Reply All' it is going to pick up the List-ID and be filtered. All the
    > setting does is make sure you don't get extra copies when your email is in
    > the To or CC fields, which is the list doing something about them.
    
    What it is doing about them is to drop the message (it can't do anything
    else). So if I send a message to adrian.klaver@aklaver.com,
    pgsql-general@lists.postgresql.org you will get the copy sent directly
    to your address (which won't have any List headers set), but not the
    copy sent to pgsql-general@lists.postgresql.org. So basically you don't
    have any reliable way to detect that the message was sent to the
    mailing-list (the best bet is probably to filter on the To: and Cc:
    headers, but that may fail (both with false positives and false
    negatives); some mailing-lists put a tag in the subject, but nobody
    removes that for a private reply.
    
    
    > I've been using this for years and aside from some general list/email
    > issues it has worked as advertised.
    
    Maybe you like the way it works. I find it useless, because it does
    exactly the opposite of what I would want it to do (but I know that
    that's impossible).
    
            hp
    
    -- 
       _  | Peter J. Holzer    | Story must make more sense than reality.
    |_|_) |                    |
    | |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
    __/   | http://www.hjp.at/ |       challenge!"